playbook_ui 15.7.0.pre.alpha.play270013399 → 15.7.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 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +0 -95
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +5 -11
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -57
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +6 -0
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +190 -0
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +31 -0
- data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +32 -0
- data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +106 -0
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +98 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +55 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +42 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +55 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +69 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +3 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +58 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +14 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +40 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +15 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +48 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +62 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +136 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +17 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +23 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +52 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +86 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +20 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +46 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +22 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +55 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +28 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts +2 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +16 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +222 -0
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +88 -0
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +10 -0
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +99 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +26 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +88 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +20 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +44 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +2 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +2 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +20 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +43 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +5 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +19 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +38 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +136 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +152 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +86 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +142 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +14 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +63 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +22 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +37 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +61 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +22 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +41 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +38 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +55 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +26 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +24 -51
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +19 -53
- data/app/pb_kits/playbook/pb_contact/contact.rb +1 -11
- data/app/pb_kits/playbook/pb_contact/contact.test.js +0 -76
- data/app/pb_kits/playbook/pb_contact/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +104 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +16 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +174 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +173 -0
- data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +20 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +4 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +14 -23
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +1 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -2
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog.rb +0 -1
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +0 -14
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +4 -5
- data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +0 -2
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +5 -7
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +0 -4
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +5 -39
- data/app/pb_kits/playbook/pb_dropdown/index.js +3 -171
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx +3 -3
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +7 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +8 -3
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -2
- data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +49 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +209 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +12 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +36 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +2 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +2 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +32 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +146 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +11 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +30 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +12 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +36 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +14 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +49 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +15 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +62 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +76 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +15 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +54 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +27 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +80 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +2 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +14 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +38 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +29 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +72 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +27 -0
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_gauge/gauge.html.erb +2 -0
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +56 -0
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +35 -0
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +91 -0
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.scss +3 -0
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +160 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +26 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +56 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +2 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +3 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +26 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +52 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +26 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +70 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +3 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +15 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +43 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +16 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +49 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +62 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +129 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +14 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +18 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +52 -0
- data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +30 -0
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +125 -0
- data/app/pb_kits/playbook/pb_line_graph/line_graph.html.erb +1 -0
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +93 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +1 -6
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +1 -6
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +1 -6
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +1 -6
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +2 -2
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +2 -3
- data/app/pb_kits/playbook/pb_table/_table.tsx +33 -187
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_table/table.html.erb +12 -68
- data/app/pb_kits/playbook/pb_table/table.rb +3 -22
- data/app/pb_kits/playbook/pb_table/table.test.js +0 -143
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +6 -56
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_text_input/index.js +8 -49
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +0 -6
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -7
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +0 -69
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +2 -38
- data/app/pb_kits/playbook/pb_textarea/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_textarea/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_textarea/index.ts +5 -62
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +0 -1
- data/app/pb_kits/playbook/pb_textarea/textarea.rb +0 -8
- data/app/pb_kits/playbook/pb_textarea/textarea.test.js +2 -57
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +0 -3
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_timeline/item.rb +0 -2
- data/app/pb_kits/playbook/pb_timeline/label.html.erb +1 -2
- data/app/pb_kits/playbook/pb_timeline/label.rb +0 -2
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -3
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -51
- data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
- data/dist/chunks/_typeahead-CYNrKU10.js +6 -0
- data/dist/chunks/lib-DDDLiZuu.js +29 -0
- data/dist/chunks/vendor.js +4 -4
- data/dist/menu.yml +31 -9
- 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/form_field_builder.rb +2 -15
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/pb_doc_helper.rb +0 -3
- data/lib/playbook/pb_kit_helper.rb +0 -35
- data/lib/playbook/version.rb +2 -2
- metadata +147 -92
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx +0 -54
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md +0 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx +0 -80
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md +0 -3
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +0 -33
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +0 -46
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +0 -2
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.html.erb +0 -24
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.jsx +0 -60
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.md +0 -3
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +0 -71
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +0 -57
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +0 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +0 -12
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +0 -26
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +0 -30
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +0 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +0 -29
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +0 -13
- data/app/pb_kits/playbook/pb_dropdown/quickpick_helper.rb +0 -75
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +0 -14
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +0 -134
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +0 -101
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +0 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +0 -180
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +0 -122
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +0 -3
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.html.erb +0 -7
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.jsx +0 -24
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.md +0 -2
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.html.erb +0 -6
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.jsx +0 -25
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.md +0 -3
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.html.erb +0 -5
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.jsx +0 -24
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/_time_picker.scss +0 -296
- data/app/pb_kits/playbook/pb_time_picker/_time_picker.tsx +0 -822
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.html.erb +0 -2
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.jsx +0 -16
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.jsx +0 -13
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.html.erb +0 -4
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.jsx +0 -29
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_disabled.html.erb +0 -13
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_disabled.jsx +0 -23
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_error.html.erb +0 -5
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_error.jsx +0 -15
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_input_options.html.erb +0 -14
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_label.html.erb +0 -2
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_label.jsx +0 -15
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.html.erb +0 -42
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.jsx +0 -52
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx +0 -45
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.html.erb +0 -3
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.jsx +0 -21
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/example.yml +0 -24
- data/app/pb_kits/playbook/pb_time_picker/docs/index.js +0 -9
- data/app/pb_kits/playbook/pb_time_picker/index.ts +0 -40
- data/app/pb_kits/playbook/pb_time_picker/time_picker.html.erb +0 -1
- data/app/pb_kits/playbook/pb_time_picker/time_picker.rb +0 -80
- data/app/pb_kits/playbook/pb_time_picker/time_picker.test.jsx +0 -114
- data/app/pb_kits/playbook/pb_time_picker/time_picker_helper.ts +0 -662
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.html.erb +0 -60
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.jsx +0 -118
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.md +0 -1
- data/app/pb_kits/playbook/utilities/deprecated.ts +0 -73
- data/app/pb_kits/playbook/utilities/emojiMask.ts +0 -42
- data/dist/chunks/_pb_line_graph-hxi01lk7.js +0 -1
- data/dist/chunks/_typeahead-CXDxFWiJ.js +0 -1
- data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
- data/dist/chunks/globalProps-DgYwLYNx.js +0 -6
- data/dist/chunks/lib-NLxTo8OB.js +0 -29
- data/lib/playbook/forms/builder/time_picker_field.rb +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fcd203ca2c6c310aa95e818199272a8730eba2c3cdc237405bf8b4426678be78
|
|
4
|
+
data.tar.gz: fb7eae7c6e74ceec237f663fd4c3f7706effff2009b79edbc9d6372319aa2b64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9bda1d76401b97c07eeeccb14e887f02b08a8e69ab256021756e7b4ad6488797d8a3523eaad710782b1c29b8727a5017f1926cbdd7b800a791dca57ba9273ea7
|
|
7
|
+
data.tar.gz: 12dfb9cd054c39b94936fdd71de6d2a92e9c920121fbf4f8a9bdc39d871ef19e7608063ac306c67577776c3edaab974d78c66ace6af6076b577f6bec97d531ac
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
|
|
1
2
|
@import 'pb_advanced_table/advanced_table';
|
|
2
3
|
@import 'pb_avatar/avatar';
|
|
3
4
|
@import 'pb_background/background';
|
|
4
5
|
@import 'pb_badge/badge';
|
|
6
|
+
@import 'pb_bar_graph/bar_graph';
|
|
5
7
|
@import 'pb_body/body';
|
|
6
8
|
@import 'pb_bread_crumbs/bread_crumbs';
|
|
7
9
|
@import 'pb_button/button';
|
|
@@ -9,6 +11,7 @@
|
|
|
9
11
|
@import 'pb_caption/caption';
|
|
10
12
|
@import 'pb_card/card';
|
|
11
13
|
@import 'pb_checkbox/checkbox';
|
|
14
|
+
@import 'pb_circle_chart/circle_chart';
|
|
12
15
|
@import 'pb_circle_icon_button/circle_icon_button';
|
|
13
16
|
@import 'pb_collapsible/collapsible';
|
|
14
17
|
@import 'pb_contact/contact';
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
@import 'pb_form/form';
|
|
37
40
|
@import 'pb_form_group/form_group';
|
|
38
41
|
@import 'pb_form_pill/form_pill';
|
|
42
|
+
@import 'pb_gauge/gauge';
|
|
39
43
|
@import 'pb_hashtag/hashtag';
|
|
40
44
|
@import 'pb_highlight/highlight';
|
|
41
45
|
@import 'pb_home_address_street/home_address_street';
|
|
@@ -50,6 +54,7 @@
|
|
|
50
54
|
@import 'pb_layout/layout';
|
|
51
55
|
@import 'pb_legend/legend';
|
|
52
56
|
@import 'pb_lightbox/lightbox';
|
|
57
|
+
@import 'pb_line_graph/line_graph';
|
|
53
58
|
@import 'pb_link/link';
|
|
54
59
|
@import 'pb_list/list';
|
|
55
60
|
@import 'pb_loading_inline/loading_inline';
|
|
@@ -93,7 +98,6 @@
|
|
|
93
98
|
@import 'pb_text_input/text_input';
|
|
94
99
|
@import 'pb_textarea/textarea';
|
|
95
100
|
@import 'pb_time/time';
|
|
96
|
-
@import 'pb_time_picker/time_picker';
|
|
97
101
|
@import 'pb_time_range_inline/time_range_inline';
|
|
98
102
|
@import 'pb_time_stacked/time_stacked';
|
|
99
103
|
@import 'pb_timeline/timeline';
|
|
@@ -63,11 +63,10 @@ const TableCellRenderer = ({
|
|
|
63
63
|
|
|
64
64
|
const { column } = cell;
|
|
65
65
|
|
|
66
|
-
// Find the
|
|
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
69
|
const cellFontColor = colDef?.columnStyling?.fontColor
|
|
70
|
-
const cellBackgroundColor = colDef?.columnStyling?.cellBackgroundColor
|
|
71
70
|
const paddingValue = colDef?.columnStyling?.cellPadding ?? customRowStyle?.cellPadding
|
|
72
71
|
const paddingClass = paddingValue ? `p_${paddingValue}` : undefined
|
|
73
72
|
|
|
@@ -89,7 +88,7 @@ const TableCellRenderer = ({
|
|
|
89
88
|
? '180px'
|
|
90
89
|
: `${column.getStart("left")}px`
|
|
91
90
|
: undefined,
|
|
92
|
-
backgroundColor:
|
|
91
|
+
backgroundColor: i === 0 && customRowStyle?.backgroundColor,
|
|
93
92
|
color: cellFontColor || customRowStyle?.fontColor,
|
|
94
93
|
}}
|
|
95
94
|
>
|
|
@@ -90,8 +90,6 @@ export const TableHeaderCell = ({
|
|
|
90
90
|
: undefined
|
|
91
91
|
|
|
92
92
|
const headerAlignment = colDef?.columnStyling?.headerAlignment ?? colDef?.columnStyling?.headerAligment
|
|
93
|
-
const headerBackgroundColor = colDef?.columnStyling?.headerBackgroundColor
|
|
94
|
-
const headerFontColor = colDef?.columnStyling?.headerFontColor
|
|
95
93
|
|
|
96
94
|
const isLeafColumn =
|
|
97
95
|
header?.column.getLeafColumns().length === 1 &&
|
|
@@ -196,8 +194,6 @@ const isToggleExpansionEnabled =
|
|
|
196
194
|
id={cellId}
|
|
197
195
|
key={`${header?.id}-header`}
|
|
198
196
|
style={{
|
|
199
|
-
backgroundColor: headerBackgroundColor,
|
|
200
|
-
color: headerFontColor,
|
|
201
197
|
left: isPinnedLeft
|
|
202
198
|
? header?.index === 1 //Accounting for set min-width for first column
|
|
203
199
|
? '180px'
|
|
@@ -888,98 +888,3 @@ test("Sort icon renders with enableSort on individual columns", () => {
|
|
|
888
888
|
expect(sortButton).toBeInTheDocument();
|
|
889
889
|
});
|
|
890
890
|
|
|
891
|
-
test("columnStyling.backgroundColor works as excpected", () => {
|
|
892
|
-
const styledColumnDefs = [
|
|
893
|
-
{
|
|
894
|
-
accessor: "year",
|
|
895
|
-
label: "Year",
|
|
896
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
accessor: "newEnrollments",
|
|
900
|
-
label: "New Enrollments",
|
|
901
|
-
columnStyling: {
|
|
902
|
-
cellBackgroundColor: colors.error_subtle,
|
|
903
|
-
},
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
accessor: "scheduledMeetings",
|
|
907
|
-
label: "Scheduled Meetings",
|
|
908
|
-
},
|
|
909
|
-
];
|
|
910
|
-
|
|
911
|
-
render(
|
|
912
|
-
<AdvancedTable
|
|
913
|
-
columnDefinitions={styledColumnDefs}
|
|
914
|
-
data={{ testid: testId }}
|
|
915
|
-
tableData={MOCK_DATA}
|
|
916
|
-
/>
|
|
917
|
-
);
|
|
918
|
-
|
|
919
|
-
const firstEnrollmentCell = screen.getAllByText("20")[0].closest("td");
|
|
920
|
-
expect(firstEnrollmentCell).toHaveStyle({ backgroundColor: colors.error_subtle });
|
|
921
|
-
});
|
|
922
|
-
|
|
923
|
-
test("columnStyling.headerBackgroundColor works as excpected", () => {
|
|
924
|
-
const styledColumnDefs = [
|
|
925
|
-
{
|
|
926
|
-
accessor: "year",
|
|
927
|
-
label: "Year",
|
|
928
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
accessor: "newEnrollments",
|
|
932
|
-
label: "New Enrollments",
|
|
933
|
-
columnStyling: {
|
|
934
|
-
headerBackgroundColor: colors.error_subtle,
|
|
935
|
-
},
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
accessor: "scheduledMeetings",
|
|
939
|
-
label: "Scheduled Meetings",
|
|
940
|
-
},
|
|
941
|
-
];
|
|
942
|
-
|
|
943
|
-
render(
|
|
944
|
-
<AdvancedTable
|
|
945
|
-
columnDefinitions={styledColumnDefs}
|
|
946
|
-
data={{ testid: testId }}
|
|
947
|
-
tableData={MOCK_DATA}
|
|
948
|
-
/>
|
|
949
|
-
);
|
|
950
|
-
|
|
951
|
-
const firstEnrollmentHeader = screen.getAllByText("New Enrollments")[0].closest("th");
|
|
952
|
-
expect(firstEnrollmentHeader).toHaveStyle({ backgroundColor: colors.error_subtle });
|
|
953
|
-
});
|
|
954
|
-
|
|
955
|
-
test("columnStyling.headerFontColor works as excpected", () => {
|
|
956
|
-
const styledColumnDefs = [
|
|
957
|
-
{
|
|
958
|
-
accessor: "year",
|
|
959
|
-
label: "Year",
|
|
960
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
961
|
-
},
|
|
962
|
-
{
|
|
963
|
-
accessor: "newEnrollments",
|
|
964
|
-
label: "New Enrollments",
|
|
965
|
-
columnStyling: {
|
|
966
|
-
headerFontColor: colors.white,
|
|
967
|
-
},
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
accessor: "scheduledMeetings",
|
|
971
|
-
label: "Scheduled Meetings",
|
|
972
|
-
},
|
|
973
|
-
];
|
|
974
|
-
|
|
975
|
-
render(
|
|
976
|
-
<AdvancedTable
|
|
977
|
-
columnDefinitions={styledColumnDefs}
|
|
978
|
-
data={{ testid: testId }}
|
|
979
|
-
tableData={MOCK_DATA}
|
|
980
|
-
/>
|
|
981
|
-
);
|
|
982
|
-
|
|
983
|
-
const firstEnrollmentHeader = screen.getAllByText("New Enrollments")[0].closest("th");
|
|
984
|
-
expect(firstEnrollmentHeader).toHaveStyle({ color: colors.white });
|
|
985
|
-
});
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb
CHANGED
|
@@ -8,26 +8,16 @@
|
|
|
8
8
|
accessor: "newEnrollments",
|
|
9
9
|
label: "New Enrollments",
|
|
10
10
|
column_styling: {
|
|
11
|
-
cell_background_color: "
|
|
12
|
-
header_background_color: "error_subtle"
|
|
11
|
+
cell_background_color: ->(row) { row[:newEnrollments].to_i > 20 ? "success_secondary" : "warning_secondary" }
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
{
|
|
16
15
|
accessor: "scheduledMeetings",
|
|
17
16
|
label: "Scheduled Meetings",
|
|
18
|
-
column_styling: {
|
|
19
|
-
cell_background_color: "info_subtle",
|
|
20
|
-
}
|
|
21
17
|
},
|
|
22
18
|
{
|
|
23
19
|
accessor: "attendanceRate",
|
|
24
20
|
label: "Attendance Rate",
|
|
25
|
-
column_styling: {
|
|
26
|
-
cell_background_color: "info",
|
|
27
|
-
header_background_color: "info",
|
|
28
|
-
header_font_color: "white",
|
|
29
|
-
font_color: "white"
|
|
30
|
-
}
|
|
31
21
|
},
|
|
32
22
|
{
|
|
33
23
|
accessor: "completedClasses",
|
|
@@ -36,6 +26,10 @@
|
|
|
36
26
|
{
|
|
37
27
|
accessor: "classCompletionRate",
|
|
38
28
|
label: "Class Completion Rate",
|
|
29
|
+
column_styling: {
|
|
30
|
+
cell_background_color: "category_1",
|
|
31
|
+
font_color: "white"
|
|
32
|
+
}
|
|
39
33
|
},
|
|
40
34
|
{
|
|
41
35
|
accessor: "graduatedStudents",
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
`column_styling` can also be used to control the background color on all cells in a given column
|
|
2
|
-
|
|
3
|
-
1) `cell_background_color`: use this to control the background color of all cells in the given column
|
|
4
|
-
2) `font_color`: use this to control font color for all cells in the given column if needed, for example if using a darker background color
|
|
5
|
-
3) `header_background_color`: use this to control the background color of the column header
|
|
6
|
-
4) `header_font_color`: use this to control font color for the header in the given column if needed, for example if using a darker background color.
|
|
7
|
-
|
|
1
|
+
`column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here. Use `font_color` to achieve better contrast between cell content and background for darker backgrounds.
|
|
@@ -26,8 +26,7 @@ examples:
|
|
|
26
26
|
- advanced_table_column_styling_rails: Column Styling
|
|
27
27
|
- advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
|
28
28
|
- advanced_table_padding_control_rails: Padding Control using Column Styling
|
|
29
|
-
- advanced_table_background_control_rails: Column Styling
|
|
30
|
-
- advanced_table_background_colors_rails: Column Styling Individual Cell Background Color
|
|
29
|
+
- advanced_table_background_control_rails: Background Control using Column Styling
|
|
31
30
|
- advanced_table_column_border_color_rails: Column Group Border Color
|
|
32
31
|
|
|
33
32
|
|
|
@@ -76,8 +75,6 @@ examples:
|
|
|
76
75
|
- advanced_table_padding_control_per_row: Padding Control using Row Styling
|
|
77
76
|
- advanced_table_column_styling: Column Styling
|
|
78
77
|
- advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
|
|
79
|
-
- advanced_table_column_styling_background: Column Styling Background Color
|
|
80
|
-
- advanced_table_column_styling_background_multi: Column Styling Background Color with Multiple Headers
|
|
81
78
|
- advanced_table_padding_control: Padding Control using Column Styling
|
|
82
79
|
- advanced_table_column_border_color: Column Group Border Color
|
|
83
80
|
- advanced_table_fullscreen: Fullscreen
|
|
@@ -45,6 +45,4 @@ export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced
|
|
|
45
45
|
export { default as AdvancedTableSortPerColumn } from './_advanced_table_sort_per_column.jsx'
|
|
46
46
|
export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
|
|
47
47
|
export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
|
|
48
|
-
export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
|
|
49
|
-
export { default as AdvancedTableColumnStylingBackground } from './_advanced_table_column_styling_background.jsx'
|
|
50
|
-
export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
|
|
48
|
+
export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<%= object.render_select_all_header %>
|
|
6
6
|
<% end %>
|
|
7
7
|
<% header_row.each_with_index do |cell, cell_index| %>
|
|
8
|
-
<%
|
|
9
|
-
<%= pb_rails(
|
|
8
|
+
<% header_id = cell[:accessor].present? ? cell[:accessor] : "header_#{row_index}_#{cell_index}" %>
|
|
9
|
+
<%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
|
|
10
10
|
<%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: (cell[:header_alignment] || "end") }) do %>
|
|
11
11
|
<% if cell_index.zero? && row_index === header_rows.size - 1 %>
|
|
12
12
|
<% if object.selectable_rows && object.enable_toggle_expansion != "none" %>
|
|
@@ -119,59 +119,6 @@ module Playbook
|
|
|
119
119
|
end
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
-
# Get header background color from column styling
|
|
123
|
-
def header_background_color(cell)
|
|
124
|
-
original_def = find_original_column_def_for_cell(cell)
|
|
125
|
-
return nil unless original_def
|
|
126
|
-
|
|
127
|
-
original_def.dig(:column_styling, :header_background_color)
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Get header font color from column styling
|
|
131
|
-
def header_font_color(cell)
|
|
132
|
-
original_def = find_original_column_def_for_cell(cell)
|
|
133
|
-
return nil unless original_def
|
|
134
|
-
|
|
135
|
-
original_def.dig(:column_styling, :header_font_color)
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
# Check if header has custom background color
|
|
139
|
-
def has_custom_header_background_color?(cell)
|
|
140
|
-
cell[:header_background_color].present?
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Returns component info for header cell (uses background kit if custom bg color)
|
|
144
|
-
def header_component_info(cell, cell_index, row_index)
|
|
145
|
-
header_id = cell[:accessor].present? ? cell[:accessor] : "header_#{row_index}_#{cell_index}"
|
|
146
|
-
classname = [th_classname(is_first_column: cell_index.zero?), ("last-header-cell" if cell[:is_last_in_group] && cell_index != 0)].compact.join(" ")
|
|
147
|
-
|
|
148
|
-
if has_custom_header_background_color?(cell)
|
|
149
|
-
component_name = "background"
|
|
150
|
-
component_props = {
|
|
151
|
-
background_color: cell[:header_background_color],
|
|
152
|
-
tag: "th",
|
|
153
|
-
classname: classname,
|
|
154
|
-
}
|
|
155
|
-
component_props[:html_options] = {
|
|
156
|
-
id: header_id,
|
|
157
|
-
colspan: cell[:colspan],
|
|
158
|
-
style: { color: cell[:header_font_color] },
|
|
159
|
-
}
|
|
160
|
-
component_props[:html_options][:style].delete(:color) unless cell[:header_font_color].present?
|
|
161
|
-
else
|
|
162
|
-
component_name = "table/table_header"
|
|
163
|
-
component_props = {
|
|
164
|
-
id: header_id,
|
|
165
|
-
colspan: cell[:colspan],
|
|
166
|
-
classname: classname,
|
|
167
|
-
sort_menu: cell[:accessor] ? cell[:sort_menu] : nil,
|
|
168
|
-
}
|
|
169
|
-
component_props[:html_options] = { style: { color: cell[:header_font_color] } } if cell[:header_font_color].present?
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
{ name: component_name, props: component_props }
|
|
173
|
-
end
|
|
174
|
-
|
|
175
122
|
private
|
|
176
123
|
|
|
177
124
|
# Find the original column definition for a cell
|
|
@@ -216,8 +163,6 @@ module Playbook
|
|
|
216
163
|
else
|
|
217
164
|
raw_styling = col[:column_styling] || {}
|
|
218
165
|
header_alignment = raw_styling[:header_alignment]
|
|
219
|
-
header_background_color = raw_styling[:header_background_color]
|
|
220
|
-
header_font_color = raw_styling[:header_font_color]
|
|
221
166
|
|
|
222
167
|
colspan = 1
|
|
223
168
|
cell_hash = {
|
|
@@ -227,8 +172,6 @@ module Playbook
|
|
|
227
172
|
sort_menu: col[:sort_menu],
|
|
228
173
|
is_last_in_group: is_last && current_depth.positive?,
|
|
229
174
|
header_alignment: header_alignment,
|
|
230
|
-
header_background_color: header_background_color,
|
|
231
|
-
header_font_color: header_font_color,
|
|
232
175
|
}
|
|
233
176
|
cell_hash[:id] = col[:id] if col[:id].present?
|
|
234
177
|
rows[current_depth] << cell_hash
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
|
+
import { globalProps } from "../utilities/globalProps";
|
|
3
|
+
import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
|
|
4
|
+
|
|
5
|
+
import HighchartsReact from "highcharts-react-official";
|
|
6
|
+
import Highcharts from "highcharts";
|
|
7
|
+
import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
|
|
8
|
+
import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
|
|
9
|
+
import mapColors from "../pb_dashboard/pbChartsColorsHelper";
|
|
10
|
+
import { merge } from '../utilities/object'
|
|
11
|
+
|
|
12
|
+
import classnames from "classnames";
|
|
13
|
+
|
|
14
|
+
type BarGraphProps = {
|
|
15
|
+
align?: "left" | "right" | "center";
|
|
16
|
+
axisTitle: { name: string; }[] | string;
|
|
17
|
+
dark?: boolean;
|
|
18
|
+
xAxisCategories: [];
|
|
19
|
+
yAxisMin: number;
|
|
20
|
+
yAxisMax: number;
|
|
21
|
+
chartData: { name: string; data: number[], yAxis: number }[];
|
|
22
|
+
className?: string;
|
|
23
|
+
customOptions?: Partial<Highcharts.Options>;
|
|
24
|
+
id: string;
|
|
25
|
+
pointStart: number;
|
|
26
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
27
|
+
subTitle?: string;
|
|
28
|
+
title: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
legend?: boolean;
|
|
31
|
+
toggleLegendClick?: boolean;
|
|
32
|
+
height?: string;
|
|
33
|
+
colors: string[];
|
|
34
|
+
layout?: "horizontal" | "vertical" | "proximate";
|
|
35
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
36
|
+
x?: number;
|
|
37
|
+
y?: number;
|
|
38
|
+
aria?: { [key: string]: string };
|
|
39
|
+
data?: { [key: string]: string };
|
|
40
|
+
stacking?: "normal" | "percent"
|
|
41
|
+
axisFormat?: { format: string; }[] | string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const BarGraph = ({
|
|
46
|
+
aria = {},
|
|
47
|
+
data = {},
|
|
48
|
+
align = "center",
|
|
49
|
+
axisTitle,
|
|
50
|
+
dark = false,
|
|
51
|
+
chartData,
|
|
52
|
+
className = "pb_bar_graph",
|
|
53
|
+
colors,
|
|
54
|
+
htmlOptions = {},
|
|
55
|
+
customOptions = {},
|
|
56
|
+
axisFormat,
|
|
57
|
+
id,
|
|
58
|
+
pointStart,
|
|
59
|
+
stacking,
|
|
60
|
+
subTitle,
|
|
61
|
+
type = "column",
|
|
62
|
+
title = "Title",
|
|
63
|
+
xAxisCategories,
|
|
64
|
+
yAxisMin,
|
|
65
|
+
yAxisMax,
|
|
66
|
+
legend = false,
|
|
67
|
+
toggleLegendClick = true,
|
|
68
|
+
height,
|
|
69
|
+
layout = "horizontal",
|
|
70
|
+
verticalAlign = "bottom",
|
|
71
|
+
x = 0,
|
|
72
|
+
y = 0,
|
|
73
|
+
...props
|
|
74
|
+
}: BarGraphProps): React.ReactElement => {
|
|
75
|
+
const ariaProps = buildAriaProps(aria);
|
|
76
|
+
const dataProps = buildDataProps(data)
|
|
77
|
+
const htmlProps = buildHtmlProps(htmlOptions);
|
|
78
|
+
const setupTheme = () => {
|
|
79
|
+
dark
|
|
80
|
+
? Highcharts.setOptions(highchartsDarkTheme)
|
|
81
|
+
: Highcharts.setOptions(highchartsTheme);
|
|
82
|
+
};
|
|
83
|
+
setupTheme();
|
|
84
|
+
|
|
85
|
+
const staticOptions = {
|
|
86
|
+
title: {
|
|
87
|
+
text: title,
|
|
88
|
+
},
|
|
89
|
+
chart: {
|
|
90
|
+
height: height,
|
|
91
|
+
type: type,
|
|
92
|
+
},
|
|
93
|
+
subtitle: {
|
|
94
|
+
text: subTitle,
|
|
95
|
+
},
|
|
96
|
+
yAxis: [{
|
|
97
|
+
labels: {
|
|
98
|
+
format: typeof axisFormat === 'string' ? axisFormat : (axisFormat && axisFormat[0] ? axisFormat[0].format : "")
|
|
99
|
+
|
|
100
|
+
},
|
|
101
|
+
min: yAxisMin,
|
|
102
|
+
max: yAxisMax,
|
|
103
|
+
opposite: false,
|
|
104
|
+
title: {
|
|
105
|
+
text: Array.isArray(axisTitle) ? (axisTitle.length > 0 ? axisTitle[0].name : null) : axisTitle,
|
|
106
|
+
},
|
|
107
|
+
plotLines: typeof yAxisMin !== 'undefined' && yAxisMin !== null ? [] : [{
|
|
108
|
+
value: 0,
|
|
109
|
+
zIndex: 10,
|
|
110
|
+
color: "#E4E8F0"
|
|
111
|
+
}],
|
|
112
|
+
}],
|
|
113
|
+
xAxis: {
|
|
114
|
+
categories: xAxisCategories,
|
|
115
|
+
},
|
|
116
|
+
legend: {
|
|
117
|
+
enabled: legend,
|
|
118
|
+
align: align,
|
|
119
|
+
verticalAlign: verticalAlign,
|
|
120
|
+
layout: layout,
|
|
121
|
+
x: x,
|
|
122
|
+
y: y,
|
|
123
|
+
},
|
|
124
|
+
colors:
|
|
125
|
+
colors !== undefined && colors.length > 0
|
|
126
|
+
? mapColors(colors)
|
|
127
|
+
: highchartsTheme.colors,
|
|
128
|
+
plotOptions: {
|
|
129
|
+
series: {
|
|
130
|
+
stacking: stacking,
|
|
131
|
+
pointStart: pointStart,
|
|
132
|
+
borderWidth: stacking ? 0 : "",
|
|
133
|
+
events: {},
|
|
134
|
+
dataLabels: {
|
|
135
|
+
enabled: false,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
series: chartData,
|
|
140
|
+
credits: false,
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
if (Array.isArray(axisTitle) && axisTitle.length > 1 && axisTitle[1].name) {
|
|
144
|
+
staticOptions.yAxis.push({
|
|
145
|
+
labels: {
|
|
146
|
+
format: typeof axisFormat === 'string' ? axisFormat : axisFormat[1].format,
|
|
147
|
+
},
|
|
148
|
+
min: yAxisMin,
|
|
149
|
+
max: yAxisMax,
|
|
150
|
+
opposite: true,
|
|
151
|
+
title: {
|
|
152
|
+
text: axisTitle[1].name,
|
|
153
|
+
},
|
|
154
|
+
plotLines: typeof yAxisMin !== 'undefined' && yAxisMin !== null ? [] : [{
|
|
155
|
+
value: 0,
|
|
156
|
+
zIndex: 10,
|
|
157
|
+
color: "#E4E8F0"
|
|
158
|
+
}],
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (!toggleLegendClick) {
|
|
163
|
+
staticOptions.plotOptions.series.events = { legendItemClick: () => false };
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const filteredProps: any = {...props};
|
|
167
|
+
delete filteredProps.verticalAlign;
|
|
168
|
+
|
|
169
|
+
const [options, setOptions] = useState({});
|
|
170
|
+
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
setOptions(merge(staticOptions, customOptions));
|
|
173
|
+
}, [chartData]);
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
<HighchartsReact
|
|
177
|
+
containerProps={{
|
|
178
|
+
className: classnames(globalProps(filteredProps), className),
|
|
179
|
+
id: id,
|
|
180
|
+
...ariaProps,
|
|
181
|
+
...dataProps,
|
|
182
|
+
...htmlProps
|
|
183
|
+
}}
|
|
184
|
+
highcharts={Highcharts}
|
|
185
|
+
options={options}
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export default BarGraph;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../utilities/test-utils';
|
|
3
|
+
import BarGraph from './_bar_graph';
|
|
4
|
+
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
// Silences error logs within the test suite.
|
|
7
|
+
jest.spyOn(console, 'error');
|
|
8
|
+
jest.spyOn(console, 'warn');
|
|
9
|
+
console.error.mockImplementation(() => {});
|
|
10
|
+
console.warn.mockImplementation(() => {});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
afterEach(() => {
|
|
14
|
+
console.error.mockRestore();
|
|
15
|
+
console.warn.mockRestore();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const testId = 'bargraph1';
|
|
19
|
+
|
|
20
|
+
test('bargraph uses exact classname', () => {
|
|
21
|
+
render(
|
|
22
|
+
<BarGraph
|
|
23
|
+
className='super_important_class'
|
|
24
|
+
data={{ testid: testId }}
|
|
25
|
+
id='bar-default'
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const kit = screen.getByTestId(testId);
|
|
30
|
+
expect(kit).toHaveClass('super_important_class');
|
|
31
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { commonSettings } from '../pb_dashboard/commonSettings.js'
|
|
2
|
+
import typography from '../tokens/exports/_typography.module.scss'
|
|
3
|
+
|
|
4
|
+
const sizeColumns = function(highchart) {
|
|
5
|
+
const column = highchart.plotOptions.column
|
|
6
|
+
const series = highchart.plotOptions.series
|
|
7
|
+
|
|
8
|
+
column.borderRadius = 0
|
|
9
|
+
column.pointPadding = 0.3
|
|
10
|
+
column.groupPadding = 0
|
|
11
|
+
|
|
12
|
+
series.borderWidth = 0
|
|
13
|
+
series.shadow = false
|
|
14
|
+
series.pointPadding = 0.25
|
|
15
|
+
series.groupPadding = 0
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const styleDataLabels = (highchart) => {
|
|
19
|
+
const series = highchart.plotOptions.series
|
|
20
|
+
|
|
21
|
+
series.dataLabels.style.fontFamily = typography.font_family_base
|
|
22
|
+
series.dataLabels.style.fontSize = typography.text_small
|
|
23
|
+
series.dataLabels.style.fontWeight = typography.bold
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const barGraphSettings = function(highchart) {
|
|
27
|
+
commonSettings(highchart)
|
|
28
|
+
sizeColumns(highchart)
|
|
29
|
+
styleDataLabels(highchart)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default barGraphSettings
|