openproject-primer_view_components 0.68.0 → 0.69.1

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +5 -0
  4. data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -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/alpha/action_menu/action_menu_element.d.ts +5 -0
  8. data/app/components/primer/alpha/action_menu/action_menu_element.js +111 -16
  9. data/app/components/primer/alpha/action_menu/action_menu_element.ts +136 -23
  10. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
  11. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +62 -0
  12. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.ts +67 -0
  13. data/app/components/primer/alpha/action_menu/list.rb +3 -1
  14. data/app/components/primer/alpha/action_menu/list_wrapper.rb +31 -0
  15. data/app/components/primer/alpha/action_menu/menu.html.erb +24 -0
  16. data/app/components/primer/alpha/action_menu/menu.rb +136 -0
  17. data/app/components/primer/alpha/action_menu/primary_menu.rb +86 -0
  18. data/app/components/primer/alpha/action_menu/sub_menu.rb +74 -0
  19. data/app/components/primer/alpha/action_menu/sub_menu_item.html.erb +5 -0
  20. data/app/components/primer/alpha/action_menu/sub_menu_item.rb +53 -0
  21. data/app/components/primer/alpha/action_menu.html.erb +1 -26
  22. data/app/components/primer/alpha/action_menu.rb +44 -118
  23. data/app/components/primer/alpha/select_panel.rb +3 -3
  24. data/lib/primer/view_components/version.rb +2 -2
  25. data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +13 -4
  26. data/previews/primer/alpha/action_menu_preview/opens_dialog.html.erb +20 -11
  27. data/previews/primer/alpha/action_menu_preview/single_select_form_items.html.erb +13 -2
  28. data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +19 -0
  29. data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +20 -11
  30. data/previews/primer/alpha/action_menu_preview/with_deferred_content.html.erb +24 -0
  31. data/previews/primer/alpha/action_menu_preview.rb +93 -29
  32. data/static/arguments.json +169 -68
  33. data/static/audited_at.json +4 -0
  34. data/static/constants.json +27 -7
  35. data/static/info_arch.json +797 -199
  36. data/static/previews.json +13 -0
  37. data/static/statuses.json +4 -0
  38. metadata +14 -2
@@ -1311,145 +1311,41 @@
1311
1311
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
1312
1312
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
1313
1313
  "parameters": [
1314
- {
1315
- "name": "menu_id",
1316
- "type": "String",
1317
- "default": "`self.class.generate_id`",
1318
- "description": "Id of the menu."
1319
- },
1320
- {
1321
- "name": "anchor_align",
1322
- "type": "Symbol",
1323
- "default": "`:start`",
1324
- "description": "One of `:center`, `:end`, or `:start`.."
1325
- },
1326
- {
1327
- "name": "anchor_side",
1328
- "type": "Symbol",
1329
- "default": "`:outside_bottom`",
1330
- "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
1331
- },
1332
- {
1333
- "name": "size",
1334
- "type": "Symbol",
1335
- "default": "`:auto`",
1336
- "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
1337
- },
1338
- {
1339
- "name": "src",
1340
- "type": "String",
1341
- "default": "`nil`",
1342
- "description": "Used with an `include-fragment` element to load menu content from the given source URL."
1343
- },
1344
- {
1345
- "name": "preload",
1346
- "type": "Boolean",
1347
- "default": "`false`",
1348
- "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
1349
- },
1350
- {
1351
- "name": "dynamic_label",
1352
- "type": "Boolean",
1353
- "default": "`false`",
1354
- "description": "Whether or not to display the text of the currently selected item in the show button."
1355
- },
1356
- {
1357
- "name": "dynamic_label_prefix",
1358
- "type": "String",
1359
- "default": "`nil`",
1360
- "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
1361
- },
1362
- {
1363
- "name": "select_variant",
1364
- "type": "Symbol",
1365
- "default": "`:none`",
1366
- "description": "One of `:multiple`, `:none`, or `:single`."
1367
- },
1368
- {
1369
- "name": "form_arguments",
1370
- "type": "Hash",
1371
- "default": "`{}`",
1372
- "description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
1373
- },
1374
- {
1375
- "name": "overlay_arguments",
1376
- "type": "Hash",
1377
- "default": "`{}`",
1378
- "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
1379
- },
1380
1314
  {
1381
1315
  "name": "system_arguments",
1382
1316
  "type": "Hash",
1383
1317
  "default": "N/A",
1384
- "description": "{{link_to_system_arguments_docs}}."
1318
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::PrimaryMenu{{/link_to_component}}."
1385
1319
  }
1386
1320
  ],
