openproject-primer_view_components 0.26.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/app/assets/javascripts/app/components/primer/open_project/zen_mode_button.d.ts +13 -0
  4. data/app/assets/javascripts/app/components/primer/primer.d.ts +1 -0
  5. data/app/assets/javascripts/primer_view_components.js +1 -1
  6. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  7. data/app/components/primer/open_project/page_header/dialog.rb +38 -0
  8. data/app/components/primer/open_project/page_header/menu.rb +38 -0
  9. data/app/components/primer/open_project/page_header.rb +16 -27
  10. data/app/components/primer/open_project/zen_mode_button.d.ts +13 -0
  11. data/app/components/primer/open_project/zen_mode_button.html.erb +11 -0
  12. data/app/components/primer/open_project/zen_mode_button.js +45 -0
  13. data/app/components/primer/open_project/zen_mode_button.rb +23 -0
  14. data/app/components/primer/open_project/zen_mode_button.ts +42 -0
  15. data/app/components/primer/primer.d.ts +1 -0
  16. data/app/components/primer/primer.js +1 -0
  17. data/app/components/primer/primer.ts +1 -0
  18. data/lib/primer/view_components/version.rb +1 -1
  19. data/previews/primer/open_project/page_header_preview/actions.html.erb +0 -8
  20. data/previews/primer/open_project/page_header_preview.rb +48 -0
  21. data/previews/primer/open_project/zen_mode_button_preview.rb +22 -0
  22. data/static/arguments.json +42 -4
  23. data/static/audited_at.json +3 -1
  24. data/static/constants.json +7 -2
  25. data/static/info_arch.json +131 -6
  26. data/static/previews.json +60 -0
  27. data/static/statuses.json +3 -1
  28. metadata +11 -2
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module OpenProject
5
+ class PageHeader
6
+ # A Helper class to create ActionMenus inside the PageHeader action slot
7
+ # Do not use standalone
8
+ class Dialog < Primer::Component
9
+ status :open_project
10
+
11
+ # @param dialog_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::Dialog) %>.
12
+ # @param button_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Beta::Button) %> or <%= link_to_component(Primer::Beta::IconButton) %>, depending on the value of the `icon:` argument.
13
+ def initialize(dialog_arguments: {}, button_arguments: {})
14
+ callback = button_arguments.delete(:button_block)
15
+
16
+ @dialog = Primer::Alpha::Dialog.new(**dialog_arguments)
17
+ @button = @dialog.with_show_button(**button_arguments) do |button|
18
+ callback&.call(button)
19
+ end
20
+ end
21
+
22
+ def render_in(view_context, &block)
23
+ super(view_context) do
24
+ block&.call(@dialog, @button)
25
+ end
26
+ end
27
+
28
+ def before_render
29
+ content
30
+ end
31
+
32
+ def call
33
+ render(@dialog)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module OpenProject
5
+ class PageHeader
6
+ # A Helper class to create ActionMenus inside the PageHeader action slot
7
+ # It should not be used standalone
8
+ class Menu < Primer::Component
9
+ status :open_project
10
+
11
+ # @param menu_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::ActionMenu) %>.
12
+ # @param button_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Beta::Button) %> or <%= link_to_component(Primer::Beta::IconButton) %>, depending on the value of the `icon:` argument.
13
+ def initialize(menu_arguments: {}, button_arguments: {})
14
+ callback = button_arguments.delete(:button_block)
15
+
16
+ @menu = Primer::Alpha::ActionMenu.new(**menu_arguments)
17
+ @button = @menu.with_show_button(**button_arguments) do |button|
18
+ callback&.call(button)
19
+ end
20
+ end
21
+
22
+ def render_in(view_context, &block)
23
+ super(view_context) do
24
+ block&.call(@menu, @button)
25
+ end
26
+ end
27
+
28
+ def before_render
29
+ content
30
+ end
31
+
32
+ def call
33
+ render(@menu)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -97,7 +97,20 @@ module Primer
97
97
  # Add the options individually to the mobile menu in the template
98
98
  @desktop_menu_block = block
99
99
 
