playbook_ui 18.2.0.pre.rc.3 → 18.3.0.pre.alpha.PLAY3245advancedtablecustomheadertooltipstylerails20919
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/pb_advanced_table/Components/CollapsibleTrail.tsx +8 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +39 -8
- data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +24 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +29 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +79 -5
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +467 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_group_separators.jsx +67 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_group_separators.md +7 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_group_separators_rails.html.erb +78 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_group_separators_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +10 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.overrides.json +8 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_group_separators.json +328 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/index.js +39 -2
- data/app/pb_kits/playbook/pb_advanced_table/kit.schema.json +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +53 -23
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +3 -1
- data/app/pb_kits/playbook/pb_avatar/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +4 -4
- data/app/pb_kits/playbook/pb_collapsible/collapsible.test.js +81 -2
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +4 -1
- data/app/pb_kits/playbook/pb_contact/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -1
- data/app/pb_kits/playbook/pb_currency/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_dashboard_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date/_date.tsx +3 -1
- data/app/pb_kits/playbook/pb_date/date.test.js +1 -1
- data/app/pb_kits/playbook/pb_date/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +4 -0
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +3 -1
- data/app/pb_kits/playbook/pb_date_range_inline/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +3 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +4 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +3 -1
- data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +1 -0
- data/app/pb_kits/playbook/pb_date_time/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +2 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +3 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +1 -0
- data/app/pb_kits/playbook/pb_date_year_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_draggable/utilities/touchDrag.ts +10 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +112 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +121 -15
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_draggable_pills.html.erb +51 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_draggable_pills.jsx +62 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_draggable_pills_rails.md +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_draggable_pills_react.md +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_form.jsx +50 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_form_react.md +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_option_creation.html.erb +16 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_option_creation.jsx +27 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_option_creation_rails.md +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_option_creation_react.md +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_highlight.jsx +101 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_highlight.md +3 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +33 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.overrides.json +13 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +5 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +24 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +235 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_creation.test.jsx +414 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_form.test.jsx +173 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_index.test.js +545 -0
- data/app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx +22 -5
- data/app/pb_kits/playbook/pb_dropdown/index.js +260 -37
- data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +3 -1
- data/app/pb_kits/playbook/pb_dropdown/kit.schema.json +42 -2
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +43 -25
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownFormFields.tsx +83 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +13 -5
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/MultiSelectTriggerDisplay.tsx +336 -31
- data/app/pb_kits/playbook/pb_dropdown/utilities/optionCreation.ts +21 -0
- data/app/pb_kits/playbook/pb_dropdown/utilities/pillReorder.js +281 -0
- data/app/pb_kits/playbook/pb_dropdown/utilities/quickpickDateSync.test.ts +24 -0
- data/app/pb_kits/playbook/pb_dropdown/utilities/usePillDropIndicator.ts +144 -0
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +8 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_one_click.html.erb +38 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_one_click.jsx +69 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_one_click.md +1 -0
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_filter/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +4 -4
- data/app/pb_kits/playbook/pb_filter/filter.rb +28 -0
- data/app/pb_kits/playbook/pb_filter/filter.test.js +41 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -2
- data/app/pb_kits/playbook/pb_form/docs/_description_react.md +3 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_default_values.jsx +898 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_default_values_react.md +3 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_defaults.jsx +879 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_defaults_react.md +29 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_loading.jsx +75 -0
- data/app/pb_kits/playbook/pb_form/docs/{_form_loading.md → _form_loading_rails.md} +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_loading_react.md +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_model_values.jsx +147 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_model_values_react.md +16 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_multi_column.jsx +164 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_multi_column_react.md +3 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_validation.jsx +1057 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_validation_react.md +26 -0
- data/app/pb_kits/playbook/pb_form/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -0
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +1 -4
- data/app/pb_kits/playbook/pb_full_screen/_full_screen.scss +6 -0
- data/app/pb_kits/playbook/pb_full_screen/_full_screen.tsx +11 -2
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_advanced_table_sticky_header.jsx +73 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_advanced_table_sticky_header.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_full_screen/full_screen.test.jsx +4 -2
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +6 -1
- data/app/pb_kits/playbook/pb_icon/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_circle/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_image/_image.tsx +3 -1
- data/app/pb_kits/playbook/pb_image/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +3 -1
- data/app/pb_kits/playbook/pb_label_pill/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_label_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +3 -1
- data/app/pb_kits/playbook/pb_legend/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +6 -3
- data/app/pb_kits/playbook/pb_map/docs/_map_default.md +22 -3
- data/app/pb_kits/playbook/pb_message/_message.tsx +3 -1
- data/app/pb_kits/playbook/pb_message/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +3 -1
- data/app/pb_kits/playbook/pb_multiple_users/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +4 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +17 -0
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +3 -1
- data/app/pb_kits/playbook/pb_online_status/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -2
- data/app/pb_kits/playbook/pb_person/_person.tsx +3 -1
- data/app/pb_kits/playbook/pb_person/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +3 -7
- data/app/pb_kits/playbook/pb_phone_number_input/img/flags.webp +0 -0
- data/app/pb_kits/playbook/pb_phone_number_input/img/flags@2x.webp +0 -0
- data/app/pb_kits/playbook/pb_phone_number_input/img/globe.webp +0 -0
- data/app/pb_kits/playbook/pb_phone_number_input/img/globe@2x.webp +0 -0
- data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +13 -6
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input_assets.test.js +61 -0
- data/app/pb_kits/playbook/pb_pill/_pill.tsx +3 -1
- data/app/pb_kits/playbook/pb_pill/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_popover/index.ts +47 -8
- data/app/pb_kits/playbook/pb_popover/popover_index.test.js +456 -0
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +3 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.md +2 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md +3 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_extensions.md +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_markdown_support.md +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_required_indicator.html.erb +9 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_required_indicator.md +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +3 -7
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.js +26 -21
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.test.js +85 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +0 -9
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_custom.jsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +0 -7
- data/app/pb_kits/playbook/pb_source/_source.tsx +3 -1
- data/app/pb_kits/playbook/pb_source/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_source/source.rb +1 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +3 -1
- data/app/pb_kits/playbook/pb_stat_change/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_stat_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +3 -1
- data/app/pb_kits/playbook/pb_time_range_inline/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +3 -1
- data/app/pb_kits/playbook/pb_time_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +3 -1
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +3 -1
- data/app/pb_kits/playbook/pb_timestamp/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +1 -0
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +3 -1
- data/app/pb_kits/playbook/pb_title_count/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +3 -1
- data/app/pb_kits/playbook/pb_title_detail/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +73 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +285 -12
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +18 -13
- data/app/pb_kits/playbook/pb_typeahead/components/PillRenderer.tsx +15 -11
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +29 -30
- data/app/pb_kits/playbook/pb_typeahead/components/usePillDropIndicator.ts +155 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +5 -5
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.overrides.json +2 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.html.erb +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.jsx +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills_rails.md +3 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills_react.md +7 -0
- data/app/pb_kits/playbook/pb_typeahead/kit.schema.json +3 -3
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +3 -3
- data/app/pb_kits/playbook/pb_user/_user.tsx +3 -1
- data/app/pb_kits/playbook/pb_user/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +3 -1
- data/app/pb_kits/playbook/pb_user_badge/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +3 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +1 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/onClick.test.js +698 -0
- data/app/pb_kits/playbook/utilities/test-utils.js +0 -1
- data/dist/ai/all-schemas.json +129 -15
- data/dist/ai/external-dependencies.json +1 -1
- data/dist/ai/forms.json +2 -2
- data/dist/ai/index.json +3 -3
- data/dist/ai/kits/advanced_table.schema.json +8 -0
- data/dist/ai/kits/avatar.schema.json +1 -0
- data/dist/ai/kits/contact.schema.json +1 -0
- data/dist/ai/kits/currency.schema.json +1 -0
- data/dist/ai/kits/dashboard_value.schema.json +1 -0
- data/dist/ai/kits/date.schema.json +1 -0
- data/dist/ai/kits/date_range_inline.schema.json +1 -0
- data/dist/ai/kits/date_range_stacked.schema.json +1 -0
- data/dist/ai/kits/date_stacked.schema.json +1 -0
- data/dist/ai/kits/date_time.schema.json +1 -0
- data/dist/ai/kits/date_time_stacked.schema.json +1 -0
- data/dist/ai/kits/date_year_stacked.schema.json +1 -0
- data/dist/ai/kits/dropdown.schema.json +81 -11
- data/dist/ai/kits/icon.schema.json +1 -0
- data/dist/ai/kits/icon_circle.schema.json +1 -0
- data/dist/ai/kits/icon_stat_value.schema.json +1 -0
- data/dist/ai/kits/icon_value.schema.json +1 -0
- data/dist/ai/kits/image.schema.json +1 -0
- data/dist/ai/kits/label_pill.schema.json +1 -0
- data/dist/ai/kits/label_value.schema.json +1 -0
- data/dist/ai/kits/legend.schema.json +1 -0
- data/dist/ai/kits/message.schema.json +1 -0
- data/dist/ai/kits/multiple_users.schema.json +1 -0
- data/dist/ai/kits/multiple_users_stacked.schema.json +1 -0
- data/dist/ai/kits/online_status.schema.json +1 -0
- data/dist/ai/kits/person.schema.json +1 -0
- data/dist/ai/kits/pill.schema.json +1 -0
- data/dist/ai/kits/rich_text_editor.schema.json +1 -1
- data/dist/ai/kits/source.schema.json +1 -0
- data/dist/ai/kits/stat_change.schema.json +1 -0
- data/dist/ai/kits/stat_value.schema.json +1 -0
- data/dist/ai/kits/time_range_inline.schema.json +1 -0
- data/dist/ai/kits/time_stacked.schema.json +1 -0
- data/dist/ai/kits/timestamp.schema.json +1 -0
- data/dist/ai/kits/title_count.schema.json +1 -0
- data/dist/ai/kits/title_detail.schema.json +1 -0
- data/dist/ai/kits/typeahead.schema.json +3 -3
- data/dist/ai/kits/user.schema.json +1 -0
- data/dist/ai/kits/user_badge.schema.json +1 -0
- data/dist/ai/kits/weekday_stacked.schema.json +1 -0
- data/dist/ai/playgrounds/advanced_table.json +1 -1
- data/dist/ai/playgrounds/dropdown.json +1 -1
- data/dist/ai/playgrounds/index.json +1 -1
- data/dist/ai/playgrounds/rich_text_editor.json +1 -1
- data/dist/ai/playgrounds/typeahead.json +1 -1
- data/dist/chunks/_pagination-DZ0eQuH2.js +1 -0
- data/dist/chunks/{_pb_line_graph-Du7xE9vl.js → _pb_line_graph-DyvH5Zj1.js} +1 -1
- data/dist/chunks/{_detail-Cy54syJC.js → _tooltip-CFbtqu-E.js} +2 -2
- data/dist/chunks/_typeahead-C3MN3apM.js +1 -0
- data/dist/chunks/{globalProps-B120NbSJ.js → globalProps-xfGTpdLP.js} +1 -1
- data/dist/chunks/index-4jrZjexD.js +1 -0
- data/dist/chunks/index-BAy61y8S.js +1 -0
- data/dist/chunks/index-Cb_SDipk.js +1 -0
- data/dist/chunks/index-D3RdsDp7.js +1 -0
- data/dist/chunks/index-D8PZIesy.js +1 -0
- data/dist/chunks/index-DIoc-aua.js +1 -0
- data/dist/chunks/index-qex65UMn.js +1 -0
- data/dist/chunks/lib-Cu_i0y0k.js +29 -0
- data/dist/chunks/{time_picker_helper-CYGg0UQ0.js → time_picker_helper-B82MORju.js} +1 -1
- data/dist/chunks/vendor.js +2 -2
- data/dist/menu.yml +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/version.rb +2 -2
- metadata +94 -25
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.md +0 -7
- data/dist/chunks/_table-BCqp1PAO.js +0 -1
- data/dist/chunks/_typeahead-CXZH3KvV.js +0 -1
- data/dist/chunks/lib-Buo6zHEw.js +0 -29
- /data/app/pb_kits/playbook/pb_form/docs/{_description.md → _description_rails.md} +0 -0
- /data/app/pb_kits/playbook/pb_form/docs/{_form_default_values.md → _form_default_values_rails.md} +0 -0
- /data/app/pb_kits/playbook/pb_form/docs/{_form_defaults.md → _form_defaults_rails.md} +0 -0
- /data/app/pb_kits/playbook/pb_form/docs/{_form_model_values.md → _form_model_values_rails.md} +0 -0
- /data/app/pb_kits/playbook/pb_form/docs/{_form_multi_column.md → _form_multi_column_rails.md} +0 -0
- /data/app/pb_kits/playbook/pb_form/docs/{_form_validation.md → _form_validation_rails.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: 165a24b36fe82b732fa3727e952e810edc9d1d733294130d2575db598c21a5d7
|
|
4
|
+
data.tar.gz: 7b4a2b5f87fdcb57b973b098727b09bb87d41d83d1728e955890d136475a2ef2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d47264d6f7fe1c3960f18752809c9a9330395453a9f178c7a75e036584649d06d6a618847e888fc911da60439fc82a4eb3f1011f37879020ce69948ad4a5d30
|
|
7
|
+
data.tar.gz: 56358953c5797ca33876dc3231114a1f7c3103d272f1a07c420dba81bd52de2a34b06f3d84df4c41f1ecea27a91334de73c9197086b17cd443e74cb641ec59bf
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { useContext } from "react"
|
|
2
|
+
|
|
3
|
+
import AdvancedTableContext from "../Context/AdvancedTableContext"
|
|
2
4
|
|
|
3
5
|
//CollapsibleTrail component
|
|
4
6
|
const CollapsibleTrail = ({ leftOffset }: { leftOffset: number }) => {
|
|
7
|
+
const { groupSeparators } = useContext(AdvancedTableContext)
|
|
5
8
|
const style: { [key: string]: string | number } = {
|
|
6
9
|
left: `${leftOffset}em`,
|
|
7
10
|
}
|
|
11
|
+
// Read by groupSeparators CSS to decide which trails stop at the stroke
|
|
12
|
+
if (groupSeparators) {
|
|
13
|
+
style["--collapsible-trail-left"] = `${leftOffset}em`
|
|
14
|
+
}
|
|
8
15
|
|
|
9
16
|
return (
|
|
10
17
|
<div
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useEffect } from "react"
|
|
1
|
+
import React, { useContext, useEffect, useMemo } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { flexRender, Row, Cell } from "@tanstack/react-table"
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import { GenericObject } from "../../types"
|
|
|
6
6
|
import { isChrome } from "../Utilities/BrowserCheck"
|
|
7
7
|
import { findColumnDefByAccessor } from "../Utilities/ColumnStylingHelper"
|
|
8
8
|
import { playbookColumnLayoutStylesFromMeta } from "../Utilities/ColumnLayoutHelper"
|
|
9
|
-
import { getFontWeight, getRowColorClass, getRowStyle, shouldShowLoadingIndicator } from "../Utilities/RowUtils"
|
|
9
|
+
import { buildGroupSeparatorInsets, getFontWeight, getRowColorClass, getRowStyle, shouldShowLoadingIndicator } from "../Utilities/RowUtils"
|
|
10
10
|
|
|
11
11
|
import LoadingInline from "../../pb_loading_inline/_loading_inline"
|
|
12
12
|
import Checkbox from "../../pb_checkbox/_checkbox"
|
|
@@ -125,6 +125,7 @@ export const RegularTableView = ({
|
|
|
125
125
|
}: RegularTableViewProps) => {
|
|
126
126
|
const {
|
|
127
127
|
enableToggleExpansion,
|
|
128
|
+
groupSeparators,
|
|
128
129
|
handleExpandOrCollapse,
|
|
129
130
|
inlineRowLoading,
|
|
130
131
|
loading,
|
|
@@ -158,14 +159,30 @@ export const RegularTableView = ({
|
|
|
158
159
|
(obj: Record<string, unknown>) => "columns" in obj
|
|
159
160
|
);
|
|
160
161
|
|
|
161
|
-
//
|
|
162
|
-
|
|
162
|
+
// One map from the full row model so pinning a non-last sibling cannot
|
|
163
|
+
// invent a second separator just because that section only sees that row.
|
|
164
|
+
const rowModelRows = table.getRowModel().rows
|
|
165
|
+
const groupSeparatorInsets = useMemo(
|
|
166
|
+
() => (groupSeparators ? buildGroupSeparatorInsets(rowModelRows) : new Map<string, number>()),
|
|
167
|
+
[groupSeparators, rowModelRows]
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
function PinnedRow({
|
|
171
|
+
position,
|
|
172
|
+
row,
|
|
173
|
+
}: {
|
|
174
|
+
position: 'top' | 'bottom'
|
|
175
|
+
row: Row<any>
|
|
176
|
+
}) {
|
|
163
177
|
const customRowStyle = getRowStyle(rowStyling, row);
|
|
164
178
|
const bottomRowsCount = table.getBottomRows().length;
|
|
179
|
+
const groupSeparatorInsetEm = groupSeparatorInsets.get(row.id)
|
|
180
|
+
const showGroupSeparator = groupSeparatorInsetEm !== undefined
|
|
165
181
|
|
|
166
182
|
return (
|
|
167
183
|
<tr
|
|
168
184
|
className={classnames('pinned-row', {
|
|
185
|
+
'group-separator-row': showGroupSeparator,
|
|
169
186
|
'pinned-row-bottom': position === 'bottom',
|
|
170
187
|
})}
|
|
171
188
|
style={{
|
|
@@ -182,6 +199,9 @@ export const RegularTableView = ({
|
|
|
182
199
|
: undefined,
|
|
183
200
|
zIndex: '3',
|
|
184
201
|
fontWeight: getFontWeight(customRowStyle),
|
|
202
|
+
...(showGroupSeparator && {
|
|
203
|
+
["--group-separator-inset" as string]: `${groupSeparatorInsetEm}em`,
|
|
204
|
+
}),
|
|
185
205
|
}}
|
|
186
206
|
>
|
|
187
207
|
<TableCellRenderer
|
|
@@ -198,11 +218,13 @@ export const RegularTableView = ({
|
|
|
198
218
|
)
|
|
199
219
|
}
|
|
200
220
|
|
|
201
|
-
const totalRows = pinnedRows ? table.getCenterRows() :
|
|
221
|
+
const totalRows = pinnedRows ? table.getCenterRows() : rowModelRows
|
|
222
|
+
const topRows = pinnedRows ? table.getTopRows() : []
|
|
223
|
+
const bottomRows = pinnedRows ? table.getBottomRows() : []
|
|
202
224
|
|
|
203
225
|
return (
|
|
204
226
|
<>
|
|
205
|
-
{
|
|
227
|
+
{topRows.map((row: Row<GenericObject>) => (
|
|
206
228
|
<PinnedRow key={row.id}
|
|
207
229
|
position="top"
|
|
208
230
|
row={row}
|
|
@@ -219,6 +241,8 @@ export const RegularTableView = ({
|
|
|
219
241
|
// Use functions from RowUtils for consistent cell coloring
|
|
220
242
|
const rowColor = getRowColorClass(row, inlineRowLoading || false);
|
|
221
243
|
const isDataLoading = shouldShowLoadingIndicator(row, inlineRowLoading || false, columnDefinitions[0]?.cellAccessors?.length || 0);
|
|
244
|
+
const groupSeparatorInsetEm = groupSeparatorInsets.get(row.id)
|
|
245
|
+
const showGroupSeparator = groupSeparatorInsetEm !== undefined
|
|
222
246
|
|
|
223
247
|
return (
|
|
224
248
|
<React.Fragment key={`${row.index}-${row.id}-${row.depth}-row`}>
|
|
@@ -234,13 +258,20 @@ export const RegularTableView = ({
|
|
|
234
258
|
)}
|
|
235
259
|
|
|
236
260
|
<tr
|
|
237
|
-
className={
|
|
261
|
+
className={classnames(
|
|
262
|
+
rowColor,
|
|
263
|
+
row.depth > 0 && `depth-sub-row-${row.depth}`,
|
|
264
|
+
showGroupSeparator && "group-separator-row"
|
|
265
|
+
)}
|
|
238
266
|
id={`${row.index}-${row.id}-${row.depth}-row`}
|
|
239
267
|
ref={isFirstRegularRow ? sampleRowRef : null}
|
|
240
268
|
style={{
|
|
241
269
|
backgroundColor: customRowStyle?.backgroundColor,
|
|
242
270
|
color: customRowStyle?.fontColor,
|
|
243
271
|
fontWeight: getFontWeight(customRowStyle),
|
|
272
|
+
...(showGroupSeparator && {
|
|
273
|
+
["--group-separator-inset" as string]: `${groupSeparatorInsetEm}em`,
|
|
274
|
+
}),
|
|
244
275
|
}}
|
|
245
276
|
>
|
|
246
277
|
{/* Render custom checkbox column when we want selectableRows for non-expanding tables */}
|
|
@@ -280,7 +311,7 @@ export const RegularTableView = ({
|
|
|
280
311
|
</React.Fragment>
|
|
281
312
|
);
|
|
282
313
|
})}
|
|
283
|
-
{
|
|
314
|
+
{bottomRows.map((row: Row<GenericObject>) => (
|
|
284
315
|
<PinnedRow key={row.id}
|
|
285
316
|
position="bottom"
|
|
286
317
|
row={row}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext,
|
|
1
|
+
import React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { flexRender, Cell, Row } from "@tanstack/react-table"
|
|
4
4
|
import { VirtualItem } from "@tanstack/react-virtual"
|
|
@@ -7,7 +7,7 @@ import { GenericObject } from "../../types"
|
|
|
7
7
|
|
|
8
8
|
import { isChrome } from "../Utilities/BrowserCheck"
|
|
9
9
|
import { getVirtualizedRowStyle } from "../Utilities/TableContainerStyles"
|
|
10
|
-
import { getRowColorClass } from "../Utilities/RowUtils"
|
|
10
|
+
import { buildGroupSeparatorInsets, getRowColorClass } from "../Utilities/RowUtils"
|
|
11
11
|
|
|
12
12
|
import LoadingInline from "../../pb_loading_inline/_loading_inline"
|
|
13
13
|
import Checkbox from "../../pb_checkbox/_checkbox"
|
|
@@ -34,6 +34,7 @@ export const VirtualizedTableView = ({
|
|
|
34
34
|
}: VirtualizedTableViewProps) => {
|
|
35
35
|
const {
|
|
36
36
|
enableToggleExpansion,
|
|
37
|
+
groupSeparators,
|
|
37
38
|
handleExpandOrCollapse,
|
|
38
39
|
inlineRowLoading,
|
|
39
40
|
loading,
|
|
@@ -119,6 +120,13 @@ export const VirtualizedTableView = ({
|
|
|
119
120
|
};
|
|
120
121
|
}, [table, selectableRows, hasAnySubRows]);
|
|
121
122
|
|
|
123
|
+
// Memoize against scroll-driven re-renders; only rebuild when the row model changes.
|
|
124
|
+
const rowModelRows = table.getRowModel().rows
|
|
125
|
+
const groupSeparatorInsets = useMemo(
|
|
126
|
+
() => (groupSeparators ? buildGroupSeparatorInsets(rowModelRows) : new Map<string, number>()),
|
|
127
|
+
[groupSeparators, rowModelRows]
|
|
128
|
+
)
|
|
129
|
+
|
|
122
130
|
// Safety check
|
|
123
131
|
if (!virtualizer || !flattenedItems) {
|
|
124
132
|
return (
|
|
@@ -180,10 +188,17 @@ export const VirtualizedTableView = ({
|
|
|
180
188
|
|
|
181
189
|
// Use the utility function to get consistent row color
|
|
182
190
|
const rowColor = getRowColorClass(row, inlineRowLoading || false);
|
|
191
|
+
const groupSeparatorInsetEm = groupSeparatorInsets.get(row.id)
|
|
192
|
+
const showGroupSeparator = groupSeparatorInsetEm !== undefined
|
|
183
193
|
|
|
184
194
|
return (
|
|
185
195
|
<tr
|
|
186
|
-
className={
|
|
196
|
+
className={classnames(
|
|
197
|
+
"virtualized-table-row",
|
|
198
|
+
rowColor,
|
|
199
|
+
row.depth > 0 && `depth-sub-row-${row.depth}`,
|
|
200
|
+
showGroupSeparator && "group-separator-row"
|
|
201
|
+
)}
|
|
187
202
|
data-index={virtualRow.index}
|
|
188
203
|
key={`row-${item.id}-sort-${sortingState}`}
|
|
189
204
|
ref={(node) => {
|
|
@@ -195,7 +210,12 @@ export const VirtualizedTableView = ({
|
|
|
195
210
|
}
|
|
196
211
|
}
|
|
197
212
|
}}
|
|
198
|
-
style={
|
|
213
|
+
style={{
|
|
214
|
+
...virtualItemStyle,
|
|
215
|
+
...(showGroupSeparator && {
|
|
216
|
+
["--group-separator-inset" as string]: `${groupSeparatorInsetEm}em`,
|
|
217
|
+
}),
|
|
218
|
+
}}
|
|
199
219
|
>
|
|
200
220
|
{/* Render custom checkbox column when we want selectableRows for non-expanding tables */}
|
|
201
221
|
{selectableRows && !hasAnySubRows && (
|
|
@@ -53,6 +53,35 @@ export const getFontWeight = (rowStyle?: GenericObject) => {
|
|
|
53
53
|
if (rowStyle?.fontWeight === "regular") return 400
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// Matches the `left` of the nth collapsible-trail (see CollapsibleTrail.tsx).
|
|
57
|
+
const getCollapsibleTrailLeftEm = (trailIndex: number): number =>
|
|
58
|
+
trailIndex * 1.0 + (trailIndex > 1 ? (trailIndex - 1) * 0.25 : 0)
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* One O(n) pass over the full visible row model → Map of row id to its
|
|
62
|
+
* `--group-separator-inset` (em). Call once (and memoize) for the whole table —
|
|
63
|
+
* do not rebuild per pinned section, or a pinned non-last sibling can look like
|
|
64
|
+
* a last sibling and invent a second separator.
|
|
65
|
+
*
|
|
66
|
+
* A row closes every group between its depth and the next visible row's depth
|
|
67
|
+
* (so expanded parents defer to their last visible descendant, and sort/filter
|
|
68
|
+
* is respected). One stroke is drawn, inset to the outermost closed group:
|
|
69
|
+
* year-level → 0 / full-bleed, otherwise that group's collapsible-trail.
|
|
70
|
+
*/
|
|
71
|
+
export const buildGroupSeparatorInsets = (
|
|
72
|
+
visibleRows: Row<GenericObject>[]
|
|
73
|
+
): Map<string, number> => {
|
|
74
|
+
const insets = new Map<string, number>()
|
|
75
|
+
|
|
76
|
+
visibleRows.forEach((row, index) => {
|
|
77
|
+
if (row.depth === 0) return
|
|
78
|
+
const nextDepth = visibleRows[index + 1]?.depth ?? 0
|
|
79
|
+
if (nextDepth >= row.depth) return
|
|
80
|
+
insets.set(row.id, nextDepth === 0 ? 0 : getCollapsibleTrailLeftEm(nextDepth + 1))
|
|
81
|
+
})
|
|
82
|
+
return insets
|
|
83
|
+
}
|
|
84
|
+
|
|
56
85
|
/**
|
|
57
86
|
* Creates a virtual item style object for virtualized rows
|
|
58
87
|
*/
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
// Base vertical border color variable setup
|
|
17
17
|
--column-border-color: #{$border_light};
|
|
18
|
+
--group-separator-color: #{$input_border_default};
|
|
19
|
+
--group-separator-row-border-color: #{$border_light};
|
|
18
20
|
|
|
19
21
|
// Define color tokens once
|
|
20
22
|
$border_color_options: (
|
|
@@ -290,6 +292,13 @@
|
|
|
290
292
|
.pb_tooltip_kit {
|
|
291
293
|
font-weight: unset;
|
|
292
294
|
text-transform: unset;
|
|
295
|
+
|
|
296
|
+
.tooltip_tooltip {
|
|
297
|
+
font-size: initial;
|
|
298
|
+
font-weight: normal;
|
|
299
|
+
letter-spacing: normal;
|
|
300
|
+
text-transform: none;
|
|
301
|
+
}
|
|
293
302
|
}
|
|
294
303
|
}
|
|
295
304
|
|
|
@@ -524,6 +533,48 @@
|
|
|
524
533
|
border-bottom-color: $border_light !important;
|
|
525
534
|
}
|
|
526
535
|
|
|
536
|
+
// 2px group separator on last sibling of each nested group. It replaces the
|
|
537
|
+
// default border-bottom: the border goes transparent and the stroke paints
|
|
538
|
+
// over its spot, with a 1px default line underneath for any part left of
|
|
539
|
+
// --group-separator-inset (0 = year-level full-bleed). Rails:
|
|
540
|
+
// .group-separator-expanded defers to the leaf.
|
|
541
|
+
tr.group-separator-row:not(.group-separator-expanded) {
|
|
542
|
+
> td,
|
|
543
|
+
> .pb_table_td {
|
|
544
|
+
border-bottom-color: transparent !important;
|
|
545
|
+
background-image:
|
|
546
|
+
linear-gradient(var(--group-separator-color), var(--group-separator-color)),
|
|
547
|
+
linear-gradient(var(--group-separator-row-border-color), var(--group-separator-row-border-color));
|
|
548
|
+
// Padding-box origin so the inset matches the trails' `left` (a first-cell
|
|
549
|
+
// border-left would otherwise shift the stroke 1px past its trail); the
|
|
550
|
+
// +1px pushes both layers down over the 1px bottom border.
|
|
551
|
+
background-origin: padding-box;
|
|
552
|
+
background-position: 0 calc(100% + 1px), 0 calc(100% + 1px);
|
|
553
|
+
background-repeat: no-repeat;
|
|
554
|
+
background-size: 100% 2px, 100% 1px;
|
|
555
|
+
// Table hover sets `transition: all` on cells, which slides the stroke in
|
|
556
|
+
// from the top when a row becomes a separator. Keep only the hover border fade.
|
|
557
|
+
transition-property: border-color !important;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
> td:first-child:not(.checkbox-cell),
|
|
561
|
+
> .pb_table_td:first-child:not(.checkbox-cell),
|
|
562
|
+
> td.checkbox-cell + td,
|
|
563
|
+
> td.checkbox-cell + .pb_table_td {
|
|
564
|
+
background-position: var(--group-separator-inset, 0em) calc(100% + 1px), 0 calc(100% + 1px);
|
|
565
|
+
background-size: calc(100% - var(--group-separator-inset, 0em)) 2px, 100% 1px;
|
|
566
|
+
|
|
567
|
+
// Trails left of the inset belong to groups that stay open, so they run
|
|
568
|
+
// through; trails at or past it stop on top of the stroke, which rises
|
|
569
|
+
// 1px above the (now transparent) border (0 or 1px).
|
|
570
|
+
// Avoid `* 1000` inside this clamp: dart-sass strips the calc() and leaves
|
|
571
|
+
// `(var() - var()) * 1000`, which SassC rejects when nitro recompiles playbook.css.
|
|
572
|
+
.collapsible-trail {
|
|
573
|
+
bottom: clamp(0px, calc(var(--collapsible-trail-left, 0em) - var(--group-separator-inset, 0em) + 1px), 1px);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
527
578
|
// Apply border colors when columnGroupBorderColor is set
|
|
528
579
|
&[class*="column-group-border-"] {
|
|
529
580
|
// For top-level column groups
|
|
@@ -789,6 +840,8 @@
|
|
|
789
840
|
&.dark {
|
|
790
841
|
// Override default border color for dark mode
|
|
791
842
|
--column-border-color: #{$border_dark};
|
|
843
|
+
--group-separator-color: #{$input_border_default_dark};
|
|
844
|
+
--group-separator-row-border-color: #{$border_dark};
|
|
792
845
|
|
|
793
846
|
// Dark mode default border colors for trails and horizontal borders
|
|
794
847
|
.collapsible-trail {
|
|
@@ -800,6 +853,26 @@
|
|
|
800
853
|
border-bottom-color: $border_dark !important;
|
|
801
854
|
}
|
|
802
855
|
|
|
856
|
+
// table-dark sets `border-color: … !important` (rest + hover), and
|
|
857
|
+
// column-group-border sets `.toggle-content td { border-bottom: … !important }`.
|
|
858
|
+
// Those beat the shared separator rule, so the opaque border paints over the
|
|
859
|
+
// 2px stroke. Reassert transparent bottom with higher specificity.
|
|
860
|
+
.pb_table.dark,
|
|
861
|
+
.pb_table.table-dark {
|
|
862
|
+
tbody > tr.group-separator-row:not(.group-separator-expanded),
|
|
863
|
+
.pb_table_tbody > .pb_table_tr.group-separator-row:not(.group-separator-expanded) {
|
|
864
|
+
> td,
|
|
865
|
+
> .pb_table_td {
|
|
866
|
+
border-bottom-color: transparent !important;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
&:hover > td,
|
|
870
|
+
&:hover > .pb_table_td {
|
|
871
|
+
border-bottom-color: transparent !important;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
|
|
803
876
|
.pb-bg-row-white {
|
|
804
877
|
background: $bg_dark_card;
|
|
805
878
|
}
|
|
@@ -808,21 +881,22 @@
|
|
|
808
881
|
background: $bg_dark;
|
|
809
882
|
}
|
|
810
883
|
|
|
811
|
-
// Dark mode virtualized rows
|
|
884
|
+
// Dark mode virtualized rows — use background-color (not the background
|
|
885
|
+
// shorthand) so group-separator background-image is not cleared.
|
|
812
886
|
.virtualized-table-row {
|
|
813
887
|
&.pb-bg-row-white {
|
|
814
|
-
background: $bg_dark_card !important;
|
|
888
|
+
background-color: $bg_dark_card !important;
|
|
815
889
|
|
|
816
890
|
td:first-child {
|
|
817
|
-
background: $bg_dark_card !important;
|
|
891
|
+
background-color: $bg_dark_card !important;
|
|
818
892
|
}
|
|
819
893
|
}
|
|
820
894
|
|
|
821
895
|
&.bg-silver {
|
|
822
|
-
background: $bg_dark;
|
|
896
|
+
background-color: $bg_dark;
|
|
823
897
|
|
|
824
898
|
td:first-child {
|
|
825
|
-
background: $bg_dark;
|
|
899
|
+
background-color: $bg_dark;
|
|
826
900
|
}
|
|
827
901
|
}
|
|
828
902
|
}
|
|
@@ -37,6 +37,7 @@ type AdvancedTableProps = {
|
|
|
37
37
|
expandByDepth?: GenericObject[]
|
|
38
38
|
onExpandByDepthClick?: (arg: number, arg1: any) => void
|
|
39
39
|
fullWidthCell?: boolean
|
|
40
|
+
groupSeparators?: boolean
|
|
40
41
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
41
42
|
id?: string
|
|
42
43
|
initialLoadingRowsCount?: number
|
|
@@ -100,6 +101,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
100
101
|
expandByDepth,
|
|
101
102
|
onExpandByDepthClick,
|
|
102
103
|
fullWidthCell = false,
|
|
104
|
+
groupSeparators = false,
|
|
103
105
|
htmlOptions = {},
|
|
104
106
|
id,
|
|
105
107
|
initialLoadingRowsCount = 10,
|
|
@@ -326,6 +328,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
|
326
328
|
expandByDepth={expandByDepth}
|
|
327
329
|
expanded={expanded}
|
|
328
330
|
expandedControl={expandedControl}
|
|
331
|
+
groupSeparators={groupSeparators}
|
|
329
332
|
handleExpandOrCollapse={handleExpandOrCollapse}
|
|
330
333
|
hasAnySubRows={hasAnySubRows}
|
|
331
334
|
inlineRowLoading={inlineRowLoading}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<% content.presence %>
|
|
13
13
|
<% else %>
|
|
14
14
|
<%= pb_rails("advanced_table/table_header", props: { table_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, inline_row_loading: object.inline_row_loading, persist_toggle_expansion_button: object.persist_toggle_expansion_button, table_data: object.table_data }) %>
|
|
15
|
-
<%= pb_rails("advanced_table/table_body", props: { table_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, inline_row_loading: object.inline_row_loading, full_width_cell: object.full_width_cell, pinned_rows: object.pinned_rows }) %>
|
|
15
|
+
<%= pb_rails("advanced_table/table_body", props: { table_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, inline_row_loading: object.inline_row_loading, full_width_cell: object.full_width_cell, group_separators: object.group_separators, pinned_rows: object.pinned_rows }) %>
|
|
16
16
|
<% end %>
|
|
17
17
|
<% end %>
|
|
18
18
|
<% end %>
|
|
@@ -37,11 +37,19 @@ module Playbook
|
|
|
37
37
|
default: false
|
|
38
38
|
prop :full_width_cell, type: Playbook::Props::Boolean,
|
|
39
39
|
default: false
|
|
40
|
+
prop :group_separators, type: Playbook::Props::Boolean,
|
|
41
|
+
default: false
|
|
40
42
|
prop :persist_toggle_expansion_button, type: Playbook::Props::Boolean,
|
|
41
43
|
default: false
|
|
42
44
|
prop :pinned_rows, type: Playbook::Props::HashProp,
|
|
43
45
|
default: {}
|
|
44
46
|
|
|
47
|
+
# Marker for Rails JS: only toggle group-separator-expanded when this is set.
|
|
48
|
+
# Use merge (not tap/mutate) so we don't write onto the shared default {} or a caller-owned data hash.
|
|
49
|
+
def data
|
|
50
|
+
Hash(prop(:data)).merge(group_separators ? { group_separators: true } : {})
|
|
51
|
+
end
|
|
52
|
+
|
|
45
53
|
def classname
|
|
46
54
|
additional_classes = [
|
|
47
55
|
responsive_classname,
|