@primer/view-components 0.44.0-rc.2b4579f7 → 0.44.0-rc.385b39ff

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.
@@ -1185,74 +1185,205 @@
1185
1185
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
1186
1186
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
1187
1187
  "parameters": [
1188
+ {
1189
+ "name": "menu_id",
1190
+ "type": "String",
1191
+ "default": "`self.class.generate_id`",
1192
+ "description": "Id of the menu."
1193
+ },
1194
+ {
1195
+ "name": "anchor_align",
1196
+ "type": "Symbol",
1197
+ "default": "`:start`",
1198
+ "description": "One of `:center`, `:end`, or `:start`.."
1199
+ },
1200
+ {
1201
+ "name": "anchor_side",
1202
+ "type": "Symbol",
1203
+ "default": "`:outside_bottom`",
1204
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
1205
+ },
1206
+ {
1207
+ "name": "size",
1208
+ "type": "Symbol",
1209
+ "default": "`:auto`",
1210
+ "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
1211
+ },
1212
+ {
1213
+ "name": "src",
1214
+ "type": "String",
1215
+ "default": "`nil`",
1216
+ "description": "Used with an `include-fragment` element to load menu content from the given source URL."
1217
+ },
1218
+ {
1219
+ "name": "preload",
1220
+ "type": "Boolean",
1221
+ "default": "`false`",
1222
+ "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
1223
+ },
1224
+ {
1225
+ "name": "dynamic_label",
1226
+ "type": "Boolean",
1227
+ "default": "`false`",
1228
+ "description": "Whether or not to display the text of the currently selected item in the show button."
1229
+ },
1230
+ {
1231
+ "name": "dynamic_label_prefix",
1232
+ "type": "String",
1233
+ "default": "`nil`",
1234
+ "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
1235
+ },
1236
+ {
1237
+ "name": "select_variant",
1238
+ "type": "Symbol",
1239
+ "default": "`:none`",
1240
+ "description": "One of `:multiple`, `:none`, or `:single`."
1241
+ },
1242
+ {
1243
+ "name": "form_arguments",
1244
+ "type": "Hash",
1245
+ "default": "`{}`",
1246
+ "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."
1247
+ },
1248
+ {
1249
+ "name": "overlay_arguments",
1250
+ "type": "Hash",
1251
+ "default": "`{}`",
1252
+ "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
1253
+ },
1188
1254
  {
1189
1255
  "name": "system_arguments",
1190
1256
  "type": "Hash",
1191
1257
  "default": "N/A",
1192
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::PrimaryMenu{{/link_to_component}}."
1258
+ "description": "{{link_to_system_arguments_docs}}."
1259
+ }
1260
+ ],
1261
+ "slots": [
1262
+ {
1263
+ "name": "show_button",
1264
+ "description": "Button to activate the menu.",
1265
+ "parameters": [
1266
+ {
1267
+ "name": "system_arguments",
1268
+ "type": "Hash",
1269
+ "default": "N/A",
1270
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
1271
+ }
1272
+ ]
1273
+ },
1274
+ {
1275
+ "name": "items",
1276
+ "description": "Adds a new item to the list.",
1277
+ "parameters": [
1278
+ {
1279
+ "name": "system_arguments",
1280
+ "type": "Hash",
1281
+ "default": "N/A",
1282
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1283
+ }
1284
+ ]
1193
1285
  }
1194
1286
  ],
