@primer/view-components 0.18.2-rc.fe99b203 → 0.19.0-rc.1ce8b774

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.
@@ -3436,6 +3436,28 @@
3436
3436
  }
3437
3437
  ]
3438
3438
  },
3439
+ {
3440
+ "component": "ButtonGroup::MenuButton",
3441
+ "status": "alpha",
3442
+ "a11y_reviewed": false,
3443
+ "short_name": "ButtonGroupMenuButton",
3444
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button_group/menu_button.rb",
3445
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button_group/menu_button/default/",
3446
+ "parameters": [
3447
+ {
3448
+ "name": "menu_arguments",
3449
+ "type": "Hash",
3450
+ "default": "`{}`",
3451
+ "description": "The arguments accepted by [ActionMenu](/components/alpha/actionmenu)."
3452
+ },
3453
+ {
3454
+ "name": "button_arguments",
3455
+ "type": "Hash",
3456
+ "default": "`{}`",
3457
+ "description": "The arguments accepted by [Button](/components/beta/button) or [IconButton](/components/beta/iconbutton), depending on the value of the `icon:` argument."
3458
+ }
3459
+ ]
3460
+ },
3439
3461
  {
3440
3462
  "component": "ClipboardCopy",
3441
3463
  "status": "beta",
@@ -75,6 +75,7 @@
75
75
  "Primer::Beta::Breadcrumbs::Item": "",
76
76
  "Primer::Beta::Button": "",
77
77
  "Primer::Beta::ButtonGroup": "",
78
+ "Primer::Beta::ButtonGroup::MenuButton": "",
78
79
  "Primer::Beta::ClipboardCopy": "",
79
80
  "Primer::Beta::ClipboardCopyBaseButton": "",
80
81
  "Primer::Beta::ClipboardCopyButton": "",
@@ -848,6 +848,9 @@
848
848
  ]
849
849
  },
850
850
  "Primer::Beta::ButtonGroup": {
851
+ "MenuButton": "Primer::Beta::ButtonGroup::MenuButton"
852
+ },
853
+ "Primer::Beta::ButtonGroup::MenuButton": {
851
854
  },
852
855
  "Primer::Beta::ClipboardCopy": {
853
856
  },
@@ -2232,7 +2232,7 @@
2232
2232
  {
2233
2233
  "fully_qualified_name": "Primer::Alpha::Banner",
2234
2234
  "description": "Use `Banner` to highlight important information.",
2235
- "accessibility_docs": null,
2235
+ "accessibility_docs": "Depending on the scenario, some Banners may need to receive focus when they appear. This helps to maximize discoverability of the message, especially in critical scenarios. Visit the [Banner's Accessibility section](https://primer.style/components/banner#accessibility) or defer to the accessibility team to determine if your scenario requires focusing the banner.\n\nTo properly focus a banner, add a `tabindex=\"-1\"` to the Banner container, and focus that container (one way is using the [`focus()` API](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus)).\n\nFor more information about the focus management technique, visit the [Accessible Banner Prototype docs](https://github.com/github/accessibility/blob/main/docs/coaching-recommendations/toast-flash-banner/accessible-banner-prototype.md#consideration). This guidance is subject to change.",
2236
2236
  "is_form_component": false,
2237
2237
  "is_published": true,
2238
2238
  "requires_js": true,
@@ -11038,7 +11038,7 @@
11038
11038
  "slots": [
11039
11039
  {
11040
11040
  "name": "buttons",
11041
- "description": "List of buttons to be rendered. Add buttons via the `#with_button` and `#with_clipboard_copy_button` methods (see below).",
11041
+ "description": "List of buttons to be rendered. Add buttons via the `#with_button`, `#with_menu_button`, and `#with_clipboard_copy_button` methods (see below).",
11042
11042
  "parameters": [
11043
11043
 
11044
11044
  ]
@@ -11063,6 +11063,18 @@
11063
11063
  }
11064
11064
  ]
11065
11065
  },