100
- PageHeaderActionMenu.new(**system_arguments)
100
+ Primer::OpenProject::PageHeader::Menu.new(**system_arguments)
101
+ },
102
+ },
103
+ dialog: {
104
+ renders: lambda { |mobile_icon:, mobile_label:, **system_arguments|
105
+ deny_tag_argument(**system_arguments)
106
+
107
+ # The id will be automatically calculated for the trigger button, so we have to behave the same, for the mobile click to work
108
+ system_arguments[:button_arguments][:id] = "dialog-show-#{system_arguments[:dialog_arguments][:id]}"
109
+
110
+ system_arguments[:button_arguments] = set_action_arguments(system_arguments[:button_arguments])
111
+ add_option_to_mobile_menu(system_arguments[:button_arguments], mobile_icon, mobile_label, :default)
112
+
113
+ Primer::OpenProject::PageHeader::Dialog.new(**system_arguments)
101
114
  },
102
115
  },
103
116
  }
@@ -183,6 +196,8 @@ module Primer
183
196
 
184
197
  def render?
185
198
  raise ArgumentError, "PageHeader needs a title and a breadcrumb. Please use the `with_title` and `with_breadcrumbs` slot" unless breadcrumbs? || Rails.env.production?
199
+ raise ArgumentError, "PageHeader allows only a maximum of 5 actions" if actions.count > 5
200
+
186
201
  title? && breadcrumbs?
187
202
  end
188
203
 
@@ -253,32 +268,6 @@ module Primer
253
268
  def anchor_tag_string?(item)
254
269
  item.is_a?(String) && item.start_with?("\u003c")
255
270
  end
256
-
257
- # A Helper class to create ActionMenus inside the PageHeader action slot
258
- class PageHeaderActionMenu < Primer::Component
259
- status :open_project
260
-
261
- # @param menu_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::ActionMenu) %>.
262
- # @param button_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Beta::Button) %> or <%= link_to_component(Primer::Beta::IconButton) %>, depending on the value of the `icon:` argument.
263
- def initialize(menu_arguments: {}, button_arguments: {})
264
- @menu = Primer::Alpha::ActionMenu.new(**menu_arguments)
265
- @button = @menu.with_show_button(icon: "triangle-down", **button_arguments)
266
- end
267
-
268
- def render_in(view_context, &block)
269
- super(view_context) do
270
- block.call(@menu, @button)
271
- end
272
- end
273
-
274
- def before_render
275
- content
276
- end
277
-
278
- def call
279
- render(@menu)
280
- end
281
- end
282
271
  end
283
272
  end
284
273
  end
