diff --git a/static/arguments.json b/static/arguments.json index 7f5e27accd..aa992e8e17 100644 --- a/static/arguments.json +++ b/static/arguments.json @@ -5023,6 +5023,22 @@ } ] }, + { + "component": "OpenProject::SubHeader", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectSubHeader", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/default/", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "[System arguments](/system-arguments)" + } + ] + }, { "component": "OpenProject::ZenModeButton", "status": "open_project", diff --git a/static/audited_at.json b/static/audited_at.json index 7b51399e1a..71c9843bbf 100644 --- a/static/audited_at.json +++ b/static/audited_at.json @@ -123,6 +123,7 @@ "Primer::OpenProject::PageHeader": "", "Primer::OpenProject::PageHeader::Dialog": "", "Primer::OpenProject::PageHeader::Menu": "", + "Primer::OpenProject::SubHeader": "", "Primer::OpenProject::ZenModeButton": "", "Primer::Tooltip": "", "Primer::Truncate": "" diff --git a/static/constants.json b/static/constants.json index c729ce2cf9..54a4d6b0f7 100644 --- a/static/constants.json +++ b/static/constants.json @@ -1473,6 +1473,10 @@ }, "Primer::OpenProject::PageHeader::Menu": { }, + "Primer::OpenProject::SubHeader": { + "HIDDEN_FILTER_TARGET_SELECTOR": "sub-header.hiddenItemsOnExpandedFilter", + "SHOWN_FILTER_TARGET_SELECTOR": "sub-header.shownItemsOnExpandedFilter" + }, "Primer::OpenProject::ZenModeButton": { "ZEN_MODE_BUTTON_ICON": "screen-full", "ZEN_MODE_BUTTON_LABEL": "Translation missing: en.label_zen_mode" diff --git a/static/info_arch.json b/static/info_arch.json index 6e1bdd9595..c64ecfc727 100644 --- a/static/info_arch.json +++ b/static/info_arch.json @@ -16951,6 +16951,177 @@ ] }, + { + "fully_qualified_name": "Primer::OpenProject::SubHeader", + "description": "The SubHeader contains specific actions to modify the page content below, e.g a filter button or a create button\nIt should not be used stand alone, but in combination with a PageHeader, either as a direct sibling or as part of a tab content", + "accessibility_docs": null, + "is_form_component": false, + "is_published": true, + "requires_js": false, + "component": "OpenProject::SubHeader", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectSubHeader", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/default/", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ], + "slots": [ + { + "name": "actions", + "description": "A button or custom content that will render on the right-hand side of the component.\n\nTo render a button, call the `with_button` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}.\n\nTo render custom content, call the `with_button_component` method and pass a block that returns HTML.", + "parameters": [ + + ] + }, + { + "name": "filter_input", + "description": null, + "parameters": [ + + ] + }, + { + "name": "filter_button", + "description": "A button or custom content that will render on the left-hand side of the component, next to the filter input.\n\nTo render a button, call the `with_filter_button` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}.\n\nTo render custom content, call the `with_filter_component` method and pass a block that returns HTML.", + "parameters": [ + + ] + }, + { + "name": "text", + "description": null, + "parameters": [ + + ] + }, + { + "name": "bottom_pane_component", + "description": "A slot for a generic component which will be shown in a second row below the rest, spanning the whole width", + "parameters": [ + + ] + } + ], + "methods": [ + + ], + "previews": [ + { + "preview_path": "primer/open_project/sub_header/playground", + "name": "playground", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/default", + "name": "default", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/action_menu_buttons", + "name": "action_menu_buttons", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/dialog_buttons", + "name": "dialog_buttons", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/button_group", + "name": "button_group", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/custom_filter_button", + "name": "custom_filter_button", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/bottom_pane", + "name": "bottom_pane", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/text", + "name": "text", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + } + ], + "subcomponents": [ + + ] + }, { "fully_qualified_name": "Primer::OpenProject::ZenModeButton", "description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.", diff --git a/static/previews.json b/static/previews.json index 81262f98b3..40c193e71a 100644 --- a/static/previews.json +++ b/static/previews.json @@ -6310,6 +6310,118 @@ } ] }, + { + "name": "sub_header", + "component": "OpenProject::SubHeader", + "status": "open_project", + "lookup_path": "primer/open_project/sub_header", + "examples": [ + { + "preview_path": "primer/open_project/sub_header/playground", + "name": "playground", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/default", + "name": "default", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/action_menu_buttons", + "name": "action_menu_buttons", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/dialog_buttons", + "name": "dialog_buttons", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/button_group", + "name": "button_group", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/custom_filter_button", + "name": "custom_filter_button", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/bottom_pane", + "name": "bottom_pane", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/sub_header/text", + "name": "text", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + } + ] + }, { "name": "subhead", "component": "Subhead", diff --git a/static/statuses.json b/static/statuses.json index edad1b5b17..1c033d3cbf 100644 --- a/static/statuses.json +++ b/static/statuses.json @@ -123,6 +123,7 @@ "Primer::OpenProject::PageHeader": "open_project", "Primer::OpenProject::PageHeader::Dialog": "open_project", "Primer::OpenProject::PageHeader::Menu": "open_project", + "Primer::OpenProject::SubHeader": "open_project", "Primer::OpenProject::ZenModeButton": "open_project", "Primer::Tooltip": "deprecated", "Primer::Truncate": "deprecated"