playbook_ui 15.3.0.pre.alpha.play262912095 → 15.3.0.pre.rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +5 -5
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +3 -18
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +14 -71
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +3 -12
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +5 -127
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +0 -28
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -11
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +1 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/index.js +8 -12
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +6 -79
- data/app/pb_kits/playbook/pb_background/background.html.erb +2 -10
- data/app/pb_kits/playbook/pb_background/docs/_background_category.md +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +4 -4
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -4
- data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -20
- data/app/pb_kits/playbook/pb_currency/currency.rb +8 -35
- data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -47
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +30 -11
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.md +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md +0 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -10
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/formHelper.js +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.md +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.md +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +14 -7
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +15 -6
- data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.md +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +6 -8
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +1 -73
- data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +0 -47
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -25
- data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +34 -69
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_popover/popover.test.js +0 -80
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +2 -41
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +20 -60
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +0 -36
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.test.js +1 -127
- data/app/pb_kits/playbook/pb_section_separator/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -29
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_react.md +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sm.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -76
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -85
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -2
- data/app/pb_kits/playbook/tokens/_positioning.scss +0 -1
- data/app/pb_kits/playbook/utilities/_positioning.scss +1 -6
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -3
- data/dist/chunks/{_line_graph-CqE0-dq5.js → _line_graph-DY4PK6AH.js} +1 -1
- data/dist/chunks/_typeahead-fQDb_yVO.js +6 -0
- data/dist/chunks/{_weekday_stacked-W1kKx2Gl.js → _weekday_stacked-D_bGbWtk.js} +3 -3
- data/dist/chunks/{lib-CGxXTQ75.js → lib-QZuu1ltS.js} +1 -1
- data/dist/chunks/{pb_form_validation-DebqlUKZ.js → pb_form_validation-CleM960_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -12
- data/dist/playbook-doc.js +2 -2
- 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/pb_forms_helper.rb +6 -7
- data/lib/playbook/version.rb +2 -2
- data/lib/playbook/z_index.rb +1 -1
- metadata +8 -101
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +0 -51
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +0 -42
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +0 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.scss +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.tsx +0 -69
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.html.erb +0 -12
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +0 -24
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +0 -5
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.html.erb +0 -45
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +0 -119
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.html.erb +0 -5
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.html.erb +0 -12
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.jsx +0 -24
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.html.erb +0 -23
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +0 -37
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.html.erb +0 -40
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +0 -56
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_live_data.jsx +0 -64
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.html.erb +0 -27
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +0 -40
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.html.erb +0 -19
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.jsx +0 -65
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.html.erb +0 -14
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.jsx +0 -27
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.html.erb +0 -39
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +0 -58
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/example.yml +0 -29
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pbGaugeGraphTheme.ts +0 -91
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.rb +0 -25
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +0 -80
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.scss +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.tsx +0 -61
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +0 -52
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +0 -5
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +0 -47
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +0 -64
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +0 -24
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +0 -37
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +0 -39
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +0 -86
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +0 -116
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +0 -11
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +0 -20
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_pb_line_graph/pbLineGraphTheme.ts +0 -125
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.rb +0 -25
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +0 -110
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +0 -68
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx +0 -34
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +0 -69
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.html.erb +0 -63
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx +0 -89
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md +0 -4
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md +0 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +0 -64
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +0 -70
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.html.erb +0 -102
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.jsx +0 -103
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.md +0 -1
- data/dist/chunks/_typeahead-3ZAbZUqU.js +0 -6
- /data/app/pb_kits/playbook/pb_popover/docs/{_popover_append_to_rails.md → _popover_append_to.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: 923e49d3ee86d5e4c40329476d18f0ddf6624341de26ff6bfb459b47511b6e7b
|
|
4
|
+
data.tar.gz: '087cf99671b19f164e1051dc1ec762e67e85307eda369df19c49b0d270b19ea0'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf78055ba2a71ad2e53506ededf079046677b6d50df2cd94d7bc7ac9150a5b643c9fc8415f755009eb99d8dd2375f82ecbd1847a039111854ad0fa7b4fc819f3
|
|
7
|
+
data.tar.gz: 76c1afb64e8a7afc52298a617106c118507c0b88639a0333b78963a66b6abc0f9f1d6434d46fdae13b3c1ae3be76462bbd78addd104fd0ec38ac3a5898b1894c
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
2
4
|
@import 'pb_advanced_table/advanced_table';
|
|
3
5
|
@import 'pb_avatar/avatar';
|
|
4
6
|
@import 'pb_background/background';
|
|
@@ -31,7 +33,6 @@
|
|
|
31
33
|
@import 'pb_distribution_bar/distribution_bar';
|
|
32
34
|
@import 'pb_draggable/draggable';
|
|
33
35
|
@import 'pb_dropdown/dropdown';
|
|
34
|
-
@import 'pb_empty_state/empty_state';
|
|
35
36
|
@import 'pb_file_upload/file_upload';
|
|
36
37
|
@import 'pb_filter/filter';
|
|
37
38
|
@import 'pb_fixed_confirmation_toast/fixed_confirmation_toast';
|
|
@@ -69,10 +70,6 @@
|
|
|
69
70
|
@import 'pb_overlay/overlay';
|
|
70
71
|
@import 'pb_pagination/pagination';
|
|
71
72
|
@import 'pb_passphrase/passphrase';
|
|
72
|
-
@import 'pb_pb_bar_graph/pb_bar_graph';
|
|
73
|
-
@import 'pb_pb_circle_chart/pb_circle_chart';
|
|
74
|
-
@import 'pb_pb_gauge_chart/pb_gauge_chart';
|
|
75
|
-
@import 'pb_pb_line_graph/pb_line_graph';
|
|
76
73
|
@import 'pb_person/person';
|
|
77
74
|
@import 'pb_person_contact/person_contact';
|
|
78
75
|
@import 'pb_phone_number_input/phone_number_input';
|
|
@@ -111,6 +108,9 @@
|
|
|
111
108
|
@import 'pb_user/user';
|
|
112
109
|
@import 'pb_user_badge/user_badge';
|
|
113
110
|
@import 'pb_weekday_stacked/weekday_stacked';
|
|
111
|
+
@import 'pb_empty_state/empty_state';
|
|
112
|
+
@import 'pb_pb_bar_graph/pb_bar_graph';
|
|
113
|
+
@import 'pb_pb_circle_chart/pb_circle_chart';
|
|
114
114
|
@import 'utilities/mixins';
|
|
115
115
|
@import 'utilities/spacing';
|
|
116
116
|
@import 'utilities/cursor';
|
|
@@ -66,7 +66,6 @@ const TableCellRenderer = ({
|
|
|
66
66
|
// Find the “owning” colDefinition by accessor. Needed for multi column logic
|
|
67
67
|
const colDef = findColumnDefByAccessor(columnDefinitions ?? [], column.id)
|
|
68
68
|
const cellAlignment = colDef?.columnStyling?.cellAlignment ?? "right"
|
|
69
|
-
const cellFontColor = colDef?.columnStyling?.fontColor
|
|
70
69
|
const paddingValue = colDef?.columnStyling?.cellPadding ?? customRowStyle?.cellPadding
|
|
71
70
|
const paddingClass = paddingValue ? `p_${paddingValue}` : undefined
|
|
72
71
|
|
|
@@ -89,7 +88,7 @@ const TableCellRenderer = ({
|
|
|
89
88
|
: `${column.getStart("left")}px`
|
|
90
89
|
: undefined,
|
|
91
90
|
backgroundColor: i === 0 && customRowStyle?.backgroundColor,
|
|
92
|
-
color:
|
|
91
|
+
color: customRowStyle?.fontColor,
|
|
93
92
|
}}
|
|
94
93
|
>
|
|
95
94
|
{collapsibleTrail && i === 0 && row.depth > 0 && renderCollapsibleTrail(row.depth)}
|
|
@@ -30,7 +30,6 @@ type TableHeaderCellProps = {
|
|
|
30
30
|
headerChildren?: React.ReactNode | React.ReactNode[]
|
|
31
31
|
isPinnedLeft?: boolean
|
|
32
32
|
loading?: boolean
|
|
33
|
-
persistToggleExpansionButton?: boolean
|
|
34
33
|
sortIcon?: string | string[]
|
|
35
34
|
table?: Table<GenericObject>
|
|
36
35
|
} & GlobalProps
|
|
@@ -59,7 +58,6 @@ export const TableHeaderCell = ({
|
|
|
59
58
|
selectableRows,
|
|
60
59
|
hasAnySubRows,
|
|
61
60
|
showActionsBar,
|
|
62
|
-
persistToggleExpansionButton,
|
|
63
61
|
stickyLeftColumn,
|
|
64
62
|
inlineRowLoading,
|
|
65
63
|
isActionBarVisible,
|
|
@@ -222,7 +220,7 @@ const isToggleExpansionEnabled =
|
|
|
222
220
|
/>
|
|
223
221
|
)
|
|
224
222
|
}
|
|
225
|
-
{isToggleExpansionEnabled &&
|
|
223
|
+
{isToggleExpansionEnabled && hasAnySubRows && !expandByDepth && (
|
|
226
224
|
<ToggleIconButton onClick={handleExpandOrCollapse} />
|
|
227
225
|
)}
|
|
228
226
|
{isToggleExpansionEnabled && hasAnySubRows && expandByDepth && (
|
|
@@ -9,9 +9,6 @@ interface UseTableActionsProps {
|
|
|
9
9
|
setExpanded: (expanded: GenericObject) => void;
|
|
10
10
|
onToggleExpansionClick?: (arg: Row<GenericObject>) => void;
|
|
11
11
|
onRowSelectionChange?: (rowSelection: any) => void;
|
|
12
|
-
inlineRowLoading?: boolean;
|
|
13
|
-
localPagination?: { pageIndex: number; pageSize: number };
|
|
14
|
-
setLocalPagination?: (pagination: { pageIndex: number; pageSize: number }) => void;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
export function useTableActions({
|
|
@@ -19,10 +16,7 @@ export function useTableActions({
|
|
|
19
16
|
expanded,
|
|
20
17
|
setExpanded,
|
|
21
18
|
onToggleExpansionClick,
|
|
22
|
-
onRowSelectionChange
|
|
23
|
-
inlineRowLoading = false,
|
|
24
|
-
localPagination,
|
|
25
|
-
setLocalPagination
|
|
19
|
+
onRowSelectionChange
|
|
26
20
|
}: UseTableActionsProps) {
|
|
27
21
|
|
|
28
22
|
// State to achieve 1 second delay before fetching more rows
|
|
@@ -44,17 +38,8 @@ export function useTableActions({
|
|
|
44
38
|
|
|
45
39
|
// Handle pagination
|
|
46
40
|
const onPageChange = useCallback((page: number) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
setLocalPagination({
|
|
50
|
-
...localPagination,
|
|
51
|
-
pageIndex: page - 1
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
// Use tanstack's built-in pagination
|
|
55
|
-
table.setPageIndex(page - 1);
|
|
56
|
-
}
|
|
57
|
-
}, [table, inlineRowLoading, setLocalPagination, localPagination]);
|
|
41
|
+
table.setPageIndex(page - 1);
|
|
42
|
+
}, [table]);
|
|
58
43
|
|
|
59
44
|
// Handle scroll detection for infinite scroll/virtualization
|
|
60
45
|
const fetchMoreOnBottomReached = useCallback((
|
|
@@ -35,7 +35,6 @@ interface UseTableStateProps {
|
|
|
35
35
|
onRowSelectionChange?: (arg: RowSelectionState) => void;
|
|
36
36
|
columnVisibilityControl?: GenericObject;
|
|
37
37
|
rowStyling?: GenericObject;
|
|
38
|
-
inlineRowLoading?: boolean;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
export function useTableState({
|
|
@@ -54,8 +53,7 @@ export function useTableState({
|
|
|
54
53
|
tableOptions,
|
|
55
54
|
columnVisibilityControl,
|
|
56
55
|
pinnedRows,
|
|
57
|
-
rowStyling
|
|
58
|
-
inlineRowLoading = false
|
|
56
|
+
rowStyling
|
|
59
57
|
}: UseTableStateProps) {
|
|
60
58
|
|
|
61
59
|
// Create a local state for expanded and setExpanded if expandedControl not used
|
|
@@ -66,12 +64,6 @@ export function useTableState({
|
|
|
66
64
|
const [localRowPinning, setLocalRowPinning] = useState<RowPinningState>({
|
|
67
65
|
top: [],
|
|
68
66
|
});
|
|
69
|
-
// Manage local state to preserve current page index when inlineRowLoading is enabled so it does not boot table to page 1
|
|
70
|
-
// We can extend this for more usecases, but for now scoping it only for inlineRowLoading
|
|
71
|
-
const [localPagination, setLocalPagination] = useState({
|
|
72
|
-
pageIndex: paginationProps?.pageIndex ?? 0,
|
|
73
|
-
pageSize: paginationProps?.pageSize ?? 20,
|
|
74
|
-
});
|
|
75
67
|
// Determine whether to use the prop or the local state
|
|
76
68
|
const expanded = expandedControl ? expandedControl.value : localExpanded;
|
|
77
69
|
const setExpanded = expandedControl ? expandedControl.onChange : setLocalExpanded;
|
|
@@ -141,7 +133,6 @@ export function useTableState({
|
|
|
141
133
|
...(selectableRows && { rowSelection }),
|
|
142
134
|
...(columnVisibility && { columnVisibility }),
|
|
143
135
|
...(pinnedRows && { rowPinning }),
|
|
144
|
-
...(inlineRowLoading && { pagination: localPagination }),
|
|
145
136
|
},
|
|
146
137
|
}), [
|
|
147
138
|
expanded,
|
|
@@ -151,36 +142,23 @@ export function useTableState({
|
|
|
151
142
|
rowSelection,
|
|
152
143
|
columnVisibility,
|
|
153
144
|
rowPinning,
|
|
154
|
-
inlineRowLoading,
|
|
155
|
-
localPagination
|
|
156
145
|
]);
|
|
157
146
|
|
|
158
147
|
// Pagination configuration
|
|
159
148
|
const paginationInitializer = useMemo(() => {
|
|
160
149
|
if (!pagination) return {};
|
|
161
150
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
};
|
|
170
|
-
} else {
|
|
171
|
-
// Use normal pagination initialization for non- inlineRowLoading usecases
|
|
172
|
-
return {
|
|
173
|
-
getPaginationRowModel: getPaginationRowModel(),
|
|
174
|
-
paginateExpandedRows: false,
|
|
175
|
-
initialState: {
|
|
176
|
-
pagination: {
|
|
177
|
-
pageIndex: paginationProps?.pageIndex ?? 0,
|
|
178
|
-
pageSize: paginationProps?.pageSize ?? 20,
|
|
179
|
-
},
|
|
151
|
+
return {
|
|
152
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
153
|
+
paginateExpandedRows: false,
|
|
154
|
+
initialState: {
|
|
155
|
+
pagination: {
|
|
156
|
+
pageIndex: paginationProps?.pageIndex ?? 0,
|
|
157
|
+
pageSize: paginationProps?.pageSize ?? 20,
|
|
180
158
|
},
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}, [pagination, paginationProps
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
}, [pagination, paginationProps]);
|
|
184
162
|
|
|
185
163
|
// Initialize the table
|
|
186
164
|
const table = useReactTable({
|
|
@@ -228,42 +206,9 @@ export function useTableState({
|
|
|
228
206
|
// Set pagination state when pagination is enabled
|
|
229
207
|
useEffect(() => {
|
|
230
208
|
if (pagination && paginationProps?.pageSize) {
|
|
231
|
-
|
|
232
|
-
// Update local pagination state for inlineRowLoading
|
|
233
|
-
setLocalPagination(prev => ({
|
|
234
|
-
...prev,
|
|
235
|
-
pageSize: paginationProps.pageSize
|
|
236
|
-
}));
|
|
237
|
-
} else {
|
|
238
|
-
table.setPageSize(paginationProps.pageSize);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}, [pagination, paginationProps?.pageSize, table, inlineRowLoading]);
|
|
242
|
-
|
|
243
|
-
// Update local pagination when paginationProps change and inlineRowLoading is enabled
|
|
244
|
-
useEffect(() => {
|
|
245
|
-
if (pagination && inlineRowLoading && paginationProps) {
|
|
246
|
-
setLocalPagination({
|
|
247
|
-
pageIndex: paginationProps.pageIndex ?? localPagination.pageIndex,
|
|
248
|
-
pageSize: paginationProps.pageSize ?? localPagination.pageSize,
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}, [pagination, inlineRowLoading, paginationProps?.pageIndex, paginationProps?.pageSize]);
|
|
252
|
-
|
|
253
|
-
// Call the callback with the new page index when localPagination.pageIndex changes (with inlineRowLoading)
|
|
254
|
-
useEffect(() => {
|
|
255
|
-
if (pagination && inlineRowLoading && paginationProps?.onPageChange) {
|
|
256
|
-
paginationProps.onPageChange(localPagination.pageIndex);
|
|
257
|
-
}
|
|
258
|
-
}, [localPagination.pageIndex, pagination, inlineRowLoading, paginationProps]);
|
|
259
|
-
|
|
260
|
-
// Call the callback with the new page index when localPagination.pageIndex changes (without inlineRowLoading)
|
|
261
|
-
useEffect(() => {
|
|
262
|
-
if (pagination && !inlineRowLoading && paginationProps?.onPageChange) {
|
|
263
|
-
const currentPageIndex = table.getState().pagination.pageIndex;
|
|
264
|
-
paginationProps.onPageChange(currentPageIndex);
|
|
209
|
+
table.setPageSize(paginationProps.pageSize);
|
|
265
210
|
}
|
|
266
|
-
}, [
|
|
211
|
+
}, [pagination, paginationProps?.pageSize, table]);
|
|
267
212
|
|
|
268
213
|
// Check if table has any sub-rows
|
|
269
214
|
const hasAnySubRows = table.getRowModel().rows.some(row => row.subRows && row.subRows.length > 0);
|
|
@@ -302,8 +247,6 @@ export function useTableState({
|
|
|
302
247
|
rowSelection,
|
|
303
248
|
fullData,
|
|
304
249
|
totalFetched,
|
|
305
|
-
isFetching
|
|
306
|
-
localPagination,
|
|
307
|
-
setLocalPagination
|
|
250
|
+
isFetching
|
|
308
251
|
};
|
|
309
252
|
}
|
|
@@ -39,7 +39,6 @@ export const TableHeader = ({
|
|
|
39
39
|
hasAnySubRows,
|
|
40
40
|
showActionsBar,
|
|
41
41
|
selectableRows,
|
|
42
|
-
persistToggleExpansionButton,
|
|
43
42
|
responsive,
|
|
44
43
|
headerRef,
|
|
45
44
|
virtualizedRows,
|
|
@@ -93,7 +92,6 @@ export const TableHeader = ({
|
|
|
93
92
|
isPinnedLeft={isPinnedLeft}
|
|
94
93
|
key={`${header.id}-header`}
|
|
95
94
|
loading={loading}
|
|
96
|
-
persistToggleExpansionButton={persistToggleExpansionButton}
|
|
97
95
|
sortIcon={sortIcon}
|
|
98
96
|
table={table}
|
|
99
97
|
/>
|
|
@@ -138,7 +136,6 @@ export const TableHeader = ({
|
|
|
138
136
|
isVirtualized
|
|
139
137
|
key={`${header.id}-header-virtualized`}
|
|
140
138
|
loading={loading}
|
|
141
|
-
persistToggleExpansionButton={persistToggleExpansionButton}
|
|
142
139
|
sortIcon={sortIcon}
|
|
143
140
|
table={table}
|
|
144
141
|
/>
|
|
@@ -17,7 +17,7 @@ export const getRowColorClass = (
|
|
|
17
17
|
(inlineRowLoading && (rowHasNoChildren || row.getCanExpand()))
|
|
18
18
|
);
|
|
19
19
|
|
|
20
|
-
return row.getIsSelected() ? "bg-row-selection" : shouldShowExpandedBackground ? "bg-silver" : "
|
|
20
|
+
return row.getIsSelected() ? "bg-row-selection" : shouldShowExpandedBackground ? "bg-silver" : "bg-white";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
background-color: lighten($silver, $opacity_7);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
.bg-white {
|
|
55
55
|
background-color: $white;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
&.
|
|
281
|
+
&.bg-white {
|
|
282
282
|
td:first-child {
|
|
283
283
|
background-color: $white;
|
|
284
284
|
}
|
|
@@ -756,7 +756,7 @@
|
|
|
756
756
|
border-bottom-color: $border_dark !important;
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
-
.
|
|
759
|
+
.bg-white {
|
|
760
760
|
background: $bg_dark_card;
|
|
761
761
|
}
|
|
762
762
|
|
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
|
|
767
767
|
// Dark mode virtualized rows
|
|
768
768
|
.virtualized-table-row {
|
|
769
|
-
&.
|
|
769
|
+
&.bg-white {
|
|
770
770
|
background: $bg_dark_card !important;
|
|
771
771
|
|
|
772
772
|
td:first-child {
|
|
@@ -63,7 +63,6 @@ type AdvancedTableProps = {
|
|
|
63
63
|
scrollBarNone?: boolean,
|
|
64
64
|
selectableRows?: boolean,
|
|
65
65
|
showActionsBar?: boolean,
|
|
66
|
-
persistToggleExpansionButton?: boolean,
|
|
67
66
|
sortControl?: GenericObject
|
|
68
67
|
tableData: GenericObject[]
|
|
69
68
|
tableOptions?: GenericObject
|
|
@@ -110,7 +109,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
110
109
|
scrollBarNone= false,
|
|
111
110
|
showActionsBar = true,
|
|
112
111
|
selectableRows,
|
|
113
|
-
persistToggleExpansionButton = false,
|
|
114
112
|
sortControl,
|
|
115
113
|
stickyLeftColumn,
|
|
116
114
|
tableData,
|
|
@@ -136,9 +134,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
136
134
|
updateLoadingStateRowCount,
|
|
137
135
|
fullData,
|
|
138
136
|
totalFetched,
|
|
139
|
-
isFetching
|
|
140
|
-
localPagination,
|
|
141
|
-
setLocalPagination
|
|
137
|
+
isFetching
|
|
142
138
|
} = useTableState({
|
|
143
139
|
tableData,
|
|
144
140
|
columnDefinitions,
|
|
@@ -156,8 +152,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
156
152
|
onRowSelectionChange,
|
|
157
153
|
columnVisibilityControl,
|
|
158
154
|
pinnedRows,
|
|
159
|
-
rowStyling
|
|
160
|
-
inlineRowLoading
|
|
155
|
+
rowStyling
|
|
161
156
|
});
|
|
162
157
|
|
|
163
158
|
// Initialize table actions
|
|
@@ -170,10 +165,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
170
165
|
expanded,
|
|
171
166
|
setExpanded,
|
|
172
167
|
onToggleExpansionClick,
|
|
173
|
-
onRowSelectionChange
|
|
174
|
-
inlineRowLoading,
|
|
175
|
-
localPagination,
|
|
176
|
-
setLocalPagination
|
|
168
|
+
onRowSelectionChange
|
|
177
169
|
});
|
|
178
170
|
|
|
179
171
|
// Set table row count for loading state
|
|
@@ -357,7 +349,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
357
349
|
loading={loading}
|
|
358
350
|
onCustomSortClick={onCustomSortClick}
|
|
359
351
|
onExpandByDepthClick={onExpandByDepthClick}
|
|
360
|
-
persistToggleExpansionButton={persistToggleExpansionButton}
|
|
361
352
|
pinnedRows={pinnedRows}
|
|
362
353
|
responsive={responsive}
|
|
363
354
|
rowStyling={rowStyling}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<% if content.present? %>
|
|
12
12
|
<% content.presence %>
|
|
13
13
|
<% else %>
|
|
14
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
15
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
14
|
+
<%= pb_rails("advanced_table/table_header", props: { id: object.id, column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion, responsive: object.responsive, loading: object.loading, selectable_rows: object.selectable_rows, show_actions_bar: object.show_actions_bar }) %>
|
|
15
|
+
<%= 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, selectable_rows: object.selectable_rows, enable_toggle_expansion: object.enable_toggle_expansion, row_styling: object.row_styling }) %>
|
|
16
16
|
<% end %>
|
|
17
17
|
<% end %>
|
|
18
18
|
<% end %>
|
|
@@ -108,48 +108,6 @@ const MOCK_DATA_WITH_ID = [
|
|
|
108
108
|
},
|
|
109
109
|
]
|
|
110
110
|
|
|
111
|
-
const MOCK_DATA_NO_SUBROWS = [
|
|
112
|
-
{
|
|
113
|
-
year: "2021",
|
|
114
|
-
quarter: null,
|
|
115
|
-
month: null,
|
|
116
|
-
day: null,
|
|
117
|
-
newEnrollments: "20",
|
|
118
|
-
scheduledMeetings: "10",
|
|
119
|
-
attendanceRate: "51%",
|
|
120
|
-
completedClasses: "3",
|
|
121
|
-
classCompletionRate: "33%",
|
|
122
|
-
graduatedStudents: "19",
|
|
123
|
-
children: [],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
year: "2022",
|
|
127
|
-
quarter: null,
|
|
128
|
-
month: null,
|
|
129
|
-
day: null,
|
|
130
|
-
newEnrollments: "25",
|
|
131
|
-
scheduledMeetings: "17",
|
|
132
|
-
attendanceRate: "75%",
|
|
133
|
-
completedClasses: "5",
|
|
134
|
-
classCompletionRate: "45%",
|
|
135
|
-
graduatedStudents: "32",
|
|
136
|
-
children: [],
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
year: "2023",
|
|
140
|
-
quarter: null,
|
|
141
|
-
month: null,
|
|
142
|
-
day: null,
|
|
143
|
-
newEnrollments: "30",
|
|
144
|
-
scheduledMeetings: "22",
|
|
145
|
-
attendanceRate: "80%",
|
|
146
|
-
completedClasses: "7",
|
|
147
|
-
classCompletionRate: "55%",
|
|
148
|
-
graduatedStudents: "45",
|
|
149
|
-
children: [],
|
|
150
|
-
},
|
|
151
|
-
]
|
|
152
|
-
|
|
153
111
|
const columnDefinitions = [
|
|
154
112
|
{
|
|
155
113
|
accessor: "year",
|
|
@@ -308,10 +266,10 @@ test("Row toggle button exists and toggles subrows open and closed", () => {
|
|
|
308
266
|
const kit = screen.getByTestId(testId)
|
|
309
267
|
const rowButton = kit.querySelector(".gray-icon.expand-toggle-icon")
|
|
310
268
|
expect(rowButton).toBeInTheDocument()
|
|
311
|
-
const subRow1 = kit.querySelector(".
|
|
269
|
+
const subRow1 = kit.querySelector(".bg-white.depth-sub-row-1")
|
|
312
270
|
expect(subRow1).not.toBeInTheDocument()
|
|
313
271
|
rowButton.click()
|
|
314
|
-
const subRow = kit.querySelector(".
|
|
272
|
+
const subRow = kit.querySelector(".bg-white.depth-sub-row-1")
|
|
315
273
|
expect(subRow).toBeInTheDocument()
|
|
316
274
|
})
|
|
317
275
|
|
|
@@ -328,13 +286,13 @@ test("toggleExpansionAll button exists and toggles subrows open and closed", asy
|
|
|
328
286
|
const toggleButton = kit.querySelector(".gray-icon.toggle-all-icon");
|
|
329
287
|
expect(toggleButton).toBeInTheDocument();
|
|
330
288
|
|
|
331
|
-
const subRow1 = kit.querySelector(".
|
|
289
|
+
const subRow1 = kit.querySelector(".bg-white.depth-sub-row-1");
|
|
332
290
|
expect(subRow1).not.toBeInTheDocument();
|
|
333
291
|
|
|
334
292
|
toggleButton.click();
|
|
335
293
|
|
|
336
294
|
await waitFor(() => {
|
|
337
|
-
const subRow = kit.querySelector(".
|
|
295
|
+
const subRow = kit.querySelector(".bg-white.depth-sub-row-1");
|
|
338
296
|
expect(subRow).toBeInTheDocument();
|
|
339
297
|
})
|
|
340
298
|
})
|
|
@@ -385,7 +343,7 @@ test("expandControl prop works as expected", () => {
|
|
|
385
343
|
render (<AdvancedTableExpandControl/>)
|
|
386
344
|
|
|
387
345
|
const kit = screen.getByTestId(testId)
|
|
388
|
-
const subRow = kit.querySelector(".
|
|
346
|
+
const subRow = kit.querySelector(".bg-white.depth-sub-row-1")
|
|
389
347
|
expect(subRow).toBeInTheDocument()
|
|
390
348
|
})
|
|
391
349
|
|
|
@@ -551,23 +509,6 @@ test("inlineRowLoading prop renders inline loading if true", () => {
|
|
|
551
509
|
expect(inlineLoading).toBeInTheDocument()
|
|
552
510
|
})
|
|
553
511
|
|
|
554
|
-
test("persistToggleExpansionButton prop shows header toggle when inlineRowLoading is true", () => {
|
|
555
|
-
render(
|
|
556
|
-
<AdvancedTable
|
|
557
|
-
columnDefinitions={columnDefinitions}
|
|
558
|
-
data={{ testid: testId }}
|
|
559
|
-
enableToggleExpansion="all"
|
|
560
|
-
inlineRowLoading
|
|
561
|
-
persistToggleExpansionButton
|
|
562
|
-
tableData={MOCK_DATA_NO_SUBROWS}
|
|
563
|
-
/>
|
|
564
|
-
)
|
|
565
|
-
|
|
566
|
-
const kit = screen.getByTestId(testId)
|
|
567
|
-
const headerToggleButton = kit.querySelector(".gray-icon.toggle-all-icon")
|
|
568
|
-
expect(headerToggleButton).toBeInTheDocument()
|
|
569
|
-
})
|
|
570
|
-
|
|
571
512
|
test("responsive prop functions as expected", () => {
|
|
572
513
|
render(
|
|
573
514
|
<AdvancedTable
|
|
@@ -740,69 +681,6 @@ test("columnStyling.cellPadding sets cell padding", () => {
|
|
|
740
681
|
expect(firstEnrollmentCell).toHaveClass('p_none')
|
|
741
682
|
});
|
|
742
683
|
|
|
743
|
-
test("columnStyling.fontColor sets cell font color", () => {
|
|
744
|
-
const styledColumnDefs = [
|
|
745
|
-
{
|
|
746
|
-
accessor: "year",
|
|
747
|
-
label: "Year",
|
|
748
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
accessor: "newEnrollments",
|
|
752
|
-
label: "New Enrollments",
|
|
753
|
-
columnStyling: { fontColor: colors.category_1 },
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
accessor: "scheduledMeetings",
|
|
757
|
-
label: "Scheduled Meetings",
|
|
758
|
-
},
|
|
759
|
-
];
|
|
760
|
-
|
|
761
|
-
render(
|
|
762
|
-
<AdvancedTable
|
|
763
|
-
columnDefinitions={styledColumnDefs}
|
|
764
|
-
data={{ testid: testId }}
|
|
765
|
-
tableData={MOCK_DATA}
|
|
766
|
-
/>
|
|
767
|
-
);
|
|
768
|
-
|
|
769
|
-
const firstEnrollmentCell = screen.getAllByText("20")[0].closest("td");
|
|
770
|
-
expect(firstEnrollmentCell).toHaveStyle({ color: colors.category_1 });
|
|
771
|
-
});
|
|
772
|
-
|
|
773
|
-
test("columnStyling.fontColor works with background color", () => {
|
|
774
|
-
const styledColumnDefs = [
|
|
775
|
-
{
|
|
776
|
-
accessor: "year",
|
|
777
|
-
label: "Year",
|
|
778
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
779
|
-
},
|
|
780
|
-
{
|
|
781
|
-
accessor: "newEnrollments",
|
|
782
|
-
label: "New Enrollments",
|
|
783
|
-
columnStyling: {
|
|
784
|
-
cellBackgroundColor: (row) => row.newEnrollments > 20 ? "success_secondary" : "warning_secondary",
|
|
785
|
-
fontColor: colors.white
|
|
786
|
-
},
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
accessor: "scheduledMeetings",
|
|
790
|
-
label: "Scheduled Meetings",
|
|
791
|
-
},
|
|
792
|
-
];
|
|
793
|
-
|
|
794
|
-
render(
|
|
795
|
-
<AdvancedTable
|
|
796
|
-
columnDefinitions={styledColumnDefs}
|
|
797
|
-
data={{ testid: testId }}
|
|
798
|
-
tableData={MOCK_DATA}
|
|
799
|
-
/>
|
|
800
|
-
);
|
|
801
|
-
|
|
802
|
-
const firstEnrollmentCell = screen.getAllByText("20")[0].closest("td");
|
|
803
|
-
expect(firstEnrollmentCell).toHaveStyle({ color: colors.white });
|
|
804
|
-
});
|
|
805
|
-
|
|
806
684
|
test("renders virtualized table rows and header", () => {
|
|
807
685
|
render(
|
|
808
686
|
<AdvancedTable
|
|
@@ -2,9 +2,7 @@ The AdvancedTable kit accepts tree data and automatically renders expansion cont
|
|
|
2
2
|
|
|
3
3
|
### id
|
|
4
4
|
|
|
5
|
-
A unique `id` is required to allow the table functionality to work properly. Without it, certain functions like the action bar
|
|
6
|
-
|
|
7
|
-
You must also set `table_id` when using subcomponents like `table_header` or `table_body`.
|
|
5
|
+
A unique `id` is required to allow the table functionality to work properly. Without it, certain functions like the action bar will not be able to properly reference the correct table.
|
|
8
6
|
|
|
9
7
|
### table_data
|
|
10
8
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
]
|
|
52
52
|
%>
|
|
53
53
|
|
|
54
|
-
<%= pb_rails("advanced_table", props: {
|
|
55
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
56
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
54
|
+
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "beta_sort" }) do %>
|
|
55
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
|
56
|
+
<%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, enable_toggle_expansion: "all" }) %>
|
|
57
57
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
subrow_headers = ["Quarter", "Month", "Day"]
|
|
35
35
|
%>
|
|
36
36
|
|
|
37
|
-
<%= pb_rails("advanced_table", props: {
|
|
38
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
39
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
37
|
+
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "test_table" }) do %>
|
|
38
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
|
39
|
+
<%= pb_rails("advanced_table/table_body", props: { id: "test_table", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
|
|
40
40
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb
CHANGED
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
] %>
|
|
32
32
|
|
|
33
33
|
<%= pb_rails("advanced_table", props: { id: "collapsible_trail", table_data: @table_data, column_definitions: column_definitions }) do %>
|
|
34
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
35
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
34
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
|
35
|
+
<%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions, collapsible_trail: false }) %>
|
|
36
36
|
<% end %>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
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
2
|
|
|
3
|
-
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/
|
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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
2
|
|
|
3
|
-
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/
|
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import
|
|
2
|
+
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
3
|
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
const AdvancedTableColumnStyling = (props) => {
|
|
7
6
|
const columnDefinitions = [
|
|
8
7
|
{
|
|
@@ -35,7 +34,6 @@ const AdvancedTableColumnStyling = (props) => {
|
|
|
35
34
|
{
|
|
36
35
|
accessor: "graduatedStudents",
|
|
37
36
|
label: "Graduated Students",
|
|
38
|
-
columnStyling:{fontColor: colors.data_8},
|
|
39
37
|
},
|
|
40
38
|
]
|
|
41
39
|
|