@@ -0,0 +1,13 @@
1
+ declare class ZenModeButtonElement extends HTMLElement {
2
+ button: HTMLElement;
3
+ inZenMode: boolean;
4
+ private deactivateZenMode;
5
+ private activateZenMode;
6
+ performAction(): void;
7
+ }
8
+ declare global {
9
+ interface Window {
10
+ ZenModeButtonElement: typeof ZenModeButtonElement;
11
+ }
12
+ }
13
+ export {};
@@ -0,0 +1,11 @@
1
+ <%= render(Primer::BaseComponent.new(**@system_arguments)) do %>
2
+ <%= render(
3
+ Primer::Beta::IconButton.new(
4
+ scheme: :default,
5
+ id: "zenModeButton",
6
+ icon: "screen-normal",
7
+ aria: { label: I18n.t("zen_mode") },
8
+ data: { target: "zen-mode-button.button", action: "click:zen-mode-button#performAction" }
9
+ )
10
+ ) %>
11
+ <% end %>
@@ -0,0 +1,45 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { controller, target } from '@github/catalyst';
8
+ let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.inZenMode = false;
12
+ }
13
+ deactivateZenMode() {
14
+ this.inZenMode = false;
15
+ this.button.setAttribute('aria-pressed', 'false');
16
+ if (document.exitFullscreen) {
17
+ void document.exitFullscreen();
18
+ }
19
+ }
20
+ activateZenMode() {
21
+ this.inZenMode = true;
22
+ this.button.setAttribute('aria-pressed', 'true');
23
+ if (document.documentElement.requestFullscreen) {
24
+ void document.documentElement.requestFullscreen();
25
+ }
26
+ }
27
+ performAction() {
28
+ if (this.inZenMode) {
29
+ this.deactivateZenMode();
30
+ }
31
+ else {
32
+ this.activateZenMode();
33
+ }
34
+ }
35
+ };
36
+ __decorate([
37
+ target
38
+ ], ZenModeButtonElement.prototype, "button", void 0);
39
+ ZenModeButtonElement = __decorate([
40
+ controller
41
+ ], ZenModeButtonElement);
42
+ if (!window.customElements.get('zen-mode-button')) {
43
+ window.ZenModeButtonElement = ZenModeButtonElement;
44
+ window.customElements.define('zen-mode-button', ZenModeButtonElement);
45
+ }
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module OpenProject
5
+ # Add a general description of component here
6
+ # Add additional usage considerations or best practices that may aid the user to use the component correctly.
7
+ # @accessibility Add any accessibility considerations
8
+ class ZenModeButton < Primer::Component
9
+ status :open_project
10
+
11
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
12
+ def initialize(**system_arguments)
13
+ @system_arguments = system_arguments
14
+ @system_arguments[:tag] = "zen-mode-button"
15
+ @system_arguments[:classes] =
16
+ class_names(
17
+ @system_arguments[:classes],
18
+ "ZenModeButton"
19
+ )
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,42 @@
1
+ import {controller, target} from '@github/catalyst'
2
+
3
+ @controller
4
+ class ZenModeButtonElement extends HTMLElement {
5
+ @target button: HTMLElement
6
+ inZenMode = false
7
+
8
+ private deactivateZenMode() {
9
+ this.inZenMode = false
10
+ this.button.setAttribute('aria-pressed', 'false')
11
+ if (document.exitFullscreen) {
12
+ void document.exitFullscreen()
13
+ }
14
+ }
15
+
16
+ private activateZenMode() {
17
+ this.inZenMode = true
18
+ this.button.setAttribute('aria-pressed', 'true')
19
+ if (document.documentElement.requestFullscreen) {
20
+ void document.documentElement.requestFullscreen()
21
+ }
22
+ }
23
+
24
+ public performAction() {
25
+ if (this.inZenMode) {
26
+ this.deactivateZenMode()
27
+ } else {
28
+ this.activateZenMode()
29
+ }
30
+ }
31
+ }
32
+
33
+ declare global {
34
+ interface Window {
35
+ ZenModeButtonElement: typeof ZenModeButtonElement
36
+ }
37
+ }
38
+
39
+ if (!window.customElements.get('zen-mode-button')) {
40
+ window.ZenModeButtonElement = ZenModeButtonElement
41
+ window.customElements.define('zen-mode-button', ZenModeButtonElement)
42
+ }
@@ -23,3 +23,4 @@ import '../../../lib/primer/forms/primer_text_field';
23
23
  import '../../../lib/primer/forms/toggle_switch_input';
24
24
  import './alpha/action_menu/action_menu_element';
25
25
  import './open_project/page_header_element';
26
+ import './open_project/zen_mode_button';
@@ -23,3 +23,4 @@ import '../../../lib/primer/forms/primer_text_field';
23
23
  import '../../../lib/primer/forms/toggle_switch_input';
24
24
  import './alpha/action_menu/action_menu_element';
25
25
  import './open_project/page_header_element';
26
+ import './open_project/zen_mode_button';
@@ -23,3 +23,4 @@ import '../../../lib/primer/forms/primer_text_field'
23
23
  import '../../../lib/primer/forms/toggle_switch_input'
24
24
  import './alpha/action_menu/action_menu_element'
25
25
  import './open_project/page_header_element'
26
+ import './open_project/zen_mode_button'
@@ -5,7 +5,7 @@ module Primer
5
5
  module ViewComponents
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 26
8
+ MINOR = 27
9
9
  PATCH = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
@@ -14,12 +14,4 @@
14
14
  <% end %>
15
15
  <% component.with_action_button(mobile_icon: nil, mobile_label: nil) { "Hide on mobile" } %>
16
16
  <% component.with_action_icon_button(icon: "trash", mobile_icon: "trash", label: "Delete", scheme: :danger) %>
17
- <% component.with_action_menu(menu_arguments: { anchor_align: :end }, button_arguments: { icon: "op-kebab-vertical", "aria-label": "Some actions" }) do |menu, button| %>
18
- <% menu.with_item(label: "Subitem 1") do |item| %>
19
- <% item.with_leading_visual_icon(icon: :paste) %>
20
- <% end %>
21
- <% menu.with_item(label: "Subitem 2") do |item| %>
22
- <% item.with_leading_visual_icon(icon: :log) %>
23
- <% end %>
24
- <% end %>
25
17
  <% end %>