1195
- "slots": [],
1196
1287
  "methods": [
1197
1288
  {
1198
- "name": "with_item",
1199
- "description": "Adds an item to the menu.",
1289
+ "name": "list",
1290
+ "description": "Returns the value of attribute list.",
1291
+ "parameters": [],
1292
+ "return_types": []
1293
+ },
1294
+ {
1295
+ "name": "preload",
1296
+ "description": "Returns the value of attribute preload.",
1297
+ "parameters": [],
1298
+ "return_types": []
1299
+ },
1300
+ {
1301
+ "name": "preload?",
1302
+ "description": "Returns the value of attribute preload.",
1303
+ "parameters": [],
1304
+ "return_types": []
1305
+ },
1306
+ {
1307
+ "name": "with_show_button",
1308
+ "description": "Button to activate the menu.",
1200
1309
  "parameters": [
1201
1310
  {
1202
1311
  "name": "system_arguments",
1203
1312
  "type": "Hash",
1204
1313
  "default": "N/A",
1205
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1314
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
1206
1315
  }
1207
1316
  ],
1208
1317
  "return_types": []
1209
1318
  },
1210
1319
  {
1211
- "name": "with_avatar_item",
1212
- "description": "Adds an avatar item to the menu.",
1320
+ "name": "with_item",
1321
+ "description": "Adds a new item to the list.",
1213
1322
  "parameters": [
1214
1323
  {
1215
1324
  "name": "system_arguments",
1216
1325
  "type": "Hash",
1217
1326
  "default": "N/A",
1218
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1327
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1219
1328
  }
1220
1329
  ],
1221
1330
  "return_types": []
1222
1331
  },
1223
1332
  {
1224
1333
  "name": "with_divider",
1225
- "description": "Adds a divider to the list. Dividers visually separate items.",
1334
+ "description": "Adds a divider to the list.",
1226
1335
  "parameters": [
1227
1336
  {
1228
1337
  "name": "system_arguments",
1229
1338
  "type": "Hash",
1230
1339
  "default": "N/A",
1231
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
1340
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `divider` slot."
1232
1341
  }
1233
1342
  ],
1234
1343
  "return_types": []
1235
1344
  },
1236
1345
  {
1237
- "name": "with_group",
1238
- "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
1346
+ "name": "with_avatar_item",
1347
+ "description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
1239
1348
  "parameters": [
1349
+ {
1350
+ "name": "src",
1351
+ "type": "String",
1352
+ "default": "N/A",
1353
+ "description": "The source url of the avatar image."
1354
+ },
1355
+ {
1356
+ "name": "username",
1357
+ "type": "String",
1358
+ "default": "N/A",
1359
+ "description": "The username associated with the avatar."
1360
+ },
1361
+ {
1362
+ "name": "full_name",
1363
+ "type": "String",
1364
+ "default": "N/A",
1365
+ "description": "Optional. The user's full name."
1366
+ },
1367
+ {
1368
+ "name": "full_name_scheme",
1369
+ "type": "Symbol",
1370
+ "default": "N/A",
1371
+ "description": "Optional. How to display the user's full name."
1372
+ },
1373
+ {
1374
+ "name": "avatar_arguments",
1375
+ "type": "Hash",
1376
+ "default": "N/A",
1377
+ "description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}."
1378
+ },
1240
1379
  {
1241
1380
  "name": "system_arguments",
1242
1381
  "type": "Hash",
1243
1382
  "default": "N/A",
1244
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
1383
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
1245
1384
  }
1246
1385
  ],
1247
1386
  "return_types": []
1248
- },
1249
- {
1250
- "name": "items",
1251
- "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
1252
- "parameters": [],
1253
- "return_types": [
1254
- "Array<ViewComponent::Slot>"
1255
- ]
1256
1387
  }
1257
1388
  ],
1258
1389
  "previews": [
@@ -1632,645 +1763,80 @@
1632
1763
  "color-contrast"
1633
1764
  ]
1634
1765
  }
1635
- },
1636
- {
1637
- "preview_path": "primer/alpha/action_menu/sub_menus",
1638
- "name": "sub_menus",
1639
- "snapshot": "false",
1640
- "skip_rules": {
1641
- "wont_fix": [
1642
- "region"
1643
- ],
1644
- "will_fix": [
1645
- "color-contrast"
1646
- ]
1647
- }
1648
1766
  }
1649
1767
  ],
