@primer/view-components 0.9.0 → 0.10.0-rc.29aa7da1
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/primer.d.ts +1 -1
- 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_menu/action_menu_element.js +2 -1
- package/app/components/primer/alpha/overlay.css +1 -1
- package/app/components/primer/focus_group.js +2 -1
- package/app/components/primer/primer.d.ts +1 -1
- package/app/components/primer/primer.js +1 -1
- package/package.json +3 -3
- package/static/arguments.json +169 -5
- package/static/audited_at.json +5 -0
- package/static/constants.json +14 -0
- package/static/info_arch.json +1021 -608
- package/static/previews.json +33 -7
- package/static/statuses.json +10 -5
- /package/app/assets/javascripts/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
- /package/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
- /package/app/components/primer/{alpha → beta}/nav_list.js +0 -0
package/static/info_arch.json
CHANGED
@@ -2686,6 +2686,18 @@
|
|
2686
2686
|
"default": "N/A",
|
2687
2687
|
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
2688
2688
|
},
|
2689
|
+
{
|
2690
|
+
"name": "invalid",
|
2691
|
+
"type": "Boolean",
|
2692
|
+
"default": "N/A",
|
2693
|
+
"description": "If set to `true`, the input will be marked as invalid. Implied if `validation_message` is truthy. This option is set to `true` automatically if the model object associated with the form reports that the input is invalid via Rails validations. It is provided for cases where the form does not have an associated model. If the input is invalid as determined by Rails validations, setting `invalid` to `false` will have no effect."
|
2694
|
+
},
|
2695
|
+
{
|
2696
|
+
"name": "validation_message",
|
2697
|
+
"type": "String",
|
2698
|
+
"default": "N/A",
|
2699
|
+
"description": "A string displayed between the caption and the input indicating the input's contents are invalid. This option is, by default, set to the first Rails validation message for the input (assuming the form is associated with a model object). Use `validation_message` to override the default or to provide a validation message in case there is no associated model object."
|
2700
|
+
},
|
2689
2701
|
{
|
2690
2702
|
"name": "label_arguments",
|
2691
2703
|
"type": "Hash",
|
@@ -2743,6 +2755,19 @@
|
|
2743
2755
|
]
|
2744
2756
|
}
|
2745
2757
|
},
|
2758
|
+
{
|
2759
|
+
"preview_path": "primer/alpha/check_box_group/invalid",
|
2760
|
+
"name": "invalid",
|
2761
|
+
"snapshot": "false",
|
2762
|
+
"skip_rules": {
|
2763
|
+
"wont_fix": [
|
2764
|
+
"region"
|
2765
|
+
],
|
2766
|
+
"will_fix": [
|
2767
|
+
"color-contrast"
|
2768
|
+
]
|
2769
|
+
}
|
2770
|
+
},
|
2746
2771
|
{
|
2747
2772
|
"preview_path": "primer/alpha/check_box_group/with_caption",
|
2748
2773
|
"name": "with_caption",
|
@@ -4845,13 +4870,13 @@
|
|
4845
4870
|
},
|
4846
4871
|
{
|
4847
4872
|
"fully_qualified_name": "Primer::Alpha::NavList",
|
4848
|
-
"description": "
|
4873
|
+
"description": "",
|
4849
4874
|
"accessibility_docs": null,
|
4850
4875
|
"is_form_component": false,
|
4851
4876
|
"is_published": true,
|
4852
4877
|
"requires_js": true,
|
4853
4878
|
"component": "NavList",
|
4854
|
-
"status": "
|
4879
|
+
"status": "deprecated",
|
4855
4880
|
"a11y_reviewed": true,
|
4856
4881
|
"short_name": "NavList",
|
4857
4882
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list.rb",
|
@@ -4873,7 +4898,7 @@
|
|
4873
4898
|
"slots": [
|
4874
4899
|
{
|
4875
4900
|
"name": "heading",
|
4876
|
-
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::
|
4901
|
+
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Heading{{/link_to_component}}.",
|
4877
4902
|
"parameters": [
|
4878
4903
|
|
4879
4904
|
]
|
@@ -4887,269 +4912,243 @@
|
|
4887
4912
|
}
|
4888
4913
|
],
|
4889
4914
|
"methods": [
|
4915
|
+
|
4916
|
+
],
|
4917
|
+
"previews": [
|
4918
|
+
|
4919
|
+
],
|
4920
|
+
"subcomponents": [
|
4890
4921
|
{
|
4891
|
-
"
|
4892
|
-
"description": "
|
4922
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Item",
|
4923
|
+
"description": "",
|
4924
|
+
"accessibility_docs": null,
|
4925
|
+
"is_form_component": false,
|
4926
|
+
"is_published": true,
|
4927
|
+
"requires_js": true,
|
4928
|
+
"component": "NavList::Item",
|
4929
|
+
"status": "deprecated",
|
4930
|
+
"a11y_reviewed": false,
|
4931
|
+
"short_name": "NavListItem",
|
4932
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
4933
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/item/default/",
|
4893
4934
|
"parameters": [
|
4894
4935
|
{
|
4895
|
-
"name": "
|
4896
|
-
"type": "
|
4897
|
-
"default": "`
|
4898
|
-
"description": "The
|
4936
|
+
"name": "selected_item_id",
|
4937
|
+
"type": "Symbol",
|
4938
|
+
"default": "`nil`",
|
4939
|
+
"description": "The ID of the currently selected list item. Used internally."
|
4940
|
+
},
|
4941
|
+
{
|
4942
|
+
"name": "selected_by_ids",
|
4943
|
+
"type": "Array<Symbol>",
|
4944
|
+
"default": "`[]`",
|
4945
|
+
"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."
|
4946
|
+
},
|
4947
|
+
{
|
4948
|
+
"name": "expanded",
|
4949
|
+
"type": "Boolean",
|
4950
|
+
"default": "`false`",
|
4951
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
4952
|
+
},
|
4953
|
+
{
|
4954
|
+
"name": "sub_item",
|
4955
|
+
"type": "Boolean",
|
4956
|
+
"default": "`false`",
|
4957
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
4899
4958
|
},
|
4900
4959
|
{
|
4901
4960
|
"name": "system_arguments",
|
4902
4961
|
"type": "Hash",
|
4903
4962
|
"default": "N/A",
|
4904
|
-
"description": "
|
4963
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4905
4964
|
}
|
4906
|
-
]
|
4907
|
-
|
4908
|
-
{
|
4909
|
-
"name": "with_avatar_item",
|
4910
|
-
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
4911
|
-
"parameters": [
|
4912
|
-
{
|
4913
|
-
"name": "src",
|
4914
|
-
"type": "String",
|
4915
|
-
"default": "N/A",
|
4916
|
-
"description": "The source url of the avatar image."
|
4917
|
-
},
|
4965
|
+
],
|
4966
|
+
"slots": [
|
4918
4967
|
{
|
4919
|
-
"name": "
|
4920
|
-
"
|
4921
|
-
"
|
4922
|
-
|
4968
|
+
"name": "items",
|
4969
|
+
"description": null,
|
4970
|
+
"parameters": [
|
4971
|
+
{
|
4972
|
+
"name": "system_arguments",
|
4973
|
+
"type": "Hash",
|
4974
|
+
"default": "N/A",
|
4975
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
4976
|
+
}
|
4977
|
+
]
|
4923
4978
|
},
|
4924
4979
|
{
|
4925
|
-
"name": "
|
4926
|
-
"
|
4927
|
-
"
|
4928
|
-
|
4980
|
+
"name": "description",
|
4981
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
4982
|
+
"parameters": [
|
4983
|
+
|
4984
|
+
]
|
4929
4985
|
},
|
4930
4986
|
{
|
4931
|
-
"name": "
|
4932
|
-
"
|
4933
|
-
"
|
4934
|
-
|
4987
|
+
"name": "leading_visual",
|
4988
|
+
"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.",
|
4989
|
+
"parameters": [
|
4990
|
+
|
4991
|
+
]
|
4935
4992
|
},
|
4936
4993
|
{
|
4937
|
-
"name": "
|
4938
|
-
"
|
4939
|
-
"
|
4940
|
-
|
4994
|
+
"name": "trailing_visual",
|
4995
|
+
"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```",
|
4996
|
+
"parameters": [
|
4997
|
+
|
4998
|
+
]
|
4941
4999
|
},
|
4942
5000
|
{
|
4943
|
-
"name": "
|
4944
|
-
"
|
4945
|
-
"
|
4946
|
-
|
5001
|
+
"name": "trailing_action",
|
5002
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
5003
|
+
"parameters": [
|
5004
|
+
{
|
5005
|
+
"name": "system_arguments",
|
5006
|
+
"type": "Hash",
|
5007
|
+
"default": "N/A",
|
5008
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
5009
|
+
}
|
5010
|
+
]
|
4947
5011
|
},
|
4948
5012
|
{
|
4949
|
-
"name": "
|
4950
|
-
"
|
4951
|
-
"
|
4952
|
-
|
5013
|
+
"name": "tooltip",
|
5014
|
+
"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.",
|
5015
|
+
"parameters": [
|
5016
|
+
{
|
5017
|
+
"name": "type",
|
5018
|
+
"type": "Symbol",
|
5019
|
+
"default": "`:description`",
|
5020
|
+
"description": "One of `:description` or `:label`."
|
5021
|
+
},
|
5022
|
+
{
|
5023
|
+
"name": "system_arguments",
|
5024
|
+
"type": "Hash",
|
5025
|
+
"default": "N/A",
|
5026
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
5027
|
+
}
|
5028
|
+
]
|
4953
5029
|
}
|
5030
|
+
],
|
5031
|
+
"methods": [
|
5032
|
+
|
5033
|
+
],
|
5034
|
+
"previews": [
|
5035
|
+
|
5036
|
+
],
|
5037
|
+
"subcomponents": [
|
5038
|
+
|
4954
5039
|
]
|
4955
5040
|
},
|
4956
5041
|
{
|
4957
|
-
"
|
4958
|
-
"description": "
|
5042
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Heading",
|
5043
|
+
"description": "",
|
5044
|
+
"accessibility_docs": null,
|
5045
|
+
"is_form_component": false,
|
5046
|
+
"is_published": true,
|
5047
|
+
"requires_js": false,
|
5048
|
+
"component": "NavList::Heading",
|
5049
|
+
"status": "deprecated",
|
5050
|
+
"a11y_reviewed": false,
|
5051
|
+
"short_name": "NavListHeading",
|
5052
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
5053
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/heading/default/",
|
4959
5054
|
"parameters": [
|
4960
5055
|
{
|
4961
|
-
"name": "
|
4962
|
-
"type": "
|
5056
|
+
"name": "title",
|
5057
|
+
"type": "String",
|
4963
5058
|
"default": "N/A",
|
4964
|
-
"description": "The
|
4965
|
-
}
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
4969
|
-
|
4970
|
-
|
4971
|
-
|
5059
|
+
"description": "The text content of the heading."
|
5060
|
+
},
|
5061
|
+
{
|
5062
|
+
"name": "id",
|
5063
|
+
"type": "String",
|
5064
|
+
"default": "`self.class.generate_id`",
|
5065
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
5066
|
+
},
|
5067
|
+
{
|
5068
|
+
"name": "heading_level",
|
5069
|
+
"type": "Integer",
|
5070
|
+
"default": "`2`",
|
5071
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
5072
|
+
},
|
4972
5073
|
{
|
4973
5074
|
"name": "system_arguments",
|
4974
5075
|
"type": "Hash",
|
4975
5076
|
"default": "N/A",
|
4976
|
-
"description": "
|
5077
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4977
5078
|
}
|
5079
|
+
],
|
5080
|
+
"slots": [
|
5081
|
+
|
5082
|
+
],
|
5083
|
+
"methods": [
|
5084
|
+
|
5085
|
+
],
|
5086
|
+
"previews": [
|
5087
|
+
|
5088
|
+
],
|
5089
|
+
"subcomponents": [
|
5090
|
+
|
4978
5091
|
]
|
4979
5092
|
},
|
4980
5093
|
{
|
4981
|
-
"
|
4982
|
-
"description": "
|
5094
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Divider",
|
5095
|
+
"description": "",
|
5096
|
+
"accessibility_docs": null,
|
5097
|
+
"is_form_component": false,
|
5098
|
+
"is_published": true,
|
5099
|
+
"requires_js": false,
|
5100
|
+
"component": "NavList::Divider",
|
5101
|
+
"status": "deprecated",
|
5102
|
+
"a11y_reviewed": false,
|
5103
|
+
"short_name": "NavListDivider",
|
5104
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
5105
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
4983
5106
|
"parameters": [
|
4984
5107
|
{
|
4985
|
-
"name": "
|
4986
|
-
"type": "
|
4987
|
-
"default": "`
|
4988
|
-
"description": "
|
5108
|
+
"name": "scheme",
|
5109
|
+
"type": "Symbol",
|
5110
|
+
"default": "`:subtle`",
|
5111
|
+
"description": "Display a background color if scheme is `filled`."
|
4989
5112
|
},
|
4990
5113
|
{
|
4991
5114
|
"name": "system_arguments",
|
4992
5115
|
"type": "Hash",
|
4993
5116
|
"default": "N/A",
|
4994
|
-
"description": "
|
5117
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4995
5118
|
}
|
5119
|
+
],
|
5120
|
+
"slots": [
|
5121
|
+
|
5122
|
+
],
|
5123
|
+
"methods": [
|
5124
|
+
|
5125
|
+
],
|
5126
|
+
"previews": [
|
5127
|
+
|
5128
|
+
],
|
5129
|
+
"subcomponents": [
|
5130
|
+
|
4996
5131
|
]
|
4997
5132
|
},
|
4998
5133
|
{
|
4999
|
-
"
|
5000
|
-
"description": "
|
5001
|
-
"parameters": [
|
5002
|
-
{
|
5003
|
-
"name": "src",
|
5004
|
-
"type": "String",
|
5005
|
-
"default": "N/A",
|
5006
|
-
"description": "The source url of the avatar image."
|
5007
|
-
},
|
5008
|
-
{
|
5009
|
-
"name": "username",
|
5010
|
-
"type": "String",
|
5011
|
-
"default": "N/A",
|
5012
|
-
"description": "The username associated with the avatar."
|
5013
|
-
},
|
5014
|
-
{
|
5015
|
-
"name": "full_name",
|
5016
|
-
"type": "String",
|
5017
|
-
"default": "`nil`",
|
5018
|
-
"description": "Optional. The user's full name."
|
5019
|
-
},
|
5020
|
-
{
|
5021
|
-
"name": "full_name_scheme",
|
5022
|
-
"type": "Symbol",
|
5023
|
-
"default": "`:block`",
|
5024
|
-
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
5025
|
-
},
|
5026
|
-
{
|
5027
|
-
"name": "component_klass",
|
5028
|
-
"type": "Class",
|
5029
|
-
"default": "`Primer::Alpha::NavList::Item`",
|
5030
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
5031
|
-
},
|
5032
|
-
{
|
5033
|
-
"name": "avatar_arguments",
|
5034
|
-
"type": "Hash",
|
5035
|
-
"default": "`{}`",
|
5036
|
-
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
5037
|
-
},
|
5038
|
-
{
|
5039
|
-
"name": "system_arguments",
|
5040
|
-
"type": "Hash",
|
5041
|
-
"default": "N/A",
|
5042
|
-
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
5043
|
-
}
|
5044
|
-
]
|
5045
|
-
},
|
5046
|
-
{
|
5047
|
-
"name": "render_outer_list?",
|
5048
|
-
"description": "Lists that contain top-level items (i.e. items outside of a group) should be wrapped in a <ul>",
|
5049
|
-
"parameters": [
|
5050
|
-
|
5051
|
-
]
|
5052
|
-
}
|
5053
|
-
],
|
5054
|
-
"previews": [
|
5055
|
-
{
|
5056
|
-
"preview_path": "primer/alpha/nav_list/playground",
|
5057
|
-
"name": "playground",
|
5058
|
-
"snapshot": "false",
|
5059
|
-
"skip_rules": {
|
5060
|
-
"wont_fix": [
|
5061
|
-
"region"
|
5062
|
-
],
|
5063
|
-
"will_fix": [
|
5064
|
-
"color-contrast"
|
5065
|
-
]
|
5066
|
-
}
|
5067
|
-
},
|
5068
|
-
{
|
5069
|
-
"preview_path": "primer/alpha/nav_list/default",
|
5070
|
-
"name": "default",
|
5071
|
-
"snapshot": "true",
|
5072
|
-
"skip_rules": {
|
5073
|
-
"wont_fix": [
|
5074
|
-
"region"
|
5075
|
-
],
|
5076
|
-
"will_fix": [
|
5077
|
-
"color-contrast"
|
5078
|
-
]
|
5079
|
-
}
|
5080
|
-
},
|
5081
|
-
{
|
5082
|
-
"preview_path": "primer/alpha/nav_list/top_level_items",
|
5083
|
-
"name": "top_level_items",
|
5084
|
-
"snapshot": "false",
|
5085
|
-
"skip_rules": {
|
5086
|
-
"wont_fix": [
|
5087
|
-
"region"
|
5088
|
-
],
|
5089
|
-
"will_fix": [
|
5090
|
-
"color-contrast"
|
5091
|
-
]
|
5092
|
-
}
|
5093
|
-
},
|
5094
|
-
{
|
5095
|
-
"preview_path": "primer/alpha/nav_list/show_more_item",
|
5096
|
-
"name": "show_more_item",
|
5097
|
-
"snapshot": "true",
|
5098
|
-
"skip_rules": {
|
5099
|
-
"wont_fix": [
|
5100
|
-
"region"
|
5101
|
-
],
|
5102
|
-
"will_fix": [
|
5103
|
-
"color-contrast"
|
5104
|
-
]
|
5105
|
-
}
|
5106
|
-
},
|
5107
|
-
{
|
5108
|
-
"preview_path": "primer/alpha/nav_list/trailing_action",
|
5109
|
-
"name": "trailing_action",
|
5110
|
-
"snapshot": "true",
|
5111
|
-
"skip_rules": {
|
5112
|
-
"wont_fix": [
|
5113
|
-
"region"
|
5114
|
-
],
|
5115
|
-
"will_fix": [
|
5116
|
-
"color-contrast"
|
5117
|
-
]
|
5118
|
-
}
|
5119
|
-
}
|
5120
|
-
],
|
5121
|
-
"subcomponents": [
|
5122
|
-
{
|
5123
|
-
"fully_qualified_name": "Primer::Alpha::NavList::Heading",
|
5124
|
-
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Alpha::NavList{{/link_to_component}} for usage examples.",
|
5134
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5135
|
+
"description": "",
|
5125
5136
|
"accessibility_docs": null,
|
5126
5137
|
"is_form_component": false,
|
5127
5138
|
"is_published": true,
|
5128
|
-
"requires_js":
|
5129
|
-
"component": "NavList::
|
5130
|
-
"status": "
|
5131
|
-
"a11y_reviewed":
|
5132
|
-
"short_name": "
|
5133
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5134
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5139
|
+
"requires_js": true,
|
5140
|
+
"component": "NavList::Group",
|
5141
|
+
"status": "deprecated",
|
5142
|
+
"a11y_reviewed": true,
|
5143
|
+
"short_name": "NavListGroup",
|
5144
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5145
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5135
5146
|
"parameters": [
|
5136
5147
|
{
|
5137
|
-
"name": "
|
5138
|
-
"type": "
|
5139
|
-
"default": "
|
5140
|
-
"description": "The
|
5141
|
-
},
|
5142
|
-
{
|
5143
|
-
"name": "id",
|
5144
|
-
"type": "String",
|
5145
|
-
"default": "`self.class.generate_id`",
|
5146
|
-
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
5147
|
-
},
|
5148
|
-
{
|
5149
|
-
"name": "heading_level",
|
5150
|
-
"type": "Integer",
|
5151
|
-
"default": "`2`",
|
5152
|
-
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
5148
|
+
"name": "selected_item_id",
|
5149
|
+
"type": "Symbol",
|
5150
|
+
"default": "`nil`",
|
5151
|
+
"description": "The ID of the currently selected item. Used internally."
|
5153
5152
|
},
|
5154
5153
|
{
|
5155
5154
|
"name": "system_arguments",
|
@@ -5159,37 +5158,63 @@
|
|
5159
5158
|
}
|
5160
5159
|
],
|
5161
5160
|
"slots": [
|
5162
|
-
|
5163
|
-
],
|
5164
|
-
"methods": [
|
5165
|
-
{
|
5166
|
-
"name": "title",
|
5167
|
-
"description": "Returns the value of attribute title.",
|
5168
|
-
"parameters": [
|
5169
|
-
|
5170
|
-
]
|
5171
|
-
},
|
5172
5161
|
{
|
5173
|
-
"name": "
|
5174
|
-
"description": "
|
5162
|
+
"name": "show_more_item",
|
5163
|
+
"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.",
|
5175
5164
|
"parameters": [
|
5176
|
-
|
5165
|
+
{
|
5166
|
+
"name": "src",
|
5167
|
+
"type": "String",
|
5168
|
+
"default": "N/A",
|
5169
|
+
"description": "The URL to query for additional pages of list items."
|
5170
|
+
},
|
5171
|
+
{
|
5172
|
+
"name": "pages",
|
5173
|
+
"type": "Integer",
|
5174
|
+
"default": "N/A",
|
5175
|
+
"description": "The total number of pages in the result set."
|
5176
|
+
},
|
5177
|
+
{
|
5178
|
+
"name": "component_klass",
|
5179
|
+
"type": "Class",
|
5180
|
+
"default": "N/A",
|
5181
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5182
|
+
},
|
5183
|
+
{
|
5184
|
+
"name": "system_arguments",
|
5185
|
+
"type": "Hash",
|
5186
|
+
"default": "N/A",
|
5187
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5188
|
+
}
|
5177
5189
|
]
|
5178
5190
|
},
|
5179
5191
|
{
|
5180
|
-
"name": "
|
5181
|
-
"description": "
|
5192
|
+
"name": "items",
|
5193
|
+
"description": "Items.",
|
5182
5194
|
"parameters": [
|
5183
|
-
|
5195
|
+
{
|
5196
|
+
"name": "system_arguments",
|
5197
|
+
"type": "Hash",
|
5198
|
+
"default": "N/A",
|
5199
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5200
|
+
}
|
5184
5201
|
]
|
5185
5202
|
},
|
5186
5203
|
{
|
5187
|
-
"name": "
|
5188
|
-
"description": "
|
5204
|
+
"name": "heading",
|
5205
|
+
"description": "Heading text rendered above the list of items.",
|
5189
5206
|
"parameters": [
|
5190
|
-
|
5207
|
+
{
|
5208
|
+
"name": "system_arguments",
|
5209
|
+
"type": "Hash",
|
5210
|
+
"default": "N/A",
|
5211
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5212
|
+
}
|
5191
5213
|
]
|
5192
5214
|
}
|
5215
|
+
],
|
5216
|
+
"methods": [
|
5217
|
+
|
5193
5218
|
],
|
5194
5219
|
"previews": [
|
5195
5220
|
|
@@ -5197,405 +5222,112 @@
|
|
5197
5222
|
"subcomponents": [
|
5198
5223
|
|
5199
5224
|
]
|
5225
|
+
}
|
5226
|
+
]
|
5227
|
+
},
|
5228
|
+
{
|
5229
|
+
"fully_qualified_name": "Primer::Alpha::Navigation::Tab",
|
5230
|
+
"description": "This component is part of navigation components such as `Primer::Alpha::TabNav`\nand `Primer::Alpha::UnderlineNav` and should not be used by itself.",
|
5231
|
+
"accessibility_docs": "`Tab` renders the selected anchor tab with `aria-current=\"page\"` by default.\n When the selected tab does not correspond to the current page, such as in a nested inner tab, make sure to use aria-current=\"true\"",
|
5232
|
+
"is_form_component": false,
|
5233
|
+
"is_published": true,
|
5234
|
+
"requires_js": false,
|
5235
|
+
"component": "Navigation::Tab",
|
5236
|
+
"status": "alpha",
|
5237
|
+
"a11y_reviewed": false,
|
5238
|
+
"short_name": "NavigationTab",
|
5239
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/navigation/tab.rb",
|
5240
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/navigation/tab/default/",
|
5241
|
+
"parameters": [
|
5242
|
+
{
|
5243
|
+
"name": "list",
|
5244
|
+
"type": "Boolean",
|
5245
|
+
"default": "`false`",
|
5246
|
+
"description": "Whether the Tab is an item in a `<ul>` list."
|
5200
5247
|
},
|
5201
5248
|
{
|
5202
|
-
"
|
5203
|
-
"
|
5204
|
-
"
|
5205
|
-
"
|
5206
|
-
|
5207
|
-
|
5208
|
-
"
|
5209
|
-
"
|
5210
|
-
"
|
5211
|
-
"
|
5212
|
-
|
5213
|
-
|
5214
|
-
"
|
5215
|
-
|
5216
|
-
|
5217
|
-
|
5218
|
-
|
5219
|
-
|
5220
|
-
|
5221
|
-
|
5222
|
-
|
5223
|
-
|
5224
|
-
|
5225
|
-
|
5226
|
-
|
5227
|
-
|
5228
|
-
|
5229
|
-
|
5230
|
-
|
5231
|
-
|
5232
|
-
|
5233
|
-
|
5234
|
-
|
5235
|
-
|
5236
|
-
|
5237
|
-
|
5238
|
-
|
5249
|
+
"name": "selected",
|
5250
|
+
"type": "Boolean",
|
5251
|
+
"default": "`false`",
|
5252
|
+
"description": "Whether the Tab is selected or not."
|
5253
|
+
},
|
5254
|
+
{
|
5255
|
+
"name": "with_panel",
|
5256
|
+
"type": "Boolean",
|
5257
|
+
"default": "`false`",
|
5258
|
+
"description": "Whether the Tab has an associated panel."
|
5259
|
+
},
|
5260
|
+
{
|
5261
|
+
"name": "panel_id",
|
5262
|
+
"type": "String",
|
5263
|
+
"default": "`\"\"`",
|
5264
|
+
"description": "Only applies if `with_panel` is `true`. Unique id of panel."
|
5265
|
+
},
|
5266
|
+
{
|
5267
|
+
"name": "icon_classes",
|
5268
|
+
"type": "Boolean",
|
5269
|
+
"default": "`\"\"`",
|
5270
|
+
"description": "Classes that must always be applied to icons."
|
5271
|
+
},
|
5272
|
+
{
|
5273
|
+
"name": "wrapper_arguments",
|
5274
|
+
"type": "Hash",
|
5275
|
+
"default": "`{}`",
|
5276
|
+
"description": "{{link_to_system_arguments_docs}} to be used in the `<li>` wrapper when the tab is an item in a list."
|
5277
|
+
},
|
5278
|
+
{
|
5279
|
+
"name": "system_arguments",
|
5280
|
+
"type": "Hash",
|
5281
|
+
"default": "N/A",
|
5282
|
+
"description": "{{link_to_system_arguments_docs}}"
|
5283
|
+
}
|
5284
|
+
],
|
5285
|
+
"slots": [
|
5286
|
+
{
|
5287
|
+
"name": "panel",
|
5288
|
+
"description": "Panel controlled by the Tab. This will not render anything in the tab itself.\nIt will provide a accessor for the Tab's parent to call and render the panel\ncontent in the appropriate place.\nRefer to `UnderlineNav` and `TabNav` implementations for examples.",
|
5289
|
+
"parameters": [
|
5239
5290
|
{
|
5240
5291
|
"name": "system_arguments",
|
5241
5292
|
"type": "Hash",
|
5242
5293
|
"default": "N/A",
|
5243
5294
|
"description": "{{link_to_system_arguments_docs}}"
|
5244
5295
|
}
|
5245
|
-
]
|
5246
|
-
|
5247
|
-
|
5248
|
-
|
5249
|
-
|
5250
|
-
|
5251
|
-
{
|
5252
|
-
"name": "system_arguments",
|
5253
|
-
"type": "Hash",
|
5254
|
-
"default": "N/A",
|
5255
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
5256
|
-
}
|
5257
|
-
]
|
5258
|
-
},
|
5259
|
-
{
|
5260
|
-
"name": "description",
|
5261
|
-
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
5262
|
-
"parameters": [
|
5263
|
-
|
5264
|
-
]
|
5265
|
-
},
|
5266
|
-
{
|
5267
|
-
"name": "leading_visual",
|
5268
|
-
"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.",
|
5269
|
-
"parameters": [
|
5270
|
-
|
5271
|
-
]
|
5272
|
-
},
|
5273
|
-
{
|
5274
|
-
"name": "trailing_visual",
|
5275
|
-
"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```",
|
5276
|
-
"parameters": [
|
5277
|
-
|
5278
|
-
]
|
5279
|
-
},
|
5280
|
-
{
|
5281
|
-
"name": "trailing_action",
|
5282
|
-
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
5283
|
-
"parameters": [
|
5284
|
-
{
|
5285
|
-
"name": "system_arguments",
|
5286
|
-
"type": "Hash",
|
5287
|
-
"default": "N/A",
|
5288
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
5289
|
-
}
|
5290
|
-
]
|
5291
|
-
},
|
5292
|
-
{
|
5293
|
-
"name": "tooltip",
|
5294
|
-
"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.",
|
5295
|
-
"parameters": [
|
5296
|
-
{
|
5297
|
-
"name": "type",
|
5298
|
-
"type": "Symbol",
|
5299
|
-
"default": "`:description`",
|
5300
|
-
"description": "One of `:description` or `:label`."
|
5301
|
-
},
|
5302
|
-
{
|
5303
|
-
"name": "system_arguments",
|
5304
|
-
"type": "Hash",
|
5305
|
-
"default": "N/A",
|
5306
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
5307
|
-
}
|
5308
|
-
]
|
5309
|
-
}
|
5310
|
-
],
|
5311
|
-
"methods": [
|
5312
|
-
{
|
5313
|
-
"name": "selected_by_ids",
|
5314
|
-
"description": "Returns the value of attribute selected_by_ids.",
|
5315
|
-
"parameters": [
|
5316
|
-
|
5317
|
-
]
|
5318
|
-
},
|
5319
|
-
{
|
5320
|
-
"name": "sub_item",
|
5321
|
-
"description": "Returns the value of attribute sub_item.",
|
5322
|
-
"parameters": [
|
5323
|
-
|
5324
|
-
]
|
5325
|
-
},
|
5326
|
-
{
|
5327
|
-
"name": "sub_item?",
|
5328
|
-
"description": "Returns the value of attribute sub_item.\nWhether or not this item is nested under a parent item.",
|
5329
|
-
"parameters": [
|
5330
|
-
|
5331
|
-
]
|
5332
|
-
},
|
5333
|
-
{
|
5334
|
-
"name": "expand!",
|
5335
|
-
"description": "Cause this item to show its list of sub items when rendered.",
|
5336
|
-
"parameters": [
|
5337
|
-
|
5338
|
-
]
|
5339
|
-
},
|
5296
|
+
]
|
5297
|
+
},
|
5298
|
+
{
|
5299
|
+
"name": "icon",
|
5300
|
+
"description": "Icon to be rendered in the Tab left.",
|
5301
|
+
"parameters": [
|
5340
5302
|
{
|
5341
|
-
"name": "
|
5342
|
-
"
|
5343
|
-
"
|
5344
|
-
|
5345
|
-
]
|
5303
|
+
"name": "kwargs",
|
5304
|
+
"type": "Hash",
|
5305
|
+
"default": "N/A",
|
5306
|
+
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
|
5346
5307
|
}
|
5347
|
-
],
|
5348
|
-
"previews": [
|
5349
|
-
|
5350
|
-
],
|
5351
|
-
"subcomponents": [
|
5352
|
-
|
5353
5308
|
]
|
5354
5309
|
},
|
5355
5310
|
{
|
5356
|
-
"
|
5357
|
-
"description": "
|
5358
|
-
"accessibility_docs": null,
|
5359
|
-
"is_form_component": false,
|
5360
|
-
"is_published": true,
|
5361
|
-
"requires_js": false,
|
5362
|
-
"component": "NavList::Divider",
|
5363
|
-
"status": "alpha",
|
5364
|
-
"a11y_reviewed": false,
|
5365
|
-
"short_name": "NavListDivider",
|
5366
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
5367
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
5311
|
+
"name": "text",
|
5312
|
+
"description": "The Tab's text.",
|
5368
5313
|
"parameters": [
|
5369
5314
|
{
|
5370
|
-
"name": "
|
5371
|
-
"type": "Symbol",
|
5372
|
-
"default": "`:subtle`",
|
5373
|
-
"description": "Display a background color if scheme is `filled`."
|
5374
|
-
},
|
5375
|
-
{
|
5376
|
-
"name": "system_arguments",
|
5315
|
+
"name": "kwargs",
|
5377
5316
|
"type": "Hash",
|
5378
5317
|
"default": "N/A",
|
5379
|
-
"description": "{{
|
5318
|
+
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Text{{/link_to_component}}."
|
5380
5319
|
}
|
5381
|
-
],
|
5382
|
-
"slots": [
|
5383
|
-
|
5384
|
-
],
|
5385
|
-
"methods": [
|
5386
|
-
|
5387
|
-
],
|
5388
|
-
"previews": [
|
5389
|
-
|
5390
|
-
],
|
5391
|
-
"subcomponents": [
|
5392
|
-
|
5393
5320
|
]
|
5394
5321
|
},
|
5395
5322
|
{
|
5396
|
-
"
|
5397
|
-
"description": "
|
5398
|
-
"accessibility_docs": null,
|
5399
|
-
"is_form_component": false,
|
5400
|
-
"is_published": true,
|
5401
|
-
"requires_js": true,
|
5402
|
-
"component": "NavList::Group",
|
5403
|
-
"status": "alpha",
|
5404
|
-
"a11y_reviewed": true,
|
5405
|
-
"short_name": "NavListGroup",
|
5406
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5407
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5323
|
+
"name": "counter",
|
5324
|
+
"description": "Counter to be rendered in the Tab right.",
|
5408
5325
|
"parameters": [
|
5409
5326
|
{
|
5410
|
-
"name": "
|
5411
|
-
"type": "Symbol",
|
5412
|
-
"default": "`nil`",
|
5413
|
-
"description": "The ID of the currently selected item. Used internally."
|
5414
|
-
},
|
5415
|
-
{
|
5416
|
-
"name": "system_arguments",
|
5327
|
+
"name": "kwargs",
|
5417
5328
|
"type": "Hash",
|
5418
5329
|
"default": "N/A",
|
5419
|
-
"description": "{{
|
5420
|
-
}
|
5421
|
-
],
|
5422
|
-
"slots": [
|
5423
|
-
{
|
5424
|
-
"name": "show_more_item",
|
5425
|
-
"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.",
|
5426
|
-
"parameters": [
|
5427
|
-
{
|
5428
|
-
"name": "src",
|
5429
|
-
"type": "String",
|
5430
|
-
"default": "N/A",
|
5431
|
-
"description": "The URL to query for additional pages of list items."
|
5432
|
-
},
|
5433
|
-
{
|
5434
|
-
"name": "pages",
|
5435
|
-
"type": "Integer",
|
5436
|
-
"default": "N/A",
|
5437
|
-
"description": "The total number of pages in the result set."
|
5438
|
-
},
|
5439
|
-
{
|
5440
|
-
"name": "component_klass",
|
5441
|
-
"type": "Class",
|
5442
|
-
"default": "N/A",
|
5443
|
-
"description": "A component class to use instead of the default `Primer::Alpha::NavList::Item` class."
|
5444
|
-
},
|
5445
|
-
{
|
5446
|
-
"name": "system_arguments",
|
5447
|
-
"type": "Hash",
|
5448
|
-
"default": "N/A",
|
5449
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}."
|
5450
|
-
}
|
5451
|
-
]
|
5452
|
-
},
|
5453
|
-
{
|
5454
|
-
"name": "items",
|
5455
|
-
"description": "Items.",
|
5456
|
-
"parameters": [
|
5457
|
-
{
|
5458
|
-
"name": "system_arguments",
|
5459
|
-
"type": "Hash",
|
5460
|
-
"default": "N/A",
|
5461
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}."
|
5462
|
-
}
|
5463
|
-
]
|
5464
|
-
},
|
5465
|
-
{
|
5466
|
-
"name": "heading",
|
5467
|
-
"description": "Heading text rendered above the list of items.",
|
5468
|
-
"parameters": [
|
5469
|
-
{
|
5470
|
-
"name": "system_arguments",
|
5471
|
-
"type": "Hash",
|
5472
|
-
"default": "N/A",
|
5473
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5474
|
-
}
|
5475
|
-
]
|
5476
|
-
}
|
5477
|
-
],
|
5478
|
-
"methods": [
|
5479
|
-
{
|
5480
|
-
"name": "expand!",
|
5481
|
-
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
5482
|
-
"parameters": [
|
5483
|
-
|
5484
|
-
]
|
5485
|
-
}
|
5486
|
-
],
|
5487
|
-
"previews": [
|
5488
|
-
|
5489
|
-
],
|
5490
|
-
"subcomponents": [
|
5491
|
-
|
5492
|
-
]
|
5493
|
-
}
|
5494
|
-
]
|
5495
|
-
},
|
5496
|
-
{
|
5497
|
-
"fully_qualified_name": "Primer::Alpha::Navigation::Tab",
|
5498
|
-
"description": "This component is part of navigation components such as `Primer::Alpha::TabNav`\nand `Primer::Alpha::UnderlineNav` and should not be used by itself.",
|
5499
|
-
"accessibility_docs": "`Tab` renders the selected anchor tab with `aria-current=\"page\"` by default.\n When the selected tab does not correspond to the current page, such as in a nested inner tab, make sure to use aria-current=\"true\"",
|
5500
|
-
"is_form_component": false,
|
5501
|
-
"is_published": true,
|
5502
|
-
"requires_js": false,
|
5503
|
-
"component": "Navigation::Tab",
|
5504
|
-
"status": "alpha",
|
5505
|
-
"a11y_reviewed": false,
|
5506
|
-
"short_name": "NavigationTab",
|
5507
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/navigation/tab.rb",
|
5508
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/navigation/tab/default/",
|
5509
|
-
"parameters": [
|
5510
|
-
{
|
5511
|
-
"name": "list",
|
5512
|
-
"type": "Boolean",
|
5513
|
-
"default": "`false`",
|
5514
|
-
"description": "Whether the Tab is an item in a `<ul>` list."
|
5515
|
-
},
|
5516
|
-
{
|
5517
|
-
"name": "selected",
|
5518
|
-
"type": "Boolean",
|
5519
|
-
"default": "`false`",
|
5520
|
-
"description": "Whether the Tab is selected or not."
|
5521
|
-
},
|
5522
|
-
{
|
5523
|
-
"name": "with_panel",
|
5524
|
-
"type": "Boolean",
|
5525
|
-
"default": "`false`",
|
5526
|
-
"description": "Whether the Tab has an associated panel."
|
5527
|
-
},
|
5528
|
-
{
|
5529
|
-
"name": "panel_id",
|
5530
|
-
"type": "String",
|
5531
|
-
"default": "`\"\"`",
|
5532
|
-
"description": "Only applies if `with_panel` is `true`. Unique id of panel."
|
5533
|
-
},
|
5534
|
-
{
|
5535
|
-
"name": "icon_classes",
|
5536
|
-
"type": "Boolean",
|
5537
|
-
"default": "`\"\"`",
|
5538
|
-
"description": "Classes that must always be applied to icons."
|
5539
|
-
},
|
5540
|
-
{
|
5541
|
-
"name": "wrapper_arguments",
|
5542
|
-
"type": "Hash",
|
5543
|
-
"default": "`{}`",
|
5544
|
-
"description": "{{link_to_system_arguments_docs}} to be used in the `<li>` wrapper when the tab is an item in a list."
|
5545
|
-
},
|
5546
|
-
{
|
5547
|
-
"name": "system_arguments",
|
5548
|
-
"type": "Hash",
|
5549
|
-
"default": "N/A",
|
5550
|
-
"description": "{{link_to_system_arguments_docs}}"
|
5551
|
-
}
|
5552
|
-
],
|
5553
|
-
"slots": [
|
5554
|
-
{
|
5555
|
-
"name": "panel",
|
5556
|
-
"description": "Panel controlled by the Tab. This will not render anything in the tab itself.\nIt will provide a accessor for the Tab's parent to call and render the panel\ncontent in the appropriate place.\nRefer to `UnderlineNav` and `TabNav` implementations for examples.",
|
5557
|
-
"parameters": [
|
5558
|
-
{
|
5559
|
-
"name": "system_arguments",
|
5560
|
-
"type": "Hash",
|
5561
|
-
"default": "N/A",
|
5562
|
-
"description": "{{link_to_system_arguments_docs}}"
|
5563
|
-
}
|
5564
|
-
]
|
5565
|
-
},
|
5566
|
-
{
|
5567
|
-
"name": "icon",
|
5568
|
-
"description": "Icon to be rendered in the Tab left.",
|
5569
|
-
"parameters": [
|
5570
|
-
{
|
5571
|
-
"name": "kwargs",
|
5572
|
-
"type": "Hash",
|
5573
|
-
"default": "N/A",
|
5574
|
-
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
|
5575
|
-
}
|
5576
|
-
]
|
5577
|
-
},
|
5578
|
-
{
|
5579
|
-
"name": "text",
|
5580
|
-
"description": "The Tab's text.",
|
5581
|
-
"parameters": [
|
5582
|
-
{
|
5583
|
-
"name": "kwargs",
|
5584
|
-
"type": "Hash",
|
5585
|
-
"default": "N/A",
|
5586
|
-
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Text{{/link_to_component}}."
|
5587
|
-
}
|
5588
|
-
]
|
5589
|
-
},
|
5590
|
-
{
|
5591
|
-
"name": "counter",
|
5592
|
-
"description": "Counter to be rendered in the Tab right.",
|
5593
|
-
"parameters": [
|
5594
|
-
{
|
5595
|
-
"name": "kwargs",
|
5596
|
-
"type": "Hash",
|
5597
|
-
"default": "N/A",
|
5598
|
-
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}."
|
5330
|
+
"description": "The same arguments as {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}."
|
5599
5331
|
}
|
5600
5332
|
]
|
5601
5333
|
}
|
@@ -6341,6 +6073,18 @@
|
|
6341
6073
|
"default": "N/A",
|
6342
6074
|
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
6343
6075
|
},
|
6076
|
+
{
|
6077
|
+
"name": "invalid",
|
6078
|
+
"type": "Boolean",
|
6079
|
+
"default": "N/A",
|
6080
|
+
"description": "If set to `true`, the input will be marked as invalid. Implied if `validation_message` is truthy. This option is set to `true` automatically if the model object associated with the form reports that the input is invalid via Rails validations. It is provided for cases where the form does not have an associated model. If the input is invalid as determined by Rails validations, setting `invalid` to `false` will have no effect."
|
6081
|
+
},
|
6082
|
+
{
|
6083
|
+
"name": "validation_message",
|
6084
|
+
"type": "String",
|
6085
|
+
"default": "N/A",
|
6086
|
+
"description": "A string displayed between the caption and the input indicating the input's contents are invalid. This option is, by default, set to the first Rails validation message for the input (assuming the form is associated with a model object). Use `validation_message` to override the default or to provide a validation message in case there is no associated model object."
|
6087
|
+
},
|
6344
6088
|
{
|
6345
6089
|
"name": "label_arguments",
|
6346
6090
|
"type": "Hash",
|
@@ -6398,6 +6142,19 @@
|
|
6398
6142
|
]
|
6399
6143
|
}
|
6400
6144
|
},
|
6145
|
+
{
|
6146
|
+
"preview_path": "primer/alpha/radio_button_group/invalid",
|
6147
|
+
"name": "invalid",
|
6148
|
+
"snapshot": "true",
|
6149
|
+
"skip_rules": {
|
6150
|
+
"wont_fix": [
|
6151
|
+
"region"
|
6152
|
+
],
|
6153
|
+
"will_fix": [
|
6154
|
+
"color-contrast"
|
6155
|
+
]
|
6156
|
+
}
|
6157
|
+
},
|
6401
6158
|
{
|
6402
6159
|
"preview_path": "primer/alpha/radio_button_group/with_caption",
|
6403
6160
|
"name": "with_caption",
|
@@ -8395,7 +8152,13 @@
|
|
8395
8152
|
|
8396
8153
|
],
|
8397
8154
|
"methods": [
|
8155
|
+
{
|
8156
|
+
"name": "id",
|
8157
|
+
"description": "Returns the value of attribute id.",
|
8158
|
+
"parameters": [
|
8398
8159
|
|
8160
|
+
]
|
8161
|
+
}
|
8399
8162
|
],
|
8400
8163
|
"previews": [
|
8401
8164
|
{
|
@@ -12334,6 +12097,656 @@
|
|
12334
12097
|
|
12335
12098
|
]
|
12336
12099
|
},
|
12100
|
+
{
|
12101
|
+
"fully_qualified_name": "Primer::Beta::NavList",
|
12102
|
+
"description": "`NavList` provides a simple way to render side navigation, i.e. navigation\nthat appears to the left or right side of some main content. Each group in a\nnav list is a list of links.\n\nNav list groups can contain sub items. Rather than navigating to a URL, groups\nwith sub items expand and collapse on click. To indicate this functionality, the\ngroup will automatically render with a trailing chevron icon that changes direction\nwhen the group expands and collapses.\n\nNav list items appear visually active when selected. Each nav item must have one\nor more ID values that determine which item will appear selected. Use the\n`selected_item_id` argument to select the appropriate item.",
|
12103
|
+
"accessibility_docs": null,
|
12104
|
+
"is_form_component": false,
|
12105
|
+
"is_published": true,
|
12106
|
+
"requires_js": true,
|
12107
|
+
"component": "NavList",
|
12108
|
+
"status": "beta",
|
12109
|
+
"a11y_reviewed": true,
|
12110
|
+
"short_name": "NavList",
|
12111
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list.rb",
|
12112
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/default/",
|
12113
|
+
"parameters": [
|
12114
|
+
{
|
12115
|
+
"name": "selected_item_id",
|
12116
|
+
"type": "Symbol",
|
12117
|
+
"default": "`nil`",
|
12118
|
+
"description": "The ID of the currently selected item. The default is `nil`, meaning no item is selected."
|
12119
|
+
},
|
12120
|
+
{
|
12121
|
+
"name": "system_arguments",
|
12122
|
+
"type": "Hash",
|
12123
|
+
"default": "N/A",
|
12124
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12125
|
+
}
|
12126
|
+
],
|
12127
|
+
"slots": [
|
12128
|
+
{
|
12129
|
+
"name": "heading",
|
12130
|
+
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Heading{{/link_to_component}}.",
|
12131
|
+
"parameters": [
|
12132
|
+
|
12133
|
+
]
|
12134
|
+
},
|
12135
|
+
{
|
12136
|
+
"name": "items",
|
12137
|
+
"description": "Items. Items can be individual items, dividers, or groups. See the documentation for `#with_item`, `#with_divider`, and `#with_group` respectively for more information.",
|
12138
|
+
"parameters": [
|
12139
|
+
|
12140
|
+
]
|
12141
|
+
}
|
12142
|
+
],
|
12143
|
+
"methods": [
|
12144
|
+
{
|
12145
|
+
"name": "with_item",
|
12146
|
+
"description": "Adds an item to the list.",
|
12147
|
+
"parameters": [
|
12148
|
+
{
|
12149
|
+
"name": "component_klass",
|
12150
|
+
"type": "Class",
|
12151
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12152
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12153
|
+
},
|
12154
|
+
{
|
12155
|
+
"name": "system_arguments",
|
12156
|
+
"type": "Hash",
|
12157
|
+
"default": "N/A",
|
12158
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
12159
|
+
}
|
12160
|
+
]
|
12161
|
+
},
|
12162
|
+
{
|
12163
|
+
"name": "with_avatar_item",
|
12164
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
12165
|
+
"parameters": [
|
12166
|
+
{
|
12167
|
+
"name": "src",
|
12168
|
+
"type": "String",
|
12169
|
+
"default": "N/A",
|
12170
|
+
"description": "The source url of the avatar image."
|
12171
|
+
},
|
12172
|
+
{
|
12173
|
+
"name": "username",
|
12174
|
+
"type": "String",
|
12175
|
+
"default": "N/A",
|
12176
|
+
"description": "The username associated with the avatar."
|
12177
|
+
},
|
12178
|
+
{
|
12179
|
+
"name": "full_name",
|
12180
|
+
"type": "String",
|
12181
|
+
"default": "`nil`",
|
12182
|
+
"description": "Optional. The user's full name."
|
12183
|
+
},
|
12184
|
+
{
|
12185
|
+
"name": "full_name_scheme",
|
12186
|
+
"type": "Symbol",
|
12187
|
+
"default": "`:block`",
|
12188
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
12189
|
+
},
|
12190
|
+
{
|
12191
|
+
"name": "component_klass",
|
12192
|
+
"type": "Class",
|
12193
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12194
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12195
|
+
},
|
12196
|
+
{
|
12197
|
+
"name": "avatar_arguments",
|
12198
|
+
"type": "Hash",
|
12199
|
+
"default": "`{}`",
|
12200
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
12201
|
+
},
|
12202
|
+
{
|
12203
|
+
"name": "system_arguments",
|
12204
|
+
"type": "Hash",
|
12205
|
+
"default": "N/A",
|
12206
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
12207
|
+
}
|
12208
|
+
]
|
12209
|
+
},
|
12210
|
+
{
|
12211
|
+
"name": "with_group",
|
12212
|
+
"description": "Adds a group to the list. A group is a list of links and a (required) heading.",
|
12213
|
+
"parameters": [
|
12214
|
+
{
|
12215
|
+
"name": "system_arguments",
|
12216
|
+
"type": "Hash",
|
12217
|
+
"default": "N/A",
|
12218
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Group{{/link_to_component}}."
|
12219
|
+
}
|
12220
|
+
]
|
12221
|
+
},
|
12222
|
+
{
|
12223
|
+
"name": "with_divider",
|
12224
|
+
"description": "Adds a divider to the list. Dividers visually separate items and groups.",
|
12225
|
+
"parameters": [
|
12226
|
+
{
|
12227
|
+
"name": "system_arguments",
|
12228
|
+
"type": "Hash",
|
12229
|
+
"default": "N/A",
|
12230
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Divider{{/link_to_component}}."
|
12231
|
+
}
|
12232
|
+
]
|
12233
|
+
},
|
12234
|
+
{
|
12235
|
+
"name": "build_item",
|
12236
|
+
"description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.",
|
12237
|
+
"parameters": [
|
12238
|
+
{
|
12239
|
+
"name": "component_klass",
|
12240
|
+
"type": "Class",
|
12241
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12242
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12243
|
+
},
|
12244
|
+
{
|
12245
|
+
"name": "system_arguments",
|
12246
|
+
"type": "Hash",
|
12247
|
+
"default": "N/A",
|
12248
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
12249
|
+
}
|
12250
|
+
]
|
12251
|
+
},
|
12252
|
+
{
|
12253
|
+
"name": "build_avatar_item",
|
12254
|
+
"description": "Builds a new avatar item but does not add it to the list. Avatar items\nare a convenient way to accessibly add an item with a leading avatar\nimage. Use this method instead of the `#with_avatar_item` slot if you\nneed to render an avatar item outside the context of a list, eg. if\nrendering additional items to append to an existing list, perhaps via\na separate HTTP request.",
|
12255
|
+
"parameters": [
|
12256
|
+
{
|
12257
|
+
"name": "src",
|
12258
|
+
"type": "String",
|
12259
|
+
"default": "N/A",
|
12260
|
+
"description": "The source url of the avatar image."
|
12261
|
+
},
|
12262
|
+
{
|
12263
|
+
"name": "username",
|
12264
|
+
"type": "String",
|
12265
|
+
"default": "N/A",
|
12266
|
+
"description": "The username associated with the avatar."
|
12267
|
+
},
|
12268
|
+
{
|
12269
|
+
"name": "full_name",
|
12270
|
+
"type": "String",
|
12271
|
+
"default": "`nil`",
|
12272
|
+
"description": "Optional. The user's full name."
|
12273
|
+
},
|
12274
|
+
{
|
12275
|
+
"name": "full_name_scheme",
|
12276
|
+
"type": "Symbol",
|
12277
|
+
"default": "`:block`",
|
12278
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
12279
|
+
},
|
12280
|
+
{
|
12281
|
+
"name": "component_klass",
|
12282
|
+
"type": "Class",
|
12283
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12284
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12285
|
+
},
|
12286
|
+
{
|
12287
|
+
"name": "avatar_arguments",
|
12288
|
+
"type": "Hash",
|
12289
|
+
"default": "`{}`",
|
12290
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
12291
|
+
},
|
12292
|
+
{
|
12293
|
+
"name": "system_arguments",
|
12294
|
+
"type": "Hash",
|
12295
|
+
"default": "N/A",
|
12296
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
12297
|
+
}
|
12298
|
+
]
|
12299
|
+
},
|
12300
|
+
{
|
12301
|
+
"name": "render_outer_list?",
|
12302
|
+
"description": "Lists that contain top-level items (i.e. items outside of a group) should be wrapped in a <ul>",
|
12303
|
+
"parameters": [
|
12304
|
+
|
12305
|
+
]
|
12306
|
+
}
|
12307
|
+
],
|
12308
|
+
"previews": [
|
12309
|
+
{
|
12310
|
+
"preview_path": "primer/beta/nav_list/playground",
|
12311
|
+
"name": "playground",
|
12312
|
+
"snapshot": "false",
|
12313
|
+
"skip_rules": {
|
12314
|
+
"wont_fix": [
|
12315
|
+
"region"
|
12316
|
+
],
|
12317
|
+
"will_fix": [
|
12318
|
+
"color-contrast"
|
12319
|
+
]
|
12320
|
+
}
|
12321
|
+
},
|
12322
|
+
{
|
12323
|
+
"preview_path": "primer/beta/nav_list/default",
|
12324
|
+
"name": "default",
|
12325
|
+
"snapshot": "true",
|
12326
|
+
"skip_rules": {
|
12327
|
+
"wont_fix": [
|
12328
|
+
"region"
|
12329
|
+
],
|
12330
|
+
"will_fix": [
|
12331
|
+
"color-contrast"
|
12332
|
+
]
|
12333
|
+
}
|
12334
|
+
},
|
12335
|
+
{
|
12336
|
+
"preview_path": "primer/beta/nav_list/top_level_items",
|
12337
|
+
"name": "top_level_items",
|
12338
|
+
"snapshot": "false",
|
12339
|
+
"skip_rules": {
|
12340
|
+
"wont_fix": [
|
12341
|
+
"region"
|
12342
|
+
],
|
12343
|
+
"will_fix": [
|
12344
|
+
"color-contrast"
|
12345
|
+
]
|
12346
|
+
}
|
12347
|
+
},
|
12348
|
+
{
|
12349
|
+
"preview_path": "primer/beta/nav_list/show_more_item",
|
12350
|
+
"name": "show_more_item",
|
12351
|
+
"snapshot": "true",
|
12352
|
+
"skip_rules": {
|
12353
|
+
"wont_fix": [
|
12354
|
+
"region"
|
12355
|
+
],
|
12356
|
+
"will_fix": [
|
12357
|
+
"color-contrast"
|
12358
|
+
]
|
12359
|
+
}
|
12360
|
+
},
|
12361
|
+
{
|
12362
|
+
"preview_path": "primer/beta/nav_list/trailing_action",
|
12363
|
+
"name": "trailing_action",
|
12364
|
+
"snapshot": "true",
|
12365
|
+
"skip_rules": {
|
12366
|
+
"wont_fix": [
|
12367
|
+
"region"
|
12368
|
+
],
|
12369
|
+
"will_fix": [
|
12370
|
+
"color-contrast"
|
12371
|
+
]
|
12372
|
+
}
|
12373
|
+
}
|
12374
|
+
],
|
12375
|
+
"subcomponents": [
|
12376
|
+
{
|
12377
|
+
"fully_qualified_name": "Primer::Beta::NavList::Heading",
|
12378
|
+
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
12379
|
+
"accessibility_docs": null,
|
12380
|
+
"is_form_component": false,
|
12381
|
+
"is_published": true,
|
12382
|
+
"requires_js": false,
|
12383
|
+
"component": "NavList::Heading",
|
12384
|
+
"status": "alpha",
|
12385
|
+
"a11y_reviewed": false,
|
12386
|
+
"short_name": "NavListHeading",
|
12387
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/heading.rb",
|
12388
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/heading/default/",
|
12389
|
+
"parameters": [
|
12390
|
+
{
|
12391
|
+
"name": "title",
|
12392
|
+
"type": "String",
|
12393
|
+
"default": "N/A",
|
12394
|
+
"description": "The text content of the heading."
|
12395
|
+
},
|
12396
|
+
{
|
12397
|
+
"name": "id",
|
12398
|
+
"type": "String",
|
12399
|
+
"default": "`self.class.generate_id`",
|
12400
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
12401
|
+
},
|
12402
|
+
{
|
12403
|
+
"name": "heading_level",
|
12404
|
+
"type": "Integer",
|
12405
|
+
"default": "`2`",
|
12406
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
12407
|
+
},
|
12408
|
+
{
|
12409
|
+
"name": "system_arguments",
|
12410
|
+
"type": "Hash",
|
12411
|
+
"default": "N/A",
|
12412
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12413
|
+
}
|
12414
|
+
],
|
12415
|
+
"slots": [
|
12416
|
+
|
12417
|
+
],
|
12418
|
+
"methods": [
|
12419
|
+
{
|
12420
|
+
"name": "title",
|
12421
|
+
"description": "Returns the value of attribute title.",
|
12422
|
+
"parameters": [
|
12423
|
+
|
12424
|
+
]
|
12425
|
+
},
|
12426
|
+
{
|
12427
|
+
"name": "id",
|
12428
|
+
"description": "Returns the value of attribute id.",
|
12429
|
+
"parameters": [
|
12430
|
+
|
12431
|
+
]
|
12432
|
+
},
|
12433
|
+
{
|
12434
|
+
"name": "heading_level",
|
12435
|
+
"description": "Returns the value of attribute heading_level.",
|
12436
|
+
"parameters": [
|
12437
|
+
|
12438
|
+
]
|
12439
|
+
},
|
12440
|
+
{
|
12441
|
+
"name": "system_arguments",
|
12442
|
+
"description": "Returns the value of attribute system_arguments.",
|
12443
|
+
"parameters": [
|
12444
|
+
|
12445
|
+
]
|
12446
|
+
}
|
12447
|
+
],
|
12448
|
+
"previews": [
|
12449
|
+
|
12450
|
+
],
|
12451
|
+
"subcomponents": [
|
12452
|
+
|
12453
|
+
]
|
12454
|
+
},
|
12455
|
+
{
|
12456
|
+
"fully_qualified_name": "Primer::Beta::NavList::Item",
|
12457
|
+
"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.",
|
12458
|
+
"accessibility_docs": null,
|
12459
|
+
"is_form_component": false,
|
12460
|
+
"is_published": true,
|
12461
|
+
"requires_js": true,
|
12462
|
+
"component": "NavList::Item",
|
12463
|
+
"status": "alpha",
|
12464
|
+
"a11y_reviewed": false,
|
12465
|
+
"short_name": "NavListItem",
|
12466
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/item.rb",
|
12467
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/item/default/",
|
12468
|
+
"parameters": [
|
12469
|
+
{
|
12470
|
+
"name": "selected_item_id",
|
12471
|
+
"type": "Symbol",
|
12472
|
+
"default": "`nil`",
|
12473
|
+
"description": "The ID of the currently selected list item. Used internally."
|
12474
|
+
},
|
12475
|
+
{
|
12476
|
+
"name": "selected_by_ids",
|
12477
|
+
"type": "Array<Symbol>",
|
12478
|
+
"default": "`[]`",
|
12479
|
+
"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."
|
12480
|
+
},
|
12481
|
+
{
|
12482
|
+
"name": "expanded",
|
12483
|
+
"type": "Boolean",
|
12484
|
+
"default": "`false`",
|
12485
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
12486
|
+
},
|
12487
|
+
{
|
12488
|
+
"name": "sub_item",
|
12489
|
+
"type": "Boolean",
|
12490
|
+
"default": "`false`",
|
12491
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
12492
|
+
},
|
12493
|
+
{
|
12494
|
+
"name": "system_arguments",
|
12495
|
+
"type": "Hash",
|
12496
|
+
"default": "N/A",
|
12497
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12498
|
+
}
|
12499
|
+
],
|
12500
|
+
"slots": [
|
12501
|
+
{
|
12502
|
+
"name": "items",
|
12503
|
+
"description": null,
|
12504
|
+
"parameters": [
|
12505
|
+
{
|
12506
|
+
"name": "system_arguments",
|
12507
|
+
"type": "Hash",
|
12508
|
+
"default": "N/A",
|
12509
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
12510
|
+
}
|
12511
|
+
]
|
12512
|
+
},
|
12513
|
+
{
|
12514
|
+
"name": "description",
|
12515
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
12516
|
+
"parameters": [
|
12517
|
+
|
12518
|
+
]
|
12519
|
+
},
|
12520
|
+
{
|
12521
|
+
"name": "leading_visual",
|
12522
|
+
"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.",
|
12523
|
+
"parameters": [
|
12524
|
+
|
12525
|
+
]
|
12526
|
+
},
|
12527
|
+
{
|
12528
|
+
"name": "trailing_visual",
|
12529
|
+
"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```",
|
12530
|
+
"parameters": [
|
12531
|
+
|
12532
|
+
]
|
12533
|
+
},
|
12534
|
+
{
|
12535
|
+
"name": "trailing_action",
|
12536
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
12537
|
+
"parameters": [
|
12538
|
+
{
|
12539
|
+
"name": "system_arguments",
|
12540
|
+
"type": "Hash",
|
12541
|
+
"default": "N/A",
|
12542
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
12543
|
+
}
|
12544
|
+
]
|
12545
|
+
},
|
12546
|
+
{
|
12547
|
+
"name": "tooltip",
|
12548
|
+
"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.",
|
12549
|
+
"parameters": [
|
12550
|
+
{
|
12551
|
+
"name": "type",
|
12552
|
+
"type": "Symbol",
|
12553
|
+
"default": "`:description`",
|
12554
|
+
"description": "One of `:description` or `:label`."
|
12555
|
+
},
|
12556
|
+
{
|
12557
|
+
"name": "system_arguments",
|
12558
|
+
"type": "Hash",
|
12559
|
+
"default": "N/A",
|
12560
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
12561
|
+
}
|
12562
|
+
]
|
12563
|
+
}
|
12564
|
+
],
|
12565
|
+
"methods": [
|
12566
|
+
{
|
12567
|
+
"name": "selected_by_ids",
|
12568
|
+
"description": "Returns the value of attribute selected_by_ids.",
|
12569
|
+
"parameters": [
|
12570
|
+
|
12571
|
+
]
|
12572
|
+
},
|
12573
|
+
{
|
12574
|
+
"name": "sub_item",
|
12575
|
+
"description": "Returns the value of attribute sub_item.",
|
12576
|
+
"parameters": [
|
12577
|
+
|
12578
|
+
]
|
12579
|
+
},
|
12580
|
+
{
|
12581
|
+
"name": "sub_item?",
|
12582
|
+
"description": "Returns the value of attribute sub_item.\nWhether or not this item is nested under a parent item.",
|
12583
|
+
"parameters": [
|
12584
|
+
|
12585
|
+
]
|
12586
|
+
},
|
12587
|
+
{
|
12588
|
+
"name": "expand!",
|
12589
|
+
"description": "Cause this item to show its list of sub items when rendered.",
|
12590
|
+
"parameters": [
|
12591
|
+
|
12592
|
+
]
|
12593
|
+
},
|
12594
|
+
{
|
12595
|
+
"name": "item_active?",
|
12596
|
+
"description": "Normally it would be easier to simply ask each item for its active status, eg.\nitems.any?(&:active?), but unfortunately the view context is not set on each\nitem until _after_ the parent's before_render, etc methods have been called.\nThis means helper methods like current_page? will blow up with an error, since\n`helpers` is simply an alias for the view context (i.e. an instance of\nActionView::Base). Since we know the view context for the parent object must\nbe set before `before_render` is invoked, we can call helper methods here in\nthe parent and bypass the problem entirely. Maybe not the most OO approach,\nbut it works.",
|
12597
|
+
"parameters": [
|
12598
|
+
|
12599
|
+
]
|
12600
|
+
}
|
12601
|
+
],
|
12602
|
+
"previews": [
|
12603
|
+
|
12604
|
+
],
|
12605
|
+
"subcomponents": [
|
12606
|
+
|
12607
|
+
]
|
12608
|
+
},
|
12609
|
+
{
|
12610
|
+
"fully_qualified_name": "Primer::Beta::NavList::Divider",
|
12611
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
12612
|
+
"accessibility_docs": null,
|
12613
|
+
"is_form_component": false,
|
12614
|
+
"is_published": true,
|
12615
|
+
"requires_js": false,
|
12616
|
+
"component": "NavList::Divider",
|
12617
|
+
"status": "alpha",
|
12618
|
+
"a11y_reviewed": false,
|
12619
|
+
"short_name": "NavListDivider",
|
12620
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
12621
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
12622
|
+
"parameters": [
|
12623
|
+
{
|
12624
|
+
"name": "scheme",
|
12625
|
+
"type": "Symbol",
|
12626
|
+
"default": "`:subtle`",
|
12627
|
+
"description": "Display a background color if scheme is `filled`."
|
12628
|
+
},
|
12629
|
+
{
|
12630
|
+
"name": "system_arguments",
|
12631
|
+
"type": "Hash",
|
12632
|
+
"default": "N/A",
|
12633
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12634
|
+
}
|
12635
|
+
],
|
12636
|
+
"slots": [
|
12637
|
+
|
12638
|
+
],
|
12639
|
+
"methods": [
|
12640
|
+
|
12641
|
+
],
|
12642
|
+
"previews": [
|
12643
|
+
|
12644
|
+
],
|
12645
|
+
"subcomponents": [
|
12646
|
+
|
12647
|
+
]
|
12648
|
+
},
|
12649
|
+
{
|
12650
|
+
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
12651
|
+
"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.",
|
12652
|
+
"accessibility_docs": null,
|
12653
|
+
"is_form_component": false,
|
12654
|
+
"is_published": true,
|
12655
|
+
"requires_js": true,
|
12656
|
+
"component": "NavList::Group",
|
12657
|
+
"status": "alpha",
|
12658
|
+
"a11y_reviewed": true,
|
12659
|
+
"short_name": "NavListGroup",
|
12660
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
12661
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
12662
|
+
"parameters": [
|
12663
|
+
{
|
12664
|
+
"name": "selected_item_id",
|
12665
|
+
"type": "Symbol",
|
12666
|
+
"default": "`nil`",
|
12667
|
+
"description": "The ID of the currently selected item. Used internally."
|
12668
|
+
},
|
12669
|
+
{
|
12670
|
+
"name": "system_arguments",
|
12671
|
+
"type": "Hash",
|
12672
|
+
"default": "N/A",
|
12673
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12674
|
+
}
|
12675
|
+
],
|
12676
|
+
"slots": [
|
12677
|
+
{
|
12678
|
+
"name": "show_more_item",
|
12679
|
+
"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.",
|
12680
|
+
"parameters": [
|
12681
|
+
{
|
12682
|
+
"name": "src",
|
12683
|
+
"type": "String",
|
12684
|
+
"default": "N/A",
|
12685
|
+
"description": "The URL to query for additional pages of list items."
|
12686
|
+
},
|
12687
|
+
{
|
12688
|
+
"name": "pages",
|
12689
|
+
"type": "Integer",
|
12690
|
+
"default": "N/A",
|
12691
|
+
"description": "The total number of pages in the result set."
|
12692
|
+
},
|
12693
|
+
{
|
12694
|
+
"name": "component_klass",
|
12695
|
+
"type": "Class",
|
12696
|
+
"default": "N/A",
|
12697
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
12698
|
+
},
|
12699
|
+
{
|
12700
|
+
"name": "system_arguments",
|
12701
|
+
"type": "Hash",
|
12702
|
+
"default": "N/A",
|
12703
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12704
|
+
}
|
12705
|
+
]
|
12706
|
+
},
|
12707
|
+
{
|
12708
|
+
"name": "items",
|
12709
|
+
"description": "Items.",
|
12710
|
+
"parameters": [
|
12711
|
+
{
|
12712
|
+
"name": "system_arguments",
|
12713
|
+
"type": "Hash",
|
12714
|
+
"default": "N/A",
|
12715
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12716
|
+
}
|
12717
|
+
]
|
12718
|
+
},
|
12719
|
+
{
|
12720
|
+
"name": "heading",
|
12721
|
+
"description": "Heading text rendered above the list of items.",
|
12722
|
+
"parameters": [
|
12723
|
+
{
|
12724
|
+
"name": "system_arguments",
|
12725
|
+
"type": "Hash",
|
12726
|
+
"default": "N/A",
|
12727
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
12728
|
+
}
|
12729
|
+
]
|
12730
|
+
}
|
12731
|
+
],
|
12732
|
+
"methods": [
|
12733
|
+
{
|
12734
|
+
"name": "expand!",
|
12735
|
+
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
12736
|
+
"parameters": [
|
12737
|
+
|
12738
|
+
]
|
12739
|
+
}
|
12740
|
+
],
|
12741
|
+
"previews": [
|
12742
|
+
|
12743
|
+
],
|
12744
|
+
"subcomponents": [
|
12745
|
+
|
12746
|
+
]
|
12747
|
+
}
|
12748
|
+
]
|
12749
|
+
},
|
12337
12750
|
{
|
12338
12751
|
"fully_qualified_name": "Primer::Beta::Octicon",
|
12339
12752
|
"description": "`Octicon` renders an {{link_to_octicons}} with {{link_to_system_arguments_docs}}.\n`Octicon` can also be rendered with the `primer_octicon` helper, which accepts the same arguments.",
|