@@ -56,6 +56,54 @@ module Primer
56
56
  render_with_template(locals: {})
57
57
  end
58
58
 
59
+ # @label With a menu inside the actions
60
+ def menu_actions
61
+ callback = lambda do |button|
62
+ button.with_leading_visual_icon(icon: :alert)
63
+ "Click me"
64
+ end
65
+
66
+ render(Primer::OpenProject::PageHeader.new) do |component|
67
+ component.with_title { "Great news" }
68
+ component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"])
69
+
70
+ component.with_action_button(mobile_icon: "star", mobile_label: "Star") do |button|
71
+ button.with_leading_visual_icon(icon: "star")
72
+ "Star"
73
+ end
74
+ component.with_action_menu(menu_arguments: { anchor_align: :end },
75
+ button_arguments: { button_block: callback }) do |menu|
76
+ menu.with_item(label: "Subitem 1") do |item|
77
+ item.with_leading_visual_icon(icon: :paste)
78
+ end
79
+ menu.with_item(label: "Subitem 2") do |item|
80
+ item.with_leading_visual_icon(icon: :log)
81
+ end
82
+ end
83
+ end
84
+ end
85
+
86
+ # @label With a dialog inside the actions
87
+ def dialog_actions
88
+ callback = lambda do |button|
89
+ button.with_leading_visual_icon(icon: :plus)
90
+ "Open dialog"
91
+ end
92
+
93
+ render(Primer::OpenProject::PageHeader.new) do |component|
94
+ component.with_title { "Great news" }
95
+ component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"])
96
+
97
+ component.with_action_icon_button(icon: :trash, mobile_icon: :trash, label: "Delete", scheme: :danger)
98
+
99
+ component.with_action_dialog(mobile_icon: :plus, mobile_label: "Open dialog",
100
+ dialog_arguments: { id: "my_dialog", title: "A great dialog" },
101
+ button_arguments: { button_block: callback }) do |d|
102
+ d.with_body { "Hello" }
103
+ end
104
+ end
105
+ end
106
+
59
107
  # @label With leading action (on wide)
60
108
  # **Leading action** is only shown on **wide screens** by default.
61
109
  # If you want to override that behaviour please use the system_argument: **display**
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Primer
7
+ module OpenProject
8
+ # @label ZenModeButton
9
+ class ZenModeButtonPreview < ViewComponent::Preview
10
+ # @label Default
11
+ # @snapshot
12
+ def default
13
+ render(Primer::OpenProject::ZenModeButton.new)
14
+ end
15
+
16
+ # @label Playground
17
+ def playground
18
+ render(Primer::OpenProject::ZenModeButton.new)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -4974,12 +4974,34 @@
4974
4974
  ]
4975
4975
  },
4976
4976
  {
4977
- "component": "OpenProject::PageHeader::PageHeaderActionMenu",
4977
+ "component": "OpenProject::PageHeader::Dialog",
4978
4978
  "status": "open_project",
4979
4979
  "a11y_reviewed": false,
4980
- "short_name": "OpenProjectPageHeaderPageHeaderActionMenu",
4981
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/page_header_action_menu.rb",
4982
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/page_header_action_menu/default/",
4980
+ "short_name": "OpenProjectPageHeaderDialog",
4981
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/dialog.rb",
4982
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/dialog/default/",
4983
+ "parameters": [
4984
+ {
4985
+ "name": "dialog_arguments",
4986
+ "type": "Hash",
4987
+ "default": "`{}`",
4988
+ "description": "The arguments accepted by [Dialog](/components/alpha/dialog)."
4989
+ },
4990
+ {
4991
+ "name": "button_arguments",
4992
+ "type": "Hash",
4993
+ "default": "`{}`",
4994
+ "description": "The arguments accepted by [Button](/components/beta/button) or [IconButton](/components/beta/iconbutton), depending on the value of the `icon:` argument."
4995
+ }
4996
+ ]
4997
+ },
4998
+ {
4999
+ "component": "OpenProject::PageHeader::Menu",
5000
+ "status": "open_project",
5001
+ "a11y_reviewed": false,
5002
+ "short_name": "OpenProjectPageHeaderMenu",
5003
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/menu.rb",
5004
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/menu/default/",
4983
5005
  "parameters": [
4984
5006
  {
4985
5007
  "name": "menu_arguments",
@@ -4995,6 +5017,22 @@
4995
5017
  }
4996
5018
  ]
4997
5019
  },