1387
1321
  "slots": [
1322
+
1323
+ ],
1324
+ "methods": [
1388
1325
  {
1389
- "name": "show_button",
1390
- "description": "Button to activate the menu.",
1391
- "parameters": [
1392
- {
1393
- "name": "system_arguments",
1394
- "type": "Hash",
1395
- "default": "N/A",
1396
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
1397
- }
1398
- ]
1399
- },
1400
- {
1401
- "name": "items",
1402
- "description": "Adds a new item to the list.",
1326
+ "name": "with_item",
1327
+ "description": "Adds an item to the menu.",
1403
1328
  "parameters": [
1404
1329
  {
1405
1330
  "name": "system_arguments",
1406
1331
  "type": "Hash",
1407
1332
  "default": "N/A",
1408
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1333
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1409
1334
  }
1410
- ]
1411
- }
1412
- ],
1413
- "methods": [
1414
- {
1415
- "name": "list",
1416
- "description": "Returns the value of attribute list.",
1417
- "parameters": [
1418
-
1419
- ],
1420
- "return_types": [
1421
-
1422
- ]
1423
- },
1424
- {
1425
- "name": "preload",
1426
- "description": "Returns the value of attribute preload.",
1427
- "parameters": [
1428
-
1429
- ],
1430
- "return_types": [
1431
-
1432
- ]
1433
- },
1434
- {
1435
- "name": "preload?",
1436
- "description": "Returns the value of attribute preload.",
1437
- "parameters": [
1438
-
1439
1335
  ],
1440
1336
  "return_types": [
1441
1337
 
1442
1338
  ]
1443
1339
  },
1444
1340
  {
1445
- "name": "with_show_button",
1446
- "description": "Button to activate the menu.",
1341
+ "name": "with_avatar_item",
1342
+ "description": "Adds an avatar item to the menu.",
1447
1343
  "parameters": [
1448
1344
  {
1449
1345
  "name": "system_arguments",
1450
1346
  "type": "Hash",
1451
1347
  "default": "N/A",
1452
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
1348
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1453
1349
  }
1454
1350
  ],
1455
1351
  "return_types": [
@@ -1457,14 +1353,14 @@
1457
1353
  ]
1458
1354
  },
1459
1355
  {
1460
- "name": "with_item",
1461
- "description": "Adds a new item to the list.",
1356
+ "name": "with_divider",
1357
+ "description": "Adds a divider to the list. Dividers visually separate items.",
1462
1358
  "parameters": [
1463
1359
  {
1464
1360
  "name": "system_arguments",
1465
1361
  "type": "Hash",
1466
1362
  "default": "N/A",
1467
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1363
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
1468
1364
  }
1469
1365
  ],
1470
1366
  "return_types": [
@@ -1472,14 +1368,14 @@
1472
1368
  ]
1473
1369
  },
1474
1370
  {
1475
- "name": "with_divider",
1476
- "description": "Adds a divider to the list.",
1371
+ "name": "with_group",
1372
+ "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
1477
1373
  "parameters": [
1478
1374
  {
1479
1375
  "name": "system_arguments",
1480
1376
  "type": "Hash",
1481
1377
  "default": "N/A",
1482
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `divider` slot."
1378
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
1483
1379
  }
1484
1380
  ],
1485
1381
  "return_types": [
@@ -1487,48 +1383,13 @@
1487
1383
  ]
1488
1384
  },
1489
1385
  {
1490
- "name": "with_avatar_item",
1491
- "description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
1386
+ "name": "items",
1387
+ "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
1492
1388
  "parameters": [
1493
- {
1494
- "name": "src",
1495
- "type": "String",
1496
- "default": "N/A",
1497
- "description": "The source url of the avatar image."
1498
- },
1499
- {
1500
- "name": "username",
1501
- "type": "String",
1502
- "default": "N/A",
1503
- "description": "The username associated with the avatar."
1504
- },
1505
- {
1506
- "name": "full_name",
1507
- "type": "String",
1508
- "default": "N/A",
1509
- "description": "Optional. The user's full name."
1510
- },
1511
- {
1512
- "name": "full_name_scheme",
1513
- "type": "Symbol",
1514
- "default": "N/A",
1515
- "description": "Optional. How to display the user's full name."
1516
- },
1517
- {
1518
- "name": "avatar_arguments",
1519
- "type": "Hash",
1520
- "default": "N/A",
1521
- "description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}."
1522
- },
1523
- {
1524
- "name": "system_arguments",
1525
- "type": "Hash",
1526
- "default": "N/A",
1527
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1528
- }
1389
+
1529
1390
  ],
1530
1391
  "return_types": [
1531
-
1392
+ "Array<ViewComponent::Slot>"
1532
1393
  ]
1533
1394
  }
1534
1395
  ],
