@primer/view-components 0.15.0-rc.22e6d987 → 0.15.0-rc.24b1ecf2
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/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_list.css +1 -1
- package/app/components/primer/alpha/action_list.css.json +1 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.js +85 -11
- package/app/components/primer/alpha/overlay.css +1 -1
- package/app/components/primer/alpha/overlay.css.json +2 -1
- package/package.json +6 -6
- package/static/arguments.json +7 -1
- package/static/info_arch.json +799 -773
- package/static/previews.json +13 -0
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.",
|
@@ -921,6 +781,12 @@
|
|
921
781
|
"default": "`nil`",
|
922
782
|
"description": "Item label. If no label is provided, content is used."
|
923
783
|
},
|
784
|
+
{
|
785
|
+
"name": "item_id",
|
786
|
+
"type": "String",
|
787
|
+
"default": "`nil`",
|
788
|
+
"description": "An ID that will be attached to the item's `<li>` element as `data-item-id` for distinguishing between items, perhaps in JavaScript."
|
789
|
+
},
|
924
790
|
{
|
925
791
|
"name": "label_classes",
|
926
792
|
"type": "String",
|
@@ -1073,6 +939,13 @@
|
|
1073
939
|
|
1074
940
|
]
|
1075
941
|
},
|
942
|
+
{
|
943
|
+
"name": "item_id",
|
944
|
+
"description": "Returns the value of attribute item_id.",
|
945
|
+
"parameters": [
|
946
|
+
|
947
|
+
]
|
948
|
+
},
|
1076
949
|
{
|
1077
950
|
"name": "list",
|
1078
951
|
"description": "Returns the value of attribute list.",
|
@@ -1129,105 +1002,245 @@
|
|
1129
1002
|
"subcomponents": [
|
1130
1003
|
|
1131
1004
|
]
|
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
1005
|
},
|
1209
1006
|
{
|
1210
|
-
"
|
1211
|
-
"
|
1212
|
-
"
|
1213
|
-
"
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
"
|
1219
|
-
"
|
1007
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Heading",
|
1008
|
+
"description": "Heading used to describe each sub list within an action list.",
|
1009
|
+
"accessibility_docs": null,
|
1010
|
+
"is_form_component": false,
|
1011
|
+
"is_published": true,
|
1012
|
+
"requires_js": false,
|
1013
|
+
"component": "ActionList::Heading",
|
1014
|
+
"status": "alpha",
|
1015
|
+
"a11y_reviewed": false,
|
1016
|
+
"short_name": "ActionListHeading",
|
1017
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
|
1018
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
|
1220
1019
|
"parameters": [
|
1221
1020
|
{
|
1222
|
-
"name": "
|
1223
|
-
"type": "
|
1021
|
+
"name": "title",
|
1022
|
+
"type": "String",
|
1224
1023
|
"default": "N/A",
|
1225
|
-
"description": "
|
1226
|
-
}
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1024
|
+
"description": "Sub list title."
|
1025
|
+
},
|
1026
|
+
{
|
1027
|
+
"name": "heading_level",
|
1028
|
+
"type": "Integer",
|
1029
|
+
"default": "`3`",
|
1030
|
+
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
|
1031
|
+
},
|
1032
|
+
{
|
1033
|
+
"name": "subtitle",
|
1034
|
+
"type": "String",
|
1035
|
+
"default": "`nil`",
|
1036
|
+
"description": "Optional sub list description."
|
1037
|
+
},
|
1038
|
+
{
|
1039
|
+
"name": "scheme",
|
1040
|
+
"type": "Symbol",
|
1041
|
+
"default": "`:subtle`",
|
1042
|
+
"description": "Display a background color if scheme is `filled`."
|
1043
|
+
},
|
1044
|
+
{
|
1045
|
+
"name": "system_arguments",
|
1046
|
+
"type": "Hash",
|
1047
|
+
"default": "N/A",
|
1048
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1049
|
+
}
|
1050
|
+
],
|
1051
|
+
"slots": [
|
1052
|
+
|
1053
|
+
],
|
1054
|
+
"methods": [
|
1055
|
+
{
|
1056
|
+
"name": "title_id",
|
1057
|
+
"description": "Returns the value of attribute title_id.",
|
1058
|
+
"parameters": [
|
1059
|
+
|
1060
|
+
]
|
1061
|
+
},
|
1062
|
+
{
|
1063
|
+
"name": "subtitle_id",
|
1064
|
+
"description": "Returns the value of attribute subtitle_id.",
|
1065
|
+
"parameters": [
|
1066
|
+
|
1067
|
+
]
|
1068
|
+
}
|
1069
|
+
],
|
1070
|
+
"previews": [
|
1071
|
+
|
1072
|
+
],
|
1073
|
+
"subcomponents": [
|
1074
|
+
|
1075
|
+
]
|
1076
|
+
},
|
1077
|
+
{
|
1078
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
1079
|
+
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
1080
|
+
"accessibility_docs": null,
|
1081
|
+
"is_form_component": false,
|
1082
|
+
"is_published": true,
|
1083
|
+
"requires_js": false,
|
1084
|
+
"component": "ActionList::FormWrapper",
|
1085
|
+
"status": "alpha",
|
1086
|
+
"a11y_reviewed": false,
|
1087
|
+
"short_name": "ActionListFormWrapper",
|
1088
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
1089
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
1090
|
+
"parameters": [
|
1091
|
+
|
1092
|
+
],
|
1093
|
+
"slots": [
|
1094
|
+
|
1095
|
+
],
|
1096
|
+
"methods": [
|
1097
|
+
|
1098
|
+
],
|
1099
|
+
"previews": [
|
1100
|
+
|
1101
|
+
],
|
1102
|
+
"subcomponents": [
|
1103
|
+
|
1104
|
+
]
|
1105
|
+
},
|
1106
|
+
{
|
1107
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
1108
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
1109
|
+
"accessibility_docs": null,
|
1110
|
+
"is_form_component": false,
|
1111
|
+
"is_published": true,
|
1112
|
+
"requires_js": false,
|
1113
|
+
"component": "ActionList::Divider",
|
1114
|
+
"status": "alpha",
|
1115
|
+
"a11y_reviewed": false,
|
1116
|
+
"short_name": "ActionListDivider",
|
1117
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
1118
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
1119
|
+
"parameters": [
|
1120
|
+
{
|
1121
|
+
"name": "scheme",
|
1122
|
+
"type": "Symbol",
|
1123
|
+
"default": "`:subtle`",
|
1124
|
+
"description": "Display a background color if scheme is `filled`."
|
1125
|
+
},
|
1126
|
+
{
|
1127
|
+
"name": "system_arguments",
|
1128
|
+
"type": "Hash",
|
1129
|
+
"default": "N/A",
|
1130
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1131
|
+
}
|
1132
|
+
],
|
1133
|
+
"slots": [
|
1134
|
+
|
1135
|
+
],
|
1136
|
+
"methods": [
|
1137
|
+
|
1138
|
+
],
|
1139
|
+
"previews": [
|
1140
|
+
|
1141
|
+
],
|
1142
|
+
"subcomponents": [
|
1143
|
+
|
1144
|
+
]
|
1145
|
+
}
|
1146
|
+
]
|
1147
|
+
},
|
1148
|
+
{
|
1149
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
1150
|
+
"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.\n\n### JavaScript API\n\n`ActionList`s render an `<action-list>` custom element that exposes behavior to the client. For all these methods,\n`itemId` refers to the value of the `item_id:` argument (see below) that is used to populate the `data-item-id` HTML\nattribute.\n\n#### Query methods\n\n* `getItemById(itemId: string): Element`: Returns the item's HTML `<li>` element. The return value can be passed as the `item` argument to the other methods listed below.\n* `isItemChecked(item: Element): boolean`: Returns `true` if the item is checked, `false` otherwise.\n* `isItemHidden(item: Element): boolean`: Returns `true` if the item is hidden, `false` otherwise.\n* `isItemDisabled(item: Element): boolean`: Returns `true` if the item is disabled, `false` otherwise.\n\n#### State methods\n\n* `showItem(item: Element)`: Shows the item, i.e. makes it visible.\n* `hideItem(item: Element)`: Hides the item, i.e. makes it invisible.\n* `enableItem(item: Element)`: Enables the item, i.e. makes it clickable by the mouse and keyboard.\n* `disableItem(item: Element)`: Disables the item, i.e. makes it unclickable by the mouse and keyboard.\n* `checkItem(item: Element)`: Checks the item. Only has an effect in single- and multi-select modes.\n* `uncheckItem(item: Element)`: Unchecks the item. Only has an effect in multi-select mode, since items cannot be unchecked in single-select mode.\n\n#### Events\n\nThe `<action-menu>` element fires an `itemActivated` event whenever an item is activated (eg. clicked) via the mouse or keyboard.\n\n```typescript\ndocument.querySelector(\"action-menu\").addEventListener(\"itemActivated\", (event: ItemActivatedEvent) => {\n event.item // Element: the <li> item that was activated\n event.checked // boolean: whether or not the result of the activation checked the item\n})\n```",
|
1151
|
+
"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).",
|
1152
|
+
"is_form_component": false,
|
1153
|
+
"is_published": true,
|
1154
|
+
"requires_js": true,
|
1155
|
+
"component": "ActionMenu",
|
1156
|
+
"status": "alpha",
|
1157
|
+
"a11y_reviewed": false,
|
1158
|
+
"short_name": "ActionMenu",
|
1159
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
1160
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
1161
|
+
"parameters": [
|
1162
|
+
{
|
1163
|
+
"name": "menu_id",
|
1164
|
+
"type": "String",
|
1165
|
+
"default": "`self.class.generate_id`",
|
1166
|
+
"description": "Id of the menu."
|
1167
|
+
},
|
1168
|
+
{
|
1169
|
+
"name": "anchor_align",
|
1170
|
+
"type": "Symbol",
|
1171
|
+
"default": "`:start`",
|
1172
|
+
"description": "One of `:center`, `:end`, or `:start`.."
|
1173
|
+
},
|
1174
|
+
{
|
1175
|
+
"name": "anchor_side",
|
1176
|
+
"type": "Symbol",
|
1177
|
+
"default": "`:outside_bottom`",
|
1178
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
1179
|
+
},
|
1180
|
+
{
|
1181
|
+
"name": "size",
|
1182
|
+
"type": "Symbol",
|
1183
|
+
"default": "`:auto`",
|
1184
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
"name": "src",
|
1188
|
+
"type": "String",
|
1189
|
+
"default": "`nil`",
|
1190
|
+
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
1191
|
+
},
|
1192
|
+
{
|
1193
|
+
"name": "preload",
|
1194
|
+
"type": "Boolean",
|
1195
|
+
"default": "`false`",
|
1196
|
+
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
1197
|
+
},
|
1198
|
+
{
|
1199
|
+
"name": "dynamic_label",
|
1200
|
+
"type": "Boolean",
|
1201
|
+
"default": "`false`",
|
1202
|
+
"description": "Whether or not to display the text of the currently selected item in the show button."
|
1203
|
+
},
|
1204
|
+
{
|
1205
|
+
"name": "dynamic_label_prefix",
|
1206
|
+
"type": "String",
|
1207
|
+
"default": "`nil`",
|
1208
|
+
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
1209
|
+
},
|
1210
|
+
{
|
1211
|
+
"name": "select_variant",
|
1212
|
+
"type": "Symbol",
|
1213
|
+
"default": "`:none`",
|
1214
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
1215
|
+
},
|
1216
|
+
{
|
1217
|
+
"name": "form_arguments",
|
1218
|
+
"type": "Hash",
|
1219
|
+
"default": "`{}`",
|
1220
|
+
"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."
|
1221
|
+
},
|
1222
|
+
{
|
1223
|
+
"name": "system_arguments",
|
1224
|
+
"type": "Hash",
|
1225
|
+
"default": "N/A",
|
1226
|
+
"description": "{{link_to_system_arguments_docs}}."
|
1227
|
+
}
|
1228
|
+
],
|
1229
|
+
"slots": [
|
1230
|
+
{
|
1231
|
+
"name": "show_button",
|
1232
|
+
"description": "Button to activate the menu.",
|
1233
|
+
"parameters": [
|
1234
|
+
{
|
1235
|
+
"name": "system_arguments",
|
1236
|
+
"type": "Hash",
|
1237
|
+
"default": "N/A",
|
1238
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
|
1239
|
+
}
|
1240
|
+
]
|
1241
|
+
},
|
1242
|
+
{
|
1243
|
+
"name": "items",
|
1231
1244
|
"description": "Adds a new item to the list.",
|
1232
1245
|
"parameters": [
|
1233
1246
|
{
|
@@ -1708,109 +1721,38 @@
|
|
1708
1721
|
],
|
1709
1722
|
"subcomponents": [
|
1710
1723
|
{
|
1711
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu::
|
1724
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu::List",
|
1712
1725
|
"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
1726
|
"accessibility_docs": null,
|
1714
1727
|
"is_form_component": false,
|
1715
1728
|
"is_published": true,
|
1716
1729
|
"requires_js": false,
|
1717
|
-
"component": "ActionMenu::
|
1730
|
+
"component": "ActionMenu::List",
|
1718
1731
|
"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/
|
1732
|
+
"a11y_reviewed": false,
|
1733
|
+
"short_name": "ActionMenuList",
|
1734
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
|
1735
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
|
1723
1736
|
"parameters": [
|
1724
1737
|
{
|
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
|
-
},
|
1738
|
+
"name": "system_arguments",
|
1739
|
+
"type": "Hash",
|
1740
|
+
"default": "N/A",
|
1741
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}"
|
1742
|
+
}
|
1743
|
+
],
|
1744
|
+
"slots": [
|
1745
|
+
|
1746
|
+
],
|
1747
|
+
"methods": [
|
1792
1748
|
{
|
1793
1749
|
"name": "items",
|
1794
|
-
"description": "
|
1750
|
+
"description": "Returns the value of attribute items.",
|
1795
1751
|
"parameters": [
|
1796
1752
|
|
1797
1753
|
]
|
1798
1754
|
}
|
1799
1755
|
],
|
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
1756
|
"previews": [
|
1815
1757
|
|
1816
1758
|
],
|
@@ -1912,35 +1854,106 @@
|
|
1912
1854
|
]
|
1913
1855
|
},
|
1914
1856
|
{
|
1915
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu::
|
1857
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu::Group",
|
1916
1858
|
"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
1859
|
"accessibility_docs": null,
|
1918
1860
|
"is_form_component": false,
|
1919
1861
|
"is_published": true,
|
1920
1862
|
"requires_js": false,
|
1921
|
-
"component": "ActionMenu::
|
1863
|
+
"component": "ActionMenu::Group",
|
1922
1864
|
"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/
|
1865
|
+
"a11y_reviewed": true,
|
1866
|
+
"short_name": "ActionMenuGroup",
|
1867
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/group.rb",
|
1868
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/group/default/",
|
1927
1869
|
"parameters": [
|
1870
|
+
{
|
1871
|
+
"name": "id",
|
1872
|
+
"type": "String",
|
1873
|
+
"default": "`self.class.generate_id`",
|
1874
|
+
"description": "HTML ID value."
|
1875
|
+
},
|
1876
|
+
{
|
1877
|
+
"name": "role",
|
1878
|
+
"type": "Boolean",
|
1879
|
+
"default": "`nil`",
|
1880
|
+
"description": "ARIA role describing the function of the list. listbox and menu are a common values."
|
1881
|
+
},
|
1882
|
+
{
|
1883
|
+
"name": "item_classes",
|
1884
|
+
"type": "String",
|
1885
|
+
"default": "`nil`",
|
1886
|
+
"description": "Additional CSS classes to attach to items."
|
1887
|
+
},
|
1888
|
+
{
|
1889
|
+
"name": "scheme",
|
1890
|
+
"type": "Symbol",
|
1891
|
+
"default": "`:full`",
|
1892
|
+
"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."
|
1893
|
+
},
|
1894
|
+
{
|
1895
|
+
"name": "show_dividers",
|
1896
|
+
"type": "Boolean",
|
1897
|
+
"default": "`false`",
|
1898
|
+
"description": "Display a divider above each item in the list when it does not follow a header or divider."
|
1899
|
+
},
|
1900
|
+
{
|
1901
|
+
"name": "select_variant",
|
1902
|
+
"type": "Symbol",
|
1903
|
+
"default": "`:none`",
|
1904
|
+
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
1905
|
+
},
|
1906
|
+
{
|
1907
|
+
"name": "form_arguments",
|
1908
|
+
"type": "Hash",
|
1909
|
+
"default": "`{}`",
|
1910
|
+
"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."
|
1911
|
+
},
|
1928
1912
|
{
|
1929
1913
|
"name": "system_arguments",
|
1930
1914
|
"type": "Hash",
|
1931
1915
|
"default": "N/A",
|
1932
|
-
"description": "
|
1916
|
+
"description": "{{link_to_system_arguments_docs}}"
|
1933
1917
|
}
|
1934
1918
|
],
|
1935
1919
|
"slots": [
|
1920
|
+
{
|
1921
|
+
"name": "heading",
|
1922
|
+
"description": "Heading text rendered above the list of items.",
|
1923
|
+
"parameters": [
|
1924
|
+
{
|
1925
|
+
"name": "component_klass",
|
1926
|
+
"type": "Class",
|
1927
|
+
"default": "N/A",
|
1928
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
1929
|
+
},
|
1930
|
+
{
|
1931
|
+
"name": "system_arguments",
|
1932
|
+
"type": "Hash",
|
1933
|
+
"default": "N/A",
|
1934
|
+
"description": "The arguments accepted by `component_klass`."
|
1935
|
+
}
|
1936
|
+
]
|
1937
|
+
},
|
1938
|
+
{
|
1939
|
+
"name": "items",
|
1940
|
+
"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.",
|
1941
|
+
"parameters": [
|
1936
1942
|
|
1943
|
+
]
|
1944
|
+
}
|
1937
1945
|
],
|
1938
1946
|
"methods": [
|
1939
1947
|
{
|
1940
|
-
"name": "
|
1941
|
-
"description": "
|
1948
|
+
"name": "with_heading",
|
1949
|
+
"description": "Heading text rendered above the list of items.",
|
1942
1950
|
"parameters": [
|
1943
|
-
|
1951
|
+
{
|
1952
|
+
"name": "system_arguments",
|
1953
|
+
"type": "Hash",
|
1954
|
+
"default": "N/A",
|
1955
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu::Heading{{/link_to_component}}."
|
1956
|
+
}
|
1944
1957
|
]
|
1945
1958
|
}
|
1946
1959
|
],
|
@@ -3260,6 +3273,19 @@
|
|
3260
3273
|
]
|
3261
3274
|
}
|
3262
3275
|
},
|
3276
|
+
{
|
3277
|
+
"preview_path": "primer/alpha/dialog/with_auto_complete",
|
3278
|
+
"name": "with_auto_complete",
|
3279
|
+
"snapshot": "interactive",
|
3280
|
+
"skip_rules": {
|
3281
|
+
"wont_fix": [
|
3282
|
+
"region"
|
3283
|
+
],
|
3284
|
+
"will_fix": [
|
3285
|
+
"color-contrast"
|
3286
|
+
]
|
3287
|
+
}
|
3288
|
+
},
|
3263
3289
|
{
|
3264
3290
|
"preview_path": "primer/alpha/dialog/body_has_scrollbar_overflow",
|
3265
3291
|
"name": "body_has_scrollbar_overflow",
|
@@ -3288,6 +3314,76 @@
|
|
3288
3314
|
}
|
3289
3315
|
],
|
3290
3316
|
"subcomponents": [
|
3317
|
+
{
|
3318
|
+
"fully_qualified_name": "Primer::Alpha::Dialog::Header",
|
3319
|
+
"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}}.",
|
3320
|
+
"accessibility_docs": null,
|
3321
|
+
"is_form_component": false,
|
3322
|
+
"is_published": true,
|
3323
|
+
"requires_js": false,
|
3324
|
+
"component": "Dialog::Header",
|
3325
|
+
"status": "alpha",
|
3326
|
+
"a11y_reviewed": true,
|
3327
|
+
"short_name": "DialogHeader",
|
3328
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
3329
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
3330
|
+
"parameters": [
|
3331
|
+
{
|
3332
|
+
"name": "id",
|
3333
|
+
"type": "String",
|
3334
|
+
"default": "N/A",
|
3335
|
+
"description": "The HTML element's ID value."
|
3336
|
+
},
|
3337
|
+
{
|
3338
|
+
"name": "title",
|
3339
|
+
"type": "String",
|
3340
|
+
"default": "N/A",
|
3341
|
+
"description": "Describes the content of the dialog."
|
3342
|
+
},
|
3343
|
+
{
|
3344
|
+
"name": "subtitle",
|
3345
|
+
"type": "String",
|
3346
|
+
"default": "`nil`",
|
3347
|
+
"description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
|
3348
|
+
},
|
3349
|
+
{
|
3350
|
+
"name": "show_divider",
|
3351
|
+
"type": "Boolean",
|
3352
|
+
"default": "`false`",
|
3353
|
+
"description": "Show a divider between the header and body."
|
3354
|
+
},
|
3355
|
+
{
|
3356
|
+
"name": "visually_hide_title",
|
3357
|
+
"type": "Boolean",
|
3358
|
+
"default": "`false`",
|
3359
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3360
|
+
},
|
3361
|
+
{
|
3362
|
+
"name": "variant",
|
3363
|
+
"type": "Symbol",
|
3364
|
+
"default": "`:medium`",
|
3365
|
+
"description": "One of `:large` or `:medium`."
|
3366
|
+
},
|
3367
|
+
{
|
3368
|
+
"name": "system_arguments",
|
3369
|
+
"type": "Hash",
|
3370
|
+
"default": "N/A",
|
3371
|
+
"description": "{{link_to_system_arguments_docs}}"
|
3372
|
+
}
|
3373
|
+
],
|
3374
|
+
"slots": [
|
3375
|
+
|
3376
|
+
],
|
3377
|
+
"methods": [
|
3378
|
+
|
3379
|
+
],
|
3380
|
+
"previews": [
|
3381
|
+
|
3382
|
+
],
|
3383
|
+
"subcomponents": [
|
3384
|
+
|
3385
|
+
]
|
3386
|
+
},
|
3291
3387
|
{
|
3292
3388
|
"fully_qualified_name": "Primer::Alpha::Dialog::Footer",
|
3293
3389
|
"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}}.",
|
@@ -3360,76 +3456,6 @@
|
|
3360
3456
|
],
|
3361
3457
|
"subcomponents": [
|
3362
3458
|
|
3363
|
-
]
|
3364
|
-
},
|
3365
|
-
{
|
3366
|
-
"fully_qualified_name": "Primer::Alpha::Dialog::Header",
|
3367
|
-
"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}}.",
|
3368
|
-
"accessibility_docs": null,
|
3369
|
-
"is_form_component": false,
|
3370
|
-
"is_published": true,
|
3371
|
-
"requires_js": false,
|
3372
|
-
"component": "Dialog::Header",
|
3373
|
-
"status": "alpha",
|
3374
|
-
"a11y_reviewed": true,
|
3375
|
-
"short_name": "DialogHeader",
|
3376
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
3377
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
3378
|
-
"parameters": [
|
3379
|
-
{
|
3380
|
-
"name": "id",
|
3381
|
-
"type": "String",
|
3382
|
-
"default": "N/A",
|
3383
|
-
"description": "The HTML element's ID value."
|
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
3459
|
]
|
3434
3460
|
}
|
3435
3461
|
]
|
@@ -4713,31 +4739,20 @@
|
|
4713
4739
|
],
|
4714
4740
|
"subcomponents": [
|
4715
4741
|
{
|
4716
|
-
"fully_qualified_name": "Primer::Alpha::Layout::
|
4717
|
-
"description": "The layout's
|
4742
|
+
"fully_qualified_name": "Primer::Alpha::Layout::Sidebar",
|
4743
|
+
"description": "The layout's sidebar content.",
|
4718
4744
|
"accessibility_docs": null,
|
4719
4745
|
"is_form_component": false,
|
4720
4746
|
"is_published": true,
|
4721
4747
|
"requires_js": false,
|
4722
|
-
"component": "Layout::
|
4748
|
+
"component": "Layout::Sidebar",
|
4723
4749
|
"status": "alpha",
|
4724
4750
|
"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/
|
4751
|
+
"short_name": "LayoutSidebar",
|
4752
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/sidebar.rb",
|
4753
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/sidebar/default/",
|
4728
4754
|
"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
|
-
}
|
4755
|
+
|
4741
4756
|
],
|
4742
4757
|
"slots": [
|
4743
4758
|
|
@@ -4753,20 +4768,31 @@
|
|
4753
4768
|
]
|
4754
4769
|
},
|
4755
4770
|
{
|
4756
|
-
"fully_qualified_name": "Primer::Alpha::Layout::
|
4757
|
-
"description": "The layout's
|
4771
|
+
"fully_qualified_name": "Primer::Alpha::Layout::Main",
|
4772
|
+
"description": "The layout's main content.",
|
4758
4773
|
"accessibility_docs": null,
|
4759
4774
|
"is_form_component": false,
|
4760
4775
|
"is_published": true,
|
4761
4776
|
"requires_js": false,
|
4762
|
-
"component": "Layout::
|
4777
|
+
"component": "Layout::Main",
|
4763
4778
|
"status": "alpha",
|
4764
4779
|
"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/
|
4780
|
+
"short_name": "LayoutMain",
|
4781
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/main.rb",
|
4782
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/main/default/",
|
4768
4783
|
"parameters": [
|
4769
|
-
|
4784
|
+
{
|
4785
|
+
"name": "width",
|
4786
|
+
"type": "Symbol",
|
4787
|
+
"default": "`:full`",
|
4788
|
+
"description": "One of `:full`, `:lg`, `:md`, or `:xl`."
|
4789
|
+
},
|
4790
|
+
{
|
4791
|
+
"name": "system_arguments",
|
4792
|
+
"type": "Hash",
|
4793
|
+
"default": "N/A",
|
4794
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4795
|
+
}
|
4770
4796
|
],
|
4771
4797
|
"slots": [
|
4772
4798
|
|
@@ -5134,64 +5160,42 @@
|
|
5134
5160
|
],
|
5135
5161
|
"subcomponents": [
|
5136
5162
|
{
|
5137
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5163
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Item",
|
5138
5164
|
"description": ":nodoc:",
|
5139
5165
|
"accessibility_docs": null,
|
5140
5166
|
"is_form_component": false,
|
5141
5167
|
"is_published": true,
|
5142
|
-
"requires_js":
|
5143
|
-
"component": "NavList::
|
5168
|
+
"requires_js": true,
|
5169
|
+
"component": "NavList::Item",
|
5144
5170
|
"status": "deprecated",
|
5145
5171
|
"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/
|
5172
|
+
"short_name": "NavListItem",
|
5173
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
5174
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/item/default/",
|
5149
5175
|
"parameters": [
|
5150
5176
|
{
|
5151
|
-
"name": "
|
5177
|
+
"name": "selected_item_id",
|
5152
5178
|
"type": "Symbol",
|
5153
|
-
"default": "
|
5154
|
-
"description": "
|
5179
|
+
"default": "`nil`",
|
5180
|
+
"description": "The ID of the currently selected list item. Used internally."
|
5155
5181
|
},
|
5156
5182
|
{
|
5157
|
-
"name": "
|
5158
|
-
"type": "
|
5159
|
-
"default": "
|
5160
|
-
"description": "
|
5161
|
-
}
|
5162
|
-
],
|
5163
|
-
"slots": [
|
5164
|
-
|
5165
|
-
],
|
5166
|
-
"methods": [
|
5167
|
-
|
5168
|
-
],
|
5169
|
-
"previews": [
|
5170
|
-
|
5171
|
-
],
|
5172
|
-
"subcomponents": [
|
5173
|
-
|
5174
|
-
]
|
5175
|
-
},
|
5176
|
-
{
|
5177
|
-
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5178
|
-
"description": ":nodoc:",
|
5179
|
-
"accessibility_docs": null,
|
5180
|
-
"is_form_component": false,
|
5181
|
-
"is_published": true,
|
5182
|
-
"requires_js": true,
|
5183
|
-
"component": "NavList::Group",
|
5184
|
-
"status": "deprecated",
|
5185
|
-
"a11y_reviewed": true,
|
5186
|
-
"short_name": "NavListGroup",
|
5187
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5188
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5189
|
-
"parameters": [
|
5183
|
+
"name": "selected_by_ids",
|
5184
|
+
"type": "Array<Symbol>",
|
5185
|
+
"default": "`[]`",
|
5186
|
+
"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."
|
5187
|
+
},
|
5190
5188
|
{
|
5191
|
-
"name": "
|
5192
|
-
"type": "
|
5193
|
-
"default": "`
|
5194
|
-
"description": "
|
5189
|
+
"name": "expanded",
|
5190
|
+
"type": "Boolean",
|
5191
|
+
"default": "`false`",
|
5192
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
5193
|
+
},
|
5194
|
+
{
|
5195
|
+
"name": "sub_item",
|
5196
|
+
"type": "Boolean",
|
5197
|
+
"default": "`false`",
|
5198
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
5195
5199
|
},
|
5196
5200
|
{
|
5197
5201
|
"name": "system_arguments",
|
@@ -5202,62 +5206,65 @@
|
|
5202
5206
|
],
|
5203
5207
|
"slots": [
|
5204
5208
|
{
|
5205
|
-
"name": "
|
5206
|
-
"description":
|
5209
|
+
"name": "items",
|
5210
|
+
"description": null,
|
5207
5211
|
"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
5212
|
{
|
5227
5213
|
"name": "system_arguments",
|
5228
5214
|
"type": "Hash",
|
5229
5215
|
"default": "N/A",
|
5230
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
5216
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
5231
5217
|
}
|
5232
5218
|
]
|
5233
5219
|
},
|
5234
5220
|
{
|
5235
|
-
"name": "
|
5236
|
-
"description": "
|
5221
|
+
"name": "description",
|
5222
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
5223
|
+
"parameters": [
|
5224
|
+
|
5225
|
+
]
|
5226
|
+
},
|
5227
|
+
{
|
5228
|
+
"name": "leading_visual",
|
5229
|
+
"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.",
|
5230
|
+
"parameters": [
|
5231
|
+
|
5232
|
+
]
|
5233
|
+
},
|
5234
|
+
{
|
5235
|
+
"name": "trailing_visual",
|
5236
|
+
"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```",
|
5237
|
+
"parameters": [
|
5238
|
+
|
5239
|
+
]
|
5240
|
+
},
|
5241
|
+
{
|
5242
|
+
"name": "trailing_action",
|
5243
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
5237
5244
|
"parameters": [
|
5238
5245
|
{
|
5239
5246
|
"name": "system_arguments",
|
5240
5247
|
"type": "Hash",
|
5241
5248
|
"default": "N/A",
|
5242
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::
|
5249
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
5243
5250
|
}
|
5244
5251
|
]
|
5245
5252
|
},
|
5246
5253
|
{
|
5247
|
-
"name": "
|
5248
|
-
"description": "
|
5254
|
+
"name": "tooltip",
|
5255
|
+
"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.",
|
5249
5256
|
"parameters": [
|
5250
5257
|
{
|
5251
|
-
"name": "
|
5252
|
-
"type": "
|
5253
|
-
"default": "
|
5254
|
-
"description": "
|
5258
|
+
"name": "type",
|
5259
|
+
"type": "Symbol",
|
5260
|
+
"default": "`:description`",
|
5261
|
+
"description": "One of `:description` or `:label`."
|
5255
5262
|
},
|
5256
5263
|
{
|
5257
5264
|
"name": "system_arguments",
|
5258
5265
|
"type": "Hash",
|
5259
5266
|
"default": "N/A",
|
5260
|
-
"description": "The arguments accepted by
|
5267
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
5261
5268
|
}
|
5262
5269
|
]
|
5263
5270
|
}
|
@@ -5325,42 +5332,64 @@
|
|
5325
5332
|
]
|
5326
5333
|
},
|
5327
5334
|
{
|
5328
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5335
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Divider",
|
5329
5336
|
"description": ":nodoc:",
|
5330
5337
|
"accessibility_docs": null,
|
5331
5338
|
"is_form_component": false,
|
5332
5339
|
"is_published": true,
|
5333
|
-
"requires_js":
|
5334
|
-
"component": "NavList::
|
5340
|
+
"requires_js": false,
|
5341
|
+
"component": "NavList::Divider",
|
5335
5342
|
"status": "deprecated",
|
5336
5343
|
"a11y_reviewed": false,
|
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/
|
5344
|
+
"short_name": "NavListDivider",
|
5345
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
5346
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
5340
5347
|
"parameters": [
|
5341
5348
|
{
|
5342
|
-
"name": "
|
5349
|
+
"name": "scheme",
|
5343
5350
|
"type": "Symbol",
|
5344
|
-
"default": "`
|
5345
|
-
"description": "
|
5351
|
+
"default": "`:subtle`",
|
5352
|
+
"description": "Display a background color if scheme is `filled`."
|
5346
5353
|
},
|
5347
5354
|
{
|
5348
|
-
"name": "
|
5349
|
-
"type": "
|
5350
|
-
"default": "
|
5351
|
-
"description": "
|
5352
|
-
}
|
5353
|
-
|
5354
|
-
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5355
|
+
"name": "system_arguments",
|
5356
|
+
"type": "Hash",
|
5357
|
+
"default": "N/A",
|
5358
|
+
"description": "{{link_to_system_arguments_docs}}"
|
5359
|
+
}
|
5360
|
+
],
|
5361
|
+
"slots": [
|
5362
|
+
|
5363
|
+
],
|
5364
|
+
"methods": [
|
5365
|
+
|
5366
|
+
],
|
5367
|
+
"previews": [
|
5368
|
+
|
5369
|
+
],
|
5370
|
+
"subcomponents": [
|
5371
|
+
|
5372
|
+
]
|
5373
|
+
},
|
5374
|
+
{
|
5375
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5376
|
+
"description": ":nodoc:",
|
5377
|
+
"accessibility_docs": null,
|
5378
|
+
"is_form_component": false,
|
5379
|
+
"is_published": true,
|
5380
|
+
"requires_js": true,
|
5381
|
+
"component": "NavList::Group",
|
5382
|
+
"status": "deprecated",
|
5383
|
+
"a11y_reviewed": true,
|
5384
|
+
"short_name": "NavListGroup",
|
5385
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5386
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5387
|
+
"parameters": [
|
5359
5388
|
{
|
5360
|
-
"name": "
|
5361
|
-
"type": "
|
5362
|
-
"default": "`
|
5363
|
-
"description": "
|
5389
|
+
"name": "selected_item_id",
|
5390
|
+
"type": "Symbol",
|
5391
|
+
"default": "`nil`",
|
5392
|
+
"description": "The ID of the currently selected item. Used internally."
|
5364
5393
|
},
|
5365
5394
|
{
|
5366
5395
|
"name": "system_arguments",
|
@@ -5371,65 +5400,62 @@
|
|
5371
5400
|
],
|
5372
5401
|
"slots": [
|
5373
5402
|
{
|
5374
|
-
"name": "
|
5375
|
-
"description":
|
5403
|
+
"name": "show_more_item",
|
5404
|
+
"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
5405
|
"parameters": [
|
5406
|
+
{
|
5407
|
+
"name": "src",
|
5408
|
+
"type": "String",
|
5409
|
+
"default": "N/A",
|
5410
|
+
"description": "The URL to query for additional pages of list items."
|
5411
|
+
},
|
5412
|
+
{
|
5413
|
+
"name": "pages",
|
5414
|
+
"type": "Integer",
|
5415
|
+
"default": "N/A",
|
5416
|
+
"description": "The total number of pages in the result set."
|
5417
|
+
},
|
5418
|
+
{
|
5419
|
+
"name": "component_klass",
|
5420
|
+
"type": "Class",
|
5421
|
+
"default": "N/A",
|
5422
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5423
|
+
},
|
5377
5424
|
{
|
5378
5425
|
"name": "system_arguments",
|
5379
5426
|
"type": "Hash",
|
5380
5427
|
"default": "N/A",
|
5381
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
5428
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5382
5429
|
}
|
5383
5430
|
]
|
5384
5431
|
},
|
5385
5432
|
{
|
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.",
|
5433
|
+
"name": "items",
|
5434
|
+
"description": "Items.",
|
5409
5435
|
"parameters": [
|
5410
5436
|
{
|
5411
5437
|
"name": "system_arguments",
|
5412
5438
|
"type": "Hash",
|
5413
5439
|
"default": "N/A",
|
5414
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::
|
5440
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5415
5441
|
}
|
5416
5442
|
]
|
5417
5443
|
},
|
5418
5444
|
{
|
5419
|
-
"name": "
|
5420
|
-
"description": "
|
5445
|
+
"name": "heading",
|
5446
|
+
"description": "Heading text rendered above the list of items.",
|
5421
5447
|
"parameters": [
|
5422
5448
|
{
|
5423
|
-
"name": "
|
5424
|
-
"type": "
|
5425
|
-
"default": "
|
5426
|
-
"description": "
|
5449
|
+
"name": "component_klass",
|
5450
|
+
"type": "Class",
|
5451
|
+
"default": "N/A",
|
5452
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5427
5453
|
},
|
5428
5454
|
{
|
5429
5455
|
"name": "system_arguments",
|
5430
5456
|
"type": "Hash",
|
5431
5457
|
"default": "N/A",
|
5432
|
-
"description": "The arguments accepted by
|
5458
|
+
"description": "The arguments accepted by `component_klass`."
|
5433
5459
|
}
|
5434
5460
|
]
|
5435
5461
|
}
|
@@ -5917,30 +5943,54 @@
|
|
5917
5943
|
],
|
5918
5944
|
"subcomponents": [
|
5919
5945
|
{
|
5920
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
5921
|
-
"description": "A `Overlay::
|
5946
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Header",
|
5947
|
+
"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
5948
|
"accessibility_docs": null,
|
5923
5949
|
"is_form_component": false,
|
5924
5950
|
"is_published": true,
|
5925
5951
|
"requires_js": false,
|
5926
|
-
"component": "Overlay::
|
5952
|
+
"component": "Overlay::Header",
|
5927
5953
|
"status": "alpha",
|
5928
5954
|
"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/
|
5955
|
+
"short_name": "OverlayHeader",
|
5956
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/header.rb",
|
5957
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/header/default/",
|
5932
5958
|
"parameters": [
|
5933
5959
|
{
|
5934
|
-
"name": "
|
5960
|
+
"name": "title",
|
5961
|
+
"type": "String",
|
5962
|
+
"default": "N/A",
|
5963
|
+
"description": "Describes the content of the Overlay."
|
5964
|
+
},
|
5965
|
+
{
|
5966
|
+
"name": "subtitle",
|
5967
|
+
"type": "String",
|
5968
|
+
"default": "`nil`",
|
5969
|
+
"description": "Provides additional context for the Overlay, also setting the `aria-describedby` attribute."
|
5970
|
+
},
|
5971
|
+
{
|
5972
|
+
"name": "overlay_id",
|
5973
|
+
"type": "String",
|
5974
|
+
"default": "`nil`",
|
5975
|
+
"description": "Provides the id of the overlay element so the close button can close it"
|
5976
|
+
},
|
5977
|
+
{
|
5978
|
+
"name": "size",
|
5979
|
+
"type": "Symbol",
|
5980
|
+
"default": "`:medium`",
|
5981
|
+
"description": "The size of the Header. One of `:large` or `:medium`."
|
5982
|
+
},
|
5983
|
+
{
|
5984
|
+
"name": "divider",
|
5935
5985
|
"type": "Boolean",
|
5936
5986
|
"default": "`false`",
|
5937
|
-
"description": "Show a divider between the
|
5987
|
+
"description": "Show a divider between the header and body."
|
5938
5988
|
},
|
5939
5989
|
{
|
5940
|
-
"name": "
|
5941
|
-
"type": "
|
5942
|
-
"default": "`
|
5943
|
-
"description": "
|
5990
|
+
"name": "visually_hide_title",
|
5991
|
+
"type": "Boolean",
|
5992
|
+
"default": "`false`",
|
5993
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
5944
5994
|
},
|
5945
5995
|
{
|
5946
5996
|
"name": "system_arguments",
|
@@ -5963,19 +6013,31 @@
|
|
5963
6013
|
]
|
5964
6014
|
},
|
5965
6015
|
{
|
5966
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
5967
|
-
"description": "A `Overlay::
|
6016
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Footer",
|
6017
|
+
"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
6018
|
"accessibility_docs": null,
|
5969
6019
|
"is_form_component": false,
|
5970
6020
|
"is_published": true,
|
5971
6021
|
"requires_js": false,
|
5972
|
-
"component": "Overlay::
|
6022
|
+
"component": "Overlay::Footer",
|
5973
6023
|
"status": "alpha",
|
5974
6024
|
"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/
|
6025
|
+
"short_name": "OverlayFooter",
|
6026
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/footer.rb",
|
6027
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/footer/default/",
|
5978
6028
|
"parameters": [
|
6029
|
+
{
|
6030
|
+
"name": "show_divider",
|
6031
|
+
"type": "Boolean",
|
6032
|
+
"default": "`false`",
|
6033
|
+
"description": "Show a divider between the footer and body."
|
6034
|
+
},
|
6035
|
+
{
|
6036
|
+
"name": "align_content",
|
6037
|
+
"type": "Symbol",
|
6038
|
+
"default": "`DEFAULT_ALIGN_CONTENT`",
|
6039
|
+
"description": "The alginment of contents. One of `:center`, `:end`, or `:start`."
|
6040
|
+
},
|
5979
6041
|
{
|
5980
6042
|
"name": "system_arguments",
|
5981
6043
|
"type": "Hash",
|
@@ -5997,55 +6059,19 @@
|
|
5997
6059
|
]
|
5998
6060
|
},
|
5999
6061
|
{
|
6000
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::
|
6001
|
-
"description": "A `Overlay::
|
6062
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Body",
|
6063
|
+
"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
6064
|
"accessibility_docs": null,
|
6003
6065
|
"is_form_component": false,
|
6004
6066
|
"is_published": true,
|
6005
6067
|
"requires_js": false,
|
6006
|
-
"component": "Overlay::
|
6068
|
+
"component": "Overlay::Body",
|
6007
6069
|
"status": "alpha",
|
6008
6070
|
"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/
|
6071
|
+
"short_name": "OverlayBody",
|
6072
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/body.rb",
|
6073
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/body/default/",
|
6012
6074
|
"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
6075
|
{
|
6050
6076
|
"name": "system_arguments",
|
6051
6077
|
"type": "Hash",
|
@@ -13004,58 +13030,18 @@
|
|
13004
13030
|
],
|
13005
13031
|
"subcomponents": [
|
13006
13032
|
{
|
13007
|
-
"fully_qualified_name": "Primer::Beta::NavList::
|
13008
|
-
"description": "
|
13033
|
+
"fully_qualified_name": "Primer::Beta::NavList::Heading",
|
13034
|
+
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
13009
13035
|
"accessibility_docs": null,
|
13010
13036
|
"is_form_component": false,
|
13011
13037
|
"is_published": true,
|
13012
13038
|
"requires_js": false,
|
13013
|
-
"component": "NavList::
|
13039
|
+
"component": "NavList::Heading",
|
13014
13040
|
"status": "alpha",
|
13015
13041
|
"a11y_reviewed": false,
|
13016
|
-
"short_name": "
|
13017
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/
|
13018
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/
|
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
|
-
{
|
13047
|
-
"fully_qualified_name": "Primer::Beta::NavList::Heading",
|
13048
|
-
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
13049
|
-
"accessibility_docs": null,
|
13050
|
-
"is_form_component": false,
|
13051
|
-
"is_published": true,
|
13052
|
-
"requires_js": false,
|
13053
|
-
"component": "NavList::Heading",
|
13054
|
-
"status": "alpha",
|
13055
|
-
"a11y_reviewed": false,
|
13056
|
-
"short_name": "NavListHeading",
|
13057
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/heading.rb",
|
13058
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/heading/default/",
|
13042
|
+
"short_name": "NavListHeading",
|
13043
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/heading.rb",
|
13044
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/heading/default/",
|
13059
13045
|
"parameters": [
|
13060
13046
|
{
|
13061
13047
|
"name": "title",
|
@@ -13122,111 +13108,6 @@
|
|
13122
13108
|
|
13123
13109
|
]
|
13124
13110
|
},
|
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
13111
|
{
|
13231
13112
|
"fully_qualified_name": "Primer::Beta::NavList::Item",
|
13232
13113
|
"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 +13260,151 @@
|
|
13379
13260
|
],
|
13380
13261
|
"subcomponents": [
|
13381
13262
|
|
13263
|
+
]
|
13264
|
+
},
|
13265
|
+
{
|
13266
|
+
"fully_qualified_name": "Primer::Beta::NavList::Divider",
|
13267
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
13268
|
+
"accessibility_docs": null,
|
13269
|
+
"is_form_component": false,
|
13270
|
+
"is_published": true,
|
13271
|
+
"requires_js": false,
|
13272
|
+
"component": "NavList::Divider",
|
13273
|
+
"status": "alpha",
|
13274
|
+
"a11y_reviewed": false,
|
13275
|
+
"short_name": "NavListDivider",
|
13276
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
13277
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
13278
|
+
"parameters": [
|
13279
|
+
{
|
13280
|
+
"name": "scheme",
|
13281
|
+
"type": "Symbol",
|
13282
|
+
"default": "`:subtle`",
|
13283
|
+
"description": "Display a background color if scheme is `filled`."
|
13284
|
+
},
|
13285
|
+
{
|
13286
|
+
"name": "system_arguments",
|
13287
|
+
"type": "Hash",
|
13288
|
+
"default": "N/A",
|
13289
|
+
"description": "{{link_to_system_arguments_docs}}"
|
13290
|
+
}
|
13291
|
+
],
|
13292
|
+
"slots": [
|
13293
|
+
|
13294
|
+
],
|
13295
|
+
"methods": [
|
13296
|
+
|
13297
|
+
],
|
13298
|
+
"previews": [
|
13299
|
+
|
13300
|
+
],
|
13301
|
+
"subcomponents": [
|
13302
|
+
|
13303
|
+
]
|
13304
|
+
},
|
13305
|
+
{
|
13306
|
+
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
13307
|
+
"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.",
|
13308
|
+
"accessibility_docs": null,
|
13309
|
+
"is_form_component": false,
|
13310
|
+
"is_published": true,
|
13311
|
+
"requires_js": true,
|
13312
|
+
"component": "NavList::Group",
|
13313
|
+
"status": "alpha",
|
13314
|
+
"a11y_reviewed": true,
|
13315
|
+
"short_name": "NavListGroup",
|
13316
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
13317
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
13318
|
+
"parameters": [
|
13319
|
+
{
|
13320
|
+
"name": "selected_item_id",
|
13321
|
+
"type": "Symbol",
|
13322
|
+
"default": "`nil`",
|
13323
|
+
"description": "The ID of the currently selected item. Used internally."
|
13324
|
+
},
|
13325
|
+
{
|
13326
|
+
"name": "system_arguments",
|
13327
|
+
"type": "Hash",
|
13328
|
+
"default": "N/A",
|
13329
|
+
"description": "{{link_to_system_arguments_docs}}"
|
13330
|
+
}
|
13331
|
+
],
|
13332
|
+
"slots": [
|
13333
|
+
{
|
13334
|
+
"name": "show_more_item",
|
13335
|
+
"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.",
|
13336
|
+
"parameters": [
|
13337
|
+
{
|
13338
|
+
"name": "src",
|
13339
|
+
"type": "String",
|
13340
|
+
"default": "N/A",
|
13341
|
+
"description": "The URL to query for additional pages of list items."
|
13342
|
+
},
|
13343
|
+
{
|
13344
|
+
"name": "pages",
|
13345
|
+
"type": "Integer",
|
13346
|
+
"default": "N/A",
|
13347
|
+
"description": "The total number of pages in the result set."
|
13348
|
+
},
|
13349
|
+
{
|
13350
|
+
"name": "component_klass",
|
13351
|
+
"type": "Class",
|
13352
|
+
"default": "N/A",
|
13353
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
13354
|
+
},
|
13355
|
+
{
|
13356
|
+
"name": "system_arguments",
|
13357
|
+
"type": "Hash",
|
13358
|
+
"default": "N/A",
|
13359
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13360
|
+
}
|
13361
|
+
]
|
13362
|
+
},
|
13363
|
+
{
|
13364
|
+
"name": "items",
|
13365
|
+
"description": "Items.",
|
13366
|
+
"parameters": [
|
13367
|
+
{
|
13368
|
+
"name": "system_arguments",
|
13369
|
+
"type": "Hash",
|
13370
|
+
"default": "N/A",
|
13371
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
13372
|
+
}
|
13373
|
+
]
|
13374
|
+
},
|
13375
|
+
{
|
13376
|
+
"name": "heading",
|
13377
|
+
"description": "Heading text rendered above the list of items.",
|
13378
|
+
"parameters": [
|
13379
|
+
{
|
13380
|
+
"name": "component_klass",
|
13381
|
+
"type": "Class",
|
13382
|
+
"default": "N/A",
|
13383
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
13384
|
+
},
|
13385
|
+
{
|
13386
|
+
"name": "system_arguments",
|
13387
|
+
"type": "Hash",
|
13388
|
+
"default": "N/A",
|
13389
|
+
"description": "The arguments accepted by `component_klass`."
|
13390
|
+
}
|
13391
|
+
]
|
13392
|
+
}
|
13393
|
+
],
|
13394
|
+
"methods": [
|
13395
|
+
{
|
13396
|
+
"name": "expand!",
|
13397
|
+
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
13398
|
+
"parameters": [
|
13399
|
+
|
13400
|
+
]
|
13401
|
+
}
|
13402
|
+
],
|
13403
|
+
"previews": [
|
13404
|
+
|
13405
|
+
],
|
13406
|
+
"subcomponents": [
|
13407
|
+
|
13382
13408
|
]
|
13383
13409
|
}
|
13384
13410
|
]
|