5020
+ {
5021
+ "component": "OpenProject::ZenModeButton",
5022
+ "status": "open_project",
5023
+ "a11y_reviewed": false,
5024
+ "short_name": "OpenProjectZenModeButton",
5025
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/zen_mode_button.rb",
5026
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/zen_mode_button/default/",
5027
+ "parameters": [
5028
+ {
5029
+ "name": "system_arguments",
5030
+ "type": "Hash",
5031
+ "default": "N/A",
5032
+ "description": "[System arguments](/system-arguments)"
5033
+ }
5034
+ ]
5035
+ },
4998
5036
  {
4999
5037
  "component": "Tooltip",
5000
5038
  "status": "deprecated",
@@ -121,7 +121,9 @@
121
121
  "Primer::OpenProject::GridLayout::Area": "",
122
122
  "Primer::OpenProject::InputGroup": "",
123
123
  "Primer::OpenProject::PageHeader": "",
124
- "Primer::OpenProject::PageHeader::PageHeaderActionMenu": "",
124
+ "Primer::OpenProject::PageHeader::Dialog": "",
125
+ "Primer::OpenProject::PageHeader::Menu": "",
126
+ "Primer::OpenProject::ZenModeButton": "",
125
127
  "Primer::Tooltip": "",
126
128
  "Primer::Truncate": ""
127
129
  }
@@ -1449,6 +1449,7 @@
1449
1449
  "block",
1450
1450
  "none"
1451
1451
  ],
1452
+ "Dialog": "Primer::OpenProject::PageHeader::Dialog",
1452
1453
  "HEADER_VARIANT_OPTIONS": [
1453
1454
  "medium",
1454
1455
  "large"
@@ -1466,9 +1467,13 @@
1466
1467
  "flex",
1467
1468
  "none"
1468
1469
  ],
1469
- "PageHeaderActionMenu": "Primer::OpenProject::PageHeader::PageHeaderActionMenu"
1470
+ "Menu": "Primer::OpenProject::PageHeader::Menu"
1470
1471
  },
1471
- "Primer::OpenProject::PageHeader::PageHeaderActionMenu": {
1472
+ "Primer::OpenProject::PageHeader::Dialog": {
1473
+ },
1474
+ "Primer::OpenProject::PageHeader::Menu": {
1475
+ },
1476
+ "Primer::OpenProject::ZenModeButton": {
1472
1477
  },
1473
1478
  "Primer::Tooltip": {
1474
1479
  "ALIGN_DEFAULT": "default",
@@ -16605,6 +16605,32 @@
16605
16605
  ]
16606
16606
  }
16607
16607
  },
16608
+ {
16609
+ "preview_path": "primer/open_project/page_header/menu_actions",
16610
+ "name": "menu_actions",
16611
+ "snapshot": "false",
16612
+ "skip_rules": {
16613
+ "wont_fix": [
16614
+ "region"
16615
+ ],
16616
+ "will_fix": [
16617
+ "color-contrast"
16618
+ ]
16619
+ }
16620
+ },
16621
+ {
16622
+ "preview_path": "primer/open_project/page_header/dialog_actions",
16623
+ "name": "dialog_actions",
16624
+ "snapshot": "false",
16625
+ "skip_rules": {
16626
+ "wont_fix": [
16627
+ "region"
16628
+ ],
16629
+ "will_fix": [
16630
+ "color-contrast"
16631
+ ]
16632
+ }
16633
+ },
16608
16634
  {
16609
16635
  "preview_path": "primer/open_project/page_header/leading_action",
16610
16636
  "name": "leading_action",
@@ -16637,18 +16663,58 @@
16637
16663
  ]
16638
16664
  },