@@ -1909,28 +1770,101 @@
1909
1770
  "color-contrast"
1910
1771
  ]
1911
1772
  }
1773
+ },
1774
+ {
1775
+ "preview_path": "primer/alpha/action_menu/sub_menus",
1776
+ "name": "sub_menus",
1777
+ "snapshot": "false",
1778
+ "skip_rules": {
1779
+ "wont_fix": [
1780
+ "region"
1781
+ ],
1782
+ "will_fix": [
1783
+ "color-contrast"
1784
+ ]
1785
+ }
1912
1786
  }
1913
1787
  ],
1914
1788
  "subcomponents": [
1915
1789
  {
1916
- "fully_qualified_name": "Primer::Alpha::ActionMenu::List",
1790
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::Menu",
1917
1791
  "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
1918
1792
  "accessibility_docs": null,
1919
1793
  "is_form_component": false,
1920
1794
  "is_published": true,
1921
1795
  "requires_js": false,
1922
- "component": "ActionMenu::List",
1796
+ "component": "ActionMenu::Menu",
1923
1797
  "status": "alpha",
1924
1798
  "a11y_reviewed": false,
1925
- "short_name": "ActionMenuList",
1926
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
1927
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
1799
+ "short_name": "ActionMenuMenu",
1800
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/menu.rb",
1801
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/menu/default/",
1928
1802
  "parameters": [
1803
+ {
1804
+ "name": "anchor_align",
1805
+ "type": "Symbol",
1806
+ "default": "N/A",
1807
+ "description": "One of `:center`, `:end`, or `:start`."
1808
+ },
1809
+ {
1810
+ "name": "anchor_side",
1811
+ "type": "Symbol",
1812
+ "default": "N/A",
1813
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
1814
+ },
1815
+ {
1816
+ "name": "menu_id",
1817
+ "type": "String",
1818
+ "default": "`self.class.generate_id`",
1819
+ "description": "Id of the menu."
1820
+ },
1821
+ {
1822
+ "name": "size",
1823
+ "type": "Symbol",
1824
+ "default": "`:auto`",
1825
+ "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
1826
+ },
1827
+ {
1828
+ "name": "src",
1829
+ "type": "String",
1830
+ "default": "`nil`",
1831
+ "description": "Used with an `include-fragment` element to load menu content from the given source URL."
1832
+ },
1833
+ {
1834
+ "name": "preload",
1835
+ "type": "Boolean",
1836
+ "default": "`false`",
1837
+ "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
1838
+ },
1839
+ {
1840
+ "name": "select_variant",
1841
+ "type": "Symbol",
1842
+ "default": "`:none`",
1843
+ "description": "One of `:multiple`, `:none`, or `:single`."
1844
+ },
1845
+ {
1846
+ "name": "form_arguments",
1847
+ "type": "Hash",
1848
+ "default": "`{}`",
1849
+ "description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
1850
+ },
1851
+ {
1852
+ "name": "overlay_arguments",
1853
+ "type": "Hash",
1854
+ "default": "`{}`",
1855
+ "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
1856
+ },
1857
+ {
1858
+ "name": "list_arguments",
1859
+ "type": "Hash",
1860
+ "default": "`{}`",
1861
+ "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::ActionMenu::List{{/link_to_component}}"
1862
+ },
1929
1863
  {
1930
1864
  "name": "system_arguments",
1931
1865
  "type": "Hash",
1932
1866
  "default": "N/A",
1933
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}"
1867
+ "description": "{{link_to_system_arguments_docs}}."
1934
1868
  }
1935
1869
  ],
1936
1870
  "slots": [
@@ -1938,48 +1872,650 @@
1938
1872
  ],
1939
1873
  "methods": [
1940
1874
  {
1941
- "name": "items",
1942
- "description": "Returns the value of attribute items.",
1875
+ "name": "menu_id",
1876
+ "description": "Returns the value of attribute menu_id.",
1943
1877
  "parameters": [
1944
1878
 
1945
1879
  ],
1946
1880
  "return_types": [
1947
1881
 
1948
1882
  ]
1949
- }
1950
- ],
1951
- "previews": [
1883
+ },
1884
+ {
1885
+ "name": "anchor_side",
1886
+ "description": "Returns the value of attribute anchor_side.",
1887
+ "parameters": [
1952
1888
 
1953
- ],
1954
- "subcomponents": [
1889
+ ],
1890
+ "return_types": [
1955
1891
 
1956
- ]
1957
- },
1958
- {
1959
- "fully_qualified_name": "Primer::Alpha::ActionMenu::Heading",
1960
- "description": "Heading used to describe groups within an action menu.",
1961
- "accessibility_docs": null,
1962
- "is_form_component": false,
1963
- "is_published": true,
1964
- "requires_js": false,
1965
- "component": "ActionMenu::Heading",
1966
- "status": "alpha",
1967
- "a11y_reviewed": false,
1968
- "short_name": "ActionMenuHeading",
1969
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/heading.rb",
1970
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/heading/default/",
1971
- "parameters": [
1892
+ ]
1893
+ },
1894
+ {
1895
+ "name": "anchor_align",
1896
+ "description": "Returns the value of attribute anchor_align.",
1897
+ "parameters": [
1972
1898
 
1973
- ],
1974
- "slots": [
1899
+ ],
1900
+ "return_types": [
1975
1901
 
1976
- ],
1977
- "methods": [
1902
+ ]
1903
+ },
1904
+ {
1905
+ "name": "list",
1906
+ "description": "Returns the value of attribute list.",
1907
+ "parameters": [
1978
1908
 
1979
- ],
1980
- "previews": [
1909
+ ],
1910
+ "return_types": [
1981
1911
 
1982
- ],
1912
+ ]
1913
+ },
1914
+ {
1915
+ "name": "preload",
1916
+ "description": "Returns the value of attribute preload.",
1917
+ "parameters": [
1918
+
1919
+ ],
1920
+ "return_types": [
1921
+
1922
+ ]
1923
+ },
1924
+ {
1925
+ "name": "src",
1926
+ "description": "Returns the value of attribute src.",
1927
+ "parameters": [
1928
+
1929
+ ],
1930
+ "return_types": [
1931
+
1932
+ ]
1933
+ },
1934
+ {
1935
+ "name": "select_variant",
1936
+ "description": "Returns the value of attribute select_variant.",
1937
+ "parameters": [
1938
+
1939
+ ],
1940
+ "return_types": [
1941
+
1942
+ ]
1943
+ },
1944
+ {
1945
+ "name": "form_arguments",
1946
+ "description": "Returns the value of attribute form_arguments.",
1947
+ "parameters": [
1948
+
1949
+ ],
1950
+ "return_types": [
1951
+
1952
+ ]
1953
+ },
1954
+ {
1955
+ "name": "preload?",
1956
+ "description": "Returns the value of attribute preload.",
1957
+ "parameters": [
1958
+
1959
+ ],
1960
+ "return_types": [
1961
+
1962
+ ]
1963
+ },
1964
+ {
1965
+ "name": "with_item",
1966
+ "description": "Adds an item to the menu.",
1967
+ "parameters": [
1968
+ {
1969
+ "name": "system_arguments",
1970
+ "type": "Hash",
1971
+ "default": "N/A",
1972
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1973
+ }
1974
+ ],
1975
+ "return_types": [
1976
+
1977
+ ]
1978
+ },
1979
+ {
1980
+ "name": "with_avatar_item",
1981
+ "description": "Adds an avatar item to the menu.",
1982
+ "parameters": [
1983
+ {
1984
+ "name": "system_arguments",
1985
+ "type": "Hash",
1986
+ "default": "N/A",
1987
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1988
+ }
1989
+ ],
1990
+ "return_types": [
1991
+
1992
+ ]
1993
+ },
1994
+ {
1995
+ "name": "with_divider",
1996
+ "description": "Adds a divider to the list. Dividers visually separate items.",
1997
+ "parameters": [
1998
+ {
1999
+ "name": "system_arguments",
2000
+ "type": "Hash",
2001
+ "default": "N/A",
2002
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2003
+ }
2004
+ ],
2005
+ "return_types": [
2006
+
2007
+ ]
2008
+ },
2009
+ {
2010
+ "name": "with_group",
2011
+ "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2012
+ "parameters": [
2013
+ {
2014
+ "name": "system_arguments",
2015
+ "type": "Hash",
2016
+ "default": "N/A",
2017
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2018
+ }
2019
+ ],
2020
+ "return_types": [
2021
+
2022
+ ]
2023
+ },
2024
+ {
2025
+ "name": "items",
2026
+ "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2027
+ "parameters": [
2028
+
2029
+ ],
2030
+ "return_types": [
2031
+ "Array<ViewComponent::Slot>"
2032
+ ]
2033
+ },
2034
+ {
2035
+ "name": "with_sub_menu_item",
2036
+ "description": "Adds a sub-menu to the menu.",
2037
+ "parameters": [
2038
+ {
2039
+ "name": "system_arguments",
2040
+ "type": "Hash",
2041
+ "default": "N/A",
2042
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::SubMenuItem{{/link_to_component}}."
2043
+ }
2044
+ ],
2045
+ "return_types": [
2046
+
2047
+ ]
2048
+ }
2049
+ ],
2050
+ "previews": [
2051
+
2052
+ ],
2053
+ "subcomponents": [
2054
+
2055
+ ]
2056
+ },
2057
+ {
2058
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::List",
2059
+ "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2060
+ "accessibility_docs": null,
2061
+ "is_form_component": false,
2062
+ "is_published": true,
2063
+ "requires_js": false,
2064
+ "component": "ActionMenu::List",
2065
+ "status": "alpha",
2066
+ "a11y_reviewed": false,
2067
+ "short_name": "ActionMenuList",
2068
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
2069
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
2070
+ "parameters": [
2071
+ {
2072
+ "name": "system_arguments",
2073
+ "type": "Hash",
2074
+ "default": "N/A",
2075
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::ListWrapper{{/link_to_component}}"
2076
+ }
2077
+ ],
2078
+ "slots": [
2079
+
2080
+ ],
2081
+ "methods": [
2082
+ {
2083
+ "name": "items",
2084
+ "description": "Returns the value of attribute items.",
2085
+ "parameters": [
2086
+
2087
+ ],
2088
+ "return_types": [
2089
+
2090
+ ]
2091
+ }
2092
+ ],
2093
+ "previews": [
2094
+
2095
+ ],
2096
+ "subcomponents": [
2097
+
2098
+ ]
2099
+ },
2100
+ {
2101
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::SubMenu",
2102
+ "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2103
+ "accessibility_docs": null,
2104
+ "is_form_component": false,
2105
+ "is_published": true,
2106
+ "requires_js": false,
2107
+ "component": "ActionMenu::SubMenu",
2108
+ "status": "alpha",
2109
+ "a11y_reviewed": false,
2110
+ "short_name": "ActionMenuSubMenu",
2111
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu.rb",
2112
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu/default/",
2113
+ "parameters": [
2114
+ {
2115
+ "name": "menu_id",
2116
+ "type": "String",
2117
+ "default": "`self.class.generate_id`",
2118
+ "description": "Id of the menu."
2119
+ },
2120
+ {
2121
+ "name": "anchor_align",
2122
+ "type": "Symbol",
2123
+ "default": "`:start`",
2124
+ "description": "One of `:center`, `:end`, or `:start`."
2125
+ },
2126
+ {
2127
+ "name": "anchor_side",
2128
+ "type": "Symbol",
2129
+ "default": "`:outside_right`",
2130
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
2131
+ },
2132
+ {
2133
+ "name": "overlay_arguments",
2134
+ "type": "Hash",
2135
+ "default": "`{}`",
2136
+ "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
2137
+ },
2138
+ {
2139
+ "name": "system_arguments",
2140
+ "type": "Hash",
2141
+ "default": "N/A",
2142
+ "description": "{{link_to_system_arguments_docs}}."
2143
+ }
2144
+ ],
2145
+ "slots": [
2146
+
2147
+ ],
2148
+ "methods": [
2149
+ {
2150
+ "name": "with_item",
2151
+ "description": "Adds an item to the menu.",
2152
+ "parameters": [
2153
+ {
2154
+ "name": "system_arguments",
2155
+ "type": "Hash",
2156
+ "default": "N/A",
2157
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2158
+ }
2159
+ ],
2160
+ "return_types": [
2161
+
2162
+ ]
2163
+ },
2164
+ {
2165
+ "name": "with_avatar_item",
2166
+ "description": "Adds an avatar item to the menu.",
2167
+ "parameters": [
2168
+ {
2169
+ "name": "system_arguments",
2170
+ "type": "Hash",
2171
+ "default": "N/A",
2172
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2173
+ }
2174
+ ],
2175
+ "return_types": [
2176
+
2177
+ ]
2178
+ },
2179
+ {
2180
+ "name": "with_divider",
2181
+ "description": "Adds a divider to the list. Dividers visually separate items.",
2182
+ "parameters": [
2183
+ {
2184
+ "name": "system_arguments",
2185
+ "type": "Hash",
2186
+ "default": "N/A",
2187
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2188
+ }
2189
+ ],
2190
+ "return_types": [
2191
+
2192
+ ]
2193
+ },
2194
+ {
2195
+ "name": "with_group",
2196
+ "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2197
+ "parameters": [
2198
+ {
2199
+ "name": "system_arguments",
2200
+ "type": "Hash",
2201
+ "default": "N/A",
2202
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2203
+ }
2204
+ ],
2205
+ "return_types": [
2206
+
2207
+ ]
2208
+ },
2209
+ {
2210
+ "name": "items",
2211
+ "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2212
+ "parameters": [
2213
+
2214
+ ],
2215
+ "return_types": [
2216
+ "Array<ViewComponent::Slot>"
2217
+ ]
2218
+ },
2219
+ {
2220
+ "name": "with_sub_menu_item",
2221
+ "description": "Adds a sub-menu to the menu.",
2222
+ "parameters": [
2223
+ {
2224
+ "name": "system_arguments",
2225
+ "type": "Hash",
2226
+ "default": "N/A",
2227
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::SubMenuItem{{/link_to_component}}."
2228
+ }
2229
+ ],
2230
+ "return_types": [
2231
+
2232
+ ]
2233
+ }
2234
+ ],
2235
+ "previews": [
2236
+
2237
+ ],
2238
+ "subcomponents": [
2239
+
2240
+ ]
2241
+ },
2242
+ {
2243
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::PrimaryMenu",
2244
+ "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2245
+ "accessibility_docs": null,
2246
+ "is_form_component": false,
2247
+ "is_published": true,
2248
+ "requires_js": false,
2249
+ "component": "ActionMenu::PrimaryMenu",
2250
+ "status": "alpha",
2251
+ "a11y_reviewed": false,
2252
+ "short_name": "ActionMenuPrimaryMenu",
2253
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/primary_menu.rb",
2254
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/primary_menu/default/",
2255
+ "parameters": [
2256
+ {
2257
+ "name": "anchor_align",
2258
+ "type": "Symbol",
2259
+ "default": "`:start`",
2260
+ "description": "One of `:center`, `:end`, or `:start`."
2261
+ },
2262
+ {
2263
+ "name": "anchor_side",
2264
+ "type": "Symbol",
2265
+ "default": "`:outside_bottom`",
2266
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
2267
+ },
2268
+ {
2269
+ "name": "dynamic_label",
2270
+ "type": "Boolean",
2271
+ "default": "`false`",
2272
+ "description": "Whether or not to display the text of the currently selected item in the show button."
2273
+ },
2274
+ {
2275
+ "name": "dynamic_label_prefix",
2276
+ "type": "String",
2277
+ "default": "`nil`",
2278
+ "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
2279
+ },
2280
+ {
2281
+ "name": "system_arguments",
2282
+ "type": "Hash",
2283
+ "default": "N/A",
2284
+ "description": "{{link_to_system_arguments_docs}}."
2285
+ }
2286
+ ],
2287
+ "slots": [
2288
+
2289
+ ],
2290
+ "methods": [
2291
+ {
2292
+ "name": "dynamic_label",
2293
+ "description": "Returns the value of attribute dynamic_label.",
2294
+ "parameters": [
2295
+
2296
+ ],
2297
+ "return_types": [
2298
+
2299
+ ]
2300
+ },
2301
+ {
2302
+ "name": "dynamic_label_prefix",
2303
+ "description": "Returns the value of attribute dynamic_label_prefix.",
2304
+ "parameters": [
2305
+
2306
+ ],
2307
+ "return_types": [
2308
+
2309
+ ]
2310
+ },
2311
+ {
2312
+ "name": "with_item",
2313
+ "description": "Adds an item to the menu.",
2314
+ "parameters": [
2315
+ {
2316
+ "name": "system_arguments",
2317
+ "type": "Hash",
2318
+ "default": "N/A",
2319
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2320
+ }
2321
+ ],
2322
+ "return_types": [
2323
+
2324
+ ]
2325
+ },
2326
+ {
2327
+ "name": "with_avatar_item",
2328
+ "description": "Adds an avatar item to the menu.",
2329
+ "parameters": [
2330
+ {
2331
+ "name": "system_arguments",
2332
+ "type": "Hash",
2333
+ "default": "N/A",
2334
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2335
+ }
2336
+ ],
2337
+ "return_types": [
2338
+
2339
+ ]
2340
+ },
2341
+ {
2342
+ "name": "with_divider",
2343
+ "description": "Adds a divider to the list. Dividers visually separate items.",
2344
+ "parameters": [
2345
+ {
2346
+ "name": "system_arguments",
2347
+ "type": "Hash",
2348
+ "default": "N/A",
2349
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2350
+ }
2351
+ ],
2352
+ "return_types": [
2353
+
2354
+ ]
2355
+ },
2356
+ {
2357
+ "name": "with_group",
2358
+ "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2359
+ "parameters": [
2360
+ {
2361
+ "name": "system_arguments",
2362
+ "type": "Hash",
2363
+ "default": "N/A",
2364
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2365
+ }
2366
+ ],
2367
+ "return_types": [
2368
+
2369
+ ]
2370
+ },
2371
+ {
2372
+ "name": "items",
2373
+ "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2374
+ "parameters": [
2375
+
2376
+ ],
2377
+ "return_types": [
2378
+ "Array<ViewComponent::Slot>"
2379
+ ]
2380
+ },
2381
+ {
2382
+ "name": "with_show_button",
2383
+ "description": "Button to activate the menu.",
2384
+ "parameters": [
2385
+ {
2386
+ "name": "system_arguments",
2387
+ "type": "Hash",
2388
+ "default": "N/A",
2389
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
2390
+ }
2391
+ ],
2392
+ "return_types": [
2393
+
2394
+ ]
2395
+ }
2396
+ ],
2397
+ "previews": [
2398
+
2399
+ ],
2400
+ "subcomponents": [
2401
+
2402
+ ]
2403
+ },
2404
+ {
2405
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::SubMenuItem",
2406
+ "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2407
+ "accessibility_docs": null,
2408
+ "is_form_component": false,
2409
+ "is_published": true,
2410
+ "requires_js": false,
2411
+ "component": "ActionMenu::SubMenuItem",
2412
+ "status": "alpha",
2413
+ "a11y_reviewed": false,
2414
+ "short_name": "ActionMenuSubMenuItem",
2415
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu_item.rb",
2416
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu_item/default/",
2417
+ "parameters": [
2418
+
2419
+ ],
2420
+ "slots": [
2421
+ {
2422
+ "name": "description",
2423
+ "description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
2424
+ "parameters": [
2425
+ {
2426
+ "name": "legacy_content",
2427
+ "type": "String",
2428
+ "default": "N/A",
2429
+ "description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
2430
+ },
2431
+ {
2432
+ "name": "test_selector",
2433
+ "type": "String",
2434
+ "default": "N/A",
2435
+ "description": "The value of this argument is set as the value of a `data-test-selector` HTML attribute on the description element."
2436
+ }
2437
+ ]
2438
+ },
2439
+ {
2440
+ "name": "leading_visual",
2441
+ "description": "An icon, avatar, SVG, or custom content that will render to the left of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render an SVG, call the `with_leading_visual_svg` method.\n\nTo render custom content, call the `with_leading_visual_content` method and pass a block that returns a string.",
2442
+ "parameters": [
2443
+
2444
+ ]
2445
+ },
2446
+ {
2447
+ "name": "trailing_visual",
2448
+ "description": "An icon, label, counter, or text to render to the right of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render a label, call the `with_leading_visual_label` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Label{{/link_to_component}}.\n\nTo render a counter, call the `with_leading_visual_counter` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}.\n\nTo render text, call the `with_leading_visual_text` method and pass a block that returns a string. Eg:\n```ruby\nwith_leading_visual_text { \"Text here\" }\n```",
2449
+ "parameters": [
2450
+
2451
+ ]
2452
+ },
2453
+ {
2454
+ "name": "trailing_action",
2455
+ "description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
2456
+ "parameters": [
2457
+ {
2458
+ "name": "system_arguments",
2459
+ "type": "Hash",
2460
+ "default": "N/A",
2461
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
2462
+ }
2463
+ ]
2464
+ },
2465
+ {
2466
+ "name": "tooltip",
2467
+ "description": "`Tooltip` that appears on mouse hover or keyboard focus over the trailing action button. Use tooltips sparingly and as\na last resort. **Important:** This tooltip defaults to `type: :description`. In a few scenarios, `type: :label` may be\nmore appropriate. Consult the {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}} documentation for more information.",
2468
+ "parameters": [
2469
+ {
2470
+ "name": "type",
2471
+ "type": "Symbol",
2472
+ "default": "`:description`",
2473
+ "description": "One of `:description` or `:label`."
2474
+ },
2475
+ {
2476
+ "name": "system_arguments",
2477
+ "type": "Hash",
2478
+ "default": "N/A",
2479
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
2480
+ }
2481
+ ]
2482
+ }
2483
+ ],
2484
+ "methods": [
2485
+
2486
+ ],
2487
+ "previews": [
2488
+
2489
+ ],
2490
+ "subcomponents": [
2491
+
2492
+ ]
2493
+ },
2494
+ {
2495
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::Heading",
2496
+ "description": "Heading used to describe groups within an action menu.",
2497
+ "accessibility_docs": null,
2498
+ "is_form_component": false,
2499
+ "is_published": true,
2500
+ "requires_js": false,
2501
+ "component": "ActionMenu::Heading",
2502
+ "status": "alpha",
2503
+ "a11y_reviewed": false,
2504
+ "short_name": "ActionMenuHeading",
2505
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/heading.rb",
2506
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/heading/default/",
2507
+ "parameters": [
2508
+
2509
+ ],
2510
+ "slots": [
2511
+
2512
+ ],
2513
+ "methods": [
2514
+
2515
+ ],
2516
+ "previews": [
2517
+
2518
+ ],
1983
2519
  "subcomponents": [
1984
2520
 
1985
2521
  ]
@@ -2029,17 +2565,79 @@
2029
2565
  "description": "The arguments accepted by `component_klass`."
2030
2566
  }