1650
1768
  "subcomponents": [
1651
1769
  {
1652
- "fully_qualified_name": "Primer::Alpha::ActionMenu::Menu",
1770
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::List",
1653
1771
  "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
1654
1772
  "accessibility_docs": null,
1655
1773
  "is_form_component": false,
1656
1774
  "is_published": true,
1657
1775
  "requires_js": false,
1658
- "component": "ActionMenu::Menu",
1776
+ "component": "ActionMenu::List",
1659
1777
  "status": "alpha",
1660
1778
  "a11y_reviewed": false,
1661
- "short_name": "ActionMenuMenu",
1662
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/menu.rb",
1663
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/menu/default/",
1779
+ "short_name": "ActionMenuList",
1780
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
1781
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
1664
1782
  "parameters": [
1665
- {
1666
- "name": "anchor_align",
1667
- "type": "Symbol",
1668
- "default": "N/A",
1669
- "description": "One of `:center`, `:end`, or `:start`."
1670
- },
1671
- {
1672
- "name": "anchor_side",
1673
- "type": "Symbol",
1674
- "default": "N/A",
1675
- "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
1676
- },
1677
- {
1678
- "name": "menu_id",
1679
- "type": "String",
1680
- "default": "`self.class.generate_id`",
1681
- "description": "Id of the menu."
1682
- },
1683
- {
1684
- "name": "size",
1685
- "type": "Symbol",
1686
- "default": "`:auto`",
1687
- "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
1688
- },
1689
- {
1690
- "name": "src",
1691
- "type": "String",
1692
- "default": "`nil`",
1693
- "description": "Used with an `include-fragment` element to load menu content from the given source URL."
1694
- },
1695
- {
1696
- "name": "preload",
1697
- "type": "Boolean",
1698
- "default": "`false`",
1699
- "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
1700
- },
1701
- {
1702
- "name": "select_variant",
1703
- "type": "Symbol",
1704
- "default": "`:none`",
1705
- "description": "One of `:multiple`, `:none`, or `:single`."
1706
- },
1707
- {
1708
- "name": "form_arguments",
1709
- "type": "Hash",
1710
- "default": "`{}`",
1711
- "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."
1712
- },
1713
- {
1714
- "name": "overlay_arguments",
1715
- "type": "Hash",
1716
- "default": "`{}`",
1717
- "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
1718
- },
1719
- {
1720
- "name": "list_arguments",
1721
- "type": "Hash",
1722
- "default": "`{}`",
1723
- "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::ActionMenu::List{{/link_to_component}}"
1724
- },
1725
1783
  {
1726
1784
  "name": "system_arguments",
1727
1785
  "type": "Hash",
1728
1786
  "default": "N/A",
1729
- "description": "{{link_to_system_arguments_docs}}."
1787
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}"
1730
1788
  }
1731
1789
  ],
1732
1790
  "slots": [],
1733
1791
  "methods": [
1734
1792
  {
1735
- "name": "menu_id",
1736
- "description": "Returns the value of attribute menu_id.",
1737
- "parameters": [],
1738
- "return_types": []
1739
- },
1740
- {
1741
- "name": "anchor_side",
1742
- "description": "Returns the value of attribute anchor_side.",
1793
+ "name": "items",
1794
+ "description": "Returns the value of attribute items.",
1743
1795
  "parameters": [],
1744
1796
  "return_types": []
1745
- },
1797
+ }
1798
+ ],
1799
+ "previews": [],
1800
+ "subcomponents": []
1801
+ },
1802
+ {
1803
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::Heading",
1804
+ "description": "Heading used to describe groups within an action menu.",
1805
+ "accessibility_docs": null,
1806
+ "is_form_component": false,
1807
+ "is_published": true,
1808
+ "requires_js": false,
1809
+ "component": "ActionMenu::Heading",
1810
+ "status": "alpha",
1811
+ "a11y_reviewed": false,
1812
+ "short_name": "ActionMenuHeading",
1813
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/heading.rb",
1814
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/heading/default/",
1815
+ "parameters": [],
1816
+ "slots": [],
1817
+ "methods": [],
1818
+ "previews": [],
1819
+ "subcomponents": []
1820
+ },
1821
+ {
1822
+ "fully_qualified_name": "Primer::Alpha::ActionMenu::ListWrapper",
1823
+ "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
1824
+ "accessibility_docs": null,
1825
+ "is_form_component": false,
1826
+ "is_published": true,
1827
+ "requires_js": false,
1828
+ "component": "ActionMenu::ListWrapper",
1829
+ "status": "alpha",
1830
+ "a11y_reviewed": true,
1831
+ "short_name": "ActionMenuListWrapper",
1832
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list_wrapper.rb",
1833
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list_wrapper/default/",
1834
+ "parameters": [
1746
1835
  {
1747
- "name": "anchor_align",
1748
- "description": "Returns the value of attribute anchor_align.",
1749
- "parameters": [],
1750
- "return_types": []
1751
- },
1752
- {
1753
- "name": "list",
1754
- "description": "Returns the value of attribute list.",
1755
- "parameters": [],
1756
- "return_types": []
1757
- },
1758
- {
1759
- "name": "preload",
1760
- "description": "Returns the value of attribute preload.",
1761
- "parameters": [],
1762
- "return_types": []
1763
- },
1764
- {
1765
- "name": "src",
1766
- "description": "Returns the value of attribute src.",
1767
- "parameters": [],
1768
- "return_types": []
1769
- },
1770
- {
1771
- "name": "select_variant",
1772
- "description": "Returns the value of attribute select_variant.",
1773
- "parameters": [],
1774
- "return_types": []
1775
- },
1776
- {
1777
- "name": "form_arguments",
1778
- "description": "Returns the value of attribute form_arguments.",
1779
- "parameters": [],
1780
- "return_types": []
1781
- },
1782
- {
1783
- "name": "preload?",
1784
- "description": "Returns the value of attribute preload.",
1785
- "parameters": [],
1786
- "return_types": []
1787
- },
1788
- {
1789
- "name": "with_item",
1790
- "description": "Adds an item to the menu.",
1791
- "parameters": [
1792
- {
1793
- "name": "system_arguments",
1794
- "type": "Hash",
1795
- "default": "N/A",
1796
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1797
- }
1798
- ],
1799
- "return_types": []
1800
- },
1801
- {
1802
- "name": "with_avatar_item",
1803
- "description": "Adds an avatar item to the menu.",
1804
- "parameters": [
1805
- {
1806
- "name": "system_arguments",
1807
- "type": "Hash",
1808
- "default": "N/A",
1809
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1810
- }
1811
- ],
1812
- "return_types": []
1813
- },
1814
- {
1815
- "name": "with_divider",
1816
- "description": "Adds a divider to the list. Dividers visually separate items.",
1817
- "parameters": [
1818
- {
1819
- "name": "system_arguments",
1820
- "type": "Hash",
1821
- "default": "N/A",
1822
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
1823
- }
1824
- ],
1825
- "return_types": []
1826
- },
1827
- {
1828
- "name": "with_group",
1829
- "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
1830
- "parameters": [
1831
- {
1832
- "name": "system_arguments",
1833
- "type": "Hash",
1834
- "default": "N/A",
1835
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
1836
- }
1837
- ],
1838
- "return_types": []
1839
- },
1840
- {
1841
- "name": "items",
1842
- "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
1843
- "parameters": [],
1844
- "return_types": [
1845
- "Array<ViewComponent::Slot>"
1846
- ]
1847
- },
1848
- {
1849
- "name": "with_sub_menu_item",
1850
- "description": "Adds a sub-menu to the menu.",
1851
- "parameters": [
1852
- {
1853
- "name": "system_arguments",
1854
- "type": "Hash",
1855
- "default": "N/A",
1856
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::SubMenuItem{{/link_to_component}}."
1857
- }
1858
- ],
1859
- "return_types": []
1860
- }
1861
- ],
1862
- "previews": [],
1863
- "subcomponents": []
1864
- },
1865
- {
1866
- "fully_qualified_name": "Primer::Alpha::ActionMenu::List",
1867
- "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
1868
- "accessibility_docs": null,
1869
- "is_form_component": false,
1870
- "is_published": true,
1871
- "requires_js": false,
1872
- "component": "ActionMenu::List",
1873
- "status": "alpha",
1874
- "a11y_reviewed": false,
1875
- "short_name": "ActionMenuList",
1876
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
1877
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
1878
- "parameters": [
1879
- {
1880
- "name": "system_arguments",
1881
- "type": "Hash",
1882
- "default": "N/A",
1883
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::ListWrapper{{/link_to_component}}"
1884
- }
1885
- ],
1886
- "slots": [],
1887
- "methods": [
1888
- {
1889
- "name": "items",
1890
- "description": "Returns the value of attribute items.",
1891
- "parameters": [],
1892
- "return_types": []
1893
- }
1894
- ],
1895
- "previews": [],
1896
- "subcomponents": []
1897
- },
1898
- {
1899
- "fully_qualified_name": "Primer::Alpha::ActionMenu::SubMenu",
1900
- "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
1901
- "accessibility_docs": null,
1902
- "is_form_component": false,
1903
- "is_published": true,
1904
- "requires_js": false,
1905
- "component": "ActionMenu::SubMenu",
1906
- "status": "alpha",
1907
- "a11y_reviewed": false,
1908
- "short_name": "ActionMenuSubMenu",
1909
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu.rb",
1910
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu/default/",
1911
- "parameters": [
1912
- {
1913
- "name": "menu_id",
1914
- "type": "String",
1915
- "default": "`self.class.generate_id`",
1916
- "description": "Id of the menu."
1917
- },
1918
- {
1919
- "name": "anchor_align",
1920
- "type": "Symbol",
1921
- "default": "`:start`",
1922
- "description": "One of `:center`, `:end`, or `:start`."
1923
- },
1924
- {
1925
- "name": "anchor_side",
1926
- "type": "Symbol",
1927
- "default": "`:outside_right`",
1928
- "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
1929
- },
1930
- {
1931
- "name": "overlay_arguments",
1932
- "type": "Hash",
1933
- "default": "`{}`",
1934
- "description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}"
1935
- },
1936
- {
1937
- "name": "system_arguments",
1938
- "type": "Hash",
1939
- "default": "N/A",
1940
- "description": "{{link_to_system_arguments_docs}}."
1941
- }
1942
- ],
1943
- "slots": [],
1944
- "methods": [
1945
- {
1946
- "name": "with_item",
1947
- "description": "Adds an item to the menu.",
1948
- "parameters": [
1949
- {
1950
- "name": "system_arguments",
1951
- "type": "Hash",
1952
- "default": "N/A",
1953
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1954
- }
1955
- ],
1956
- "return_types": []
1957
- },
1958
- {
1959
- "name": "with_avatar_item",
1960
- "description": "Adds an avatar item to the menu.",
1961
- "parameters": [
1962
- {
1963
- "name": "system_arguments",
1964
- "type": "Hash",
1965
- "default": "N/A",
1966
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
1967
- }
1968
- ],
1969
- "return_types": []
1970
- },
1971
- {
1972
- "name": "with_divider",
1973
- "description": "Adds a divider to the list. Dividers visually separate items.",
1974
- "parameters": [
1975
- {
1976
- "name": "system_arguments",
1977
- "type": "Hash",
1978
- "default": "N/A",
1979
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
1980
- }
1981
- ],
1982
- "return_types": []
1983
- },
1984
- {
1985
- "name": "with_group",
1986
- "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
1987
- "parameters": [
1988
- {
1989
- "name": "system_arguments",
1990
- "type": "Hash",
1991
- "default": "N/A",
1992
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
1993
- }
1994
- ],
1995
- "return_types": []
1996
- },
1997
- {
1998
- "name": "items",
1999
- "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2000
- "parameters": [],
2001
- "return_types": [
2002
- "Array<ViewComponent::Slot>"
2003
- ]
2004
- },
2005
- {
2006
- "name": "with_sub_menu_item",
2007
- "description": "Adds a sub-menu to the menu.",
2008
- "parameters": [
2009
- {
2010
- "name": "system_arguments",
2011
- "type": "Hash",
2012
- "default": "N/A",
2013
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::SubMenuItem{{/link_to_component}}."
2014
- }
2015
- ],
2016
- "return_types": []
2017
- }
2018
- ],
2019
- "previews": [],
2020
- "subcomponents": []
2021
- },
2022
- {
2023
- "fully_qualified_name": "Primer::Alpha::ActionMenu::PrimaryMenu",
2024
- "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2025
- "accessibility_docs": null,
2026
- "is_form_component": false,
2027
- "is_published": true,
2028
- "requires_js": false,
2029
- "component": "ActionMenu::PrimaryMenu",
2030
- "status": "alpha",
2031
- "a11y_reviewed": false,
2032
- "short_name": "ActionMenuPrimaryMenu",
2033
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/primary_menu.rb",
2034
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/primary_menu/default/",
2035
- "parameters": [
2036
- {
2037
- "name": "anchor_align",
2038
- "type": "Symbol",
2039
- "default": "`:start`",
2040
- "description": "One of `:center`, `:end`, or `:start`."
2041
- },
2042
- {
2043
- "name": "anchor_side",
2044
- "type": "Symbol",
2045
- "default": "`:outside_bottom`",
2046
- "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
2047
- },
2048
- {
2049
- "name": "dynamic_label",
2050
- "type": "Boolean",
2051
- "default": "`false`",
2052
- "description": "Whether or not to display the text of the currently selected item in the show button."
2053
- },
2054
- {
2055
- "name": "dynamic_label_prefix",
2056
- "type": "String",
2057
- "default": "`nil`",
2058
- "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
2059
- },
2060
- {
2061
- "name": "system_arguments",
2062
- "type": "Hash",
2063
- "default": "N/A",
2064
- "description": "{{link_to_system_arguments_docs}}."
2065
- }
2066
- ],
2067
- "slots": [],
2068
- "methods": [
2069
- {
2070
- "name": "dynamic_label",
2071
- "description": "Returns the value of attribute dynamic_label.",
2072
- "parameters": [],
2073
- "return_types": []
2074
- },
2075
- {
2076
- "name": "dynamic_label_prefix",
2077
- "description": "Returns the value of attribute dynamic_label_prefix.",
2078
- "parameters": [],
2079
- "return_types": []
2080
- },
2081
- {
2082
- "name": "with_item",
2083
- "description": "Adds an item to the menu.",
2084
- "parameters": [
2085
- {
2086
- "name": "system_arguments",
2087
- "type": "Hash",
2088
- "default": "N/A",
2089
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2090
- }
2091
- ],
2092
- "return_types": []
2093
- },
2094
- {
2095
- "name": "with_avatar_item",
2096
- "description": "Adds an avatar item to the menu.",
2097
- "parameters": [
2098
- {
2099
- "name": "system_arguments",
2100
- "type": "Hash",
2101
- "default": "N/A",
2102
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2103
- }
2104
- ],
2105
- "return_types": []
2106
- },
2107
- {
2108
- "name": "with_divider",
2109
- "description": "Adds a divider to the list. Dividers visually separate items.",
2110
- "parameters": [
2111
- {
2112
- "name": "system_arguments",
2113
- "type": "Hash",
2114
- "default": "N/A",
2115
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2116
- }
2117
- ],
2118
- "return_types": []
2119
- },
2120
- {
2121
- "name": "with_group",
2122
- "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2123
- "parameters": [
2124
- {
2125
- "name": "system_arguments",
2126
- "type": "Hash",
2127
- "default": "N/A",
2128
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2129
- }
2130
- ],
2131
- "return_types": []
2132
- },
2133
- {
2134
- "name": "items",
2135
- "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2136
- "parameters": [],
2137
- "return_types": [
2138
- "Array<ViewComponent::Slot>"
2139
- ]
2140
- },
2141
- {
2142
- "name": "with_show_button",
2143
- "description": "Button to activate the menu.",
2144
- "parameters": [
2145
- {
2146
- "name": "system_arguments",
2147
- "type": "Hash",
2148
- "default": "N/A",
2149
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
2150
- }
2151
- ],
2152
- "return_types": []
2153
- }
2154
- ],
2155
- "previews": [],
2156
- "subcomponents": []
2157
- },
2158
- {
2159
- "fully_qualified_name": "Primer::Alpha::ActionMenu::SubMenuItem",
2160
- "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2161
- "accessibility_docs": null,
2162
- "is_form_component": false,
2163
- "is_published": true,
2164
- "requires_js": false,
2165
- "component": "ActionMenu::SubMenuItem",
2166
- "status": "alpha",
2167
- "a11y_reviewed": false,
2168
- "short_name": "ActionMenuSubMenuItem",
2169
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu_item.rb",
2170
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu_item/default/",
2171
- "parameters": [],
2172
- "slots": [
2173
- {
2174
- "name": "description",
2175
- "description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
2176
- "parameters": [
2177
- {
2178
- "name": "legacy_content",
2179
- "type": "String",
2180
- "default": "N/A",
2181
- "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\")`."
2182
- },
2183
- {
2184
- "name": "test_selector",
2185
- "type": "String",
2186
- "default": "N/A",
2187
- "description": "The value of this argument is set as the value of a `data-test-selector` HTML attribute on the description element."
2188
- }
2189
- ]
2190
- },
2191
- {
2192
- "name": "leading_visual",
2193
- "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.",
2194
- "parameters": []
2195
- },
2196
- {
2197
- "name": "trailing_visual",
2198
- "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```",
2199
- "parameters": []
2200
- },
2201
- {
2202
- "name": "trailing_action",
2203
- "description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
2204
- "parameters": [
2205
- {
2206
- "name": "system_arguments",
2207
- "type": "Hash",
2208
- "default": "N/A",
2209
- "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
2210
- }
2211
- ]
2212
- },
2213
- {
2214
- "name": "tooltip",
2215
- "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.",
2216
- "parameters": [
2217
- {
2218
- "name": "type",
2219
- "type": "Symbol",
2220
- "default": "`:description`",
2221
- "description": "One of `:description` or `:label`."
2222
- },
2223
- {
2224
- "name": "system_arguments",
2225
- "type": "Hash",
2226
- "default": "N/A",
2227
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
2228
- }
2229
- ]
2230
- }
2231
- ],
2232
- "methods": [],
2233
- "previews": [],
2234
- "subcomponents": []
2235
- },
2236
- {
2237
- "fully_qualified_name": "Primer::Alpha::ActionMenu::Heading",
2238
- "description": "Heading used to describe groups within an action menu.",
2239
- "accessibility_docs": null,
2240
- "is_form_component": false,
2241
- "is_published": true,
2242
- "requires_js": false,
2243
- "component": "ActionMenu::Heading",
2244
- "status": "alpha",
2245
- "a11y_reviewed": false,
2246
- "short_name": "ActionMenuHeading",
2247
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/heading.rb",
2248
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/heading/default/",
2249
- "parameters": [],
2250
- "slots": [],
2251
- "methods": [],
2252
- "previews": [],
2253
- "subcomponents": []
2254
- },
2255
- {
2256
- "fully_qualified_name": "Primer::Alpha::ActionMenu::ListWrapper",
2257
- "description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
2258
- "accessibility_docs": null,
2259
- "is_form_component": false,
2260
- "is_published": true,
2261
- "requires_js": false,
2262
- "component": "ActionMenu::ListWrapper",
2263
- "status": "alpha",
2264
- "a11y_reviewed": true,
2265
- "short_name": "ActionMenuListWrapper",
2266
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list_wrapper.rb",
2267
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list_wrapper/default/",
2268
- "parameters": [
2269
- {
2270
- "name": "menu_id",
2271
- "type": "String",
2272
- "default": "N/A",
2273
- "description": "ID of the parent menu."
1836
+ "name": "menu_id",
1837
+ "type": "String",
1838
+ "default": "N/A",
1839
+ "description": "ID of the parent menu."
2274
1840
  },
2275
1841
  {
2276
1842
  "name": "system_arguments",
@@ -2297,70 +1863,14 @@
2297
1863
  "description": "The arguments accepted by `component_klass`."
2298
1864
  }
2299
1865
  ]
2300
- }
2301
- ],
2302
- "methods": [
2303
- {
2304
- "name": "with_item",
2305
- "description": "Adds an item to the menu.",
2306
- "parameters": [
2307
- {
2308
- "name": "system_arguments",
2309
- "type": "Hash",
2310
- "default": "N/A",
2311
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2312
- }
2313
- ],
2314
- "return_types": []
2315
- },
2316
- {
2317
- "name": "with_avatar_item",
2318
- "description": "Adds an avatar item to the menu.",
2319
- "parameters": [
2320
- {
2321
- "name": "system_arguments",
2322
- "type": "Hash",
2323
- "default": "N/A",
2324
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `item` slot."
2325
- }
2326
- ],
2327
- "return_types": []
2328
- },
2329
- {
2330
- "name": "with_divider",
2331
- "description": "Adds a divider to the list. Dividers visually separate items.",
2332
- "parameters": [
2333
- {
2334
- "name": "system_arguments",
2335
- "type": "Hash",
2336
- "default": "N/A",
2337
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}."
2338
- }
2339
- ],
2340
- "return_types": []
2341
- },
2342
- {
2343
- "name": "with_group",
2344
- "description": "Adds a group to the menu. Groups are a logical set of items with a header.",
2345
- "parameters": [
2346
- {
2347
- "name": "system_arguments",
2348
- "type": "Hash",
2349
- "default": "N/A",
2350
- "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Group{{/link_to_component}}."
2351
- }
2352
- ],
2353
- "return_types": []
2354
1866
  },
2355
1867
  {
2356
1868
  "name": "items",
2357
- "description": "Gets the list of configured menu items, which includes regular items, avatar items, groups, and dividers.",
2358
- "parameters": [],
2359
- "return_types": [
2360
- "Array<ViewComponent::Slot>"
2361
- ]
1869
+ "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.",
1870
+ "parameters": []
2362
1871
  }
2363
1872
  ],
1873
+ "methods": [],
2364
1874
  "previews": [],
2365
1875
  "subcomponents": []
2366
1876
  },