playbook_ui 18.2.0 → 18.3.0.pre.alpha.PLAY3342advancedtablereactmulticolumnselectablerow21082
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/TableActionBar.tsx +62 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +24 -4
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +105 -66
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +29 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +83 -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 +1100 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md +5 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi_select_all.jsx +82 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi_select_all.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +3 -1
- 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/_advanced_table_selectable_rows.jsx +177 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +17 -2
- 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 +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/index.js +39 -2
- data/app/pb_kits/playbook/pb_advanced_table/kit.schema.json +44 -16
- 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 +23 -10
- data/app/pb_kits/playbook/pb_background/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_background/kit.schema.json +10 -3
- data/app/pb_kits/playbook/pb_badge/docs/_playground.json +2 -0
- data/app/pb_kits/playbook/pb_badge/kit.schema.json +27 -13
- data/app/pb_kits/playbook/pb_body/docs/_playground.json +3 -3
- data/app/pb_kits/playbook/pb_body/kit.schema.json +14 -5
- data/app/pb_kits/playbook/pb_button/_button.tsx +3 -1
- data/app/pb_kits/playbook/pb_button/button.rb +3 -0
- data/app/pb_kits/playbook/pb_button/button.test.js +154 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_options_react.md +9 -0
- data/app/pb_kits/playbook/pb_button/docs/_playground.json +4 -2
- data/app/pb_kits/playbook/pb_button/docs/_playground.overrides.json +1 -1
- data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_button/kit.schema.json +31 -27
- data/app/pb_kits/playbook/pb_caption/kit.schema.json +17 -7
- data/app/pb_kits/playbook/pb_card/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_card/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_playground.json +6 -1
- data/app/pb_kits/playbook/pb_checkbox/kit.schema.json +10 -5
- 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/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_contact/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/_playground.json +5 -1
- data/app/pb_kits/playbook/pb_copy_button/kit.schema.json +10 -5
- data/app/pb_kits/playbook/pb_currency/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_currency/kit.schema.json +6 -2
- data/app/pb_kits/playbook/pb_dashboard_value/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_dashboard_value/kit.schema.json +4 -2
- 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/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date/kit.schema.json +17 -7
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +4 -1
- data/app/pb_kits/playbook/pb_date_picker/kit.schema.json +32 -14
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +3 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_range_inline/kit.schema.json +3 -1
- 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/docs/_playground.json +2 -1
- data/app/pb_kits/playbook/pb_date_time/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +2 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/kit.schema.json +3 -1
- 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_detail/docs/_playground.json +2 -1
- data/app/pb_kits/playbook/pb_detail/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_dialog/kit.schema.json +22 -9
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_distribution_bar/kit.schema.json +2 -1
- 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/_playground.json +39 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.overrides.json +13 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +4 -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 +59 -9
- 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_empty_state/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_empty_state/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_file_upload/docs/_playground.json +3 -2
- data/app/pb_kits/playbook/pb_file_upload/kit.schema.json +8 -3
- 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/docs/_playground.json +4 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/kit.schema.json +6 -3
- data/app/pb_kits/playbook/pb_flex/docs/_playground.json +3 -0
- data/app/pb_kits/playbook/pb_flex/kit.schema.json +27 -12
- 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/form.rb +1 -1
- data/app/pb_kits/playbook/pb_form/kit.schema.json +1 -6
- 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_form_pill/docs/_playground.json +3 -0
- data/app/pb_kits/playbook/pb_form_pill/kit.schema.json +6 -3
- 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/_playground.json +3 -3
- 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_full_screen/kit.schema.json +8 -4
- data/app/pb_kits/playbook/pb_hashtag/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_hashtag/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_highlight/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +6 -1
- data/app/pb_kits/playbook/pb_icon/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_icon/kit.schema.json +31 -13
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_circle/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_icon_circle/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_playground.json +3 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/kit.schema.json +4 -2
- data/app/pb_kits/playbook/pb_image/_image.tsx +5 -3
- data/app/pb_kits/playbook/pb_image/docs/_playground.json +27 -27
- data/app/pb_kits/playbook/pb_image/kit.schema.json +57 -24
- 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/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_label_value/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_layout/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_layout/kit.schema.json +43 -20
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +3 -1
- data/app/pb_kits/playbook/pb_legend/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_legend/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +2 -2
- data/app/pb_kits/playbook/pb_lightbox/kit.schema.json +84 -0
- data/app/pb_kits/playbook/pb_link/docs/_playground.json +6 -3
- data/app/pb_kits/playbook/pb_link/kit.schema.json +14 -6
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +6 -3
- data/app/pb_kits/playbook/pb_list/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_list/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.json +0 -1
- data/app/pb_kits/playbook/pb_loading_inline/kit.schema.json +4 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_default.md +22 -3
- data/app/pb_kits/playbook/pb_map/kit.schema.json +4 -6
- data/app/pb_kits/playbook/pb_message/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +4 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/_playground.json +2 -1
- data/app/pb_kits/playbook/pb_multiple_users/kit.schema.json +19 -11
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/_playground.json +2 -0
- data/app/pb_kits/playbook/pb_nav/kit.schema.json +4 -2
- 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_overlay/docs/_playground.json +3 -3
- data/app/pb_kits/playbook/pb_overlay/kit.schema.json +22 -12
- data/app/pb_kits/playbook/pb_pagination/kit.schema.json +6 -3
- data/app/pb_kits/playbook/pb_passphrase/docs/_playground.json +6 -4
- data/app/pb_kits/playbook/pb_passphrase/kit.schema.json +10 -5
- 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/kit.schema.json +2 -1
- 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_person_contact/docs/_playground.json +3 -3
- data/app/pb_kits/playbook/pb_person_contact/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +3 -7
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.json +3 -0
- 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/kit.schema.json +6 -3
- 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/docs/_playground.json +1 -2
- data/app/pb_kits/playbook/pb_popover/index.ts +47 -8
- data/app/pb_kits/playbook/pb_popover/kit.schema.json +18 -9
- data/app/pb_kits/playbook/pb_popover/popover_index.test.js +456 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.json +3 -2
- data/app/pb_kits/playbook/pb_progress_simple/kit.schema.json +4 -2
- 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 +10 -3
- 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/kit.schema.json +18 -9
- 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/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_selectable_card/kit.schema.json +4 -2
- 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/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_custom.jsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/kit.schema.json +2 -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/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_source/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_source/source.rb +1 -1
- data/app/pb_kits/playbook/pb_star_rating/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_star_rating/kit.schema.json +15 -7
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +3 -1
- data/app/pb_kits/playbook/pb_stat_change/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_stat_change/kit.schema.json +3 -1
- data/app/pb_kits/playbook/pb_stat_value/docs/_playground.json +3 -1
- data/app/pb_kits/playbook/pb_stat_value/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_table/docs/_playground.json +5 -1
- data/app/pb_kits/playbook/pb_table/kit.schema.json +28 -11
- data/app/pb_kits/playbook/pb_text_input/docs/_playground.json +3 -0
- data/app/pb_kits/playbook/pb_text_input/kit.schema.json +22 -9
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +4 -1
- data/app/pb_kits/playbook/pb_time/kit.schema.json +13 -5
- data/app/pb_kits/playbook/pb_time_picker/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_time_picker/kit.schema.json +2 -1
- 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 +13 -5
- 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/kit.schema.json +23 -10
- data/app/pb_kits/playbook/pb_title_count/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_title_count/kit.schema.json +2 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_playground.json +5 -1
- data/app/pb_kits/playbook/pb_tooltip/kit.schema.json +10 -5
- 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 +22 -14
- 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/docs/_playground.json +3 -1
- data/app/pb_kits/playbook/pb_user/kit.schema.json +20 -9
- 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/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_weekday_stacked/kit.schema.json +3 -1
- 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 +471 -0
- data/app/pb_kits/playbook/utilities/test-utils.js +0 -1
- data/dist/ai/all-schemas.json +986 -388
- data/dist/ai/external-dependencies.json +1 -1
- data/dist/ai/forms.json +2 -2
- data/dist/ai/index.json +11 -3
- data/dist/ai/kits/advanced_table.schema.json +44 -16
- data/dist/ai/kits/avatar.schema.json +22 -9
- data/dist/ai/kits/background.schema.json +10 -3
- data/dist/ai/kits/badge.schema.json +26 -12
- data/dist/ai/kits/body.schema.json +14 -5
- data/dist/ai/kits/button.schema.json +29 -25
- data/dist/ai/kits/caption.schema.json +17 -7
- data/dist/ai/kits/card.schema.json +2 -1
- data/dist/ai/kits/checkbox.schema.json +10 -5
- data/dist/ai/kits/contact.schema.json +3 -1
- data/dist/ai/kits/copy_button.schema.json +10 -5
- data/dist/ai/kits/currency.schema.json +6 -2
- data/dist/ai/kits/dashboard_value.schema.json +4 -2
- data/dist/ai/kits/date.schema.json +16 -6
- data/dist/ai/kits/date_picker.schema.json +31 -13
- data/dist/ai/kits/date_range_inline.schema.json +3 -1
- 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 +3 -1
- data/dist/ai/kits/date_time_stacked.schema.json +3 -1
- data/dist/ai/kits/date_year_stacked.schema.json +1 -0
- data/dist/ai/kits/detail.schema.json +2 -1
- data/dist/ai/kits/dialog.schema.json +22 -9
- data/dist/ai/kits/distribution_bar.schema.json +2 -1
- data/dist/ai/kits/dropdown.schema.json +98 -18
- data/dist/ai/kits/empty_state.schema.json +2 -1
- data/dist/ai/kits/file_upload.schema.json +8 -3
- data/dist/ai/kits/fixed_confirmation_toast.schema.json +6 -3
- data/dist/ai/kits/flex.schema.json +27 -12
- data/dist/ai/kits/form.schema.json +1 -6
- data/dist/ai/kits/form_pill.schema.json +6 -3
- data/dist/ai/kits/full_screen.schema.json +8 -4
- data/dist/ai/kits/hashtag.schema.json +2 -1
- data/dist/ai/kits/highlight.schema.json +2 -1
- data/dist/ai/kits/icon.schema.json +31 -13
- data/dist/ai/kits/icon_circle.schema.json +3 -1
- data/dist/ai/kits/icon_stat_value.schema.json +4 -2
- data/dist/ai/kits/image.schema.json +57 -24
- data/dist/ai/kits/label_pill.schema.json +1 -0
- data/dist/ai/kits/label_value.schema.json +2 -1
- data/dist/ai/kits/layout.schema.json +43 -20
- data/dist/ai/kits/legend.schema.json +3 -1
- data/dist/ai/kits/lightbox.schema.json +86 -0
- data/dist/ai/kits/link.schema.json +14 -6
- data/dist/ai/kits/list.schema.json +2 -1
- data/dist/ai/kits/loading_inline.schema.json +4 -1
- data/dist/ai/kits/map.schema.json +4 -7
- data/dist/ai/kits/message.schema.json +2 -1
- data/dist/ai/kits/multiple_users.schema.json +19 -11
- data/dist/ai/kits/multiple_users_stacked.schema.json +2 -1
- data/dist/ai/kits/nav.schema.json +4 -2
- data/dist/ai/kits/online_status.schema.json +1 -0
- data/dist/ai/kits/overlay.schema.json +22 -12
- data/dist/ai/kits/pagination.schema.json +6 -3
- data/dist/ai/kits/passphrase.schema.json +10 -5
- data/dist/ai/kits/pb_gauge_chart.schema.json +2 -1
- data/dist/ai/kits/person.schema.json +1 -0
- data/dist/ai/kits/person_contact.schema.json +2 -1
- data/dist/ai/kits/phone_number_input.schema.json +6 -3
- data/dist/ai/kits/pill.schema.json +1 -0
- data/dist/ai/kits/popover.schema.json +17 -8
- data/dist/ai/kits/progress_pills.schema.json +2 -1
- data/dist/ai/kits/progress_simple.schema.json +4 -2
- data/dist/ai/kits/rich_text_editor.schema.json +19 -10
- data/dist/ai/kits/selectable_card.schema.json +4 -2
- data/dist/ai/kits/selectable_card_icon.schema.json +2 -1
- data/dist/ai/kits/source.schema.json +3 -1
- data/dist/ai/kits/star_rating.schema.json +15 -7
- data/dist/ai/kits/stat_change.schema.json +3 -1
- data/dist/ai/kits/stat_value.schema.json +2 -1
- data/dist/ai/kits/table.schema.json +28 -11
- data/dist/ai/kits/text_input.schema.json +22 -9
- data/dist/ai/kits/time.schema.json +12 -4
- data/dist/ai/kits/time_picker.schema.json +2 -1
- data/dist/ai/kits/time_range_inline.schema.json +13 -5
- data/dist/ai/kits/time_stacked.schema.json +1 -0
- data/dist/ai/kits/timestamp.schema.json +1 -0
- data/dist/ai/kits/title.schema.json +23 -10
- data/dist/ai/kits/title_count.schema.json +2 -1
- data/dist/ai/kits/tooltip.schema.json +10 -5
- data/dist/ai/kits/typeahead.schema.json +3 -3
- data/dist/ai/kits/user.schema.json +20 -9
- data/dist/ai/kits/user_badge.schema.json +1 -0
- data/dist/ai/kits/weekday_stacked.schema.json +3 -1
- 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/ai/visual-index.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-Bsvl694i.js → _tooltip-CFbtqu-E.js} +2 -2
- data/dist/chunks/_typeahead-CkiAf8zx.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 +3 -3
- 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/changelog_generator.rb +47 -21
- data/lib/playbook/connect_message_generator.rb +15 -2
- data/lib/playbook/version.rb +2 -2
- metadata +99 -23
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.md +0 -7
- data/dist/chunks/_table-Bf6LGyL9.js +0 -1
- data/dist/chunks/_typeahead-w6S5Vx4b.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
|
@@ -29,6 +29,8 @@ module Playbook
|
|
|
29
29
|
default: false
|
|
30
30
|
prop :full_width_cell, type: Playbook::Props::Boolean,
|
|
31
31
|
default: false
|
|
32
|
+
prop :group_separators, type: Playbook::Props::Boolean,
|
|
33
|
+
default: false
|
|
32
34
|
prop :pinned_rows, type: Playbook::Props::HashProp,
|
|
33
35
|
default: {}
|
|
34
36
|
|
|
@@ -46,7 +48,7 @@ module Playbook
|
|
|
46
48
|
end.compact
|
|
47
49
|
end
|
|
48
50
|
|
|
49
|
-
def render_row_and_children(row, column_definitions, current_depth, first_parent_child, ancestor_ids = [], top_parent_id = nil, additional_classes: "", table_data_attributes: {}, immediate_parent_row_id: nil, is_pinned_row: false, pinned_index: nil, skip_pinned_ids: nil, initial_table_data_attributes: nil, pinned_position: "top", pinned_bottom_total: nil)
|
|
51
|
+
def render_row_and_children(row, column_definitions, current_depth, first_parent_child, ancestor_ids = [], top_parent_id = nil, additional_classes: "", table_data_attributes: {}, immediate_parent_row_id: nil, is_pinned_row: false, pinned_index: nil, skip_pinned_ids: nil, initial_table_data_attributes: nil, pinned_position: "top", pinned_bottom_total: nil, group_closes_from_depth: nil)
|
|
50
52
|
if skip_pinned_ids && row_id_for(row) && skip_pinned_ids.include?(row_id_for(row).to_s)
|
|
51
53
|
return is_pinned_row ? [ActiveSupport::SafeBuffer.new, pinned_index] : ActiveSupport::SafeBuffer.new
|
|
52
54
|
end
|
|
@@ -91,38 +93,51 @@ module Playbook
|
|
|
91
93
|
initial_table_data_attributes || table_data_attributes
|
|
92
94
|
end
|
|
93
95
|
|
|
96
|
+
children = row_children_for(row)
|
|
97
|
+
# Match React: every last sibling gets a separator. When the row is expanded,
|
|
98
|
+
# JS adds `group-separator-expanded` and CSS hides this row’s separator so the leaf keeps it.
|
|
99
|
+
# group_closes_from_depth is the depth of the outermost group this row closes (nil unless a last sibling).
|
|
100
|
+
show_group_separator = group_separators && current_depth.positive? && !group_closes_from_depth.nil?
|
|
101
|
+
row_classname = [additional_classes, ("group-separator-row" if show_group_separator)].compact.join(" ").strip
|
|
102
|
+
separator_inset_style = show_group_separator ? "--group-separator-inset: #{group_separator_inset_em(group_closes_from_depth)}em;" : nil
|
|
103
|
+
|
|
94
104
|
# Additional class and data attributes needed for toggle logic
|
|
95
|
-
row_props = { table_id: table_id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname:
|
|
105
|
+
row_props = { table_id: table_id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, group_separators: group_separators, classname: row_classname, table_data_attributes: current_data_attributes, responsive: responsive, loading: loading, selectable_rows: selectable_rows, row_id: row[:id], enable_toggle_expansion: enable_toggle_expansion, row_styling: row_styling, last_row: last_row, immediate_parent_row_id: immediate_parent_row_id, inline_row_loading: inline_row_loading, full_width_cell: full_width_cell }
|
|
96
106
|
if is_pinned_row && !next_pinned_index.nil?
|
|
97
107
|
row_props[:is_pinned_row] = true
|
|
98
108
|
row_props[:pinned_position] = pinned_position.to_s
|
|
99
109
|
row_props[:pinned_index] = next_pinned_index
|
|
100
110
|
row_bg = (row_styling || []).find { |s| s[:row_id].to_s == row_id_for(row).to_s }&.[](:background_color) || "white"
|
|
101
|
-
|
|
111
|
+
pinned_style = build_pinned_row_style(next_pinned_index, background: row_bg, position: pinned_position, bottom_total: pinned_bottom_total)
|
|
112
|
+
row_props[:html_options] = { style: [pinned_style, separator_inset_style].compact.join(" ") }
|
|
102
113
|
next_pinned_index += 1
|
|
114
|
+
elsif separator_inset_style
|
|
115
|
+
row_props[:html_options] = { style: separator_inset_style }
|
|
103
116
|
end
|
|
104
117
|
output << pb_rails("advanced_table/table_row", props: row_props)
|
|
105
118
|
|
|
106
119
|
# Render inline loading row when inline_row_loading is enabled and row has empty children
|
|
107
|
-
if inline_row_loading
|
|
108
|
-
|
|
109
|
-
if
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
output << render_inline_loading_row(leaf_columns.length, current_depth, loading_row_data_attributes)
|
|
119
|
-
end
|
|
120
|
+
if inline_row_loading && children.is_a?(::Array) && children.empty?
|
|
121
|
+
max_depth = cell_accessors_length(column_definitions)
|
|
122
|
+
if current_depth < max_depth
|
|
123
|
+
loading_row_data_attributes = {
|
|
124
|
+
advanced_table_content: "#{new_ancestor_ids.join('-')}-loading",
|
|
125
|
+
row_depth: current_depth + 1,
|
|
126
|
+
row_parent: "#{table_id}_#{row.object_id}",
|
|
127
|
+
inline_loading_row: true,
|
|
128
|
+
}
|
|
129
|
+
output << render_inline_loading_row(leaf_columns.length, current_depth, loading_row_data_attributes)
|
|
120
130
|
end
|
|
121
131
|
end
|
|
122
132
|
|
|
123
133
|
if row[:children].present?
|
|
124
134
|
row[:children].each do |child_row|
|
|
125
|
-
is_first_child = row[:children].first
|
|
135
|
+
is_first_child = row[:children].first.equal?(child_row)
|
|
136
|
+
is_last_child = group_separators && row[:children].last.equal?(child_row)
|
|
137
|
+
# Prefer nil? over || so year-level 0 is kept (0 is falsy in Ruby).
|
|
138
|
+
child_closes_from_depth = if is_last_child
|
|
139
|
+
group_closes_from_depth.nil? ? current_depth : group_closes_from_depth
|
|
140
|
+
end
|
|
126
141
|
immediate_parent_id = row.object_id
|
|
127
142
|
data_content = new_ancestor_ids.join("-") + "-#{child_row.object_id}"
|
|
128
143
|
|
|
@@ -133,7 +148,7 @@ module Playbook
|
|
|
133
148
|
advanced_table_content: data_content,
|
|
134
149
|
}
|
|
135
150
|
|
|
136
|
-
child_opts = { additional_classes: "toggle-content", table_data_attributes: child_data_attributes, immediate_parent_row_id: row[:id] }
|
|
151
|
+
child_opts = { additional_classes: "toggle-content", table_data_attributes: child_data_attributes, immediate_parent_row_id: row[:id], group_closes_from_depth: child_closes_from_depth }
|
|
137
152
|
child_opts[:is_pinned_row] = is_pinned_row
|
|
138
153
|
child_opts[:pinned_index] = next_pinned_index if is_pinned_row
|
|
139
154
|
child_opts[:pinned_position] = pinned_position if is_pinned_row
|
|
@@ -212,12 +227,17 @@ module Playbook
|
|
|
212
227
|
row_children_for(row)&.each { |child| collect_row_and_descendant_ids(child, set) }
|
|
213
228
|
end
|
|
214
229
|
|
|
215
|
-
def find_row_by_id(data, id, depth: 0, ancestor_ids: [], parent_row: nil)
|
|
230
|
+
def find_row_by_id(data, id, depth: 0, ancestor_ids: [], parent_row: nil, parent_closes_from_depth: nil)
|
|
216
231
|
id_str = id.to_s
|
|
217
|
-
Array(data)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
232
|
+
rows = Array(data)
|
|
233
|
+
rows.each do |row|
|
|
234
|
+
# Same chain as render_row_and_children so a pinned nested root gets the right separator inset.
|
|
235
|
+
closes_from_depth = if parent_row && row.equal?(rows.last)
|
|
236
|
+
parent_closes_from_depth.nil? ? depth - 1 : parent_closes_from_depth
|
|
237
|
+
end
|
|
238
|
+
return { row: row, depth: depth, ancestor_ids: ancestor_ids, parent_row: parent_row, group_closes_from_depth: closes_from_depth } if row_id_for(row).to_s == id_str
|
|
239
|
+
|
|
240
|
+
found = find_row_by_id(row_children_for(row), id_str, depth: depth + 1, ancestor_ids: ancestor_ids + [row.object_id], parent_row: row, parent_closes_from_depth: closes_from_depth)
|
|
221
241
|
return found if found
|
|
222
242
|
end
|
|
223
243
|
nil
|
|
@@ -299,6 +319,16 @@ module Playbook
|
|
|
299
319
|
accessors&.length || 0
|
|
300
320
|
end
|
|
301
321
|
|
|
322
|
+
# Mirrors React `buildGroupSeparatorInsets`: inset to the outermost closed
|
|
323
|
+
# group — year-level → 0 / full-bleed; nested → that group's collapsible-trail.
|
|
324
|
+
def group_separator_inset_em(closes_from_depth)
|
|
325
|
+
return 0 if closes_from_depth.to_i.zero?
|
|
326
|
+
|
|
327
|
+
trail_index = closes_from_depth.to_i + 1
|
|
328
|
+
additional_offset = trail_index > 1 ? (trail_index - 1) * 0.25 : 0
|
|
329
|
+
trail_index * 1.0 + additional_offset
|
|
330
|
+
end
|
|
331
|
+
|
|
302
332
|
private
|
|
303
333
|
|
|
304
334
|
def has_grouped_headers?
|
|
@@ -157,7 +157,7 @@ module Playbook
|
|
|
157
157
|
|
|
158
158
|
# Determines if the toggle-all button should be shown in the header based on inline row loading and persist toggle expansion button props
|
|
159
159
|
def show_toggle_all_button?
|
|
160
|
-
return false unless
|
|
160
|
+
return false unless %w[header all].include?(enable_toggle_expansion)
|
|
161
161
|
|
|
162
162
|
has_any_sub_rows? || (inline_row_loading && persist_toggle_expansion_button)
|
|
163
163
|
end
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<% (1..depth).each do |i| %>
|
|
23
23
|
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
|
|
24
24
|
<% left_offset = i * 1.0 + additional_offset %>
|
|
25
|
-
<div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
|
|
25
|
+
<div class="collapsible-trail" style="left: <%= left_offset %>em;<% if group_separators %> --collapsible-trail-left: <%= left_offset %>em;<% end %>"></div>
|
|
26
26
|
<% end %>
|
|
27
27
|
<% end %>
|
|
28
28
|
|
|
@@ -14,6 +14,8 @@ module Playbook
|
|
|
14
14
|
prop :depth
|
|
15
15
|
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
|
16
16
|
default: true
|
|
17
|
+
prop :group_separators, type: Playbook::Props::Boolean,
|
|
18
|
+
default: false
|
|
17
19
|
prop :table_data_attributes, type: Playbook::Props::HashProp,
|
|
18
20
|
default: {}
|
|
19
21
|
prop :loading, type: Playbook::Props::Boolean,
|
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
import { getPlacementProps } from './Utilities/GetPlacementPropsHelper'
|
|
7
8
|
|
|
8
9
|
import Image from "../pb_image/_image";
|
|
@@ -33,7 +34,7 @@ export type AvatarProps = {
|
|
|
33
34
|
name?: string,
|
|
34
35
|
size?: "md" | "lg" | "sm" | "xl" | "xs" | "xxs",
|
|
35
36
|
status?: "away" | "offline" | "online",
|
|
36
|
-
} & GlobalProps
|
|
37
|
+
} & GlobalProps & GlobalEventProps
|
|
37
38
|
|
|
38
39
|
const firstTwoInitials = (name: string) =>
|
|
39
40
|
name.split(/\s/).map((name) => name[0])
|
|
@@ -94,6 +95,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
|
94
95
|
{...ariaProps}
|
|
95
96
|
{...dataProps}
|
|
96
97
|
{...htmlProps}
|
|
98
|
+
{...globalEventProps(props)}
|
|
97
99
|
className={classes}
|
|
98
100
|
id={id}
|
|
99
101
|
>
|
|
@@ -59,14 +59,25 @@
|
|
|
59
59
|
"react",
|
|
60
60
|
"rails"
|
|
61
61
|
],
|
|
62
|
-
"values":
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
"values": {
|
|
63
|
+
"react": [
|
|
64
|
+
"md",
|
|
65
|
+
"lg",
|
|
66
|
+
"sm",
|
|
67
|
+
"xl",
|
|
68
|
+
"xs",
|
|
69
|
+
"xxs"
|
|
70
|
+
],
|
|
71
|
+
"rails": [
|
|
72
|
+
"xxs",
|
|
73
|
+
"xs",
|
|
74
|
+
"sm",
|
|
75
|
+
"md",
|
|
76
|
+
"base",
|
|
77
|
+
"lg",
|
|
78
|
+
"xl"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
70
81
|
"default": "md"
|
|
71
82
|
},
|
|
72
83
|
"status": {
|
|
@@ -79,10 +90,12 @@
|
|
|
79
90
|
"away",
|
|
80
91
|
"offline",
|
|
81
92
|
"online"
|
|
82
|
-
]
|
|
93
|
+
],
|
|
94
|
+
"default": null
|
|
83
95
|
}
|
|
84
96
|
},
|
|
85
97
|
"globalProps": true,
|
|
98
|
+
"globalEventProps": true,
|
|
86
99
|
"usage": {
|
|
87
100
|
"react": {
|
|
88
101
|
"import": "import { Avatar } from 'playbook-ui'",
|
|
@@ -90,7 +103,7 @@
|
|
|
90
103
|
},
|
|
91
104
|
"rails": {
|
|
92
105
|
"import": null,
|
|
93
|
-
"example": "<%= pb_rails(\"avatar\", props: { size: \"
|
|
106
|
+
"example": "<%= pb_rails(\"avatar\", props: { size: \"xxs\", status: \"away\" }) %>"
|
|
94
107
|
}
|
|
95
108
|
}
|
|
96
109
|
}
|
|
@@ -112,7 +112,10 @@
|
|
|
112
112
|
"react",
|
|
113
113
|
"rails"
|
|
114
114
|
],
|
|
115
|
-
"default":
|
|
115
|
+
"default": {
|
|
116
|
+
"react": "",
|
|
117
|
+
"rails": null
|
|
118
|
+
}
|
|
116
119
|
},
|
|
117
120
|
"backgroundRepeat": {
|
|
118
121
|
"type": {
|
|
@@ -140,7 +143,8 @@
|
|
|
140
143
|
"platforms": [
|
|
141
144
|
"react",
|
|
142
145
|
"rails"
|
|
143
|
-
]
|
|
146
|
+
],
|
|
147
|
+
"default": ""
|
|
144
148
|
},
|
|
145
149
|
"imageOverlay": {
|
|
146
150
|
"type": "enum",
|
|
@@ -217,7 +221,10 @@
|
|
|
217
221
|
"blur",
|
|
218
222
|
"scale"
|
|
219
223
|
],
|
|
220
|
-
"default":
|
|
224
|
+
"default": {
|
|
225
|
+
"react": "",
|
|
226
|
+
"rails": null
|
|
227
|
+
}
|
|
221
228
|
}
|
|
222
229
|
},
|
|
223
230
|
"globalProps": true,
|
|
@@ -11,13 +11,15 @@
|
|
|
11
11
|
"type": "GenericObject",
|
|
12
12
|
"platforms": [
|
|
13
13
|
"react"
|
|
14
|
-
]
|
|
14
|
+
],
|
|
15
|
+
"default": {}
|
|
15
16
|
},
|
|
16
17
|
"removeIcon": {
|
|
17
18
|
"type": "boolean",
|
|
18
19
|
"platforms": [
|
|
19
20
|
"react"
|
|
20
|
-
]
|
|
21
|
+
],
|
|
22
|
+
"default": false
|
|
21
23
|
},
|
|
22
24
|
"removeOnClick": {
|
|
23
25
|
"type": "function",
|
|
@@ -52,16 +54,28 @@
|
|
|
52
54
|
"react",
|
|
53
55
|
"rails"
|
|
54
56
|
],
|
|
55
|
-
"values":
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
"values": {
|
|
58
|
+
"react": [
|
|
59
|
+
"error",
|
|
60
|
+
"info",
|
|
61
|
+
"neutral",
|
|
62
|
+
"notification",
|
|
63
|
+
"notificationError",
|
|
64
|
+
"primary",
|
|
65
|
+
"success",
|
|
66
|
+
"warning"
|
|
67
|
+
],
|
|
68
|
+
"rails": [
|
|
69
|
+
"success",
|
|
70
|
+
"warning",
|
|
71
|
+
"error",
|
|
72
|
+
"info",
|
|
73
|
+
"neutral",
|
|
74
|
+
"notification",
|
|
75
|
+
"notification_error",
|
|
76
|
+
"primary"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
65
79
|
"default": "neutral"
|
|
66
80
|
}
|
|
67
81
|
},
|
|
@@ -73,7 +87,7 @@
|
|
|
73
87
|
},
|
|
74
88
|
"rails": {
|
|
75
89
|
"import": null,
|
|
76
|
-
"example": "<%= pb_rails(\"badge\", props: { variant: \"
|
|
90
|
+
"example": "<%= pb_rails(\"badge\", props: { variant: \"success\" }) %>"
|
|
77
91
|
}
|
|
78
92
|
}
|
|
79
93
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"template": "<Body{{props}}>{{children}}</Body>",
|
|
3
3
|
"propTargets": {},
|
|
4
4
|
"defaults": {
|
|
5
|
-
"
|
|
5
|
+
"highlightedText": [],
|
|
6
6
|
"highlighting": false,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"tag": "div",
|
|
8
|
+
"text": ""
|
|
9
9
|
},
|
|
10
10
|
"children": {
|
|
11
11
|
"editable": true,
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"error",
|
|
22
22
|
"success"
|
|
23
23
|
],
|
|
24
|
-
"default":
|
|
24
|
+
"default": {
|
|
25
|
+
"react": "",
|
|
26
|
+
"rails": "default"
|
|
27
|
+
}
|
|
25
28
|
},
|
|
26
29
|
"dark": {
|
|
27
30
|
"type": "boolean",
|
|
@@ -34,7 +37,8 @@
|
|
|
34
37
|
"platforms": [
|
|
35
38
|
"react",
|
|
36
39
|
"rails"
|
|
37
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"default": []
|
|
38
42
|
},
|
|
39
43
|
"highlighting": {
|
|
40
44
|
"type": "boolean",
|
|
@@ -55,7 +59,10 @@
|
|
|
55
59
|
"negative",
|
|
56
60
|
"positive"
|
|
57
61
|
],
|
|
58
|
-
"default":
|
|
62
|
+
"default": {
|
|
63
|
+
"react": null,
|
|
64
|
+
"rails": "neutral"
|
|
65
|
+
}
|
|
59
66
|
},
|
|
60
67
|
"tag": {
|
|
61
68
|
"type": "enum",
|
|
@@ -81,7 +88,8 @@
|
|
|
81
88
|
"platforms": [
|
|
82
89
|
"react",
|
|
83
90
|
"rails"
|
|
84
|
-
]
|
|
91
|
+
],
|
|
92
|
+
"default": ""
|
|
85
93
|
},
|
|
86
94
|
"variant": {
|
|
87
95
|
"type": "enum",
|
|
@@ -90,7 +98,8 @@
|
|
|
90
98
|
],
|
|
91
99
|
"values": [
|
|
92
100
|
"link"
|
|
93
|
-
]
|
|
101
|
+
],
|
|
102
|
+
"default": null
|
|
94
103
|
}
|
|
95
104
|
},
|
|
96
105
|
"globalProps": true,
|
|
@@ -34,10 +34,11 @@ type ButtonPropTypes = {
|
|
|
34
34
|
size?: 'sm' | 'md' | 'lg',
|
|
35
35
|
target?: string,
|
|
36
36
|
text?: string,
|
|
37
|
+
// @schemaOmit Deprecated. Adds `pb_button_${type}` only (default `inline`). Use `fullWidth` for layout and `variant` for appearance. HTML type is `htmlType`.
|
|
37
38
|
type?: 'inline' | null,
|
|
38
|
-
htmlType?: 'submit' | 'reset' | 'button' | undefined,
|
|
39
39
|
value?: string | null,
|
|
40
40
|
variant?: 'primary' | 'secondary' | 'link'| 'danger' | 'reaction',
|
|
41
|
+
htmlType?: 'submit' | 'reset' | 'button' | undefined,
|
|
41
42
|
wrapperClass?: string,
|
|
42
43
|
} & GlobalProps
|
|
43
44
|
|
|
@@ -60,6 +61,7 @@ const buttonClassName = (props: ButtonPropTypes) => {
|
|
|
60
61
|
const isIconOnly = icon && !text && !children && variant !== 'reaction'
|
|
61
62
|
|
|
62
63
|
if (variant) classNames.push(`pb_button_${variant}`)
|
|
64
|
+
// Deprecated `type` still controls this class, including legacy values. HTML type is `htmlType`.
|
|
63
65
|
if (type) classNames.push(`pb_button_${type}`)
|
|
64
66
|
if (fullWidth) classNames.push('pb_button_block')
|
|
65
67
|
classNames.push(disabled ? 'pb_button_disabled' : 'pb_button_enabled')
|
|
@@ -23,6 +23,9 @@ module Playbook
|
|
|
23
23
|
default: false
|
|
24
24
|
prop :target
|
|
25
25
|
prop :text
|
|
26
|
+
# HTML type attribute. Not a class hook.
|
|
27
|
+
# React uses `htmlType` for this. There is no Rails `html_type` prop.
|
|
28
|
+
# schema_values: submit, reset, button
|
|
26
29
|
prop :type
|
|
27
30
|
prop :value
|
|
28
31
|
prop :size, type: Playbook::Props::Enum,
|
|
@@ -132,6 +132,160 @@ test('should render child target prop', () => {
|
|
|
132
132
|
expect(kit).not.toHaveAttribute('rel')
|
|
133
133
|
})
|
|
134
134
|
|
|
135
|
+
describe('type and htmlType', () => {
|
|
136
|
+
test('defaults to pb_button_inline and html type button', () => {
|
|
137
|
+
render(
|
|
138
|
+
<Button
|
|
139
|
+
data={{ testid: 'default-type' }}
|
|
140
|
+
text="Save"
|
|
141
|
+
/>
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
const kit = screen.getByTestId('default-type')
|
|
145
|
+
expect(kit).toHaveClass('pb_button_kit pb_button_primary pb_button_inline pb_button_enabled')
|
|
146
|
+
expect(kit).not.toHaveClass('pb_button_block')
|
|
147
|
+
expect(kit).toHaveAttribute('type', 'button')
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
test('type="inline" adds pb_button_inline without changing the html type', () => {
|
|
151
|
+
render(
|
|
152
|
+
<Button
|
|
153
|
+
data={{ testid: 'inline-type' }}
|
|
154
|
+
type="inline"
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
const kit = screen.getByTestId('inline-type')
|
|
159
|
+
expect(kit).toHaveClass('pb_button_inline')
|
|
160
|
+
expect(kit).toHaveAttribute('type', 'button')
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
test('type={null} omits the layout class', () => {
|
|
164
|
+
render(
|
|
165
|
+
<Button
|
|
166
|
+
data={{ testid: 'null-type' }}
|
|
167
|
+
type={null}
|
|
168
|
+
/>
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
const kit = screen.getByTestId('null-type')
|
|
172
|
+
expect(kit).not.toHaveClass('pb_button_inline')
|
|
173
|
+
expect(kit).toHaveAttribute('type', 'button')
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
test('legacy and undocumented type strings still generate pb_button_${type}', () => {
|
|
177
|
+
const { unmount } = render(
|
|
178
|
+
<Button
|
|
179
|
+
data={{ testid: 'legacy-link' }}
|
|
180
|
+
type="link"
|
|
181
|
+
/>
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
const linkType = screen.getByTestId('legacy-link')
|
|
185
|
+
expect(linkType).toHaveClass('pb_button_primary')
|
|
186
|
+
expect(linkType).toHaveClass('pb_button_link')
|
|
187
|
+
expect(linkType).toHaveAttribute('type', 'button')
|
|
188
|
+
unmount()
|
|
189
|
+
|
|
190
|
+
render(
|
|
191
|
+
<Button
|
|
192
|
+
data={{ testid: 'legacy-submit' }}
|
|
193
|
+
type="submit"
|
|
194
|
+
/>
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
const submitType = screen.getByTestId('legacy-submit')
|
|
198
|
+
expect(submitType).toHaveClass('pb_button_submit')
|
|
199
|
+
expect(submitType).toHaveAttribute('type', 'button')
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
test('fullWidth keeps pb_button_inline and adds pb_button_block', () => {
|
|
203
|
+
render(
|
|
204
|
+
<Button
|
|
205
|
+
data={{ testid: 'full-width-type' }}
|
|
206
|
+
fullWidth
|
|
207
|
+
/>
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
const kit = screen.getByTestId('full-width-type')
|
|
211
|
+
expect(kit).toHaveClass('pb_button_inline')
|
|
212
|
+
expect(kit).toHaveClass('pb_button_block')
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
test('htmlType sets the attribute on standard and reaction buttons', () => {
|
|
216
|
+
const { unmount } = render(
|
|
217
|
+
<Button
|
|
218
|
+
data={{ testid: 'html-submit' }}
|
|
219
|
+
htmlType="submit"
|
|
220
|
+
/>
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
expect(screen.getByTestId('html-submit')).toHaveAttribute('type', 'submit')
|
|
224
|
+
unmount()
|
|
225
|
+
|
|
226
|
+
render(
|
|
227
|
+
<Button
|
|
228
|
+
data={{ testid: 'html-reset' }}
|
|
229
|
+
htmlType="reset"
|
|
230
|
+
variant="reaction"
|
|
231
|
+
/>
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
const kit = screen.getByTestId('html-reset')
|
|
235
|
+
expect(kit).toHaveAttribute('type', 'reset')
|
|
236
|
+
expect(kit).toHaveClass('pb_button_reaction')
|
|
237
|
+
expect(kit).toHaveClass('pb_button_inline')
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
test('htmlType is omitted when link renders an anchor', () => {
|
|
241
|
+
render(
|
|
242
|
+
<Button
|
|
243
|
+
data={{ testid: 'html-link' }}
|
|
244
|
+
htmlType="submit"
|
|
245
|
+
link="https://example.com"
|
|
246
|
+
/>
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
const kit = screen.getByTestId('html-link')
|
|
250
|
+
expect(kit.tagName).toBe('A')
|
|
251
|
+
expect(kit).toHaveAttribute('href', 'https://example.com')
|
|
252
|
+
expect(kit).not.toHaveAttribute('type')
|
|
253
|
+
expect(kit).toHaveClass('pb_button_inline')
|
|
254
|
+
})
|
|
255
|
+
|
|
256
|
+
test('htmlType overrides htmlOptions.type', () => {
|
|
257
|
+
render(
|
|
258
|
+
<Button
|
|
259
|
+
data={{ testid: 'html-override' }}
|
|
260
|
+
htmlOptions={{ type: 'submit' }}
|
|
261
|
+
htmlType="reset"
|
|
262
|
+
/>
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
expect(screen.getByTestId('html-override')).toHaveAttribute('type', 'reset')
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
test('loading, disabled, and variant classes stay independent of type', () => {
|
|
269
|
+
render(
|
|
270
|
+
<Button
|
|
271
|
+
data={{ testid: 'type-states' }}
|
|
272
|
+
disabled
|
|
273
|
+
loading
|
|
274
|
+
type="inline"
|
|
275
|
+
variant="danger"
|
|
276
|
+
/>
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
const kit = screen.getByTestId('type-states')
|
|
280
|
+
expect(kit).toHaveClass('pb_button_danger')
|
|
281
|
+
expect(kit).toHaveClass('pb_button_inline')
|
|
282
|
+
expect(kit).toHaveClass('pb_button_disabled')
|
|
283
|
+
expect(kit).toHaveClass('pb_button_loading')
|
|
284
|
+
expect(kit).toBeDisabled()
|
|
285
|
+
expect(kit).toHaveAttribute('type', 'button')
|
|
286
|
+
})
|
|
287
|
+
})
|
|
288
|
+
|
|
135
289
|
describe('icon-only button', () => {
|
|
136
290
|
test('adds pb_button_icon_only class when icon is provided without text', () => {
|
|
137
291
|
render(
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
`type` sets the HTML `type` attribute (`submit`, `reset`, or `button`). It does not change classes. When `type` is omitted, the attribute is omitted and a button inside a form submits by default.
|
|
2
|
+
|
|
3
|
+
There is no `html_type` prop. Pass `type` instead.
|
|
4
|
+
|
|
5
|
+
`value` is the HTML `value` attribute. The visible label is `text`, so `value` does not appear on the button. When this button submits a form and it has a `name`, the browser includes that name and value in the form data. `"1234"` in the example is only a sample value.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
`onClick` runs when the button is clicked. The example alerts.
|
|
2
|
+
|
|
3
|
+
`htmlType` sets the HTML `type` attribute on a `<button>` (`submit`, `reset`, or `button`). It defaults to `button`, so the button does not submit a form unless you pass `htmlType="submit"`. When `link` is set, the kit renders an `<a>` and does not emit `htmlType`.
|
|
4
|
+
|
|
5
|
+
`value` is the HTML `value` attribute. The visible label is `text`, so `value` does not appear on the button. When this button submits a form and it has a `name`, the browser includes that name and value in the form data. `"1234"` in the example is only a sample value.
|
|
6
|
+
|
|
7
|
+
`tabIndex` sets the HTML `tabindex`. `0` keeps the button in the normal tab order.
|
|
8
|
+
|
|
9
|
+
**Deprecated:** React `type`. It does not set the HTML attribute. It only adds the class `pb_button_${type}`. The default is `inline`, which adds `pb_button_inline`. That class has no stylesheet rule; the button is already inline-flex. `type={null}` omits the class. Other strings, including older undocumented values, still add `pb_button_${type}` so existing classnames stay the same.
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
"iconRight": false,
|
|
9
9
|
"loading": false,
|
|
10
10
|
"newWindow": false,
|
|
11
|
-
"
|
|
12
|
-
"variant": "primary"
|
|
11
|
+
"target": "",
|
|
12
|
+
"variant": "primary",
|
|
13
|
+
"htmlType": "button"
|
|
13
14
|
},
|
|
14
15
|
"children": {
|
|
15
16
|
"editable": true,
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"name": "Form",
|
|
57
58
|
"props": [
|
|
58
59
|
"htmlType",
|
|
60
|
+
"type",
|
|
59
61
|
"form",
|
|
60
62
|
"value",
|
|
61
63
|
"tabIndex"
|