2031
2567
  ]
2568
+ }
2569
+ ],
2570
+ "methods": [
2571
+ {
2572
+ "name": "with_item",
2573
+ "description": "Adds an item to the menu.",
2574
+ "parameters": [
2575
+ {
2576
+ "name": "system_arguments",
2577
+ "type": "Hash",
2578
+ "default": "N/A",
2579
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2580
+ }
2581
+ ],
2582
+ "return_types": [
2583
+
2584
+ ]
2585
+ },
2586
+ {
2587
+ "name": "with_avatar_item",
2588
+ "description": "Adds an avatar item to the menu.",
2589
+ "parameters": [
2590
+ {
2591
+ "name": "system_arguments",
2592
+ "type": "Hash",
2593
+ "default": "N/A",
2594
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2595
+ }
2596
+ ],
2597
+ "return_types": [
2598
+
2599
+ ]
2600
+ },
2601
+ {
2602
+ "name": "with_divider",
2603
+ "description": "Adds a divider to the list. Dividers visually separate items.",
2604
+ "parameters": [
2605
+ {
2606
+ "name": "system_arguments",
2607
+ "type": "Hash",
2608
+ "default": "N/A",
2609
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2610
+ }
2611
+ ],
2612
+ "return_types": [
2613
+
2614
+ ]
2615
+ },
2616
+ {
2617
+ "name": "with_group",
2618
+ "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2619
+ "parameters": [
2620
+ {
2621
+ "name": "system_arguments",
2622
+ "type": "Hash",
2623
+ "default": "N/A",
2624
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2625
+ }
2626
+ ],
2627
+ "return_types": [
2628
+
2629
+ ]
2032
2630
  },
2033
2631
  {
2034
2632
  "name": "items",
2035
- "description": "Items. Items can be individual items, avatar items, or dividers. See the documentation for `#with_item`, `#with_divider`, and `#with_avatar_item` respectively for more information.",
2633
+ "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2036
2634
  "parameters": [
2037
2635
 
2636
+ ],
2637
+ "return_types": [
2638
+ "Array<ViewComponent::Slot>"
2038
2639
  ]
2039
2640
  }
2040
- ],
2041
- "methods": [
2042
-
2043
2641
  ],
2044
2642
  "previews": [
2045
2643