11066
+ {
11067
+ "name": "with_menu_button",
11068
+ "description": "Adds a button that activates a menu when clicked.",
11069
+ "parameters": [
11070
+ {
11071
+ "name": "system_arguments",
11072
+ "type": "Hash",
11073
+ "default": "N/A",
11074
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::ButtonGroup::MenuButton{{/link_to_component}}."
11075
+ }
11076
+ ]
11077
+ },
11066
11078
  {
11067
11079
  "name": "with_clipboard_copy_button",
11068
11080
  "description": "Adds a {{#link_to_component}}Primer::Beta::ClipboardCopyButton{{/link_to_component}}.",
@@ -11116,6 +11128,19 @@
11116
11128
  ]
11117
11129
  }
11118
11130
  },
11131
+ {
11132
+ "preview_path": "primer/beta/button_group/with_menu_button",
11133
+ "name": "with_menu_button",
11134
+ "snapshot": "true",
11135
+ "skip_rules": {
11136
+ "wont_fix": [
11137
+ "region"
11138
+ ],
11139
+ "will_fix": [
11140
+ "color-contrast"
11141
+ ]
11142
+ }
11143
+ },
11119
11144
  {
11120
11145
  "preview_path": "primer/beta/button_group/icon_buttons",
11121
11146
  "name": "icon_buttons",
@@ -11157,7 +11182,46 @@
11157
11182
  }
11158
11183
  ],
11159
11184
  "subcomponents": [
11185
+ {
11186
+ "fully_qualified_name": "Primer::Beta::ButtonGroup::MenuButton",
11187
+ "description": "Renders a button in a {{#link_to_component}}Primer::Beta::ButtonGroup{{/link_to_component}} that displays an {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} when clicked.\nThis component should not be used outside of a `ButtonGroup` context.\n\nThis component yields both the button and the list to the block when rendered.\n\n```erb\n<%= render(Primer::Beta::ButtonGroup.new) do |group| %>\n <% group.with_menu_button do |menu, button| %>\n <% menu.with_item(label: \"Item 1\") %>\n <% button.with_trailing_visual_icon(icon: \"triangle-down\") %>\n <% end %>\n<% end %>\n```",
11188
+ "accessibility_docs": null,
11189
+ "is_form_component": false,
11190
+ "is_published": true,
11191
+ "requires_js": false,
11192
+ "component": "ButtonGroup::MenuButton",
11193
+ "status": "alpha",
11194
+ "a11y_reviewed": false,
11195
+ "short_name": "ButtonGroupMenuButton",
11196
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button_group/menu_button.rb",
11197
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button_group/menu_button/default/",
11198
+ "parameters": [
11199
+ {
11200
+ "name": "menu_arguments",
11201
+ "type": "Hash",
11202
+ "default": "`{}`",
11203
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}}."
11204
+ },
11205
+ {
11206
+ "name": "button_arguments",
11207
+ "type": "Hash",
11208
+ "default": "`{}`",
11209
+ "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."
11210
+ }
11211
+ ],
11212
+ "slots": [
11160
11213
 
11214
+ ],
11215
+ "methods": [
11216
+
11217
+ ],
11218
+ "previews": [
11219
+
11220
+ ],
11221
+ "subcomponents": [
11222
+
11223
+ ]
11224
+ }
11161
11225
  ]
11162
11226
  },
11163
11227
  {
@@ -2236,6 +2236,19 @@
2236
2236
  ]
2237
2237
  }
2238
2238
  },
2239
+ {
2240
+ "preview_path": "primer/beta/button_group/with_menu_button",
2241
+ "name": "with_menu_button",
2242
+ "snapshot": "true",
2243
+ "skip_rules": {
2244
+ "wont_fix": [
2245
+ "region"
2246
+ ],
2247
+ "will_fix": [
2248
+ "color-contrast"
2249
+ ]
2250
+ }
2251
+ },
2239
2252
  {
2240
2253
  "preview_path": "primer/beta/button_group/icon_buttons",
2241
2254
  "name": "icon_buttons",
@@ -75,6 +75,7 @@
75
75
  "Primer::Beta::Breadcrumbs::Item": "alpha",
76
76
  "Primer::Beta::Button": "beta",
77
77
  "Primer::Beta::ButtonGroup": "beta",
78
+ "Primer::Beta::ButtonGroup::MenuButton": "alpha",
78
79
  "Primer::Beta::ClipboardCopy": "beta",
79
80
  "Primer::Beta::ClipboardCopyBaseButton": "beta",
80
81
  "Primer::Beta::ClipboardCopyButton": "beta",