16639
16665
  {
16640
- "fully_qualified_name": "Primer::OpenProject::PageHeader::PageHeaderActionMenu",
16641
- "description": "A Helper class to create ActionMenus inside the PageHeader action slot",
16666
+ "fully_qualified_name": "Primer::OpenProject::PageHeader::Dialog",
16667
+ "description": "A Helper class to create ActionMenus inside the PageHeader action slot\nDo not use standalone",
16668
+ "accessibility_docs": null,
16669
+ "is_form_component": false,
16670
+ "is_published": true,
16671
+ "requires_js": false,
16672
+ "component": "OpenProject::PageHeader::Dialog",
16673
+ "status": "open_project",
16674
+ "a11y_reviewed": false,
16675
+ "short_name": "OpenProjectPageHeaderDialog",
16676
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/dialog.rb",
16677
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/dialog/default/",
16678
+ "parameters": [
16679
+ {
16680
+ "name": "dialog_arguments",
16681
+ "type": "Hash",
16682
+ "default": "`{}`",
16683
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Dialog{{/link_to_component}}."
16684
+ },
16685
+ {
16686
+ "name": "button_arguments",
16687
+ "type": "Hash",
16688
+ "default": "`{}`",
16689
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}} or {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}, depending on the value of the `icon:` argument."
16690
+ }
16691
+ ],
16692
+ "slots": [
16693
+
16694
+ ],
16695
+ "methods": [
16696
+
16697
+ ],
16698
+ "previews": [
16699
+
16700
+ ],
16701
+ "subcomponents": [
16702
+
16703
+ ]
16704
+ },
16705
+ {
16706
+ "fully_qualified_name": "Primer::OpenProject::PageHeader::Menu",
16707
+ "description": "A Helper class to create ActionMenus inside the PageHeader action slot\nIt should not be used standalone",
16642
16708
  "accessibility_docs": null,
16643
16709
  "is_form_component": false,
16644
16710
  "is_published": true,
16645
16711
  "requires_js": false,
16646
- "component": "OpenProject::PageHeader::PageHeaderActionMenu",
16712
+ "component": "OpenProject::PageHeader::Menu",
16647
16713
  "status": "open_project",
16648
16714
  "a11y_reviewed": false,
16649
- "short_name": "OpenProjectPageHeaderPageHeaderActionMenu",
16650
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/page_header_action_menu.rb",
16651
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/page_header_action_menu/default/",
16715
+ "short_name": "OpenProjectPageHeaderMenu",
16716
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/menu.rb",
16717
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/menu/default/",
16652
16718
  "parameters": [
16653
16719
  {
16654
16720
  "name": "menu_arguments",
@@ -16676,6 +16742,65 @@
16676
16742
 
16677
16743
  ]
16678
16744
  },
16745
+ {
16746
+ "fully_qualified_name": "Primer::OpenProject::ZenModeButton",
16747
+ "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.",
16748
+ "accessibility_docs": "Add any accessibility considerations",
16749
+ "is_form_component": false,
16750
+ "is_published": true,
16751
+ "requires_js": false,
16752
+ "component": "OpenProject::ZenModeButton",
16753
+ "status": "open_project",
16754
+ "a11y_reviewed": false,
16755
+ "short_name": "OpenProjectZenModeButton",
16756
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/zen_mode_button.rb",
16757
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/zen_mode_button/default/",
16758
+ "parameters": [
16759
+ {
16760
+ "name": "system_arguments",
16761
+ "type": "Hash",
16762
+ "default": "N/A",
16763
+ "description": "{{link_to_system_arguments_docs}}"
16764
+ }
16765
+ ],
16766
+ "slots": [
16767
+
16768
+ ],
16769
+ "methods": [
16770
+
16771
+ ],
16772
+ "previews": [
16773
+ {
16774
+ "preview_path": "primer/open_project/zen_mode_button/default",
16775
+ "name": "default",
16776
+ "snapshot": "true",
16777
+ "skip_rules": {
16778
+ "wont_fix": [
16779
+ "region"
16780
+ ],
16781
+ "will_fix": [
16782
+ "color-contrast"
16783
+ ]
16784
+ }
16785
+ },
16786
+ {
16787
+ "preview_path": "primer/open_project/zen_mode_button/playground",
16788
+ "name": "playground",
16789
+ "snapshot": "false",
16790
+ "skip_rules": {
16791
+ "wont_fix": [
16792
+ "region"
16793
+ ],
16794
+ "will_fix": [
16795
+ "color-contrast"
16796
+ ]
16797
+ }
16798
+ }
16799
+ ],
16800
+ "subcomponents": [
16801
+
16802
+ ]
16803
+ },
16679
16804
  {
16680
16805
  "fully_qualified_name": "Primer::Tooltip",
16681
16806
  "description": "`Tooltip` is a wrapper component that will apply a tooltip to the provided content.",