@primer/view-components 0.10.0-rc.8b3b0f36 → 0.10.0-rc.a91a254c
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/components/primer/alpha/action_menu/action_menu_element.js +2 -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 +1 -1
- package/static/arguments.json +169 -5
- package/static/audited_at.json +5 -0
- package/static/constants.json +14 -0
- package/static/info_arch.json +1201 -794
- 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
@@ -732,6 +732,146 @@
|
|
732
732
|
}
|
733
733
|
],
|
734
734
|
"subcomponents": [
|
735
|
+
{
|
736
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
737
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
738
|
+
"accessibility_docs": null,
|
739
|
+
"is_form_component": false,
|
740
|
+
"is_published": true,
|
741
|
+
"requires_js": false,
|
742
|
+
"component": "ActionList::Divider",
|
743
|
+
"status": "alpha",
|
744
|
+
"a11y_reviewed": false,
|
745
|
+
"short_name": "ActionListDivider",
|
746
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
747
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
748
|
+
"parameters": [
|
749
|
+
{
|
750
|
+
"name": "scheme",
|
751
|
+
"type": "Symbol",
|
752
|
+
"default": "`:subtle`",
|
753
|
+
"description": "Display a background color if scheme is `filled`."
|
754
|
+
},
|
755
|
+
{
|
756
|
+
"name": "system_arguments",
|
757
|
+
"type": "Hash",
|
758
|
+
"default": "N/A",
|
759
|
+
"description": "{{link_to_system_arguments_docs}}"
|
760
|
+
}
|
761
|
+
],
|
762
|
+
"slots": [
|
763
|
+
|
764
|
+
],
|
765
|
+
"methods": [
|
766
|
+
|
767
|
+
],
|
768
|
+
"previews": [
|
769
|
+
|
770
|
+
],
|
771
|
+
"subcomponents": [
|
772
|
+
|
773
|
+
]
|
774
|
+
},
|
775
|
+
{
|
776
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::Heading",
|
777
|
+
"description": "Heading used to describe each sub list within an action list.",
|
778
|
+
"accessibility_docs": null,
|
779
|
+
"is_form_component": false,
|
780
|
+
"is_published": true,
|
781
|
+
"requires_js": false,
|
782
|
+
"component": "ActionList::Heading",
|
783
|
+
"status": "alpha",
|
784
|
+
"a11y_reviewed": false,
|
785
|
+
"short_name": "ActionListHeading",
|
786
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
|
787
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
|
788
|
+
"parameters": [
|
789
|
+
{
|
790
|
+
"name": "title",
|
791
|
+
"type": "String",
|
792
|
+
"default": "N/A",
|
793
|
+
"description": "Sub list title."
|
794
|
+
},
|
795
|
+
{
|
796
|
+
"name": "heading_level",
|
797
|
+
"type": "Integer",
|
798
|
+
"default": "`3`",
|
799
|
+
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
|
800
|
+
},
|
801
|
+
{
|
802
|
+
"name": "subtitle",
|
803
|
+
"type": "String",
|
804
|
+
"default": "`nil`",
|
805
|
+
"description": "Optional sub list description."
|
806
|
+
},
|
807
|
+
{
|
808
|
+
"name": "scheme",
|
809
|
+
"type": "Symbol",
|
810
|
+
"default": "`:subtle`",
|
811
|
+
"description": "Display a background color if scheme is `filled`."
|
812
|
+
},
|
813
|
+
{
|
814
|
+
"name": "system_arguments",
|
815
|
+
"type": "Hash",
|
816
|
+
"default": "N/A",
|
817
|
+
"description": "{{link_to_system_arguments_docs}}"
|
818
|
+
}
|
819
|
+
],
|
820
|
+
"slots": [
|
821
|
+
|
822
|
+
],
|
823
|
+
"methods": [
|
824
|
+
{
|
825
|
+
"name": "title_id",
|
826
|
+
"description": "Returns the value of attribute title_id.",
|
827
|
+
"parameters": [
|
828
|
+
|
829
|
+
]
|
830
|
+
},
|
831
|
+
{
|
832
|
+
"name": "subtitle_id",
|
833
|
+
"description": "Returns the value of attribute subtitle_id.",
|
834
|
+
"parameters": [
|
835
|
+
|
836
|
+
]
|
837
|
+
}
|
838
|
+
],
|
839
|
+
"previews": [
|
840
|
+
|
841
|
+
],
|
842
|
+
"subcomponents": [
|
843
|
+
|
844
|
+
]
|
845
|
+
},
|
846
|
+
{
|
847
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
848
|
+
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
849
|
+
"accessibility_docs": null,
|
850
|
+
"is_form_component": false,
|
851
|
+
"is_published": true,
|
852
|
+
"requires_js": false,
|
853
|
+
"component": "ActionList::FormWrapper",
|
854
|
+
"status": "alpha",
|
855
|
+
"a11y_reviewed": false,
|
856
|
+
"short_name": "ActionListFormWrapper",
|
857
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
858
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
859
|
+
"parameters": [
|
860
|
+
|
861
|
+
],
|
862
|
+
"slots": [
|
863
|
+
|
864
|
+
],
|
865
|
+
"methods": [
|
866
|
+
|
867
|
+
],
|
868
|
+
"previews": [
|
869
|
+
|
870
|
+
],
|
871
|
+
"subcomponents": [
|
872
|
+
|
873
|
+
]
|
874
|
+
},
|
735
875
|
{
|
736
876
|
"fully_qualified_name": "Primer::Alpha::ActionList::Item",
|
737
877
|
"description": "An individual `ActionList` item. Items can optionally include leading and/or trailing visuals,\nsuch as icons, avatars, and counters.",
|
@@ -972,247 +1112,107 @@
|
|
972
1112
|
"subcomponents": [
|
973
1113
|
|
974
1114
|
]
|
1115
|
+
}
|
1116
|
+
]
|
1117
|
+
},
|
1118
|
+
{
|
1119
|
+
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
1120
|
+
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when users 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`.",
|
1121
|
+
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything nested 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 [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/#menu).",
|
1122
|
+
"is_form_component": false,
|
1123
|
+
"is_published": true,
|
1124
|
+
"requires_js": true,
|
1125
|
+
"component": "ActionMenu",
|
1126
|
+
"status": "alpha",
|
1127
|
+
"a11y_reviewed": false,
|
1128
|
+
"short_name": "ActionMenu",
|
1129
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
1130
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
1131
|
+
"parameters": [
|
1132
|
+
{
|
1133
|
+
"name": "menu_id",
|
1134
|
+
"type": "String",
|
1135
|
+
"default": "`self.class.generate_id`",
|
1136
|
+
"description": "Id of the menu."
|
975
1137
|
},
|
976
1138
|
{
|
977
|
-
"
|
978
|
-
"
|
979
|
-
"
|
980
|
-
"
|
981
|
-
|
982
|
-
|
983
|
-
"
|
984
|
-
"
|
985
|
-
"
|
986
|
-
"
|
987
|
-
|
988
|
-
|
1139
|
+
"name": "anchor_align",
|
1140
|
+
"type": "Symbol",
|
1141
|
+
"default": "`:start`",
|
1142
|
+
"description": "One of `:center`, `:end`, or `:start`.."
|
1143
|
+
},
|
1144
|
+
{
|
1145
|
+
"name": "anchor_side",
|
1146
|
+
"type": "Symbol",
|
1147
|
+
"default": "`:outside_bottom`",
|
1148
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
1149
|
+
},
|
1150
|
+
{
|
1151
|
+
"name": "size",
|
1152
|
+
"type": "Symbol",
|
1153
|
+
"default": "`:auto`",
|
1154
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
1155
|
+
},
|
1156
|
+
{
|
1157
|
+
"name": "src",
|
1158
|
+
"type": "String",
|
1159
|
+
"default": "`nil`",
|
1160
|
+
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
1161
|
+
},
|
1162
|
+
{
|
1163
|
+
"name": "preload",
|
1164
|
+
"type": "Boolean",
|
1165
|
+
"default": "`false`",
|
1166
|
+
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
1167
|
+
},
|
1168
|
+
{
|
1169
|
+
"name": "dynamic_label",
|
1170
|
+
"type": "Boolean",
|
1171
|
+
"default": "`false`",
|
1172
|
+
"description": "Whether or not to display the text of the currently selected item in the show button."
|
1173
|
+
},
|
1174
|
+
{
|
1175
|
+
"name": "dynamic_label_prefix",
|
1176
|
+
"type": "String",
|
1177
|
+
"default": "`nil`",
|
1178
|
+
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
1179
|
+
},
|
1180
|
+
{
|
1181
|
+
"name": "select_variant",
|
1182
|
+
"type": "Symbol",
|
1183
|
+
"default": "`:none`",
|
1184
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
"name": "form_arguments",
|
1188
|
+
"type": "Hash",
|
1189
|
+
"default": "`{}`",
|
1190
|
+
"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."
|
1191
|
+
},
|
1192
|
+
{
|
1193
|
+
"name": "system_arguments",
|
1194
|
+
"type": "Hash",
|
1195
|
+
"default": "N/A",
|
1196
|
+
"description": "{{link_to_system_arguments_docs}}."
|
1197
|
+
}
|
1198
|
+
],
|
1199
|
+
"slots": [
|
1200
|
+
{
|
1201
|
+
"name": "show_button",
|
1202
|
+
"description": "Button to activate the menu.",
|
989
1203
|
"parameters": [
|
990
1204
|
{
|
991
|
-
"name": "
|
992
|
-
"type": "
|
1205
|
+
"name": "system_arguments",
|
1206
|
+
"type": "Hash",
|
993
1207
|
"default": "N/A",
|
994
|
-
"description": "
|
995
|
-
}
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
{
|
1003
|
-
"name": "subtitle",
|
1004
|
-
"type": "String",
|
1005
|
-
"default": "`nil`",
|
1006
|
-
"description": "Optional sub list description."
|
1007
|
-
},
|
1008
|
-
{
|
1009
|
-
"name": "scheme",
|
1010
|
-
"type": "Symbol",
|
1011
|
-
"default": "`:subtle`",
|
1012
|
-
"description": "Display a background color if scheme is `filled`."
|
1013
|
-
},
|
1014
|
-
{
|
1015
|
-
"name": "system_arguments",
|
1016
|
-
"type": "Hash",
|
1017
|
-
"default": "N/A",
|
1018
|
-
"description": "{{link_to_system_arguments_docs}}"
|
1019
|
-
}
|
1020
|
-
],
|
1021
|
-
"slots": [
|
1022
|
-
|
1023
|
-
],
|
1024
|
-
"methods": [
|
1025
|
-
{
|
1026
|
-
"name": "title_id",
|
1027
|
-
"description": "Returns the value of attribute title_id.",
|
1028
|
-
"parameters": [
|
1029
|
-
|
1030
|
-
]
|
1031
|
-
},
|
1032
|
-
{
|
1033
|
-
"name": "subtitle_id",
|
1034
|
-
"description": "Returns the value of attribute subtitle_id.",
|
1035
|
-
"parameters": [
|
1036
|
-
|
1037
|
-
]
|
1038
|
-
}
|
1039
|
-
],
|
1040
|
-
"previews": [
|
1041
|
-
|
1042
|
-
],
|
1043
|
-
"subcomponents": [
|
1044
|
-
|
1045
|
-
]
|
1046
|
-
},
|
1047
|
-
{
|
1048
|
-
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
1049
|
-
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
1050
|
-
"accessibility_docs": null,
|
1051
|
-
"is_form_component": false,
|
1052
|
-
"is_published": true,
|
1053
|
-
"requires_js": false,
|
1054
|
-
"component": "ActionList::FormWrapper",
|
1055
|
-
"status": "alpha",
|
1056
|
-
"a11y_reviewed": false,
|
1057
|
-
"short_name": "ActionListFormWrapper",
|
1058
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
1059
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
1060
|
-
"parameters": [
|
1061
|
-
|
1062
|
-
],
|
1063
|
-
"slots": [
|
1064
|
-
|
1065
|
-
],
|
1066
|
-
"methods": [
|
1067
|
-
|
1068
|
-
],
|
1069
|
-
"previews": [
|
1070
|
-
|
1071
|
-
],
|
1072
|
-
"subcomponents": [
|
1073
|
-
|
1074
|
-
]
|
1075
|
-
},
|
1076
|
-
{
|
1077
|
-
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
1078
|
-
"description": "Separator with optional text rendered above groups or between individual items.",
|
1079
|
-
"accessibility_docs": null,
|
1080
|
-
"is_form_component": false,
|
1081
|
-
"is_published": true,
|
1082
|
-
"requires_js": false,
|
1083
|
-
"component": "ActionList::Divider",
|
1084
|
-
"status": "alpha",
|
1085
|
-
"a11y_reviewed": false,
|
1086
|
-
"short_name": "ActionListDivider",
|
1087
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
1088
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
1089
|
-
"parameters": [
|
1090
|
-
{
|
1091
|
-
"name": "scheme",
|
1092
|
-
"type": "Symbol",
|
1093
|
-
"default": "`:subtle`",
|
1094
|
-
"description": "Display a background color if scheme is `filled`."
|
1095
|
-
},
|
1096
|
-
{
|
1097
|
-
"name": "system_arguments",
|
1098
|
-
"type": "Hash",
|
1099
|
-
"default": "N/A",
|
1100
|
-
"description": "{{link_to_system_arguments_docs}}"
|
1101
|
-
}
|
1102
|
-
],
|
1103
|
-
"slots": [
|
1104
|
-
|
1105
|
-
],
|
1106
|
-
"methods": [
|
1107
|
-
|
1108
|
-
],
|
1109
|
-
"previews": [
|
1110
|
-
|
1111
|
-
],
|
1112
|
-
"subcomponents": [
|
1113
|
-
|
1114
|
-
]
|
1115
|
-
}
|
1116
|
-
]
|
1117
|
-
},
|
1118
|
-
{
|
1119
|
-
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
1120
|
-
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when users 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`.",
|
1121
|
-
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything nested 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 [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/#menu).",
|
1122
|
-
"is_form_component": false,
|
1123
|
-
"is_published": true,
|
1124
|
-
"requires_js": true,
|
1125
|
-
"component": "ActionMenu",
|
1126
|
-
"status": "alpha",
|
1127
|
-
"a11y_reviewed": false,
|
1128
|
-
"short_name": "ActionMenu",
|
1129
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
1130
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
1131
|
-
"parameters": [
|
1132
|
-
{
|
1133
|
-
"name": "menu_id",
|
1134
|
-
"type": "String",
|
1135
|
-
"default": "`self.class.generate_id`",
|
1136
|
-
"description": "Id of the menu."
|
1137
|
-
},
|
1138
|
-
{
|
1139
|
-
"name": "anchor_align",
|
1140
|
-
"type": "Symbol",
|
1141
|
-
"default": "`:start`",
|
1142
|
-
"description": "One of `:center`, `:end`, or `:start`.."
|
1143
|
-
},
|
1144
|
-
{
|
1145
|
-
"name": "anchor_side",
|
1146
|
-
"type": "Symbol",
|
1147
|
-
"default": "`:outside_bottom`",
|
1148
|
-
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
1149
|
-
},
|
1150
|
-
{
|
1151
|
-
"name": "size",
|
1152
|
-
"type": "Symbol",
|
1153
|
-
"default": "`:auto`",
|
1154
|
-
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
1155
|
-
},
|
1156
|
-
{
|
1157
|
-
"name": "src",
|
1158
|
-
"type": "String",
|
1159
|
-
"default": "`nil`",
|
1160
|
-
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
1161
|
-
},
|
1162
|
-
{
|
1163
|
-
"name": "preload",
|
1164
|
-
"type": "Boolean",
|
1165
|
-
"default": "`false`",
|
1166
|
-
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
1167
|
-
},
|
1168
|
-
{
|
1169
|
-
"name": "dynamic_label",
|
1170
|
-
"type": "Boolean",
|
1171
|
-
"default": "`false`",
|
1172
|
-
"description": "Whether or not to display the text of the currently selected item in the show button."
|
1173
|
-
},
|
1174
|
-
{
|
1175
|
-
"name": "dynamic_label_prefix",
|
1176
|
-
"type": "String",
|
1177
|
-
"default": "`nil`",
|
1178
|
-
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
1179
|
-
},
|
1180
|
-
{
|
1181
|
-
"name": "select_variant",
|
1182
|
-
"type": "Symbol",
|
1183
|
-
"default": "`:none`",
|
1184
|
-
"description": "One of `:multiple`, `:none`, or `:single`."
|
1185
|
-
},
|
1186
|
-
{
|
1187
|
-
"name": "form_arguments",
|
1188
|
-
"type": "Hash",
|
1189
|
-
"default": "`{}`",
|
1190
|
-
"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."
|
1191
|
-
},
|
1192
|
-
{
|
1193
|
-
"name": "system_arguments",
|
1194
|
-
"type": "Hash",
|
1195
|
-
"default": "N/A",
|
1196
|
-
"description": "{{link_to_system_arguments_docs}}."
|
1197
|
-
}
|
1198
|
-
],
|
1199
|
-
"slots": [
|
1200
|
-
{
|
1201
|
-
"name": "show_button",
|
1202
|
-
"description": "Button to activate the menu.",
|
1203
|
-
"parameters": [
|
1204
|
-
{
|
1205
|
-
"name": "system_arguments",
|
1206
|
-
"type": "Hash",
|
1207
|
-
"default": "N/A",
|
1208
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
|
1209
|
-
}
|
1210
|
-
]
|
1211
|
-
},
|
1212
|
-
{
|
1213
|
-
"name": "items",
|
1214
|
-
"description": "Adds a new item to the list.",
|
1215
|
-
"parameters": [
|
1208
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
|
1209
|
+
}
|
1210
|
+
]
|
1211
|
+
},
|
1212
|
+
{
|
1213
|
+
"name": "items",
|
1214
|
+
"description": "Adds a new item to the list.",
|
1215
|
+
"parameters": [
|
1216
1216
|
{
|
1217
1217
|
"name": "system_arguments",
|
1218
1218
|
"type": "Hash",
|
@@ -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",
|
@@ -3061,42 +3086,24 @@
|
|
3061
3086
|
],
|
3062
3087
|
"subcomponents": [
|
3063
3088
|
{
|
3064
|
-
"fully_qualified_name": "Primer::Alpha::Dialog::
|
3065
|
-
"description": "A `Dialog::
|
3089
|
+
"fully_qualified_name": "Primer::Alpha::Dialog::Footer",
|
3090
|
+
"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}}.",
|
3066
3091
|
"accessibility_docs": null,
|
3067
3092
|
"is_form_component": false,
|
3068
3093
|
"is_published": true,
|
3069
3094
|
"requires_js": false,
|
3070
|
-
"component": "Dialog::
|
3095
|
+
"component": "Dialog::Footer",
|
3071
3096
|
"status": "alpha",
|
3072
3097
|
"a11y_reviewed": true,
|
3073
|
-
"short_name": "
|
3074
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/
|
3075
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/
|
3098
|
+
"short_name": "DialogFooter",
|
3099
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/footer.rb",
|
3100
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/footer/default/",
|
3076
3101
|
"parameters": [
|
3077
|
-
{
|
3078
|
-
"name": "title",
|
3079
|
-
"type": "String",
|
3080
|
-
"default": "N/A",
|
3081
|
-
"description": "Describes the content of the dialog."
|
3082
|
-
},
|
3083
|
-
{
|
3084
|
-
"name": "subtitle",
|
3085
|
-
"type": "String",
|
3086
|
-
"default": "`nil`",
|
3087
|
-
"description": "Provides dditional context for the dialog, also setting the `aria-describedby` attribute."
|
3088
|
-
},
|
3089
3102
|
{
|
3090
3103
|
"name": "show_divider",
|
3091
3104
|
"type": "Boolean",
|
3092
3105
|
"default": "`false`",
|
3093
|
-
"description": "Show a divider between the
|
3094
|
-
},
|
3095
|
-
{
|
3096
|
-
"name": "visually_hide_title",
|
3097
|
-
"type": "Boolean",
|
3098
|
-
"default": "`false`",
|
3099
|
-
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3106
|
+
"description": "Show a divider between the footer and body."
|
3100
3107
|
},
|
3101
3108
|
{
|
3102
3109
|
"name": "system_arguments",
|
@@ -3119,25 +3126,19 @@
|
|
3119
3126
|
]
|
3120
3127
|
},
|
3121
3128
|
{
|
3122
|
-
"fully_qualified_name": "Primer::Alpha::Dialog::
|
3123
|
-
"description": "A `Dialog::
|
3129
|
+
"fully_qualified_name": "Primer::Alpha::Dialog::Body",
|
3130
|
+
"description": "A `Dialog::Body` is a compositional component, used to render the\nBody of a dialog. See {{#link_to_component}}Primer::Alpha::Dialog{{/link_to_component}}.",
|
3124
3131
|
"accessibility_docs": null,
|
3125
3132
|
"is_form_component": false,
|
3126
3133
|
"is_published": true,
|
3127
3134
|
"requires_js": false,
|
3128
|
-
"component": "Dialog::
|
3135
|
+
"component": "Dialog::Body",
|
3129
3136
|
"status": "alpha",
|
3130
3137
|
"a11y_reviewed": true,
|
3131
|
-
"short_name": "
|
3132
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/
|
3133
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/
|
3138
|
+
"short_name": "DialogBody",
|
3139
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/body.rb",
|
3140
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/body/default/",
|
3134
3141
|
"parameters": [
|
3135
|
-
{
|
3136
|
-
"name": "show_divider",
|
3137
|
-
"type": "Boolean",
|
3138
|
-
"default": "`false`",
|
3139
|
-
"description": "Show a divider between the footer and body."
|
3140
|
-
},
|
3141
3142
|
{
|
3142
3143
|
"name": "system_arguments",
|
3143
3144
|
"type": "Hash",
|
@@ -3159,19 +3160,43 @@
|
|
3159
3160
|
]
|
3160
3161
|
},
|
3161
3162
|
{
|
3162
|
-
"fully_qualified_name": "Primer::Alpha::Dialog::
|
3163
|
-
"description": "A `Dialog::
|
3163
|
+
"fully_qualified_name": "Primer::Alpha::Dialog::Header",
|
3164
|
+
"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}}.",
|
3164
3165
|
"accessibility_docs": null,
|
3165
3166
|
"is_form_component": false,
|
3166
3167
|
"is_published": true,
|
3167
3168
|
"requires_js": false,
|
3168
|
-
"component": "Dialog::
|
3169
|
+
"component": "Dialog::Header",
|
3169
3170
|
"status": "alpha",
|
3170
3171
|
"a11y_reviewed": true,
|
3171
|
-
"short_name": "
|
3172
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/
|
3173
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/
|
3172
|
+
"short_name": "DialogHeader",
|
3173
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
3174
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
3174
3175
|
"parameters": [
|
3176
|
+
{
|
3177
|
+
"name": "title",
|
3178
|
+
"type": "String",
|
3179
|
+
"default": "N/A",
|
3180
|
+
"description": "Describes the content of the dialog."
|
3181
|
+
},
|
3182
|
+
{
|
3183
|
+
"name": "subtitle",
|
3184
|
+
"type": "String",
|
3185
|
+
"default": "`nil`",
|
3186
|
+
"description": "Provides dditional context for the dialog, also setting the `aria-describedby` attribute."
|
3187
|
+
},
|
3188
|
+
{
|
3189
|
+
"name": "show_divider",
|
3190
|
+
"type": "Boolean",
|
3191
|
+
"default": "`false`",
|
3192
|
+
"description": "Show a divider between the header and body."
|
3193
|
+
},
|
3194
|
+
{
|
3195
|
+
"name": "visually_hide_title",
|
3196
|
+
"type": "Boolean",
|
3197
|
+
"default": "`false`",
|
3198
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3199
|
+
},
|
3175
3200
|
{
|
3176
3201
|
"name": "system_arguments",
|
3177
3202
|
"type": "Hash",
|
@@ -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,309 +4912,189 @@
|
|
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::Divider",
|
4923
|
+
"description": "",
|
4924
|
+
"accessibility_docs": null,
|
4925
|
+
"is_form_component": false,
|
4926
|
+
"is_published": true,
|
4927
|
+
"requires_js": false,
|
4928
|
+
"component": "NavList::Divider",
|
4929
|
+
"status": "deprecated",
|
4930
|
+
"a11y_reviewed": false,
|
4931
|
+
"short_name": "NavListDivider",
|
4932
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
4933
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
4893
4934
|
"parameters": [
|
4894
4935
|
{
|
4895
|
-
"name": "
|
4896
|
-
"type": "
|
4897
|
-
"default": "`
|
4898
|
-
"description": "
|
4936
|
+
"name": "scheme",
|
4937
|
+
"type": "Symbol",
|
4938
|
+
"default": "`:subtle`",
|
4939
|
+
"description": "Display a background color if scheme is `filled`."
|
4899
4940
|
},
|
4900
4941
|
{
|
4901
4942
|
"name": "system_arguments",
|
4902
4943
|
"type": "Hash",
|
4903
4944
|
"default": "N/A",
|
4904
|
-
"description": "
|
4945
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4905
4946
|
}
|
4947
|
+
],
|
4948
|
+
"slots": [
|
4949
|
+
|
4950
|
+
],
|
4951
|
+
"methods": [
|
4952
|
+
|
4953
|
+
],
|
4954
|
+
"previews": [
|
4955
|
+
|
4956
|
+
],
|
4957
|
+
"subcomponents": [
|
4958
|
+
|
4906
4959
|
]
|
4907
4960
|
},
|
4908
4961
|
{
|
4909
|
-
"
|
4910
|
-
"description": "
|
4962
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
4963
|
+
"description": "",
|
4964
|
+
"accessibility_docs": null,
|
4965
|
+
"is_form_component": false,
|
4966
|
+
"is_published": true,
|
4967
|
+
"requires_js": true,
|
4968
|
+
"component": "NavList::Group",
|
4969
|
+
"status": "deprecated",
|
4970
|
+
"a11y_reviewed": true,
|
4971
|
+
"short_name": "NavListGroup",
|
4972
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
4973
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
4911
4974
|
"parameters": [
|
4912
4975
|
{
|
4913
|
-
"name": "
|
4914
|
-
"type": "
|
4915
|
-
"default": "N/A",
|
4916
|
-
"description": "The source url of the avatar image."
|
4917
|
-
},
|
4918
|
-
{
|
4919
|
-
"name": "username",
|
4920
|
-
"type": "String",
|
4921
|
-
"default": "N/A",
|
4922
|
-
"description": "The username associated with the avatar."
|
4923
|
-
},
|
4924
|
-
{
|
4925
|
-
"name": "full_name",
|
4926
|
-
"type": "String",
|
4976
|
+
"name": "selected_item_id",
|
4977
|
+
"type": "Symbol",
|
4927
4978
|
"default": "`nil`",
|
4928
|
-
"description": "
|
4979
|
+
"description": "The ID of the currently selected item. Used internally."
|
4929
4980
|
},
|
4930
4981
|
{
|
4931
|
-
"name": "
|
4932
|
-
"type": "
|
4933
|
-
"default": "
|
4934
|
-
"description": "
|
4935
|
-
}
|
4982
|
+
"name": "system_arguments",
|
4983
|
+
"type": "Hash",
|
4984
|
+
"default": "N/A",
|
4985
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4986
|
+
}
|
4987
|
+
],
|
4988
|
+
"slots": [
|
4936
4989
|
{
|
4937
|
-
"name": "
|
4938
|
-
"
|
4939
|
-
"
|
4940
|
-
|
4990
|
+
"name": "show_more_item",
|
4991
|
+
"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.",
|
4992
|
+
"parameters": [
|
4993
|
+
{
|
4994
|
+
"name": "src",
|
4995
|
+
"type": "String",
|
4996
|
+
"default": "N/A",
|
4997
|
+
"description": "The URL to query for additional pages of list items."
|
4998
|
+
},
|
4999
|
+
{
|
5000
|
+
"name": "pages",
|
5001
|
+
"type": "Integer",
|
5002
|
+
"default": "N/A",
|
5003
|
+
"description": "The total number of pages in the result set."
|
5004
|
+
},
|
5005
|
+
{
|
5006
|
+
"name": "component_klass",
|
5007
|
+
"type": "Class",
|
5008
|
+
"default": "N/A",
|
5009
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5010
|
+
},
|
5011
|
+
{
|
5012
|
+
"name": "system_arguments",
|
5013
|
+
"type": "Hash",
|
5014
|
+
"default": "N/A",
|
5015
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5016
|
+
}
|
5017
|
+
]
|
4941
5018
|
},
|
4942
5019
|
{
|
4943
|
-
"name": "
|
4944
|
-
"
|
4945
|
-
"
|
4946
|
-
|
5020
|
+
"name": "items",
|
5021
|
+
"description": "Items.",
|
5022
|
+
"parameters": [
|
5023
|
+
{
|
5024
|
+
"name": "system_arguments",
|
5025
|
+
"type": "Hash",
|
5026
|
+
"default": "N/A",
|
5027
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5028
|
+
}
|
5029
|
+
]
|
4947
5030
|
},
|
4948
5031
|
{
|
4949
|
-
"name": "
|
4950
|
-
"
|
4951
|
-
"
|
4952
|
-
|
5032
|
+
"name": "heading",
|
5033
|
+
"description": "Heading text rendered above the list of items.",
|
5034
|
+
"parameters": [
|
5035
|
+
{
|
5036
|
+
"name": "system_arguments",
|
5037
|
+
"type": "Hash",
|
5038
|
+
"default": "N/A",
|
5039
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
5040
|
+
}
|
5041
|
+
]
|
4953
5042
|
}
|
5043
|
+
],
|
5044
|
+
"methods": [
|
5045
|
+
|
5046
|
+
],
|
5047
|
+
"previews": [
|
5048
|
+
|
5049
|
+
],
|
5050
|
+
"subcomponents": [
|
5051
|
+
|
4954
5052
|
]
|
4955
5053
|
},
|
4956
5054
|
{
|
4957
|
-
"
|
4958
|
-
"description": "
|
5055
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Heading",
|
5056
|
+
"description": "",
|
5057
|
+
"accessibility_docs": null,
|
5058
|
+
"is_form_component": false,
|
5059
|
+
"is_published": true,
|
5060
|
+
"requires_js": false,
|
5061
|
+
"component": "NavList::Heading",
|
5062
|
+
"status": "deprecated",
|
5063
|
+
"a11y_reviewed": false,
|
5064
|
+
"short_name": "NavListHeading",
|
5065
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
5066
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/heading/default/",
|
4959
5067
|
"parameters": [
|
4960
5068
|
{
|
4961
|
-
"name": "
|
4962
|
-
"type": "
|
5069
|
+
"name": "title",
|
5070
|
+
"type": "String",
|
4963
5071
|
"default": "N/A",
|
4964
|
-
"description": "The
|
4965
|
-
}
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
4969
|
-
|
4970
|
-
|
4971
|
-
|
5072
|
+
"description": "The text content of the heading."
|
5073
|
+
},
|
5074
|
+
{
|
5075
|
+
"name": "id",
|
5076
|
+
"type": "String",
|
5077
|
+
"default": "`self.class.generate_id`",
|
5078
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
5079
|
+
},
|
5080
|
+
{
|
5081
|
+
"name": "heading_level",
|
5082
|
+
"type": "Integer",
|
5083
|
+
"default": "`2`",
|
5084
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
5085
|
+
},
|
4972
5086
|
{
|
4973
5087
|
"name": "system_arguments",
|
4974
5088
|
"type": "Hash",
|
4975
5089
|
"default": "N/A",
|
4976
|
-
"description": "
|
4977
|
-
}
|
4978
|
-
]
|
4979
|
-
},
|
4980
|
-
{
|
4981
|
-
"name": "build_item",
|
4982
|
-
"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.",
|
4983
|
-
"parameters": [
|
4984
|
-
{
|
4985
|
-
"name": "component_klass",
|
4986
|
-
"type": "Class",
|
4987
|
-
"default": "`Primer::Alpha::NavList::Item`",
|
4988
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
4989
|
-
},
|
4990
|
-
{
|
4991
|
-
"name": "system_arguments",
|
4992
|
-
"type": "Hash",
|
4993
|
-
"default": "N/A",
|
4994
|
-
"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."
|
4995
|
-
}
|
4996
|
-
]
|
4997
|
-
},
|
4998
|
-
{
|
4999
|
-
"name": "build_avatar_item",
|
5000
|
-
"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.",
|
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.",
|
5125
|
-
"accessibility_docs": null,
|
5126
|
-
"is_form_component": false,
|
5127
|
-
"is_published": true,
|
5128
|
-
"requires_js": false,
|
5129
|
-
"component": "NavList::Heading",
|
5130
|
-
"status": "alpha",
|
5131
|
-
"a11y_reviewed": false,
|
5132
|
-
"short_name": "NavListHeading",
|
5133
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
5134
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/heading/default/",
|
5135
|
-
"parameters": [
|
5136
|
-
{
|
5137
|
-
"name": "title",
|
5138
|
-
"type": "String",
|
5139
|
-
"default": "N/A",
|
5140
|
-
"description": "The text content of the heading."
|
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."
|
5153
|
-
},
|
5154
|
-
{
|
5155
|
-
"name": "system_arguments",
|
5156
|
-
"type": "Hash",
|
5157
|
-
"default": "N/A",
|
5158
|
-
"description": "{{link_to_system_arguments_docs}}"
|
5090
|
+
"description": "{{link_to_system_arguments_docs}}"
|
5159
5091
|
}
|
5160
5092
|
],
|
5161
5093
|
"slots": [
|
5162
5094
|
|
5163
5095
|
],
|
5164
5096
|
"methods": [
|
5165
|
-
{
|
5166
|
-
"name": "title",
|
5167
|
-
"description": "Returns the value of attribute title.",
|
5168
|
-
"parameters": [
|
5169
|
-
|
5170
|
-
]
|
5171
|
-
},
|
5172
|
-
{
|
5173
|
-
"name": "id",
|
5174
|
-
"description": "Returns the value of attribute id.",
|
5175
|
-
"parameters": [
|
5176
|
-
|
5177
|
-
]
|
5178
|
-
},
|
5179
|
-
{
|
5180
|
-
"name": "heading_level",
|
5181
|
-
"description": "Returns the value of attribute heading_level.",
|
5182
|
-
"parameters": [
|
5183
|
-
|
5184
|
-
]
|
5185
|
-
},
|
5186
|
-
{
|
5187
|
-
"name": "system_arguments",
|
5188
|
-
"description": "Returns the value of attribute system_arguments.",
|
5189
|
-
"parameters": [
|
5190
5097
|
|
5191
|
-
]
|
5192
|
-
}
|
5193
5098
|
],
|
5194
5099
|
"previews": [
|
5195
5100
|
|
@@ -5200,13 +5105,13 @@
|
|
5200
5105
|
},
|
5201
5106
|
{
|
5202
5107
|
"fully_qualified_name": "Primer::Alpha::NavList::Item",
|
5203
|
-
"description": "
|
5108
|
+
"description": "",
|
5204
5109
|
"accessibility_docs": null,
|
5205
5110
|
"is_form_component": false,
|
5206
5111
|
"is_published": true,
|
5207
5112
|
"requires_js": true,
|
5208
5113
|
"component": "NavList::Item",
|
5209
|
-
"status": "
|
5114
|
+
"status": "deprecated",
|
5210
5115
|
"a11y_reviewed": false,
|
5211
5116
|
"short_name": "NavListItem",
|
5212
5117
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
@@ -5309,41 +5214,7 @@
|
|
5309
5214
|
}
|
5310
5215
|
],
|
5311
5216
|
"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
5217
|
|
5338
|
-
]
|
5339
|
-
},
|
5340
|
-
{
|
5341
|
-
"name": "item_active?",
|
5342
|
-
"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.",
|
5343
|
-
"parameters": [
|
5344
|
-
|
5345
|
-
]
|
5346
|
-
}
|
5347
5218
|
],
|
5348
5219
|
"previews": [
|
5349
5220
|
|
@@ -5351,167 +5222,28 @@
|
|
5351
5222
|
"subcomponents": [
|
5352
5223
|
|
5353
5224
|
]
|
5354
|
-
}
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5363
|
-
|
5364
|
-
|
5365
|
-
|
5366
|
-
|
5367
|
-
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5371
|
-
|
5372
|
-
|
5373
|
-
|
5374
|
-
|
5375
|
-
|
5376
|
-
"name": "system_arguments",
|
5377
|
-
"type": "Hash",
|
5378
|
-
"default": "N/A",
|
5379
|
-
"description": "{{link_to_system_arguments_docs}}"
|
5380
|
-
}
|
5381
|
-
],
|
5382
|
-
"slots": [
|
5383
|
-
|
5384
|
-
],
|
5385
|
-
"methods": [
|
5386
|
-
|
5387
|
-
],
|
5388
|
-
"previews": [
|
5389
|
-
|
5390
|
-
],
|
5391
|
-
"subcomponents": [
|
5392
|
-
|
5393
|
-
]
|
5394
|
-
},
|
5395
|
-
{
|
5396
|
-
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5397
|
-
"description": "A logical grouping of navigation links with an optional heading.\n\nSee {{#link_to_component}}Primer::Alpha::NavList{{/link_to_component}} for usage examples.",
|
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/",
|
5408
|
-
"parameters": [
|
5409
|
-
{
|
5410
|
-
"name": "selected_item_id",
|
5411
|
-
"type": "Symbol",
|
5412
|
-
"default": "`nil`",
|
5413
|
-
"description": "The ID of the currently selected item. Used internally."
|
5414
|
-
},
|
5415
|
-
{
|
5416
|
-
"name": "system_arguments",
|
5417
|
-
"type": "Hash",
|
5418
|
-
"default": "N/A",
|
5419
|
-
"description": "{{link_to_system_arguments_docs}}"
|
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."
|
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."
|
5515
5247
|
},
|
5516
5248
|
{
|
5517
5249
|
"name": "selected",
|
@@ -5938,6 +5670,52 @@
|
|
5938
5670
|
}
|
5939
5671
|
],
|
5940
5672
|
"subcomponents": [
|
5673
|
+
{
|
5674
|
+
"fully_qualified_name": "Primer::Alpha::Overlay::Footer",
|
5675
|
+
"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}}.",
|
5676
|
+
"accessibility_docs": null,
|
5677
|
+
"is_form_component": false,
|
5678
|
+
"is_published": true,
|
5679
|
+
"requires_js": false,
|
5680
|
+
"component": "Overlay::Footer",
|
5681
|
+
"status": "alpha",
|
5682
|
+
"a11y_reviewed": false,
|
5683
|
+
"short_name": "OverlayFooter",
|
5684
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/footer.rb",
|
5685
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/footer/default/",
|
5686
|
+
"parameters": [
|
5687
|
+
{
|
5688
|
+
"name": "show_divider",
|
5689
|
+
"type": "Boolean",
|
5690
|
+
"default": "`false`",
|
5691
|
+
"description": "Show a divider between the footer and body."
|
5692
|
+
},
|
5693
|
+
{
|
5694
|
+
"name": "align_content",
|
5695
|
+
"type": "Symbol",
|
5696
|
+
"default": "`DEFAULT_ALIGN_CONTENT`",
|
5697
|
+
"description": "The alginment of contents. One of `:center`, `:end`, or `:start`."
|
5698
|
+
},
|
5699
|
+
{
|
5700
|
+
"name": "system_arguments",
|
5701
|
+
"type": "Hash",
|
5702
|
+
"default": "N/A",
|
5703
|
+
"description": "{{link_to_system_arguments_docs}}"
|
5704
|
+
}
|
5705
|
+
],
|
5706
|
+
"slots": [
|
5707
|
+
|
5708
|
+
],
|
5709
|
+
"methods": [
|
5710
|
+
|
5711
|
+
],
|
5712
|
+
"previews": [
|
5713
|
+
|
5714
|
+
],
|
5715
|
+
"subcomponents": [
|
5716
|
+
|
5717
|
+
]
|
5718
|
+
},
|
5941
5719
|
{
|
5942
5720
|
"fully_qualified_name": "Primer::Alpha::Overlay::Header",
|
5943
5721
|
"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}}.",
|
@@ -6008,52 +5786,6 @@
|
|
6008
5786
|
|
6009
5787
|
]
|
6010
5788
|
},
|
6011
|
-
{
|
6012
|
-
"fully_qualified_name": "Primer::Alpha::Overlay::Footer",
|
6013
|
-
"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}}.",
|
6014
|
-
"accessibility_docs": null,
|
6015
|
-
"is_form_component": false,
|
6016
|
-
"is_published": true,
|
6017
|
-
"requires_js": false,
|
6018
|
-
"component": "Overlay::Footer",
|
6019
|
-
"status": "alpha",
|
6020
|
-
"a11y_reviewed": false,
|
6021
|
-
"short_name": "OverlayFooter",
|
6022
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/footer.rb",
|
6023
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/footer/default/",
|
6024
|
-
"parameters": [
|
6025
|
-
{
|
6026
|
-
"name": "show_divider",
|
6027
|
-
"type": "Boolean",
|
6028
|
-
"default": "`false`",
|
6029
|
-
"description": "Show a divider between the footer and body."
|
6030
|
-
},
|
6031
|
-
{
|
6032
|
-
"name": "align_content",
|
6033
|
-
"type": "Symbol",
|
6034
|
-
"default": "`DEFAULT_ALIGN_CONTENT`",
|
6035
|
-
"description": "The alginment of contents. One of `:center`, `:end`, or `:start`."
|
6036
|
-
},
|
6037
|
-
{
|
6038
|
-
"name": "system_arguments",
|
6039
|
-
"type": "Hash",
|
6040
|
-
"default": "N/A",
|
6041
|
-
"description": "{{link_to_system_arguments_docs}}"
|
6042
|
-
}
|
6043
|
-
],
|
6044
|
-
"slots": [
|
6045
|
-
|
6046
|
-
],
|
6047
|
-
"methods": [
|
6048
|
-
|
6049
|
-
],
|
6050
|
-
"previews": [
|
6051
|
-
|
6052
|
-
],
|
6053
|
-
"subcomponents": [
|
6054
|
-
|
6055
|
-
]
|
6056
|
-
},
|
6057
5789
|
{
|
6058
5790
|
"fully_qualified_name": "Primer::Alpha::Overlay::Body",
|
6059
5791
|
"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}}.",
|
@@ -6342,13 +6074,25 @@
|
|
6342
6074
|
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
6343
6075
|
},
|
6344
6076
|
{
|
6345
|
-
"name": "
|
6346
|
-
"type": "
|
6077
|
+
"name": "invalid",
|
6078
|
+
"type": "Boolean",
|
6347
6079
|
"default": "N/A",
|
6348
|
-
"description": "
|
6349
|
-
}
|
6350
|
-
|
6351
|
-
|
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
|
+
},
|
6088
|
+
{
|
6089
|
+
"name": "label_arguments",
|
6090
|
+
"type": "Hash",
|
6091
|
+
"default": "N/A",
|
6092
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
6093
|
+
}
|
6094
|
+
],
|
6095
|
+
"slots": [
|
6352
6096
|
|
6353
6097
|
],
|
6354
6098
|
"methods": [
|
@@ -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",
|
@@ -12340,6 +12097,656 @@
|
|
12340
12097
|
|
12341
12098
|
]
|
12342
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::Divider",
|
12378
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
12379
|
+
"accessibility_docs": null,
|
12380
|
+
"is_form_component": false,
|
12381
|
+
"is_published": true,
|
12382
|
+
"requires_js": false,
|
12383
|
+
"component": "NavList::Divider",
|
12384
|
+
"status": "alpha",
|
12385
|
+
"a11y_reviewed": false,
|
12386
|
+
"short_name": "NavListDivider",
|
12387
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
12388
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
12389
|
+
"parameters": [
|
12390
|
+
{
|
12391
|
+
"name": "scheme",
|
12392
|
+
"type": "Symbol",
|
12393
|
+
"default": "`:subtle`",
|
12394
|
+
"description": "Display a background color if scheme is `filled`."
|
12395
|
+
},
|
12396
|
+
{
|
12397
|
+
"name": "system_arguments",
|
12398
|
+
"type": "Hash",
|
12399
|
+
"default": "N/A",
|
12400
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12401
|
+
}
|
12402
|
+
],
|
12403
|
+
"slots": [
|
12404
|
+
|
12405
|
+
],
|
12406
|
+
"methods": [
|
12407
|
+
|
12408
|
+
],
|
12409
|
+
"previews": [
|
12410
|
+
|
12411
|
+
],
|
12412
|
+
"subcomponents": [
|
12413
|
+
|
12414
|
+
]
|
12415
|
+
},
|
12416
|
+
{
|
12417
|
+
"fully_qualified_name": "Primer::Beta::NavList::Heading",
|
12418
|
+
"description": "The heading placed above a `NavList`'s items.\n\nSee {{#link_to_component}}Primer::Beta::NavList{{/link_to_component}} for usage examples.",
|
12419
|
+
"accessibility_docs": null,
|
12420
|
+
"is_form_component": false,
|
12421
|
+
"is_published": true,
|
12422
|
+
"requires_js": false,
|
12423
|
+
"component": "NavList::Heading",
|
12424
|
+
"status": "alpha",
|
12425
|
+
"a11y_reviewed": false,
|
12426
|
+
"short_name": "NavListHeading",
|
12427
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/heading.rb",
|
12428
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/heading/default/",
|
12429
|
+
"parameters": [
|
12430
|
+
{
|
12431
|
+
"name": "title",
|
12432
|
+
"type": "String",
|
12433
|
+
"default": "N/A",
|
12434
|
+
"description": "The text content of the heading."
|
12435
|
+
},
|
12436
|
+
{
|
12437
|
+
"name": "id",
|
12438
|
+
"type": "String",
|
12439
|
+
"default": "`self.class.generate_id`",
|
12440
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
12441
|
+
},
|
12442
|
+
{
|
12443
|
+
"name": "heading_level",
|
12444
|
+
"type": "Integer",
|
12445
|
+
"default": "`2`",
|
12446
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
12447
|
+
},
|
12448
|
+
{
|
12449
|
+
"name": "system_arguments",
|
12450
|
+
"type": "Hash",
|
12451
|
+
"default": "N/A",
|
12452
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12453
|
+
}
|
12454
|
+
],
|
12455
|
+
"slots": [
|
12456
|
+
|
12457
|
+
],
|
12458
|
+
"methods": [
|
12459
|
+
{
|
12460
|
+
"name": "title",
|
12461
|
+
"description": "Returns the value of attribute title.",
|
12462
|
+
"parameters": [
|
12463
|
+
|
12464
|
+
]
|
12465
|
+
},
|
12466
|
+
{
|
12467
|
+
"name": "id",
|
12468
|
+
"description": "Returns the value of attribute id.",
|
12469
|
+
"parameters": [
|
12470
|
+
|
12471
|
+
]
|
12472
|
+
},
|
12473
|
+
{
|
12474
|
+
"name": "heading_level",
|
12475
|
+
"description": "Returns the value of attribute heading_level.",
|
12476
|
+
"parameters": [
|
12477
|
+
|
12478
|
+
]
|
12479
|
+
},
|
12480
|
+
{
|
12481
|
+
"name": "system_arguments",
|
12482
|
+
"description": "Returns the value of attribute system_arguments.",
|
12483
|
+
"parameters": [
|
12484
|
+
|
12485
|
+
]
|
12486
|
+
}
|
12487
|
+
],
|
12488
|
+
"previews": [
|
12489
|
+
|
12490
|
+
],
|
12491
|
+
"subcomponents": [
|
12492
|
+
|
12493
|
+
]
|
12494
|
+
},
|
12495
|
+
{
|
12496
|
+
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
12497
|
+
"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.",
|
12498
|
+
"accessibility_docs": null,
|
12499
|
+
"is_form_component": false,
|
12500
|
+
"is_published": true,
|
12501
|
+
"requires_js": true,
|
12502
|
+
"component": "NavList::Group",
|
12503
|
+
"status": "alpha",
|
12504
|
+
"a11y_reviewed": true,
|
12505
|
+
"short_name": "NavListGroup",
|
12506
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
12507
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
12508
|
+
"parameters": [
|
12509
|
+
{
|
12510
|
+
"name": "selected_item_id",
|
12511
|
+
"type": "Symbol",
|
12512
|
+
"default": "`nil`",
|
12513
|
+
"description": "The ID of the currently selected item. Used internally."
|
12514
|
+
},
|
12515
|
+
{
|
12516
|
+
"name": "system_arguments",
|
12517
|
+
"type": "Hash",
|
12518
|
+
"default": "N/A",
|
12519
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12520
|
+
}
|
12521
|
+
],
|
12522
|
+
"slots": [
|
12523
|
+
{
|
12524
|
+
"name": "show_more_item",
|
12525
|
+
"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.",
|
12526
|
+
"parameters": [
|
12527
|
+
{
|
12528
|
+
"name": "src",
|
12529
|
+
"type": "String",
|
12530
|
+
"default": "N/A",
|
12531
|
+
"description": "The URL to query for additional pages of list items."
|
12532
|
+
},
|
12533
|
+
{
|
12534
|
+
"name": "pages",
|
12535
|
+
"type": "Integer",
|
12536
|
+
"default": "N/A",
|
12537
|
+
"description": "The total number of pages in the result set."
|
12538
|
+
},
|
12539
|
+
{
|
12540
|
+
"name": "component_klass",
|
12541
|
+
"type": "Class",
|
12542
|
+
"default": "N/A",
|
12543
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
12544
|
+
},
|
12545
|
+
{
|
12546
|
+
"name": "system_arguments",
|
12547
|
+
"type": "Hash",
|
12548
|
+
"default": "N/A",
|
12549
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12550
|
+
}
|
12551
|
+
]
|
12552
|
+
},
|
12553
|
+
{
|
12554
|
+
"name": "items",
|
12555
|
+
"description": "Items.",
|
12556
|
+
"parameters": [
|
12557
|
+
{
|
12558
|
+
"name": "system_arguments",
|
12559
|
+
"type": "Hash",
|
12560
|
+
"default": "N/A",
|
12561
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12562
|
+
}
|
12563
|
+
]
|
12564
|
+
},
|
12565
|
+
{
|
12566
|
+
"name": "heading",
|
12567
|
+
"description": "Heading text rendered above the list of items.",
|
12568
|
+
"parameters": [
|
12569
|
+
{
|
12570
|
+
"name": "system_arguments",
|
12571
|
+
"type": "Hash",
|
12572
|
+
"default": "N/A",
|
12573
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
12574
|
+
}
|
12575
|
+
]
|
12576
|
+
}
|
12577
|
+
],
|
12578
|
+
"methods": [
|
12579
|
+
{
|
12580
|
+
"name": "expand!",
|
12581
|
+
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
12582
|
+
"parameters": [
|
12583
|
+
|
12584
|
+
]
|
12585
|
+
}
|
12586
|
+
],
|
12587
|
+
"previews": [
|
12588
|
+
|
12589
|
+
],
|
12590
|
+
"subcomponents": [
|
12591
|
+
|
12592
|
+
]
|
12593
|
+
},
|
12594
|
+
{
|
12595
|
+
"fully_qualified_name": "Primer::Beta::NavList::Item",
|
12596
|
+
"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.",
|
12597
|
+
"accessibility_docs": null,
|
12598
|
+
"is_form_component": false,
|
12599
|
+
"is_published": true,
|
12600
|
+
"requires_js": true,
|
12601
|
+
"component": "NavList::Item",
|
12602
|
+
"status": "alpha",
|
12603
|
+
"a11y_reviewed": false,
|
12604
|
+
"short_name": "NavListItem",
|
12605
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/item.rb",
|
12606
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/item/default/",
|
12607
|
+
"parameters": [
|
12608
|
+
{
|
12609
|
+
"name": "selected_item_id",
|
12610
|
+
"type": "Symbol",
|
12611
|
+
"default": "`nil`",
|
12612
|
+
"description": "The ID of the currently selected list item. Used internally."
|
12613
|
+
},
|
12614
|
+
{
|
12615
|
+
"name": "selected_by_ids",
|
12616
|
+
"type": "Array<Symbol>",
|
12617
|
+
"default": "`[]`",
|
12618
|
+
"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."
|
12619
|
+
},
|
12620
|
+
{
|
12621
|
+
"name": "expanded",
|
12622
|
+
"type": "Boolean",
|
12623
|
+
"default": "`false`",
|
12624
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
12625
|
+
},
|
12626
|
+
{
|
12627
|
+
"name": "sub_item",
|
12628
|
+
"type": "Boolean",
|
12629
|
+
"default": "`false`",
|
12630
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
12631
|
+
},
|
12632
|
+
{
|
12633
|
+
"name": "system_arguments",
|
12634
|
+
"type": "Hash",
|
12635
|
+
"default": "N/A",
|
12636
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12637
|
+
}
|
12638
|
+
],
|
12639
|
+
"slots": [
|
12640
|
+
{
|
12641
|
+
"name": "items",
|
12642
|
+
"description": null,
|
12643
|
+
"parameters": [
|
12644
|
+
{
|
12645
|
+
"name": "system_arguments",
|
12646
|
+
"type": "Hash",
|
12647
|
+
"default": "N/A",
|
12648
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
12649
|
+
}
|
12650
|
+
]
|
12651
|
+
},
|
12652
|
+
{
|
12653
|
+
"name": "description",
|
12654
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
12655
|
+
"parameters": [
|
12656
|
+
|
12657
|
+
]
|
12658
|
+
},
|
12659
|
+
{
|
12660
|
+
"name": "leading_visual",
|
12661
|
+
"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.",
|
12662
|
+
"parameters": [
|
12663
|
+
|
12664
|
+
]
|
12665
|
+
},
|
12666
|
+
{
|
12667
|
+
"name": "trailing_visual",
|
12668
|
+
"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```",
|
12669
|
+
"parameters": [
|
12670
|
+
|
12671
|
+
]
|
12672
|
+
},
|
12673
|
+
{
|
12674
|
+
"name": "trailing_action",
|
12675
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
12676
|
+
"parameters": [
|
12677
|
+
{
|
12678
|
+
"name": "system_arguments",
|
12679
|
+
"type": "Hash",
|
12680
|
+
"default": "N/A",
|
12681
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
12682
|
+
}
|
12683
|
+
]
|
12684
|
+
},
|
12685
|
+
{
|
12686
|
+
"name": "tooltip",
|
12687
|
+
"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.",
|
12688
|
+
"parameters": [
|
12689
|
+
{
|
12690
|
+
"name": "type",
|
12691
|
+
"type": "Symbol",
|
12692
|
+
"default": "`:description`",
|
12693
|
+
"description": "One of `:description` or `:label`."
|
12694
|
+
},
|
12695
|
+
{
|
12696
|
+
"name": "system_arguments",
|
12697
|
+
"type": "Hash",
|
12698
|
+
"default": "N/A",
|
12699
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
12700
|
+
}
|
12701
|
+
]
|
12702
|
+
}
|
12703
|
+
],
|
12704
|
+
"methods": [
|
12705
|
+
{
|
12706
|
+
"name": "selected_by_ids",
|
12707
|
+
"description": "Returns the value of attribute selected_by_ids.",
|
12708
|
+
"parameters": [
|
12709
|
+
|
12710
|
+
]
|
12711
|
+
},
|
12712
|
+
{
|
12713
|
+
"name": "sub_item",
|
12714
|
+
"description": "Returns the value of attribute sub_item.",
|
12715
|
+
"parameters": [
|
12716
|
+
|
12717
|
+
]
|
12718
|
+
},
|
12719
|
+
{
|
12720
|
+
"name": "sub_item?",
|
12721
|
+
"description": "Returns the value of attribute sub_item.\nWhether or not this item is nested under a parent item.",
|
12722
|
+
"parameters": [
|
12723
|
+
|
12724
|
+
]
|
12725
|
+
},
|
12726
|
+
{
|
12727
|
+
"name": "expand!",
|
12728
|
+
"description": "Cause this item to show its list of sub items when rendered.",
|
12729
|
+
"parameters": [
|
12730
|
+
|
12731
|
+
]
|
12732
|
+
},
|
12733
|
+
{
|
12734
|
+
"name": "item_active?",
|
12735
|
+
"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.",
|
12736
|
+
"parameters": [
|
12737
|
+
|
12738
|
+
]
|
12739
|
+
}
|
12740
|
+
],
|
12741
|
+
"previews": [
|
12742
|
+
|
12743
|
+
],
|
12744
|
+
"subcomponents": [
|
12745
|
+
|
12746
|
+
]
|
12747
|
+
}
|
12748
|
+
]
|
12749
|
+
},
|
12343
12750
|
{
|
12344
12751
|
"fully_qualified_name": "Primer::Beta::Octicon",
|
12345
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.",
|