@primer/view-components 0.15.0-rc.22e6d987 → 0.15.0-rc.2eb37d37
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.
- package/package.json +1 -1
- package/static/info_arch.json +820 -820
package/static/info_arch.json
CHANGED
@@ -749,146 +749,6 @@
|
|
749
749
|
}
|
750
750
|
],
|
751
751
|
"subcomponents": [
|
752
|
-
{
|
753
|
-
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
754
|
-
"description": "Separator with optional text rendered above groups or between individual items.",
|
755
|
-
"accessibility_docs": null,
|
756
|
-
"is_form_component": false,
|
757
|
-
"is_published": true,
|
758
|
-
"requires_js": false,
|
759
|
-
"component": "ActionList::Divider",
|
760
|
-
"status": "alpha",
|
761
|
-
"a11y_reviewed": false,
|
762
|
-
"short_name": "ActionListDivider",
|
763
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
764
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
765
|
-
"parameters": [
|
766
|
-
{
|
767
|
-
"name": "scheme",
|
768
|
-
"type": "Symbol",
|
769
|
-
"default": "`:subtle`",
|
770
|
-
"description": "Display a background color if scheme is `filled`."
|
771
|
-
},
|
772
|
-
{
|
773
|
-
"name": "system_arguments",
|
774
|
-
"type": "Hash",
|
775
|
-
"default": "N/A",
|
776
|
-
"description": "{{link_to_system_arguments_docs}}"
|
777
|
-
}
|
778
|
-
],
|
779
|
-
"slots": [
|
780
|
-
|
781
|
-
],
|
782
|
-
"methods": [
|
783
|
-
|
784
|
-
],
|
785
|
-
"previews": [
|
786
|
-
|
787
|
-
],
|
788
|
-
"subcomponents": [
|
789
|
-
|
790
|
-
]
|
791
|
-
},
|
792
|
-
{
|
793
|
-
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
794
|
-
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
795
|
-
"accessibility_docs": null,
|
796
|
-
"is_form_component": false,
|
797
|
-
"is_published": true,
|
798
|
-
"requires_js": false,
|
799
|
-
"component": "ActionList::FormWrapper",
|
800
|
-
"status": "alpha",
|
801
|
-
"a11y_reviewed": false,
|
802
|
-
"short_name": "ActionListFormWrapper",
|
803
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
804
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
805
|
-
"parameters": [
|
806
|
-
|
807
|
-
],
|
808
|
-
"slots": [
|
809
|
-
|
810
|
-
],
|
811
|
-
"methods": [
|
812
|
-
|
813
|
-
],
|
814
|
-
"previews": [
|
815
|
-
|
816
|
-
],
|
817
|
-
"subcomponents": [
|
818
|
-
|
819
|
-
]
|
820
|
-
},
|
821
|
-
{
|
822
|
-
"fully_qualified_name": "Primer::Alpha::ActionList::Heading",
|
823
|
-
"description": "Heading used to describe each sub list within an action list.",
|
824
|
-
"accessibility_docs": null,
|
825
|
-
"is_form_component": false,
|
826
|
-
"is_published": true,
|
827
|
-
"requires_js": false,
|
828
|
-
"component": "ActionList::Heading",
|
829
|
-
"status": "alpha",
|
830
|
-
"a11y_reviewed": false,
|
831
|
-
"short_name": "ActionListHeading",
|
832
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
|
833
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
|
834
|
-
"parameters": [
|
835
|
-
{
|
836
|
-
"name": "title",
|
837
|
-
"type": "String",
|
838
|
-
"default": "N/A",
|
839
|
-
"description": "Sub list title."
|
840
|
-
},
|
841
|
-
{
|
842
|
-
"name": "heading_level",
|
843
|
-
"type": "Integer",
|
844
|
-
"default": "`3`",
|
845
|
-
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
|
846
|
-
},
|
847
|
-
{
|
848
|
-
"name": "subtitle",
|
849
|
-
"type": "String",
|
850
|
-
"default": "`nil`",
|
851
|
-
"description": "Optional sub list description."
|
852
|
-
},
|
853
|
-
{
|
854
|
-
"name": "scheme",
|
855
|
-
"type": "Symbol",
|
856
|
-
"default": "`:subtle`",
|
857
|
-
"description": "Display a background color if scheme is `filled`."
|
858
|
-
},
|
859
|
-
{
|
860
|
-
"name": "system_arguments",
|
861
|
-
"type": "Hash",
|
862
|
-
"default": "N/A",
|
863
|
-
"description": "{{link_to_system_arguments_docs}}"
|
864
|
-
}
|
865
|
-
],
|
866
|
-
"slots": [
|
867
|
-
|
868
|
-
],
|
869
|
-
"methods": [
|
870
|
-
{
|
871
|
-
"name": "title_id",
|
872
|
-
"description": "Returns the value of attribute title_id.",
|
873
|
-
"parameters": [
|
874
|
-
|
875
|
-
]
|
876
|
-
},
|
877
|
-
{
|
878
|
-
"name": "subtitle_id",
|
879
|
-
"description": "Returns the value of attribute subtitle_id.",
|
880
|
-
"parameters": [
|
881
|
-
|
882
|
-
]
|
883
|
-
}
|
884
|
-
],
|
885
|
-
"previews": [
|
886
|
-
|
887
|
-
],
|
888
|
-
"subcomponents": [
|
889
|
-
|
890
|
-
]
|
891
|
-
},
|
892
752
|
{
|
893
753
|
"fully_qualified_name": "Primer::Alpha::ActionList::Item",
|
894
754
|
"description": "An individual `ActionList` item. Items can optionally include leading and/or trailing visuals,\nsuch as icons, avatars, and counters.",
|
@@ -1129,112 +989,252 @@
|
|
1129
989
|
"subcomponents": [
|
1130
990
|
|
1131
991
|
]
|
1132
|
-
}
|
1133
|
-
]
|
1134
|
-
},
|
1135
|
-
{
|
1136
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
1137
|
-
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when\nusers interact with buttons, actions, or other controls.\n\nThe only allowed elements for the `Item` components are: `:a`, `:button`, and `:clipboard-copy`. The default is `:button`.\n\n### Select variants\n\nWhile `ActionMenu`s default to a list of buttons that can link to other pages, copy text to the clipboard, etc, they also support\n`single` and `multiple` select variants. The single select variant allows a single item to be \"selected\" (i.e. marked \"active\")\nwhen clicked, which will cause a check mark to appear to the left of the item text. When the `multiple` select variant is chosen,\nmultiple items may be selected and check marks will appear next to each selected item.\n\nUse the `select_variant:` option to control which variant the `ActionMenu` uses. For more information, see the documentation on\nsupported arguments below.\n\n### Dynamic labels\n\nWhen using the `single` select variant, an optional label indicating the selected item can be displayed inside the menu button.\nDynamic labels can also be prefixed with custom text.\n\nPass `dynamic_label: true` to enable dynamic label behavior, and pass `dynamic_label_prefix: \"<string>\"` to set a custom prefix.\nFor more information, see the documentation on supported arguments below.\n\n### `ActionMenu`s as form inputs\n\nWhen using either the `single` or `multiple` select variants, `ActionMenu`s can be used as form inputs. They behave very\nsimilarly to how HTML `<select>` boxes behave, and play nicely with Rails' built-in form mechanisms. Pass arguments via the\n`form_arguments:` argument, including the Rails form builder object and the name of the field:\n\n```erb\n<% form_with(url: update_merge_strategy_path) do |f| %>\n <%= render(Primer::Alpha::ActionMenu.new(form_arguments: { builder: f, name: \"merge_strategy\" })) do |menu| %>\n <% menu.with_item(label: \"Fast forward\", data: { value: \"fast_forward\" }) %>\n <% menu.with_item(label: \"Recursive\", data: { value: \"recursive\" }) %>\n <% menu.with_item(label: \"Ours\", data: { value: \"ours\" }) %>\n <% menu.with_item(label: \"Theirs\", data: { value: \"theirs\" }) %>\n <% end %>\n<% end %>\n```\n\nThe value of the `data: { value: ... }` argument is sent to the server on submit, keyed using the name provided above\n(eg. `\"merge_strategy\"`). If no value is provided for an item, the value of that item is the item's label. Here's the\ncorresponding `MergeStrategyController` that might be written to handle the form above:\n\n```ruby\nclass MergeStrategyController < ApplicationController\n def update\n puts \"You chose #{merge_strategy_params[:merge_strategy]}\"\n end\n\n private\n\n def merge_strategy_params\n params.permit(:merge_strategy)\n end\nend\n```\n\n### `ActionMenu` items that submit forms\n\nWhereas `ActionMenu` items normally permit navigation via `<a>` tags which make HTTP `get` requests, `ActionMenu` items\nalso permit navigation via `POST` requests. To enable this behavior, include the `href:` argument as normal, but also pass\nthe `form_arguments:` argument to the appropriate item:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n name: \"group_by\",\n value: \"repository\"\n }\n ) %>\n<% end %>\n```\n\nMake sure to specify `method: :post`, as the default is `:get`. When clicked, the list item will submit a POST request to\nthe URL passed in the `href:` argument, including a parameter named `\"group_by\"` with a value of `\"repository\"`. If no value\nis given, the name, eg. `\"group_by\"`, will be used as the value.\n\nIt is possible to include multiple fields on submit. Instead of passing the `name:` and `value:` arguments, pass an array via\nthe `inputs:` argument:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_show_button { \"Group By\" } %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n inputs: [{\n name: \"group_by\",\n value: \"repository\"\n }, {\n name: \"some_other_field\",\n value: \"some value\",\n }],\n }\n ) %>\n<% end %>\n```\n\n### Form arguments\n\nThe following table summarizes the arguments allowed in the `form_arguments:` hash mentioned above.\n\n|Name |Type |Default|Description|\n|:----------------|:-------------|:------|:----------|\n|`method` |`Symbol` |`:get` |The HTTP request method to use to submit the form. One of `:get`, `:post`, `:patch`, `:put`, `:delete`, or `:head`|\n|`name` |`String` |`nil` |The name of the field that will be sent to the server on submit.|\n|`value` |`String` |`nil` |The value of the field that will be sent to the server on submit.|\n|`input_arguments`|`Hash` |`{}` |Additional key/value pairs to emit as HTML attributes on the `<input type=\"hidden\">` element.|\n|`inputs` |`Array<Hash>` |`[]` |An array of hashes representing HTML `<input type=\"hidden\">` elements. Must contain at least `name:` and `value:` keys. If additional key/value pairs are provided, they are emitted as HTML attributes on the `<input>` element. This argument supercedes the `name:`, `value:`, and `:input_arguments` arguments listed above.|\n\nThe elements of the `inputs:` array will be emitted as HTML `<input type=\"hidden\">` elements.",
|
1138
|
-
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything\nnested inside of it. When a menu item is selected, the menu will close immediately.\n\nAdditional information around the keyboard functionality and implementation can be found on the\n[WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/#menu).",
|
1139
|
-
"is_form_component": false,
|
1140
|
-
"is_published": true,
|
1141
|
-
"requires_js": true,
|
1142
|
-
"component": "ActionMenu",
|
1143
|
-
"status": "alpha",
|
1144
|
-
"a11y_reviewed": false,
|
1145
|
-
"short_name": "ActionMenu",
|
1146
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
1147
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
1148
|
-
"parameters": [
|
1149
|
-
{
|
1150
|
-
"name": "menu_id",
|
1151
|
-
"type": "String",
|
1152
|
-
"default": "`self.class.generate_id`",
|
1153
|
-
"description": "Id of the menu."
|
1154
|
-
},
|
1155
|
-
{
|
1156
|
-
"name": "anchor_align",
|
1157
|
-
"type": "Symbol",
|
1158
|
-
"default": "`:start`",
|
1159
|
-
"description": "One of `:center`, `:end`, or `:start`.."
|
1160
|
-
},
|
1161
|
-
{
|
1162
|
-
"name": "anchor_side",
|
1163
|
-
"type": "Symbol",
|
1164
|
-
"default": "`:outside_bottom`",
|
1165
|
-
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
1166
|
-
},
|
1167
|
-
{
|
1168
|
-
"name": "size",
|
1169
|
-
"type": "Symbol",
|
1170
|
-
"default": "`:auto`",
|
1171
|
-
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
1172
|
-
},
|
1173
|
-
{
|
1174
|
-
"name": "src",
|
1175
|
-
"type": "String",
|
1176
|
-
"default": "`nil`",
|
1177
|
-
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
1178
|
-
},
|
1179
|
-
{
|
1180
|
-
"name": "preload",
|
1181
|
-
"type": "Boolean",
|
1182
|
-
"default": "`false`",
|
1183
|
-
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
1184
992
|
},
|
1185
993
|
{
|
1186
|
-
"
|
1187
|
-
"
|
1188
|
-
"
|
1189
|
-
"
|
1190
|
-
|
1191
|
-
|
1192
|
-
"
|
1193
|
-
"
|
1194
|
-
"
|
1195
|
-
"
|
1196
|
-
|
1197
|
-
|
1198
|
-
"name": "select_variant",
|
1199
|
-
"type": "Symbol",
|
1200
|
-
"default": "`:none`",
|
1201
|
-
"description": "One of `:multiple`, `:none`, or `:single`."
|
1202
|
-
},
|
1203
|
-
{
|
1204
|
-
"name": "form_arguments",
|
1205
|
-
"type": "Hash",
|
1206
|
-
"default": "`{}`",
|
1207
|
-
"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."
|
1208
|
-
},
|
1209
|
-
{
|
1210
|
-
"name": "system_arguments",
|
1211
|
-
"type": "Hash",
|
1212
|
-
"default": "N/A",
|
1213
|
-
"description": "{{link_to_system_arguments_docs}}."
|
1214
|
-
}
|
1215
|
-
],
|
1216
|
-
"slots": [
|
1217
|
-
{
|
1218
|
-
"name": "show_button",
|
1219
|
-
"description": "Button to activate the menu.",
|
994
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Heading",
|
995
|
+
"description": "Heading used to describe each sub list within an action list.",
|
996
|
+
"accessibility_docs": null,
|
997
|
+
"is_form_component": false,
|
998
|
+
"is_published": true,
|
999
|
+
"requires_js": false,
|
1000
|
+
"component": "ActionList::Heading",
|
1001
|
+
"status": "alpha",
|
1002
|
+
"a11y_reviewed": false,
|
1003
|
+
"short_name": "ActionListHeading",
|
1004
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
|
1005
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
|
1220
1006
|
"parameters": [
|
1221
1007
|
{
|
1222
|
-
"name": "
|
1223
|
-
"type": "
|
1008
|
+
"name": "title",
|
1009
|
+
"type": "String",
|
1224
1010
|
"default": "N/A",
|
1225
|
-
"description": "
|
1226
|
-
}
|
1227
|
-
]
|
1228
|
-
},
|
1229
|
-
{
|
1230
|
-
"name": "items",
|
1231
|
-
"description": "Adds a new item to the list.",
|
1232
|
-
"parameters": [
|
1011
|
+
"description": "Sub list title."
|
1012
|
+
},
|
1233
1013
|
{
|
1234
|
-
"name": "
|
1235
|
-
"type": "
|
1236
|
-
"default": "
|
1237
|
-
"description": "
|
1014
|
+
"name": "heading_level",
|
1015
|
+
"type": "Integer",
|
1016
|
+
"default": "`3`",
|
1017
|
+
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
|
1018
|
+
},
|
1019
|
+
{
|
1020
|
+
"name": "subtitle",
|
1021
|
+
"type": "String",
|
1022
|
+
"default": "`nil`",
|
1023
|
+
"description": "Optional sub list description."
|
1024
|
+
},
|
1025
|
+
{
|
1026
|
+
"name": "scheme",
|
1027
|
+
"type": "Symbol",
|
1028
|
+
"default": "`:subtle`",
|
1029
|
+
"description": "Display a background color if scheme is `filled`."
|
1030
|
+
},
|
1031
|
+
{
|
1032
|
+
"name": "system_arguments",
|
1033
|
+
"type": "Hash",
|
1034
|
+
"default": "N/A",
|
1035
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1036
|
+
}
|
1037
|
+
],
|
1038
|
+
"slots": [
|
1039
|
+
|
1040
|
+
],
|
1041
|
+
"methods": [
|
1042
|
+
{
|
1043
|
+
"name": "title_id",
|
1044
|
+
"description": "Returns the value of attribute title_id.",
|
1045
|
+
"parameters": [
|
1046
|
+
|
1047
|
+
]
|
1048
|
+
},
|
1049
|
+
{
|
1050
|
+
"name": "subtitle_id",
|
1051
|
+
"description": "Returns the value of attribute subtitle_id.",
|
1052
|
+
"parameters": [
|
1053
|
+
|
1054
|
+
]
|
1055
|
+
}
|
1056
|
+
],
|
1057
|
+
"previews": [
|
1058
|
+
|
1059
|
+
],
|
1060
|
+
"subcomponents": [
|
1061
|
+
|
1062
|
+
]
|
1063
|
+
},
|
1064
|
+
{
|
1065
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
1066
|
+
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
1067
|
+
"accessibility_docs": null,
|
1068
|
+
"is_form_component": false,
|
1069
|
+
"is_published": true,
|
1070
|
+
"requires_js": false,
|
1071
|
+
"component": "ActionList::FormWrapper",
|
1072
|
+
"status": "alpha",
|
1073
|
+
"a11y_reviewed": false,
|
1074
|
+
"short_name": "ActionListFormWrapper",
|
1075
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
1076
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
1077
|
+
"parameters": [
|
1078
|
+
|
1079
|
+
],
|
1080
|
+
"slots": [
|
1081
|
+
|
1082
|
+
],
|
1083
|
+
"methods": [
|
1084
|
+
|
1085
|
+
],
|
1086
|
+
"previews": [
|
1087
|
+
|
1088
|
+
],
|
1089
|
+
"subcomponents": [
|
1090
|
+
|
1091
|
+
]
|
1092
|
+
},
|
1093
|
+
{
|
1094
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
1095
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
1096
|
+
"accessibility_docs": null,
|
1097
|
+
"is_form_component": false,
|
1098
|
+
"is_published": true,
|
1099
|
+
"requires_js": false,
|
1100
|
+
"component": "ActionList::Divider",
|
1101
|
+
"status": "alpha",
|
1102
|
+
"a11y_reviewed": false,
|
1103
|
+
"short_name": "ActionListDivider",
|
1104
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
1105
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
1106
|
+
"parameters": [
|
1107
|
+
{
|
1108
|
+
"name": "scheme",
|
1109
|
+
"type": "Symbol",
|
1110
|
+
"default": "`:subtle`",
|
1111
|
+
"description": "Display a background color if scheme is `filled`."
|
1112
|
+
},
|
1113
|
+
{
|
1114
|
+
"name": "system_arguments",
|
1115
|
+
"type": "Hash",
|
1116
|
+
"default": "N/A",
|
1117
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1118
|
+
}
|
1119
|
+
],
|
1120
|
+
"slots": [
|
1121
|
+
|
1122
|
+
],
|
1123
|
+
"methods": [
|
1124
|
+
|
1125
|
+
],
|
1126
|
+
"previews": [
|
1127
|
+
|
1128
|
+
],
|
1129
|
+
"subcomponents": [
|
1130
|
+
|
1131
|
+
]
|
1132
|
+
}
|
1133
|
+
]
|
1134
|
+
},
|
1135
|
+
{
|
1136
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
1137
|
+
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when\nusers interact with buttons, actions, or other controls.\n\nThe only allowed elements for the `Item` components are: `:a`, `:button`, and `:clipboard-copy`. The default is `:button`.\n\n### Select variants\n\nWhile `ActionMenu`s default to a list of buttons that can link to other pages, copy text to the clipboard, etc, they also support\n`single` and `multiple` select variants. The single select variant allows a single item to be \"selected\" (i.e. marked \"active\")\nwhen clicked, which will cause a check mark to appear to the left of the item text. When the `multiple` select variant is chosen,\nmultiple items may be selected and check marks will appear next to each selected item.\n\nUse the `select_variant:` option to control which variant the `ActionMenu` uses. For more information, see the documentation on\nsupported arguments below.\n\n### Dynamic labels\n\nWhen using the `single` select variant, an optional label indicating the selected item can be displayed inside the menu button.\nDynamic labels can also be prefixed with custom text.\n\nPass `dynamic_label: true` to enable dynamic label behavior, and pass `dynamic_label_prefix: \"<string>\"` to set a custom prefix.\nFor more information, see the documentation on supported arguments below.\n\n### `ActionMenu`s as form inputs\n\nWhen using either the `single` or `multiple` select variants, `ActionMenu`s can be used as form inputs. They behave very\nsimilarly to how HTML `<select>` boxes behave, and play nicely with Rails' built-in form mechanisms. Pass arguments via the\n`form_arguments:` argument, including the Rails form builder object and the name of the field:\n\n```erb\n<% form_with(url: update_merge_strategy_path) do |f| %>\n <%= render(Primer::Alpha::ActionMenu.new(form_arguments: { builder: f, name: \"merge_strategy\" })) do |menu| %>\n <% menu.with_item(label: \"Fast forward\", data: { value: \"fast_forward\" }) %>\n <% menu.with_item(label: \"Recursive\", data: { value: \"recursive\" }) %>\n <% menu.with_item(label: \"Ours\", data: { value: \"ours\" }) %>\n <% menu.with_item(label: \"Theirs\", data: { value: \"theirs\" }) %>\n <% end %>\n<% end %>\n```\n\nThe value of the `data: { value: ... }` argument is sent to the server on submit, keyed using the name provided above\n(eg. `\"merge_strategy\"`). If no value is provided for an item, the value of that item is the item's label. Here's the\ncorresponding `MergeStrategyController` that might be written to handle the form above:\n\n```ruby\nclass MergeStrategyController < ApplicationController\n def update\n puts \"You chose #{merge_strategy_params[:merge_strategy]}\"\n end\n\n private\n\n def merge_strategy_params\n params.permit(:merge_strategy)\n end\nend\n```\n\n### `ActionMenu` items that submit forms\n\nWhereas `ActionMenu` items normally permit navigation via `<a>` tags which make HTTP `get` requests, `ActionMenu` items\nalso permit navigation via `POST` requests. To enable this behavior, include the `href:` argument as normal, but also pass\nthe `form_arguments:` argument to the appropriate item:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n name: \"group_by\",\n value: \"repository\"\n }\n ) %>\n<% end %>\n```\n\nMake sure to specify `method: :post`, as the default is `:get`. When clicked, the list item will submit a POST request to\nthe URL passed in the `href:` argument, including a parameter named `\"group_by\"` with a value of `\"repository\"`. If no value\nis given, the name, eg. `\"group_by\"`, will be used as the value.\n\nIt is possible to include multiple fields on submit. Instead of passing the `name:` and `value:` arguments, pass an array via\nthe `inputs:` argument:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_show_button { \"Group By\" } %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n inputs: [{\n name: \"group_by\",\n value: \"repository\"\n }, {\n name: \"some_other_field\",\n value: \"some value\",\n }],\n }\n ) %>\n<% end %>\n```\n\n### Form arguments\n\nThe following table summarizes the arguments allowed in the `form_arguments:` hash mentioned above.\n\n|Name |Type |Default|Description|\n|:----------------|:-------------|:------|:----------|\n|`method` |`Symbol` |`:get` |The HTTP request method to use to submit the form. One of `:get`, `:post`, `:patch`, `:put`, `:delete`, or `:head`|\n|`name` |`String` |`nil` |The name of the field that will be sent to the server on submit.|\n|`value` |`String` |`nil` |The value of the field that will be sent to the server on submit.|\n|`input_arguments`|`Hash` |`{}` |Additional key/value pairs to emit as HTML attributes on the `<input type=\"hidden\">` element.|\n|`inputs` |`Array<Hash>` |`[]` |An array of hashes representing HTML `<input type=\"hidden\">` elements. Must contain at least `name:` and `value:` keys. If additional key/value pairs are provided, they are emitted as HTML attributes on the `<input>` element. This argument supercedes the `name:`, `value:`, and `:input_arguments` arguments listed above.|\n\nThe elements of the `inputs:` array will be emitted as HTML `<input type=\"hidden\">` elements.",
|
1138
|
+
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything\nnested inside of it. When a menu item is selected, the menu will close immediately.\n\nAdditional information around the keyboard functionality and implementation can be found on the\n[WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/#menu).",
|
1139
|
+
"is_form_component": false,
|
1140
|
+
"is_published": true,
|
1141
|
+
"requires_js": true,
|
1142
|
+
"component": "ActionMenu",
|
1143
|
+
"status": "alpha",
|
1144
|
+
"a11y_reviewed": false,
|
1145
|
+
"short_name": "ActionMenu",
|
1146
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
1147
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
1148
|
+
"parameters": [
|
1149
|
+
{
|
1150
|
+
"name": "menu_id",
|
1151
|
+
"type": "String",
|
1152
|
+
"default": "`self.class.generate_id`",
|
1153
|
+
"description": "Id of the menu."
|
1154
|
+
},
|
1155
|
+
{
|
1156
|
+
"name": "anchor_align",
|
1157
|
+
"type": "Symbol",
|
1158
|
+
"default": "`:start`",
|
1159
|
+
"description": "One of `:center`, `:end`, or `:start`.."
|
1160
|
+
},
|
1161
|
+
{
|
1162
|
+
"name": "anchor_side",
|
1163
|
+
"type": "Symbol",
|
1164
|
+
"default": "`:outside_bottom`",
|
1165
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
1166
|
+
},
|
1167
|
+
{
|
1168
|
+
"name": "size",
|
1169
|
+
"type": "Symbol",
|
1170
|
+
"default": "`:auto`",
|
1171
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
1172
|
+
},
|
1173
|
+
{
|
1174
|
+
"name": "src",
|
1175
|
+
"type": "String",
|
1176
|
+
"default": "`nil`",
|
1177
|
+
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
1178
|
+
},
|
1179
|
+
{
|
1180
|
+
"name": "preload",
|
1181
|
+
"type": "Boolean",
|
1182
|
+
"default": "`false`",
|
1183
|
+
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
1184
|
+
},
|
1185
|
+
{
|
1186
|
+
"name": "dynamic_label",
|
1187
|
+
"type": "Boolean",
|
1188
|
+
"default": "`false`",
|
1189
|
+
"description": "Whether or not to display the text of the currently selected item in the show button."
|
1190
|
+
},
|
1191
|
+
{
|
1192
|
+
"name": "dynamic_label_prefix",
|
1193
|
+
"type": "String",
|
1194
|
+
"default": "`nil`",
|
1195
|
+
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
1196
|
+
},
|
1197
|
+
{
|
1198
|
+
"name": "select_variant",
|
1199
|
+
"type": "Symbol",
|
1200
|
+
"default": "`:none`",
|
1201
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
1202
|
+
},
|
1203
|
+
{
|
1204
|
+
"name": "form_arguments",
|
1205
|
+
"type": "Hash",
|
1206
|
+
"default": "`{}`",
|
1207
|
+
"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."
|
1208
|
+
},
|
1209
|
+
{
|
1210
|
+
"name": "system_arguments",
|
1211
|
+
"type": "Hash",
|
1212
|
+
"default": "N/A",
|
1213
|
+
"description": "{{link_to_system_arguments_docs}}."
|
1214
|
+
}
|
1215
|
+
],
|
1216
|
+
"slots": [
|
1217
|
+
{
|
1218
|
+
"name": "show_button",
|
1219
|
+
"description": "Button to activate the menu.",
|
1220
|
+
"parameters": [
|
1221
|
+
{
|
1222
|
+
"name": "system_arguments",
|
1223
|
+
"type": "Hash",
|
1224
|
+
"default": "N/A",
|
1225
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
|
1226
|
+
}
|
1227
|
+
]
|
1228
|
+
},
|
1229
|
+
{
|
1230
|
+
"name": "items",
|
1231
|
+
"description": "Adds a new item to the list.",
|
1232
|
+
"parameters": [
|
1233
|
+
{
|
1234
|
+
"name": "system_arguments",
|
1235
|
+
"type": "Hash",
|
1236
|
+
"default": "N/A",
|
1237
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
1238
1238
|
}
|
1239
1239
|
]
|
1240
1240
|
}
|
@@ -1708,109 +1708,38 @@
|
|
1708
1708
|
],
|
1709
1709
|
"subcomponents": [
|
1710
1710
|
{
|
1711
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu::
|
1711
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu::List",
|
1712
1712
|
"description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
|
1713
1713
|
"accessibility_docs": null,
|
1714
1714
|
"is_form_component": false,
|
1715
1715
|
"is_published": true,
|
1716
1716
|
"requires_js": false,
|
1717
|
-
"component": "ActionMenu::
|
1717
|
+
"component": "ActionMenu::List",
|
1718
1718
|
"status": "alpha",
|
1719
|
-
"a11y_reviewed":
|
1720
|
-
"short_name": "
|
1721
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/
|
1722
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/
|
1719
|
+
"a11y_reviewed": false,
|
1720
|
+
"short_name": "ActionMenuList",
|
1721
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
|
1722
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
|
1723
1723
|
"parameters": [
|
1724
1724
|
{
|
1725
|
-
"name": "
|
1726
|
-
"type": "
|
1727
|
-
"default": "
|
1728
|
-
"description": "
|
1729
|
-
}
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
},
|
1736
|
-
{
|
1737
|
-
"name": "item_classes",
|
1738
|
-
"type": "String",
|
1739
|
-
"default": "`nil`",
|
1740
|
-
"description": "Additional CSS classes to attach to items."
|
1741
|
-
},
|
1742
|
-
{
|
1743
|
-
"name": "scheme",
|
1744
|
-
"type": "Symbol",
|
1745
|
-
"default": "`:full`",
|
1746
|
-
"description": "One of `:full` or `:inset`. `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges."
|
1747
|
-
},
|
1748
|
-
{
|
1749
|
-
"name": "show_dividers",
|
1750
|
-
"type": "Boolean",
|
1751
|
-
"default": "`false`",
|
1752
|
-
"description": "Display a divider above each item in the list when it does not follow a header or divider."
|
1753
|
-
},
|
1754
|
-
{
|
1755
|
-
"name": "select_variant",
|
1756
|
-
"type": "Symbol",
|
1757
|
-
"default": "`:none`",
|
1758
|
-
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
1759
|
-
},
|
1760
|
-
{
|
1761
|
-
"name": "form_arguments",
|
1762
|
-
"type": "Hash",
|
1763
|
-
"default": "`{}`",
|
1764
|
-
"description": "Allows an `ActionList` 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. *NOTE*: Consider using an {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} instead of using this feature directly."
|
1765
|
-
},
|
1766
|
-
{
|
1767
|
-
"name": "system_arguments",
|
1768
|
-
"type": "Hash",
|
1769
|
-
"default": "N/A",
|
1770
|
-
"description": "{{link_to_system_arguments_docs}}"
|
1771
|
-
}
|
1772
|
-
],
|
1773
|
-
"slots": [
|
1774
|
-
{
|
1775
|
-
"name": "heading",
|
1776
|
-
"description": "Heading text rendered above the list of items.",
|
1777
|
-
"parameters": [
|
1778
|
-
{
|
1779
|
-
"name": "component_klass",
|
1780
|
-
"type": "Class",
|
1781
|
-
"default": "N/A",
|
1782
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
1783
|
-
},
|
1784
|
-
{
|
1785
|
-
"name": "system_arguments",
|
1786
|
-
"type": "Hash",
|
1787
|
-
"default": "N/A",
|
1788
|
-
"description": "The arguments accepted by `component_klass`."
|
1789
|
-
}
|
1790
|
-
]
|
1791
|
-
},
|
1725
|
+
"name": "system_arguments",
|
1726
|
+
"type": "Hash",
|
1727
|
+
"default": "N/A",
|
1728
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::List{{/link_to_component}}"
|
1729
|
+
}
|
1730
|
+
],
|
1731
|
+
"slots": [
|
1732
|
+
|
1733
|
+
],
|
1734
|
+
"methods": [
|
1792
1735
|
{
|
1793
1736
|
"name": "items",
|
1794
|
-
"description": "
|
1737
|
+
"description": "Returns the value of attribute items.",
|
1795
1738
|
"parameters": [
|
1796
1739
|
|
1797
1740
|
]
|
1798
1741
|
}
|
1799
1742
|
],
|
1800
|
-
"methods": [
|
1801
|
-
{
|
1802
|
-
"name": "with_heading",
|
1803
|
-
"description": "Heading text rendered above the list of items.",
|
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::ActionMenu::Heading{{/link_to_component}}."
|
1810
|
-
}
|
1811
|
-
]
|
1812
|
-
}
|
1813
|
-
],
|
1814
1743
|
"previews": [
|
1815
1744
|
|
1816
1745
|
],
|
@@ -1912,35 +1841,106 @@
|
|
1912
1841
|
]
|
1913
1842
|
},
|
1914
1843
|
{
|
1915
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu::
|
1844
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu::Group",
|
1916
1845
|
"description": "This component is part of {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} and should not be\nused as a standalone component.",
|
1917
1846
|
"accessibility_docs": null,
|
1918
1847
|
"is_form_component": false,
|
1919
1848
|
"is_published": true,
|
1920
1849
|
"requires_js": false,
|
1921
|
-
"component": "ActionMenu::
|
1850
|
+
"component": "ActionMenu::Group",
|
1922
1851
|
"status": "alpha",
|
1923
|
-
"a11y_reviewed":
|
1924
|
-
"short_name": "
|
1925
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/
|
1926
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/
|
1852
|
+
"a11y_reviewed": true,
|
1853
|
+
"short_name": "ActionMenuGroup",
|
1854
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/group.rb",
|
1855
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/group/default/",
|
1927
1856
|
"parameters": [
|
1857
|
+
{
|
1858
|
+
"name": "id",
|
1859
|
+
"type": "String",
|
1860
|
+
"default": "`self.class.generate_id`",
|
1861
|
+
"description": "HTML ID value."
|
1862
|
+
},
|
1863
|
+
{
|
1864
|
+
"name": "role",
|
1865
|
+
"type": "Boolean",
|
1866
|
+
"default": "`nil`",
|
1867
|
+
"description": "ARIA role describing the function of the list. listbox and menu are a common values."
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
"name": "item_classes",
|
1871
|
+
"type": "String",
|
1872
|
+
"default": "`nil`",
|
1873
|
+
"description": "Additional CSS classes to attach to items."
|
1874
|
+
},
|
1875
|
+
{
|
1876
|
+
"name": "scheme",
|
1877
|
+
"type": "Symbol",
|
1878
|
+
"default": "`:full`",
|
1879
|
+
"description": "One of `:full` or `:inset`. `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges."
|
1880
|
+
},
|
1881
|
+
{
|
1882
|
+
"name": "show_dividers",
|
1883
|
+
"type": "Boolean",
|
1884
|
+
"default": "`false`",
|
1885
|
+
"description": "Display a divider above each item in the list when it does not follow a header or divider."
|
1886
|
+
},
|
1887
|
+
{
|
1888
|
+
"name": "select_variant",
|
1889
|
+
"type": "Symbol",
|
1890
|
+
"default": "`:none`",
|
1891
|
+
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
1892
|
+
},
|
1893
|
+
{
|
1894
|
+
"name": "form_arguments",
|
1895
|
+
"type": "Hash",
|
1896
|
+
"default": "`{}`",
|
1897
|
+
"description": "Allows an `ActionList` 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. *NOTE*: Consider using an {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} instead of using this feature directly."
|
1898
|
+
},
|
1928
1899
|
{
|
1929
1900
|
"name": "system_arguments",
|
1930
1901
|
"type": "Hash",
|
1931
1902
|
"default": "N/A",
|
1932
|
-
"description": "
|
1903
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1933
1904
|
}
|
1934
1905
|
],
|
1935
1906
|
"slots": [
|
1907
|
+
{
|
1908
|
+
"name": "heading",
|
1909
|
+
"description": "Heading text rendered above the list of items.",
|
1910
|
+
"parameters": [
|
1911
|
+
{
|
1912
|
+
"name": "component_klass",
|
1913
|
+
"type": "Class",
|
1914
|
+
"default": "N/A",
|
1915
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
1916
|
+
},
|
1917
|
+
{
|
1918
|
+
"name": "system_arguments",
|
1919
|
+
"type": "Hash",
|
1920
|
+
"default": "N/A",
|
1921
|
+
"description": "The arguments accepted by `component_klass`."
|
1922
|
+
}
|
1923
|
+
]
|
1924
|
+
},
|
1925
|
+
{
|
1926
|
+
"name": "items",
|
1927
|
+
"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.",
|
1928
|
+
"parameters": [
|
1936
1929
|
|
1930
|
+
]
|
1931
|
+
}
|
1937
1932
|
],
|
1938
1933
|
"methods": [
|
1939
1934
|
{
|
1940
|
-
"name": "
|
1941
|
-
"description": "
|
1935
|
+
"name": "with_heading",
|
1936
|
+
"description": "Heading text rendered above the list of items.",
|
1942
1937
|
"parameters": [
|
1943
|
-
|
1938
|
+
{
|
1939
|
+
"name": "system_arguments",
|
1940
|
+
"type": "Hash",
|
1941
|
+
"default": "N/A",
|
1942
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Heading{{/link_to_component}}."
|
1943
|
+
}
|
1944
1944
|
]
|
1945
1945
|
}
|
1946
1946
|
],
|
@@ -3288,6 +3288,76 @@
|
|
3288
3288
|
}
|
3289
3289
|
],
|
3290
3290
|
"subcomponents": [
|
3291
|
+
{
|
3292
|
+
"fully_qualified_name": "Primer::Alpha::Dialog::Header",
|
3293
|
+
"description": "A `Dialog::Header` is a compositional component, used to render the\nHeader of a dialog. See {{#link_to_component}}Primer::Alpha::Dialog{{/link_to_component}}.",
|
3294
|
+
"accessibility_docs": null,
|
3295
|
+
"is_form_component": false,
|
3296
|
+
"is_published": true,
|
3297
|
+
"requires_js": false,
|
3298
|
+
"component": "Dialog::Header",
|
3299
|
+
"status": "alpha",
|
3300
|
+
"a11y_reviewed": true,
|
3301
|
+
"short_name": "DialogHeader",
|
3302
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
3303
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
3304
|
+
"parameters": [
|
3305
|
+
{
|
3306
|
+
"name": "id",
|
3307
|
+
"type": "String",
|
3308
|
+
"default": "N/A",
|
3309
|
+
"description": "The HTML element's ID value."
|
3310
|
+
},
|
3311
|
+
{
|
3312
|
+
"name": "title",
|
3313
|
+
"type": "String",
|
3314
|
+
"default": "N/A",
|
3315
|
+
"description": "Describes the content of the dialog."
|
3316
|
+
},
|
3317
|
+
{
|
3318
|
+
"name": "subtitle",
|
3319
|
+
"type": "String",
|
3320
|
+
"default": "`nil`",
|
3321
|
+
"description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
|
3322
|
+
},
|
3323
|
+
{
|
3324
|
+
"name": "show_divider",
|
3325
|
+
"type": "Boolean",
|
3326
|
+
"default": "`false`",
|
3327
|
+
"description": "Show a divider between the header and body."
|
3328
|
+
},
|
3329
|
+
{
|
3330
|
+
"name": "visually_hide_title",
|
3331
|
+
"type": "Boolean",
|
3332
|
+
"default": "`false`",
|
3333
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3334
|
+
},
|
3335
|
+
{
|
3336
|
+
"name": "variant",
|
3337
|
+
"type": "Symbol",
|
3338
|
+
"default": "`:medium`",
|
3339
|
+
"description": "One of `:large` or `:medium`."
|
3340
|
+
},
|
3341
|
+
{
|
3342
|
+
"name": "system_arguments",
|
3343
|
+
"type": "Hash",
|
3344
|
+
"default": "N/A",
|
3345
|
+
"description": "{{link_to_system_arguments_docs}}"
|
3346
|
+
}
|
3347
|
+
],
|
3348
|
+
"slots": [
|
3349
|
+
|
3350
|
+
],
|
3351
|
+
"methods": [
|
3352
|
+
|
3353
|
+
],
|
3354
|
+
"previews": [
|
3355
|
+
|
3356
|
+
],
|
3357
|
+
"subcomponents": [
|
3358
|
+
|
3359
|
+
]
|
3360
|
+
},
|
3291
3361
|
{
|
3292
3362
|
"fully_qualified_name": "Primer::Alpha::Dialog::Footer",
|
3293
3363
|
"description": "A `Dialog::Footer` is a compositional component, used to render the\nFooter of a dialog. See {{#link_to_component}}Primer::Alpha::Dialog{{/link_to_component}}.",
|
@@ -3361,98 +3431,28 @@
|
|
3361
3431
|
"subcomponents": [
|
3362
3432
|
|
3363
3433
|
]
|
3364
|
-
}
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3374
|
-
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
3378
|
-
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3382
|
-
|
3383
|
-
|
3384
|
-
|
3385
|
-
|
3386
|
-
"name": "title",
|
3387
|
-
"type": "String",
|
3388
|
-
"default": "N/A",
|
3389
|
-
"description": "Describes the content of the dialog."
|
3390
|
-
},
|
3391
|
-
{
|
3392
|
-
"name": "subtitle",
|
3393
|
-
"type": "String",
|
3394
|
-
"default": "`nil`",
|
3395
|
-
"description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
|
3396
|
-
},
|
3397
|
-
{
|
3398
|
-
"name": "show_divider",
|
3399
|
-
"type": "Boolean",
|
3400
|
-
"default": "`false`",
|
3401
|
-
"description": "Show a divider between the header and body."
|
3402
|
-
},
|
3403
|
-
{
|
3404
|
-
"name": "visually_hide_title",
|
3405
|
-
"type": "Boolean",
|
3406
|
-
"default": "`false`",
|
3407
|
-
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3408
|
-
},
|
3409
|
-
{
|
3410
|
-
"name": "variant",
|
3411
|
-
"type": "Symbol",
|
3412
|
-
"default": "`:medium`",
|
3413
|
-
"description": "One of `:large` or `:medium`."
|
3414
|
-
},
|
3415
|
-
{
|
3416
|
-
"name": "system_arguments",
|
3417
|
-
"type": "Hash",
|
3418
|
-
"default": "N/A",
|
3419
|
-
"description": "{{link_to_system_arguments_docs}}"
|
3420
|
-
}
|
3421
|
-
],
|
3422
|
-
"slots": [
|
3423
|
-
|
3424
|
-
],
|
3425
|
-
"methods": [
|
3426
|
-
|
3427
|
-
],
|
3428
|
-
"previews": [
|
3429
|
-
|
3430
|
-
],
|
3431
|
-
"subcomponents": [
|
3432
|
-
|
3433
|
-
]
|
3434
|
-
}
|
3435
|
-
]
|
3436
|
-
},
|
3437
|
-
{
|
3438
|
-
"fully_qualified_name": "Primer::Alpha::Dropdown",
|
3439
|
-
"description": "`Dropdown` is a lightweight context menu for housing navigation and actions.\nThey're great for instances where you don't need the full power (and code) of the SelectMenu.",
|
3440
|
-
"accessibility_docs": null,
|
3441
|
-
"is_form_component": false,
|
3442
|
-
"is_published": true,
|
3443
|
-
"requires_js": true,
|
3444
|
-
"component": "Dropdown",
|
3445
|
-
"status": "alpha",
|
3446
|
-
"a11y_reviewed": false,
|
3447
|
-
"short_name": "Dropdown",
|
3448
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dropdown.rb",
|
3449
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/default/",
|
3450
|
-
"parameters": [
|
3451
|
-
{
|
3452
|
-
"name": "overlay",
|
3453
|
-
"type": "Symbol",
|
3454
|
-
"default": "`:default`",
|
3455
|
-
"description": "One of `:dark`, `:default`, or `:none`."
|
3434
|
+
}
|
3435
|
+
]
|
3436
|
+
},
|
3437
|
+
{
|
3438
|
+
"fully_qualified_name": "Primer::Alpha::Dropdown",
|
3439
|
+
"description": "`Dropdown` is a lightweight context menu for housing navigation and actions.\nThey're great for instances where you don't need the full power (and code) of the SelectMenu.",
|
3440
|
+
"accessibility_docs": null,
|
3441
|
+
"is_form_component": false,
|
3442
|
+
"is_published": true,
|
3443
|
+
"requires_js": true,
|
3444
|
+
"component": "Dropdown",
|
3445
|
+
"status": "alpha",
|
3446
|
+
"a11y_reviewed": false,
|
3447
|
+
"short_name": "Dropdown",
|
3448
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dropdown.rb",
|
3449
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/default/",
|
3450
|
+
"parameters": [
|
3451
|
+
{
|
3452
|
+
"name": "overlay",
|
3453
|
+
"type": "Symbol",
|
3454
|
+
"default": "`:default`",
|
3455
|
+
"description": "One of `:dark`, `:default`, or `:none`."
|
3456
3456
|
},
|
3457
3457
|
{
|
3458
3458
|
"name": "with_caret",
|
@@ -4713,31 +4713,20 @@
|
|
4713
4713
|
],
|
4714
4714
|
"subcomponents": [
|
4715
4715
|
{
|
4716
|
-
"fully_qualified_name": "Primer::Alpha::Layout::
|
4717
|
-
"description": "The layout's
|
4716
|
+
"fully_qualified_name": "Primer::Alpha::Layout::Sidebar",
|
4717
|
+
"description": "The layout's sidebar content.",
|
4718
4718
|
"accessibility_docs": null,
|
4719
4719
|
"is_form_component": false,
|
4720
4720
|
"is_published": true,
|
4721
4721
|
"requires_js": false,
|
4722
|
-
"component": "Layout::
|
4722
|
+
"component": "Layout::Sidebar",
|
4723
4723
|
"status": "alpha",
|
4724
4724
|
"a11y_reviewed": false,
|
4725
|
-
"short_name": "
|
4726
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/
|
4727
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/
|
4725
|
+
"short_name": "LayoutSidebar",
|
4726
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/sidebar.rb",
|
4727
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/sidebar/default/",
|
4728
4728
|
"parameters": [
|
4729
|
-
|
4730
|
-
"name": "width",
|
4731
|
-
"type": "Symbol",
|
4732
|
-
"default": "`:full`",
|
4733
|
-
"description": "One of `:full`, `:lg`, `:md`, or `:xl`."
|
4734
|
-
},
|
4735
|
-
{
|
4736
|
-
"name": "system_arguments",
|
4737
|
-
"type": "Hash",
|
4738
|
-
"default": "N/A",
|
4739
|
-
"description": "{{link_to_system_arguments_docs}}"
|
4740
|
-
}
|
4729
|
+
|
4741
4730
|
],
|
4742
4731
|
"slots": [
|
4743
4732
|
|
@@ -4753,20 +4742,31 @@
|
|
4753
4742
|
]
|
4754
4743
|
},
|
4755
4744
|
{
|
4756
|
-
"fully_qualified_name": "Primer::Alpha::Layout::
|
4757
|
-
"description": "The layout's
|
4745
|
+
"fully_qualified_name": "Primer::Alpha::Layout::Main",
|
4746
|
+
"description": "The layout's main content.",
|
4758
4747
|
"accessibility_docs": null,
|
4759
4748
|
"is_form_component": false,
|
4760
4749
|
"is_published": true,
|
4761
4750
|
"requires_js": false,
|
4762
|
-
"component": "Layout::
|
4751
|
+
"component": "Layout::Main",
|
4763
4752
|
"status": "alpha",
|
4764
4753
|
"a11y_reviewed": false,
|
4765
|
-
"short_name": "
|
4766
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/
|
4767
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/
|
4754
|
+
"short_name": "LayoutMain",
|
4755
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/main.rb",
|
4756
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/main/default/",
|
4768
4757
|
"parameters": [
|
4769
|
-
|
4758
|
+
{
|
4759
|
+
"name": "width",
|
4760
|
+
"type": "Symbol",
|
4761
|
+
"default": "`:full`",
|
4762
|
+
"description": "One of `:full`, `:lg`, `:md`, or `:xl`."
|
4763
|
+
},
|
4764
|
+
{
|
4765
|
+
"name": "system_arguments",
|
4766
|
+
"type": "Hash",
|
4767
|
+
"default": "N/A",
|
4768
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4769
|
+
}
|
4770
4770
|
],
|
4771
4771
|
"slots": [
|
4772
4772
|
|
@@ -5134,24 +5134,42 @@
|
|
5134
5134
|
],
|
5135
5135
|
"subcomponents": [
|
5136
5136
|
{
|
5137
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5137
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Item",
|
5138
5138
|
"description": ":nodoc:",
|
5139
5139
|
"accessibility_docs": null,
|
5140
5140
|
"is_form_component": false,
|
5141
5141
|
"is_published": true,
|
5142
|
-
"requires_js":
|
5143
|
-
"component": "NavList::
|
5142
|
+
"requires_js": true,
|
5143
|
+
"component": "NavList::Item",
|
5144
5144
|
"status": "deprecated",
|
5145
5145
|
"a11y_reviewed": false,
|
5146
|
-
"short_name": "
|
5147
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5148
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5146
|
+
"short_name": "NavListItem",
|
5147
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
5148
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/item/default/",
|
5149
5149
|
"parameters": [
|
5150
5150
|
{
|
5151
|
-
"name": "
|
5151
|
+
"name": "selected_item_id",
|
5152
5152
|
"type": "Symbol",
|
5153
|
-
"default": "
|
5154
|
-
"description": "
|
5153
|
+
"default": "`nil`",
|
5154
|
+
"description": "The ID of the currently selected list item. Used internally."
|
5155
|
+
},
|
5156
|
+
{
|
5157
|
+
"name": "selected_by_ids",
|
5158
|
+
"type": "Array<Symbol>",
|
5159
|
+
"default": "`[]`",
|
5160
|
+
"description": "The list of IDs that select this item. In other words, if the `selected_item_id` attribute on the parent `NavList` is set to one of these IDs, the item will appear selected."
|
5161
|
+
},
|
5162
|
+
{
|
5163
|
+
"name": "expanded",
|
5164
|
+
"type": "Boolean",
|
5165
|
+
"default": "`false`",
|
5166
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
5167
|
+
},
|
5168
|
+
{
|
5169
|
+
"name": "sub_item",
|
5170
|
+
"type": "Boolean",
|
5171
|
+
"default": "`false`",
|
5172
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
5155
5173
|
},
|
5156
5174
|
{
|
5157
5175
|
"name": "system_arguments",
|
@@ -5161,7 +5179,69 @@
|
|
5161
5179
|
}
|
5162
5180
|
],
|
5163
5181
|
"slots": [
|
5182
|
+
{
|
5183
|
+
"name": "items",
|
5184
|
+
"description": null,
|
5185
|
+
"parameters": [
|
5186
|
+
{
|
5187
|
+
"name": "system_arguments",
|
5188
|
+
"type": "Hash",
|
5189
|
+
"default": "N/A",
|
5190
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
5191
|
+
}
|
5192
|
+
]
|
5193
|
+
},
|
5194
|
+
{
|
5195
|
+
"name": "description",
|
5196
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
5197
|
+
"parameters": [
|
5198
|
+
|
5199
|
+
]
|
5200
|
+
},
|
5201
|
+
{
|
5202
|
+
"name": "leading_visual",
|
5203
|
+
"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.",
|
5204
|
+
"parameters": [
|
5205
|
+
|
5206
|
+
]
|
5207
|
+
},
|
5208
|
+
{
|
5209
|
+
"name": "trailing_visual",
|
5210
|
+
"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```",
|
5211
|
+
"parameters": [
|
5164
5212
|
|
5213
|
+
]
|
5214
|
+
},
|
5215
|
+
{
|
5216
|
+
"name": "trailing_action",
|
5217
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
5218
|
+
"parameters": [
|
5219
|
+
{
|
5220
|
+
"name": "system_arguments",
|
5221
|
+
"type": "Hash",
|
5222
|
+
"default": "N/A",
|
5223
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
5224
|
+
}
|
5225
|
+
]
|
5226
|
+
},
|
5227
|
+
{
|
5228
|
+
"name": "tooltip",
|
5229
|
+
"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.",
|
5230
|
+
"parameters": [
|
5231
|
+
{
|
5232
|
+
"name": "type",
|
5233
|
+
"type": "Symbol",
|
5234
|
+
"default": "`:description`",
|
5235
|
+
"description": "One of `:description` or `:label`."
|
5236
|
+
},
|
5237
|
+
{
|
5238
|
+
"name": "system_arguments",
|
5239
|
+
"type": "Hash",
|
5240
|
+
"default": "N/A",
|
5241
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
5242
|
+
}
|
5243
|
+
]
|
5244
|
+
}
|
5165
5245
|
],
|
5166
5246
|
"methods": [
|
5167
5247
|
|
@@ -5174,24 +5254,36 @@
|
|
5174
5254
|
]
|
5175
5255
|
},
|
5176
5256
|
{
|
5177
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5257
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Heading",
|
5178
5258
|
"description": ":nodoc:",
|
5179
5259
|
"accessibility_docs": null,
|
5180
5260
|
"is_form_component": false,
|
5181
5261
|
"is_published": true,
|
5182
|
-
"requires_js":
|
5183
|
-
"component": "NavList::
|
5262
|
+
"requires_js": false,
|
5263
|
+
"component": "NavList::Heading",
|
5184
5264
|
"status": "deprecated",
|
5185
|
-
"a11y_reviewed":
|
5186
|
-
"short_name": "
|
5187
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5188
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5265
|
+
"a11y_reviewed": false,
|
5266
|
+
"short_name": "NavListHeading",
|
5267
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
5268
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/heading/default/",
|
5189
5269
|
"parameters": [
|
5190
5270
|
{
|
5191
|
-
"name": "
|
5192
|
-
"type": "
|
5193
|
-
"default": "
|
5194
|
-
"description": "The
|
5271
|
+
"name": "title",
|
5272
|
+
"type": "String",
|
5273
|
+
"default": "N/A",
|
5274
|
+
"description": "The text content of the heading."
|
5275
|
+
},
|
5276
|
+
{
|
5277
|
+
"name": "id",
|
5278
|
+
"type": "String",
|
5279
|
+
"default": "`self.class.generate_id`",
|
5280
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
5281
|
+
},
|
5282
|
+
{
|
5283
|
+
"name": "heading_level",
|
5284
|
+
"type": "Integer",
|
5285
|
+
"default": "`2`",
|
5286
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
5195
5287
|
},
|
5196
5288
|
{
|
5197
5289
|
"name": "system_arguments",
|
@@ -5201,66 +5293,7 @@
|
|
5201
5293
|
}
|
5202
5294
|
],
|
5203
5295
|
"slots": [
|
5204
|
-
|
5205
|
-
"name": "show_more_item",
|
5206
|
-
"description": "A special \"show more\" list item that appears at the bottom of the group. Clicking\nthe item will fetch the next page of results from the URL passed in the `src` argument\nand append the resulting chunk of HTML to the group.",
|
5207
|
-
"parameters": [
|
5208
|
-
{
|
5209
|
-
"name": "src",
|
5210
|
-
"type": "String",
|
5211
|
-
"default": "N/A",
|
5212
|
-
"description": "The URL to query for additional pages of list items."
|
5213
|
-
},
|
5214
|
-
{
|
5215
|
-
"name": "pages",
|
5216
|
-
"type": "Integer",
|
5217
|
-
"default": "N/A",
|
5218
|
-
"description": "The total number of pages in the result set."
|
5219
|
-
},
|
5220
|
-
{
|
5221
|
-
"name": "component_klass",
|
5222
|
-
"type": "Class",
|
5223
|
-
"default": "N/A",
|
5224
|
-
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5225
|
-
},
|
5226
|
-
{
|
5227
|
-
"name": "system_arguments",
|
5228
|
-
"type": "Hash",
|
5229
|
-
"default": "N/A",
|
5230
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5231
|
-
}
|
5232
|
-
]
|
5233
|
-
},
|
5234
|
-
{
|
5235
|
-
"name": "items",
|
5236
|
-
"description": "Items.",
|
5237
|
-
"parameters": [
|
5238
|
-
{
|
5239
|
-
"name": "system_arguments",
|
5240
|
-
"type": "Hash",
|
5241
|
-
"default": "N/A",
|
5242
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5243
|
-
}
|
5244
|
-
]
|
5245
|
-
},
|
5246
|
-
{
|
5247
|
-
"name": "heading",
|
5248
|
-
"description": "Heading text rendered above the list of items.",
|
5249
|
-
"parameters": [
|
5250
|
-
{
|
5251
|
-
"name": "component_klass",
|
5252
|
-
"type": "Class",
|
5253
|
-
"default": "N/A",
|
5254
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5255
|
-
},
|
5256
|
-
{
|
5257
|
-
"name": "system_arguments",
|
5258
|
-
"type": "Hash",
|
5259
|
-
"default": "N/A",
|
5260
|
-
"description": "The arguments accepted by `component_klass`."
|
5261
|
-
}
|
5262
|
-
]
|
5263
|
-
}
|
5296
|
+
|
5264
5297
|
],
|
5265
5298
|
"methods": [
|
5266
5299
|
|
@@ -5273,36 +5306,24 @@
|
|
5273
5306
|
]
|
5274
5307
|
},
|
5275
5308
|
{
|
5276
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5309
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Divider",
|
5277
5310
|
"description": ":nodoc:",
|
5278
5311
|
"accessibility_docs": null,
|
5279
5312
|
"is_form_component": false,
|
5280
5313
|
"is_published": true,
|
5281
5314
|
"requires_js": false,
|
5282
|
-
"component": "NavList::
|
5315
|
+
"component": "NavList::Divider",
|
5283
5316
|
"status": "deprecated",
|
5284
5317
|
"a11y_reviewed": false,
|
5285
|
-
"short_name": "
|
5286
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5287
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5318
|
+
"short_name": "NavListDivider",
|
5319
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
5320
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
5288
5321
|
"parameters": [
|
5289
5322
|
{
|
5290
|
-
"name": "
|
5291
|
-
"type": "
|
5292
|
-
"default": "
|
5293
|
-
"description": "
|
5294
|
-
},
|
5295
|
-
{
|
5296
|
-
"name": "id",
|
5297
|
-
"type": "String",
|
5298
|
-
"default": "`self.class.generate_id`",
|
5299
|
-
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
5300
|
-
},
|
5301
|
-
{
|
5302
|
-
"name": "heading_level",
|
5303
|
-
"type": "Integer",
|
5304
|
-
"default": "`2`",
|
5305
|
-
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
5323
|
+
"name": "scheme",
|
5324
|
+
"type": "Symbol",
|
5325
|
+
"default": "`:subtle`",
|
5326
|
+
"description": "Display a background color if scheme is `filled`."
|
5306
5327
|
},
|
5307
5328
|
{
|
5308
5329
|
"name": "system_arguments",
|
@@ -5325,42 +5346,24 @@
|
|
5325
5346
|
]
|
5326
5347
|
},
|
5327
5348
|
{
|
5328
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5349
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5329
5350
|
"description": ":nodoc:",
|
5330
5351
|
"accessibility_docs": null,
|
5331
5352
|
"is_form_component": false,
|
5332
5353
|
"is_published": true,
|
5333
5354
|
"requires_js": true,
|
5334
|
-
"component": "NavList::
|
5355
|
+
"component": "NavList::Group",
|
5335
5356
|
"status": "deprecated",
|
5336
|
-
"a11y_reviewed":
|
5337
|
-
"short_name": "
|
5338
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5339
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5357
|
+
"a11y_reviewed": true,
|
5358
|
+
"short_name": "NavListGroup",
|
5359
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5360
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5340
5361
|
"parameters": [
|
5341
5362
|
{
|
5342
5363
|
"name": "selected_item_id",
|
5343
5364
|
"type": "Symbol",
|
5344
5365
|
"default": "`nil`",
|
5345
|
-
"description": "The ID of the currently selected
|
5346
|
-
},
|
5347
|
-
{
|
5348
|
-
"name": "selected_by_ids",
|
5349
|
-
"type": "Array<Symbol>",
|
5350
|
-
"default": "`[]`",
|
5351
|
-
"description": "The list of IDs that select this item. In other words, if the `selected_item_id` attribute on the parent `NavList` is set to one of these IDs, the item will appear selected."
|
5352
|
-
},
|
5353
|
-
{
|
5354
|
-
"name": "expanded",
|
5355
|
-
"type": "Boolean",
|
5356
|
-
"default": "`false`",
|
5357
|
-
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
5358
|
-
},
|
5359
|
-
{
|
5360
|
-
"name": "sub_item",
|
5361
|
-
"type": "Boolean",
|
5362
|
-
"default": "`false`",
|
5363
|
-
"description": "Whether or not this item is nested under a parent item. Used internally."
|
5366
|
+
"description": "The ID of the currently selected item. Used internally."
|
5364
5367
|
},
|
5365
5368
|
{
|
5366
5369
|
"name": "system_arguments",
|
@@ -5371,65 +5374,62 @@
|
|
5371
5374
|
],
|
5372
5375
|
"slots": [
|
5373
5376
|
{
|
5374
|
-
"name": "
|
5375
|
-
"description":
|
5377
|
+
"name": "show_more_item",
|
5378
|
+
"description": "A special \"show more\" list item that appears at the bottom of the group. Clicking\nthe item will fetch the next page of results from the URL passed in the `src` argument\nand append the resulting chunk of HTML to the group.",
|
5376
5379
|
"parameters": [
|
5380
|
+
{
|
5381
|
+
"name": "src",
|
5382
|
+
"type": "String",
|
5383
|
+
"default": "N/A",
|
5384
|
+
"description": "The URL to query for additional pages of list items."
|
5385
|
+
},
|
5386
|
+
{
|
5387
|
+
"name": "pages",
|
5388
|
+
"type": "Integer",
|
5389
|
+
"default": "N/A",
|
5390
|
+
"description": "The total number of pages in the result set."
|
5391
|
+
},
|
5392
|
+
{
|
5393
|
+
"name": "component_klass",
|
5394
|
+
"type": "Class",
|
5395
|
+
"default": "N/A",
|
5396
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5397
|
+
},
|
5377
5398
|
{
|
5378
5399
|
"name": "system_arguments",
|
5379
5400
|
"type": "Hash",
|
5380
5401
|
"default": "N/A",
|
5381
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
5402
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5382
5403
|
}
|
5383
5404
|
]
|
5384
5405
|
},
|
5385
5406
|
{
|
5386
|
-
"name": "
|
5387
|
-
"description": "
|
5388
|
-
"parameters": [
|
5389
|
-
|
5390
|
-
]
|
5391
|
-
},
|
5392
|
-
{
|
5393
|
-
"name": "leading_visual",
|
5394
|
-
"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.",
|
5395
|
-
"parameters": [
|
5396
|
-
|
5397
|
-
]
|
5398
|
-
},
|
5399
|
-
{
|
5400
|
-
"name": "trailing_visual",
|
5401
|
-
"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```",
|
5402
|
-
"parameters": [
|
5403
|
-
|
5404
|
-
]
|
5405
|
-
},
|
5406
|
-
{
|
5407
|
-
"name": "trailing_action",
|
5408
|
-
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
5407
|
+
"name": "items",
|
5408
|
+
"description": "Items.",
|
5409
5409
|
"parameters": [
|
5410
5410
|
{
|
5411
5411
|
"name": "system_arguments",
|
5412
5412
|
"type": "Hash",
|
5413
5413
|
"default": "N/A",
|
5414
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::
|
5414
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5415
5415
|
}
|
5416
5416
|
]
|
5417
5417
|
},
|
5418
5418
|
{
|
5419
|
-
"name": "
|
5420
|
-
"description": "
|
5419
|
+
"name": "heading",
|
5420
|
+
"description": "Heading text rendered above the list of items.",
|
5421
5421
|
"parameters": [
|
5422
5422
|
{
|
5423
|
-
"name": "
|
5424
|
-
"type": "
|
5425
|
-
"default": "
|
5426
|
-
"description": "
|
5423
|
+
"name": "component_klass",
|
5424
|
+
"type": "Class",
|
5425
|
+
"default": "N/A",
|
5426
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5427
5427
|
},
|
5428
5428
|
{
|
5429
5429
|
"name": "system_arguments",
|
5430
5430
|
"type": "Hash",
|
5431
5431
|
"default": "N/A",
|
5432
|
-
"description": "The arguments accepted by
|
5432
|
+
"description": "The arguments accepted by `component_klass`."
|
5433
5433
|
}
|
5434
5434
|
]
|
5435
5435
|
}
|
@@ -5917,30 +5917,54 @@
|
|
5917
5917
|
],
|
5918
5918
|
"subcomponents": [
|
5919
5919
|
{
|
5920
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
5921
|
-
"description": "A `Overlay::
|
5920
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Header",
|
5921
|
+
"description": "A `Overlay::Header` is a compositional component, used to render the\nHeader of an overlay. See {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}.",
|
5922
5922
|
"accessibility_docs": null,
|
5923
5923
|
"is_form_component": false,
|
5924
5924
|
"is_published": true,
|
5925
5925
|
"requires_js": false,
|
5926
|
-
"component": "Overlay::
|
5926
|
+
"component": "Overlay::Header",
|
5927
5927
|
"status": "alpha",
|
5928
5928
|
"a11y_reviewed": false,
|
5929
|
-
"short_name": "
|
5930
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/
|
5931
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/
|
5929
|
+
"short_name": "OverlayHeader",
|
5930
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/header.rb",
|
5931
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/header/default/",
|
5932
5932
|
"parameters": [
|
5933
5933
|
{
|
5934
|
-
"name": "
|
5934
|
+
"name": "title",
|
5935
|
+
"type": "String",
|
5936
|
+
"default": "N/A",
|
5937
|
+
"description": "Describes the content of the Overlay."
|
5938
|
+
},
|
5939
|
+
{
|
5940
|
+
"name": "subtitle",
|
5941
|
+
"type": "String",
|
5942
|
+
"default": "`nil`",
|
5943
|
+
"description": "Provides additional context for the Overlay, also setting the `aria-describedby` attribute."
|
5944
|
+
},
|
5945
|
+
{
|
5946
|
+
"name": "overlay_id",
|
5947
|
+
"type": "String",
|
5948
|
+
"default": "`nil`",
|
5949
|
+
"description": "Provides the id of the overlay element so the close button can close it"
|
5950
|
+
},
|
5951
|
+
{
|
5952
|
+
"name": "size",
|
5953
|
+
"type": "Symbol",
|
5954
|
+
"default": "`:medium`",
|
5955
|
+
"description": "The size of the Header. One of `:large` or `:medium`."
|
5956
|
+
},
|
5957
|
+
{
|
5958
|
+
"name": "divider",
|
5935
5959
|
"type": "Boolean",
|
5936
5960
|
"default": "`false`",
|
5937
|
-
"description": "Show a divider between the
|
5961
|
+
"description": "Show a divider between the header and body."
|
5938
5962
|
},
|
5939
5963
|
{
|
5940
|
-
"name": "
|
5941
|
-
"type": "
|
5942
|
-
"default": "`
|
5943
|
-
"description": "
|
5964
|
+
"name": "visually_hide_title",
|
5965
|
+
"type": "Boolean",
|
5966
|
+
"default": "`false`",
|
5967
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
5944
5968
|
},
|
5945
5969
|
{
|
5946
5970
|
"name": "system_arguments",
|
@@ -5963,19 +5987,31 @@
|
|
5963
5987
|
]
|
5964
5988
|
},
|
5965
5989
|
{
|
5966
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
5967
|
-
"description": "A `Overlay::
|
5990
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Footer",
|
5991
|
+
"description": "A `Overlay::Footer` is a compositional component, used to render the\nFooter of an overlay. See {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}.",
|
5968
5992
|
"accessibility_docs": null,
|
5969
5993
|
"is_form_component": false,
|
5970
5994
|
"is_published": true,
|
5971
5995
|
"requires_js": false,
|
5972
|
-
"component": "Overlay::
|
5996
|
+
"component": "Overlay::Footer",
|
5973
5997
|
"status": "alpha",
|
5974
5998
|
"a11y_reviewed": false,
|
5975
|
-
"short_name": "
|
5976
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/
|
5977
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/
|
5999
|
+
"short_name": "OverlayFooter",
|
6000
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/footer.rb",
|
6001
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/footer/default/",
|
5978
6002
|
"parameters": [
|
6003
|
+
{
|
6004
|
+
"name": "show_divider",
|
6005
|
+
"type": "Boolean",
|
6006
|
+
"default": "`false`",
|
6007
|
+
"description": "Show a divider between the footer and body."
|
6008
|
+
},
|
6009
|
+
{
|
6010
|
+
"name": "align_content",
|
6011
|
+
"type": "Symbol",
|
6012
|
+
"default": "`DEFAULT_ALIGN_CONTENT`",
|
6013
|
+
"description": "The alginment of contents. One of `:center`, `:end`, or `:start`."
|
6014
|
+
},
|
5979
6015
|
{
|
5980
6016
|
"name": "system_arguments",
|
5981
6017
|
"type": "Hash",
|
@@ -5997,55 +6033,19 @@
|
|
5997
6033
|
]
|
5998
6034
|
},
|
5999
6035
|
{
|
6000
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
6001
|
-
"description": "A `Overlay::
|
6036
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Body",
|
6037
|
+
"description": "A `Overlay::Body` is a compositional component, used to render the\nBody of an overlay. See {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}.",
|
6002
6038
|
"accessibility_docs": null,
|
6003
6039
|
"is_form_component": false,
|
6004
6040
|
"is_published": true,
|
6005
6041
|
"requires_js": false,
|
6006
|
-
"component": "Overlay::
|
6042
|
+
"component": "Overlay::Body",
|
6007
6043
|
"status": "alpha",
|
6008
6044
|
"a11y_reviewed": false,
|
6009
|
-
"short_name": "
|
6010
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/
|
6011
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/
|
6045
|
+
"short_name": "OverlayBody",
|
6046
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/body.rb",
|
6047
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/body/default/",
|
6012
6048
|
"parameters": [
|
6013
|
-
{
|
6014
|
-
"name": "title",
|
6015
|
-
"type": "String",
|
6016
|
-
"default": "N/A",
|
6017
|
-
"description": "Describes the content of the Overlay."
|
6018
|
-
},
|
6019
|
-
{
|
6020
|
-
"name": "subtitle",
|
6021
|
-
"type": "String",
|
6022
|
-
"default": "`nil`",
|
6023
|
-
"description": "Provides additional context for the Overlay, also setting the `aria-describedby` attribute."
|
6024
|
-
},
|
6025
|
-
{
|
6026
|
-
"name": "overlay_id",
|
6027
|
-
"type": "String",
|
6028
|
-
"default": "`nil`",
|
6029
|
-
"description": "Provides the id of the overlay element so the close button can close it"
|
6030
|
-
},
|
6031
|
-
{
|
6032
|
-
"name": "size",
|
6033
|
-
"type": "Symbol",
|
6034
|
-
"default": "`:medium`",
|
6035
|
-
"description": "The size of the Header. One of `:large` or `:medium`."
|
6036
|
-
},
|
6037
|
-
{
|
6038
|
-
"name": "divider",
|
6039
|
-
"type": "Boolean",
|
6040
|
-
"default": "`false`",
|
6041
|
-
"description": "Show a divider between the header and body."
|
6042
|
-
},
|
6043
|
-
{
|
6044
|
-
"name": "visually_hide_title",
|
6045
|
-
"type": "Boolean",
|
6046
|
-
"default": "`false`",
|
6047
|
-
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
6048
|
-
},
|
6049
6049
|
{
|
6050
6050
|
"name": "system_arguments",
|
6051
6051
|
"type": "Hash",
|
@@ -13003,46 +13003,6 @@
|
|
13003
13003
|
}
|
13004
13004
|
],
|
13005
13005
|
"subcomponents": [
|
13006
|
-
{
|
13007
|
-
"fully_qualified_name": "Primer::Beta::NavList::Divider",
|
13008
|
-
"description": "Separator with optional text rendered above groups or between individual items.",
|
13009
|
-
"accessibility_docs": null,
|
13010
|
-
"is_form_component": false,
|
13011
|
-
"is_published": true,
|
13012
|
-
"requires_js": false,
|
13013
|
-
"component": "NavList::Divider",
|
13014
|
-
"status": "alpha",
|
13015
|
-
"a11y_reviewed": false,
|
13016
|
-
"short_name": "NavListDivider",
|
13017
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
13018
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
13019
|
-
"parameters": [
|
13020
|
-
{
|
13021
|
-
"name": "scheme",
|
13022
|
-
"type": "Symbol",
|
13023
|
-
"default": "`:subtle`",
|
13024
|
-
"description": "Display a background color if scheme is `filled`."
|
13025
|
-
},
|
13026
|
-
{
|
13027
|
-
"name": "system_arguments",
|
13028
|
-
"type": "Hash",
|
13029
|
-
"default": "N/A",
|
13030
|
-
"description": "{{link_to_system_arguments_docs}}"
|
13031
|
-
}
|
13032
|
-
],
|
13033
|
-
"slots": [
|
13034
|
-
|
13035
|
-
],
|
13036
|
-
"methods": [
|
13037
|
-
|
13038
|
-
],
|
13039
|
-
"previews": [
|
13040
|
-
|
13041
|
-
],
|
13042
|
-
"subcomponents": [
|
13043
|
-
|
13044
|
-
]
|
13045
|
-
},
|
13046
13006
|
{
|
13047
13007
|
"fully_qualified_name": "Primer::Beta::NavList::Heading",
|
13048
13008
|
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
@@ -13122,111 +13082,6 @@
|
|
13122
13082
|
|
13123
13083
|
]
|
13124
13084
|
},
|
13125
|
-
{
|
13126
|
-
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
13127
|
-
"description": "A logical grouping of navigation links with an optional heading.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
13128
|
-
"accessibility_docs": null,
|
13129
|
-
"is_form_component": false,
|
13130
|
-
"is_published": true,
|
13131
|
-
"requires_js": true,
|
13132
|
-
"component": "NavList::Group",
|
13133
|
-
"status": "alpha",
|
13134
|
-
"a11y_reviewed": true,
|
13135
|
-
"short_name": "NavListGroup",
|
13136
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
13137
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
13138
|
-
"parameters": [
|
13139
|
-
{
|
13140
|
-
"name": "selected_item_id",
|
13141
|
-
"type": "Symbol",
|
13142
|
-
"default": "`nil`",
|
13143
|
-
"description": "The ID of the currently selected item. Used internally."
|
13144
|
-
},
|
13145
|
-
{
|
13146
|
-
"name": "system_arguments",
|
13147
|
-
"type": "Hash",
|
13148
|
-
"default": "N/A",
|
13149
|
-
"description": "{{link_to_system_arguments_docs}}"
|
13150
|
-
}
|
13151
|
-
],
|
13152
|
-
"slots": [
|
13153
|
-
{
|
13154
|
-
"name": "show_more_item",
|
13155
|
-
"description": "A special \"show more\" list item that appears at the bottom of the group. Clicking\nthe item will fetch the next page of results from the URL passed in the `src` argument\nand append the resulting chunk of HTML to the group.",
|
13156
|
-
"parameters": [
|
13157
|
-
{
|
13158
|
-
"name": "src",
|
13159
|
-
"type": "String",
|
13160
|
-
"default": "N/A",
|
13161
|
-
"description": "The URL to query for additional pages of list items."
|
13162
|
-
},
|
13163
|
-
{
|
13164
|
-
"name": "pages",
|
13165
|
-
"type": "Integer",
|
13166
|
-
"default": "N/A",
|
13167
|
-
"description": "The total number of pages in the result set."
|
13168
|
-
},
|
13169
|
-
{
|
13170
|
-
"name": "component_klass",
|
13171
|
-
"type": "Class",
|
13172
|
-
"default": "N/A",
|
13173
|
-
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
13174
|
-
},
|
13175
|
-
{
|
13176
|
-
"name": "system_arguments",
|
13177
|
-
"type": "Hash",
|
13178
|
-
"default": "N/A",
|
13179
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13180
|
-
}
|
13181
|
-
]
|
13182
|
-
},
|
13183
|
-
{
|
13184
|
-
"name": "items",
|
13185
|
-
"description": "Items.",
|
13186
|
-
"parameters": [
|
13187
|
-
{
|
13188
|
-
"name": "system_arguments",
|
13189
|
-
"type": "Hash",
|
13190
|
-
"default": "N/A",
|
13191
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13192
|
-
}
|
13193
|
-
]
|
13194
|
-
},
|
13195
|
-
{
|
13196
|
-
"name": "heading",
|
13197
|
-
"description": "Heading text rendered above the list of items.",
|
13198
|
-
"parameters": [
|
13199
|
-
{
|
13200
|
-
"name": "component_klass",
|
13201
|
-
"type": "Class",
|
13202
|
-
"default": "N/A",
|
13203
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
13204
|
-
},
|
13205
|
-
{
|
13206
|
-
"name": "system_arguments",
|
13207
|
-
"type": "Hash",
|
13208
|
-
"default": "N/A",
|
13209
|
-
"description": "The arguments accepted by `component_klass`."
|
13210
|
-
}
|
13211
|
-
]
|
13212
|
-
}
|
13213
|
-
],
|
13214
|
-
"methods": [
|
13215
|
-
{
|
13216
|
-
"name": "expand!",
|
13217
|
-
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
13218
|
-
"parameters": [
|
13219
|
-
|
13220
|
-
]
|
13221
|
-
}
|
13222
|
-
],
|
13223
|
-
"previews": [
|
13224
|
-
|
13225
|
-
],
|
13226
|
-
"subcomponents": [
|
13227
|
-
|
13228
|
-
]
|
13229
|
-
},
|
13230
13085
|
{
|
13231
13086
|
"fully_qualified_name": "Primer::Beta::NavList::Item",
|
13232
13087
|
"description": "Items are rendered as styled links. They can optionally include leading and/or trailing visuals,\nsuch as icons, avatars, and counters. Items are selected by ID. IDs can be specified via the\n`selected_item_ids` argument, which accepts a list of valid IDs for the item. Items can also\nthemselves contain sub items. Sub items are rendered collapsed by default.",
|
@@ -13379,6 +13234,151 @@
|
|
13379
13234
|
],
|
13380
13235
|
"subcomponents": [
|
13381
13236
|
|
13237
|
+
]
|
13238
|
+
},
|
13239
|
+
{
|
13240
|
+
"fully_qualified_name": "Primer::Beta::NavList::Divider",
|
13241
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
13242
|
+
"accessibility_docs": null,
|
13243
|
+
"is_form_component": false,
|
13244
|
+
"is_published": true,
|
13245
|
+
"requires_js": false,
|
13246
|
+
"component": "NavList::Divider",
|
13247
|
+
"status": "alpha",
|
13248
|
+
"a11y_reviewed": false,
|
13249
|
+
"short_name": "NavListDivider",
|
13250
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
13251
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
13252
|
+
"parameters": [
|
13253
|
+
{
|
13254
|
+
"name": "scheme",
|
13255
|
+
"type": "Symbol",
|
13256
|
+
"default": "`:subtle`",
|
13257
|
+
"description": "Display a background color if scheme is `filled`."
|
13258
|
+
},
|
13259
|
+
{
|
13260
|
+
"name": "system_arguments",
|
13261
|
+
"type": "Hash",
|
13262
|
+
"default": "N/A",
|
13263
|
+
"description": "{{link_to_system_arguments_docs}}"
|
13264
|
+
}
|
13265
|
+
],
|
13266
|
+
"slots": [
|
13267
|
+
|
13268
|
+
],
|
13269
|
+
"methods": [
|
13270
|
+
|
13271
|
+
],
|
13272
|
+
"previews": [
|
13273
|
+
|
13274
|
+
],
|
13275
|
+
"subcomponents": [
|
13276
|
+
|
13277
|
+
]
|
13278
|
+
},
|
13279
|
+
{
|
13280
|
+
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
13281
|
+
"description": "A logical grouping of navigation links with an optional heading.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
13282
|
+
"accessibility_docs": null,
|
13283
|
+
"is_form_component": false,
|
13284
|
+
"is_published": true,
|
13285
|
+
"requires_js": true,
|
13286
|
+
"component": "NavList::Group",
|
13287
|
+
"status": "alpha",
|
13288
|
+
"a11y_reviewed": true,
|
13289
|
+
"short_name": "NavListGroup",
|
13290
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
13291
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
13292
|
+
"parameters": [
|
13293
|
+
{
|
13294
|
+
"name": "selected_item_id",
|
13295
|
+
"type": "Symbol",
|
13296
|
+
"default": "`nil`",
|
13297
|
+
"description": "The ID of the currently selected item. Used internally."
|
13298
|
+
},
|
13299
|
+
{
|
13300
|
+
"name": "system_arguments",
|
13301
|
+
"type": "Hash",
|
13302
|
+
"default": "N/A",
|
13303
|
+
"description": "{{link_to_system_arguments_docs}}"
|
13304
|
+
}
|
13305
|
+
],
|
13306
|
+
"slots": [
|
13307
|
+
{
|
13308
|
+
"name": "show_more_item",
|
13309
|
+
"description": "A special \"show more\" list item that appears at the bottom of the group. Clicking\nthe item will fetch the next page of results from the URL passed in the `src` argument\nand append the resulting chunk of HTML to the group.",
|
13310
|
+
"parameters": [
|
13311
|
+
{
|
13312
|
+
"name": "src",
|
13313
|
+
"type": "String",
|
13314
|
+
"default": "N/A",
|
13315
|
+
"description": "The URL to query for additional pages of list items."
|
13316
|
+
},
|
13317
|
+
{
|
13318
|
+
"name": "pages",
|
13319
|
+
"type": "Integer",
|
13320
|
+
"default": "N/A",
|
13321
|
+
"description": "The total number of pages in the result set."
|
13322
|
+
},
|
13323
|
+
{
|
13324
|
+
"name": "component_klass",
|
13325
|
+
"type": "Class",
|
13326
|
+
"default": "N/A",
|
13327
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
13328
|
+
},
|
13329
|
+
{
|
13330
|
+
"name": "system_arguments",
|
13331
|
+
"type": "Hash",
|
13332
|
+
"default": "N/A",
|
13333
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13334
|
+
}
|
13335
|
+
]
|
13336
|
+
},
|
13337
|
+
{
|
13338
|
+
"name": "items",
|
13339
|
+
"description": "Items.",
|
13340
|
+
"parameters": [
|
13341
|
+
{
|
13342
|
+
"name": "system_arguments",
|
13343
|
+
"type": "Hash",
|
13344
|
+
"default": "N/A",
|
13345
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13346
|
+
}
|
13347
|
+
]
|
13348
|
+
},
|
13349
|
+
{
|
13350
|
+
"name": "heading",
|
13351
|
+
"description": "Heading text rendered above the list of items.",
|
13352
|
+
"parameters": [
|
13353
|
+
{
|
13354
|
+
"name": "component_klass",
|
13355
|
+
"type": "Class",
|
13356
|
+
"default": "N/A",
|
13357
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
13358
|
+
},
|
13359
|
+
{
|
13360
|
+
"name": "system_arguments",
|
13361
|
+
"type": "Hash",
|
13362
|
+
"default": "N/A",
|
13363
|
+
"description": "The arguments accepted by `component_klass`."
|
13364
|
+
}
|
13365
|
+
]
|
13366
|
+
}
|
13367
|
+
],
|
13368
|
+
"methods": [
|
13369
|
+
{
|
13370
|
+
"name": "expand!",
|
13371
|
+
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
13372
|
+
"parameters": [
|
13373
|
+
|
13374
|
+
]
|
13375
|
+
}
|
13376
|
+
],
|
13377
|
+
"previews": [
|
13378
|
+
|
13379
|
+
],
|
13380
|
+
"subcomponents": [
|
13381
|
+
|
13382
13382
|
]
|
13383
13383
|
}
|
13384
13384
|
]
|