openproject-primer_view_components 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +110 -0
- data/app/assets/javascripts/app/components/primer/alpha/tool_tip.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/primer.d.ts +1 -1
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_bar/item.rb +7 -4
- data/app/components/primer/alpha/action_bar.rb +2 -2
- data/app/components/primer/alpha/action_bar_element.js +9 -4
- data/app/components/primer/alpha/action_bar_element.ts +9 -2
- data/app/components/primer/alpha/action_list/form_wrapper.html.erb +4 -2
- data/app/components/primer/alpha/action_list/form_wrapper.rb +20 -9
- data/app/components/primer/alpha/action_menu/action_menu_element.js +162 -86
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +197 -82
- data/app/components/primer/alpha/action_menu/list.rb +0 -2
- data/app/components/primer/alpha/action_menu.rb +120 -3
- data/app/components/primer/alpha/check_box_group.rb +2 -0
- data/app/components/primer/alpha/dialog/header.rb +12 -0
- data/app/components/primer/alpha/dialog.rb +1 -1
- data/app/components/primer/alpha/modal_dialog.js +10 -13
- data/app/components/primer/alpha/modal_dialog.ts +10 -13
- data/app/components/primer/alpha/nav_list/divider.rb +2 -5
- data/app/components/primer/alpha/nav_list/group.rb +2 -98
- data/app/components/primer/alpha/nav_list/heading.rb +2 -27
- data/app/components/primer/alpha/nav_list/item.rb +2 -147
- data/app/components/primer/alpha/nav_list.rb +2 -205
- data/app/components/primer/alpha/overlay.css +1 -1
- data/app/components/primer/alpha/overlay.css.map +1 -1
- data/app/components/primer/alpha/overlay.pcss +1 -7
- data/app/components/primer/alpha/overlay.rb +6 -4
- data/app/components/primer/alpha/radio_button_group.rb +2 -0
- data/app/components/primer/alpha/segmented_control/item.html.erb +1 -8
- data/app/components/primer/alpha/segmented_control/item.rb +38 -4
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.json +14 -13
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.pcss +75 -66
- data/app/components/primer/alpha/segmented_control.rb +10 -0
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.json +4 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +18 -3
- data/app/components/primer/alpha/tool_tip.d.ts +1 -0
- data/app/components/primer/alpha/tool_tip.js +26 -93
- data/app/components/primer/alpha/tool_tip.ts +25 -91
- data/app/components/primer/alpha/tooltip.rb +3 -1
- data/app/components/primer/beta/base_button.rb +4 -0
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.json +2 -0
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +17 -5
- data/app/components/primer/beta/icon_button.html.erb +1 -1
- data/app/components/primer/beta/icon_button.rb +8 -1
- data/app/components/primer/beta/link.css +1 -1
- data/app/components/primer/beta/link.css.json +1 -0
- data/app/components/primer/beta/link.css.map +1 -1
- data/app/components/primer/beta/link.pcss +5 -0
- data/app/components/primer/beta/link.rb +2 -2
- data/app/components/primer/beta/nav_list/divider.rb +14 -0
- data/app/components/primer/beta/nav_list/group.rb +107 -0
- data/app/components/primer/beta/nav_list/heading.rb +36 -0
- data/app/components/primer/beta/nav_list/item.rb +156 -0
- data/app/components/primer/beta/nav_list.rb +212 -0
- data/app/components/primer/focus_group.js +30 -4
- data/app/components/primer/focus_group.ts +29 -2
- data/app/components/primer/open_project/flex_layout.html.erb +23 -0
- data/app/components/primer/open_project/flex_layout.rb +52 -0
- data/app/components/primer/open_project/grid_layout/area.rb +38 -0
- data/app/components/primer/open_project/grid_layout.html.erb +11 -0
- data/app/components/primer/open_project/grid_layout.rb +34 -0
- data/app/components/primer/open_project/page_header.css +1 -1
- data/app/components/primer/open_project/page_header.css.map +1 -1
- data/app/components/primer/open_project/page_header.pcss +4 -0
- data/app/components/primer/primer.d.ts +1 -1
- data/app/components/primer/primer.js +1 -1
- data/app/components/primer/primer.ts +1 -1
- data/app/helpers/primer/form_helper.rb +10 -0
- data/lib/primer/accessibility.rb +3 -1
- data/lib/primer/deprecations.yml +20 -0
- data/lib/primer/forms/check_box_group.html.erb +3 -0
- data/lib/primer/forms/dsl/check_box_group_input.rb +1 -5
- data/lib/primer/forms/dsl/check_box_input.rb +5 -0
- data/lib/primer/forms/dsl/radio_button_input.rb +5 -0
- data/lib/primer/forms/form_control.html.erb +1 -4
- data/lib/primer/forms/radio_button_group.html.erb +3 -0
- data/lib/primer/forms/utils.rb +2 -0
- data/lib/primer/forms/validation_message.html.erb +4 -0
- data/lib/primer/forms/validation_message.rb +14 -0
- data/lib/primer/forms.rb +16 -0
- data/lib/primer/static/generate_info_arch.rb +86 -5
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/primer/yard/component_manifest.rb +4 -0
- data/previews/primer/alpha/action_menu_preview/single_select_form_items.html.erb +31 -0
- data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +6 -5
- data/previews/primer/alpha/action_menu_preview.rb +10 -1
- data/previews/primer/alpha/check_box_group_preview.rb +13 -0
- data/previews/primer/alpha/check_box_preview.rb +1 -0
- data/previews/primer/alpha/dialog_preview/autofocus_element.html.erb +8 -0
- data/previews/primer/alpha/dialog_preview/with_header.html.erb +5 -0
- data/previews/primer/alpha/dialog_preview.rb +22 -0
- data/previews/primer/alpha/overlay_preview.rb +1 -1
- data/previews/primer/alpha/radio_button_group_preview.rb +13 -0
- data/previews/primer/alpha/radio_button_preview.rb +2 -1
- data/previews/primer/alpha/segmented_control_preview.rb +35 -0
- data/previews/primer/alpha/text_field_preview/input_group_leading_action_menu.html.erb +21 -0
- data/previews/primer/alpha/text_field_preview/input_group_leading_button.html.erb +18 -0
- data/previews/primer/alpha/text_field_preview/input_group_trailing_button.html.erb +18 -0
- data/previews/primer/alpha/text_field_preview.rb +21 -0
- data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb +23 -0
- data/previews/primer/alpha/tooltip_preview.rb +6 -1
- data/previews/primer/beta/button_group_preview.rb +6 -6
- data/previews/primer/beta/button_preview.rb +21 -3
- data/previews/primer/beta/icon_button_preview.rb +3 -0
- data/previews/primer/{alpha → beta}/nav_list_preview/trailing_action.html.erb +1 -1
- data/previews/primer/{alpha → beta}/nav_list_preview.rb +5 -5
- data/previews/primer/open_project/flex_layout_preview.rb +73 -0
- data/previews/primer/open_project/grid_layout_preview.rb +37 -0
- data/static/arguments.json +278 -7
- data/static/audited_at.json +8 -0
- data/static/classes.json +15 -0
- data/static/constants.json +47 -1
- data/static/info_arch.json +1338 -632
- data/static/previews.json +271 -167
- data/static/statuses.json +13 -5
- metadata +33 -319
- /data/app/assets/javascripts/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list/group.html.erb +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list/item.html.erb +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list.html.erb +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list.js +0 -0
- /data/app/components/primer/{alpha → beta}/nav_list.ts +0 -0
data/static/info_arch.json
CHANGED
@@ -139,7 +139,18 @@
|
|
139
139
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/item.rb",
|
140
140
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/item/default/",
|
141
141
|
"parameters": [
|
142
|
-
|
142
|
+
{
|
143
|
+
"name": "item_content",
|
144
|
+
"type": "String",
|
145
|
+
"default": "N/A",
|
146
|
+
"description": "The content to render inside the item."
|
147
|
+
},
|
148
|
+
{
|
149
|
+
"name": "item_arguments",
|
150
|
+
"type": "Hash",
|
151
|
+
"default": "N/A",
|
152
|
+
"description": "{{link_to_system_arguments_docs}}"
|
153
|
+
}
|
143
154
|
],
|
144
155
|
"slots": [
|
145
156
|
|
@@ -1117,8 +1128,8 @@
|
|
1117
1128
|
},
|
1118
1129
|
{
|
1119
1130
|
"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
|
1121
|
-
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything
|
1131
|
+
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when\nusers interact with buttons, actions, or other controls.\n\nThe only allowed elements for the `Item` components are: `:a`, `:button`, and `:clipboard-copy`. The default is `:button`.\n\n### Select variants\n\nWhile `ActionMenu`s default to a list of buttons that can link to other pages, copy text to the clipboard, etc, they also support\n`single` and `multiple` select variants. The single select variant allows a single item to be \"selected\" (i.e. marked \"active\")\nwhen clicked, which will cause a check mark to appear to the left of the item text. When the `multiple` select variant is chosen,\nmultiple items may be selected and check marks will appear next to each selected item.\n\nUse the `select_variant:` option to control which variant the `ActionMenu` uses. For more information, see the documentation on\nsupported arguments below.\n\n### Dynamic labels\n\nWhen using the `single` select variant, an optional label indicating the selected item can be displayed inside the menu button.\nDynamic labels can also be prefixed with custom text.\n\nPass `dynamic_label: true` to enable dynamic label behavior, and pass `dynamic_label_prefix: \"<string>\"` to set a custom prefix.\nFor more information, see the documentation on supported arguments below.\n\n### `ActionMenu`s as form inputs\n\nWhen using either the `single` or `multiple` select variants, `ActionMenu`s can be used as form inputs. They behave very\nsimilarly to how HTML `<select>` boxes behave, and play nicely with Rails' built-in form mechanisms. Pass arguments via the\n`form_arguments:` argument, including the Rails form builder object and the name of the field:\n\n```erb\n<% form_with(url: update_merge_strategy_path) do |f| %>\n <%= render(Primer::Alpha::ActionMenu.new(form_arguments: { builder: f, name: \"merge_strategy\" })) do |menu| %>\n <% menu.with_item(label: \"Fast forward\", data: { value: \"fast_forward\" }) %>\n <% menu.with_item(label: \"Recursive\", data: { value: \"recursive\" }) %>\n <% menu.with_item(label: \"Ours\", data: { value: \"ours\" }) %>\n <% menu.with_item(label: \"Theirs\", data: { value: \"theirs\" }) %>\n <% end %>\n<% end %>\n```\n\nThe value of the `data: { value: ... }` argument is sent to the server on submit, keyed using the name provided above\n(eg. `\"merge_strategy\"`). If no value is provided for an item, the value of that item is the item's label. Here's the\ncorresponding `MergeStrategyController` that might be written to handle the form above:\n\n```ruby\nclass MergeStrategyController < ApplicationController\n def update\n puts \"You chose #{merge_strategy_params[:merge_strategy]}\"\n end\n\n private\n\n def merge_strategy_params\n params.permit(:merge_strategy)\n end\nend\n```\n\n### `ActionMenu` items that submit forms\n\nWhereas `ActionMenu` items normally permit navigation via `<a>` tags which make HTTP `get` requests, `ActionMenu` items\nalso permit navigation via `POST` requests. To enable this behavior, include the `href:` argument as normal, but also pass\nthe `form_arguments:` argument to the appropriate item:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n name: \"group_by\",\n value: \"repository\"\n }\n ) %>\n<% end %>\n```\n\nMake sure to specify `method: :post`, as the default is `:get`. When clicked, the list item will submit a POST request to\nthe URL passed in the `href:` argument, including a parameter named `\"group_by\"` with a value of `\"repository\"`. If no value\nis given, the name, eg. `\"group_by\"`, will be used as the value.\n\nIt is possible to include multiple fields on submit. Instead of passing the `name:` and `value:` arguments, pass an array via\nthe `inputs:` argument:\n\n```erb\n<%= render(Primer::Alpha::ActionMenu.new) do |menu| %>\n <% menu.with_show_button { \"Group By\" } %>\n <% menu.with_item(\n label: \"Repository\",\n href: update_repo_grouping_path,\n form_arguments: {\n method: :post,\n inputs: [{\n name: \"group_by\",\n value: \"repository\"\n }, {\n name: \"some_other_field\",\n value: \"some value\",\n }],\n }\n ) %>\n<% end %>\n```\n\n### Form arguments\n\nThe following table summarizes the arguments allowed in the `form_arguments:` hash mentioned above.\n\n|Name |Type |Default|Description|\n|:----------------|:-------------|:------|:----------|\n|`method` |`Symbol` |`:get` |The HTTP request method to use to submit the form. One of `:get`, `:post`, `:patch`, `:put`, `:delete`, or `:head`|\n|`name` |`String` |`nil` |The name of the field that will be sent to the server on submit.|\n|`value` |`String` |`nil` |The value of the field that will be sent to the server on submit.|\n|`input_arguments`|`Hash` |`{}` |Additional key/value pairs to emit as HTML attributes on the `<input type=\"hidden\">` element.|\n|`inputs` |`Array<Hash>` |`[]` |An array of hashes representing HTML `<input type=\"hidden\">` elements. Must contain at least `name:` and `value:` keys. If additional key/value pairs are provided, they are emitted as HTML attributes on the `<input>` element. This argument supercedes the `name:`, `value:`, and `:input_arguments` arguments listed above.|\n\nThe elements of the `inputs:` array will be emitted as HTML `<input type=\"hidden\">` elements.",
|
1132
|
+
"accessibility_docs": "The action for the menu item needs to be on the element with `role=\"menuitem\"`. Semantics are removed for everything\nnested inside of it. When a menu item is selected, the menu will close immediately.\n\nAdditional information around the keyboard functionality and implementation can be found on the\n[WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.2/#menu).",
|
1122
1133
|
"is_form_component": false,
|
1123
1134
|
"is_published": true,
|
1124
1135
|
"requires_js": true,
|
@@ -1519,6 +1530,19 @@
|
|
1519
1530
|
]
|
1520
1531
|
}
|
1521
1532
|
},
|
1533
|
+
{
|
1534
|
+
"preview_path": "primer/alpha/action_menu/single_select_form_items",
|
1535
|
+
"name": "single_select_form_items",
|
1536
|
+
"snapshot": "false",
|
1537
|
+
"skip_rules": {
|
1538
|
+
"wont_fix": [
|
1539
|
+
"region"
|
1540
|
+
],
|
1541
|
+
"will_fix": [
|
1542
|
+
"color-contrast"
|
1543
|
+
]
|
1544
|
+
}
|
1545
|
+
},
|
1522
1546
|
{
|
1523
1547
|
"preview_path": "primer/alpha/action_menu/multiple_select_form",
|
1524
1548
|
"name": "multiple_select_form",
|
@@ -2565,84 +2589,7 @@
|
|
2565
2589
|
|
2566
2590
|
],
|
2567
2591
|
"previews": [
|
2568
|
-
|
2569
|
-
"preview_path": "primer/alpha/check_box/playground",
|
2570
|
-
"name": "playground",
|
2571
|
-
"snapshot": "false",
|
2572
|
-
"skip_rules": {
|
2573
|
-
"wont_fix": [
|
2574
|
-
"region"
|
2575
|
-
],
|
2576
|
-
"will_fix": [
|
2577
|
-
"color-contrast"
|
2578
|
-
]
|
2579
|
-
}
|
2580
|
-
},
|
2581
|
-
{
|
2582
|
-
"preview_path": "primer/alpha/check_box/default",
|
2583
|
-
"name": "default",
|
2584
|
-
"snapshot": "false",
|
2585
|
-
"skip_rules": {
|
2586
|
-
"wont_fix": [
|
2587
|
-
"region"
|
2588
|
-
],
|
2589
|
-
"will_fix": [
|
2590
|
-
"color-contrast"
|
2591
|
-
]
|
2592
|
-
}
|
2593
|
-
},
|
2594
|
-
{
|
2595
|
-
"preview_path": "primer/alpha/check_box/with_caption",
|
2596
|
-
"name": "with_caption",
|
2597
|
-
"snapshot": "true",
|
2598
|
-
"skip_rules": {
|
2599
|
-
"wont_fix": [
|
2600
|
-
"region"
|
2601
|
-
],
|
2602
|
-
"will_fix": [
|
2603
|
-
"color-contrast"
|
2604
|
-
]
|
2605
|
-
}
|
2606
|
-
},
|
2607
|
-
{
|
2608
|
-
"preview_path": "primer/alpha/check_box/checked",
|
2609
|
-
"name": "checked",
|
2610
|
-
"snapshot": "false",
|
2611
|
-
"skip_rules": {
|
2612
|
-
"wont_fix": [
|
2613
|
-
"region"
|
2614
|
-
],
|
2615
|
-
"will_fix": [
|
2616
|
-
"color-contrast"
|
2617
|
-
]
|
2618
|
-
}
|
2619
|
-
},
|
2620
|
-
{
|
2621
|
-
"preview_path": "primer/alpha/check_box/visually_hide_label",
|
2622
|
-
"name": "visually_hide_label",
|
2623
|
-
"snapshot": "false",
|
2624
|
-
"skip_rules": {
|
2625
|
-
"wont_fix": [
|
2626
|
-
"region"
|
2627
|
-
],
|
2628
|
-
"will_fix": [
|
2629
|
-
"color-contrast"
|
2630
|
-
]
|
2631
|
-
}
|
2632
|
-
},
|
2633
|
-
{
|
2634
|
-
"preview_path": "primer/alpha/check_box/disabled",
|
2635
|
-
"name": "disabled",
|
2636
|
-
"snapshot": "false",
|
2637
|
-
"skip_rules": {
|
2638
|
-
"wont_fix": [
|
2639
|
-
"region"
|
2640
|
-
],
|
2641
|
-
"will_fix": [
|
2642
|
-
"color-contrast"
|
2643
|
-
]
|
2644
|
-
}
|
2645
|
-
}
|
2592
|
+
|
2646
2593
|
],
|
2647
2594
|
"subcomponents": [
|
2648
2595
|
|
@@ -2686,6 +2633,18 @@
|
|
2686
2633
|
"default": "N/A",
|
2687
2634
|
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
2688
2635
|
},
|
2636
|
+
{
|
2637
|
+
"name": "invalid",
|
2638
|
+
"type": "Boolean",
|
2639
|
+
"default": "N/A",
|
2640
|
+
"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."
|
2641
|
+
},
|
2642
|
+
{
|
2643
|
+
"name": "validation_message",
|
2644
|
+
"type": "String",
|
2645
|
+
"default": "N/A",
|
2646
|
+
"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."
|
2647
|
+
},
|
2689
2648
|
{
|
2690
2649
|
"name": "label_arguments",
|
2691
2650
|
"type": "Hash",
|
@@ -2743,6 +2702,19 @@
|
|
2743
2702
|
]
|
2744
2703
|
}
|
2745
2704
|
},
|
2705
|
+
{
|
2706
|
+
"preview_path": "primer/alpha/check_box_group/invalid",
|
2707
|
+
"name": "invalid",
|
2708
|
+
"snapshot": "false",
|
2709
|
+
"skip_rules": {
|
2710
|
+
"wont_fix": [
|
2711
|
+
"region"
|
2712
|
+
],
|
2713
|
+
"will_fix": [
|
2714
|
+
"color-contrast"
|
2715
|
+
]
|
2716
|
+
}
|
2717
|
+
},
|
2746
2718
|
{
|
2747
2719
|
"preview_path": "primer/alpha/check_box_group/with_caption",
|
2748
2720
|
"name": "with_caption",
|
@@ -2896,7 +2868,7 @@
|
|
2896
2868
|
"name": "system_arguments",
|
2897
2869
|
"type": "Hash",
|
2898
2870
|
"default": "N/A",
|
2899
|
-
"description": "{{
|
2871
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Dialog::Header{{/link_to_component}}."
|
2900
2872
|
}
|
2901
2873
|
]
|
2902
2874
|
},
|
@@ -2980,6 +2952,19 @@
|
|
2980
2952
|
]
|
2981
2953
|
}
|
2982
2954
|
},
|
2955
|
+
{
|
2956
|
+
"preview_path": "primer/alpha/dialog/with_header",
|
2957
|
+
"name": "with_header",
|
2958
|
+
"snapshot": "false",
|
2959
|
+
"skip_rules": {
|
2960
|
+
"wont_fix": [
|
2961
|
+
"region"
|
2962
|
+
],
|
2963
|
+
"will_fix": [
|
2964
|
+
"color-contrast"
|
2965
|
+
]
|
2966
|
+
}
|
2967
|
+
},
|
2983
2968
|
{
|
2984
2969
|
"preview_path": "primer/alpha/dialog/with_footer",
|
2985
2970
|
"name": "with_footer",
|
@@ -3057,6 +3042,19 @@
|
|
3057
3042
|
"color-contrast"
|
3058
3043
|
]
|
3059
3044
|
}
|
3045
|
+
},
|
3046
|
+
{
|
3047
|
+
"preview_path": "primer/alpha/dialog/autofocus_element",
|
3048
|
+
"name": "autofocus_element",
|
3049
|
+
"snapshot": "false",
|
3050
|
+
"skip_rules": {
|
3051
|
+
"wont_fix": [
|
3052
|
+
"region"
|
3053
|
+
],
|
3054
|
+
"will_fix": [
|
3055
|
+
"color-contrast"
|
3056
|
+
]
|
3057
|
+
}
|
3060
3058
|
}
|
3061
3059
|
],
|
3062
3060
|
"subcomponents": [
|
@@ -3074,6 +3072,12 @@
|
|
3074
3072
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
3075
3073
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
3076
3074
|
"parameters": [
|
3075
|
+
{
|
3076
|
+
"name": "id",
|
3077
|
+
"type": "String",
|
3078
|
+
"default": "N/A",
|
3079
|
+
"description": "The HTML element's ID value."
|
3080
|
+
},
|
3077
3081
|
{
|
3078
3082
|
"name": "title",
|
3079
3083
|
"type": "String",
|
@@ -3098,6 +3102,12 @@
|
|
3098
3102
|
"default": "`false`",
|
3099
3103
|
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
3100
3104
|
},
|
3105
|
+
{
|
3106
|
+
"name": "variant",
|
3107
|
+
"type": "Symbol",
|
3108
|
+
"default": "`:medium`",
|
3109
|
+
"description": "One of `:large` or `:medium`."
|
3110
|
+
},
|
3101
3111
|
{
|
3102
3112
|
"name": "system_arguments",
|
3103
3113
|
"type": "Hash",
|
@@ -4845,13 +4855,13 @@
|
|
4845
4855
|
},
|
4846
4856
|
{
|
4847
4857
|
"fully_qualified_name": "Primer::Alpha::NavList",
|
4848
|
-
"description": "
|
4858
|
+
"description": "",
|
4849
4859
|
"accessibility_docs": null,
|
4850
4860
|
"is_form_component": false,
|
4851
4861
|
"is_published": true,
|
4852
4862
|
"requires_js": true,
|
4853
4863
|
"component": "NavList",
|
4854
|
-
"status": "
|
4864
|
+
"status": "deprecated",
|
4855
4865
|
"a11y_reviewed": true,
|
4856
4866
|
"short_name": "NavList",
|
4857
4867
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list.rb",
|
@@ -4873,7 +4883,7 @@
|
|
4873
4883
|
"slots": [
|
4874
4884
|
{
|
4875
4885
|
"name": "heading",
|
4876
|
-
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::
|
4886
|
+
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Heading{{/link_to_component}}.",
|
4877
4887
|
"parameters": [
|
4878
4888
|
|
4879
4889
|
]
|
@@ -4887,247 +4897,141 @@
|
|
4887
4897
|
}
|
4888
4898
|
],
|
4889
4899
|
"methods": [
|
4900
|
+
|
4901
|
+
],
|
4902
|
+
"previews": [
|
4903
|
+
|
4904
|
+
],
|
4905
|
+
"subcomponents": [
|
4890
4906
|
{
|
4891
|
-
"
|
4892
|
-
"description": "
|
4893
|
-
"
|
4894
|
-
|
4895
|
-
|
4896
|
-
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4903
|
-
"default": "N/A",
|
4904
|
-
"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."
|
4905
|
-
}
|
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.",
|
4907
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Item",
|
4908
|
+
"description": "",
|
4909
|
+
"accessibility_docs": null,
|
4910
|
+
"is_form_component": false,
|
4911
|
+
"is_published": true,
|
4912
|
+
"requires_js": true,
|
4913
|
+
"component": "NavList::Item",
|
4914
|
+
"status": "deprecated",
|
4915
|
+
"a11y_reviewed": false,
|
4916
|
+
"short_name": "NavListItem",
|
4917
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
4918
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/item/default/",
|
4911
4919
|
"parameters": [
|
4912
4920
|
{
|
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",
|
4921
|
+
"name": "selected_item_id",
|
4922
|
+
"type": "Symbol",
|
4927
4923
|
"default": "`nil`",
|
4928
|
-
"description": "
|
4924
|
+
"description": "The ID of the currently selected list item. Used internally."
|
4929
4925
|
},
|
4930
4926
|
{
|
4931
|
-
"name": "
|
4932
|
-
"type": "Symbol",
|
4933
|
-
"default": "
|
4934
|
-
"description": "
|
4927
|
+
"name": "selected_by_ids",
|
4928
|
+
"type": "Array<Symbol>",
|
4929
|
+
"default": "`[]`",
|
4930
|
+
"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."
|
4935
4931
|
},
|
4936
4932
|
{
|
4937
|
-
"name": "
|
4938
|
-
"type": "
|
4939
|
-
"default": "`
|
4940
|
-
"description": "
|
4933
|
+
"name": "expanded",
|
4934
|
+
"type": "Boolean",
|
4935
|
+
"default": "`false`",
|
4936
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
4941
4937
|
},
|
4942
4938
|
{
|
4943
|
-
"name": "
|
4944
|
-
"type": "
|
4945
|
-
"default": "`
|
4946
|
-
"description": "
|
4939
|
+
"name": "sub_item",
|
4940
|
+
"type": "Boolean",
|
4941
|
+
"default": "`false`",
|
4942
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
4947
4943
|
},
|
4948
4944
|
{
|
4949
4945
|
"name": "system_arguments",
|
4950
4946
|
"type": "Hash",
|
4951
4947
|
"default": "N/A",
|
4952
|
-
"description": "
|
4948
|
+
"description": "{{link_to_system_arguments_docs}}"
|
4953
4949
|
}
|
4954
|
-
]
|
4955
|
-
|
4956
|
-
{
|
4957
|
-
"name": "with_group",
|
4958
|
-
"description": "Adds a group to the list. A group is a list of links and a (required) heading.",
|
4959
|
-
"parameters": [
|
4950
|
+
],
|
4951
|
+
"slots": [
|
4960
4952
|
{
|
4961
|
-
"name": "
|
4962
|
-
"
|
4963
|
-
"
|
4964
|
-
|
4965
|
-
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
4969
|
-
|
4970
|
-
|
4971
|
-
|
4953
|
+
"name": "items",
|
4954
|
+
"description": null,
|
4955
|
+
"parameters": [
|
4956
|
+
{
|
4957
|
+
"name": "system_arguments",
|
4958
|
+
"type": "Hash",
|
4959
|
+
"default": "N/A",
|
4960
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
4961
|
+
}
|
4962
|
+
]
|
4963
|
+
},
|
4972
4964
|
{
|
4973
|
-
"name": "
|
4974
|
-
"
|
4975
|
-
"
|
4976
|
-
|
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."
|
4965
|
+
"name": "description",
|
4966
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
4967
|
+
"parameters": [
|
4968
|
+
|
4969
|
+
]
|
5019
4970
|
},
|
5020
4971
|
{
|
5021
|
-
"name": "
|
5022
|
-
"
|
5023
|
-
"
|
5024
|
-
|
4972
|
+
"name": "leading_visual",
|
4973
|
+
"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.",
|
4974
|
+
"parameters": [
|
4975
|
+
|
4976
|
+
]
|
5025
4977
|
},
|
5026
4978
|
{
|
5027
|
-
"name": "
|
5028
|
-
"
|
5029
|
-
"
|
5030
|
-
|
4979
|
+
"name": "trailing_visual",
|
4980
|
+
"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```",
|
4981
|
+
"parameters": [
|
4982
|
+
|
4983
|
+
]
|
5031
4984
|
},
|
5032
4985
|
{
|
5033
|
-
"name": "
|
5034
|
-
"
|
5035
|
-
"
|
5036
|
-
|
4986
|
+
"name": "trailing_action",
|
4987
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
4988
|
+
"parameters": [
|
4989
|
+
{
|
4990
|
+
"name": "system_arguments",
|
4991
|
+
"type": "Hash",
|
4992
|
+
"default": "N/A",
|
4993
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
4994
|
+
}
|
4995
|
+
]
|
5037
4996
|
},
|
5038
4997
|
{
|
5039
|
-
"name": "
|
5040
|
-
"
|
5041
|
-
"
|
5042
|
-
|
4998
|
+
"name": "tooltip",
|
4999
|
+
"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.",
|
5000
|
+
"parameters": [
|
5001
|
+
{
|
5002
|
+
"name": "type",
|
5003
|
+
"type": "Symbol",
|
5004
|
+
"default": "`:description`",
|
5005
|
+
"description": "One of `:description` or `:label`."
|
5006
|
+
},
|
5007
|
+
{
|
5008
|
+
"name": "system_arguments",
|
5009
|
+
"type": "Hash",
|
5010
|
+
"default": "N/A",
|
5011
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
5012
|
+
}
|
5013
|
+
]
|
5043
5014
|
}
|
5044
|
-
]
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
"
|
5049
|
-
|
5015
|
+
],
|
5016
|
+
"methods": [
|
5017
|
+
|
5018
|
+
],
|
5019
|
+
"previews": [
|
5020
|
+
|
5021
|
+
],
|
5022
|
+
"subcomponents": [
|
5050
5023
|
|
5051
5024
|
]
|
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
5025
|
},
|
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
5026
|
{
|
5123
5027
|
"fully_qualified_name": "Primer::Alpha::NavList::Heading",
|
5124
|
-
"description": "
|
5028
|
+
"description": "",
|
5125
5029
|
"accessibility_docs": null,
|
5126
5030
|
"is_form_component": false,
|
5127
5031
|
"is_published": true,
|
5128
5032
|
"requires_js": false,
|
5129
5033
|
"component": "NavList::Heading",
|
5130
|
-
"status": "
|
5034
|
+
"status": "deprecated",
|
5131
5035
|
"a11y_reviewed": false,
|
5132
5036
|
"short_name": "NavListHeading",
|
5133
5037
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
@@ -5162,34 +5066,47 @@
|
|
5162
5066
|
|
5163
5067
|
],
|
5164
5068
|
"methods": [
|
5165
|
-
{
|
5166
|
-
"name": "title",
|
5167
|
-
"description": "Returns the value of attribute title.",
|
5168
|
-
"parameters": [
|
5169
5069
|
|
5170
|
-
|
5171
|
-
|
5172
|
-
{
|
5173
|
-
"name": "id",
|
5174
|
-
"description": "Returns the value of attribute id.",
|
5175
|
-
"parameters": [
|
5070
|
+
],
|
5071
|
+
"previews": [
|
5176
5072
|
|
5177
|
-
|
5178
|
-
|
5179
|
-
{
|
5180
|
-
"name": "heading_level",
|
5181
|
-
"description": "Returns the value of attribute heading_level.",
|
5182
|
-
"parameters": [
|
5073
|
+
],
|
5074
|
+
"subcomponents": [
|
5183
5075
|
|
5184
|
-
|
5076
|
+
]
|
5077
|
+
},
|
5078
|
+
{
|
5079
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Divider",
|
5080
|
+
"description": "",
|
5081
|
+
"accessibility_docs": null,
|
5082
|
+
"is_form_component": false,
|
5083
|
+
"is_published": true,
|
5084
|
+
"requires_js": false,
|
5085
|
+
"component": "NavList::Divider",
|
5086
|
+
"status": "deprecated",
|
5087
|
+
"a11y_reviewed": false,
|
5088
|
+
"short_name": "NavListDivider",
|
5089
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
5090
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
5091
|
+
"parameters": [
|
5092
|
+
{
|
5093
|
+
"name": "scheme",
|
5094
|
+
"type": "Symbol",
|
5095
|
+
"default": "`:subtle`",
|
5096
|
+
"description": "Display a background color if scheme is `filled`."
|
5185
5097
|
},
|
5186
5098
|
{
|
5187
5099
|
"name": "system_arguments",
|
5188
|
-
"
|
5189
|
-
"
|
5190
|
-
|
5191
|
-
]
|
5100
|
+
"type": "Hash",
|
5101
|
+
"default": "N/A",
|
5102
|
+
"description": "{{link_to_system_arguments_docs}}"
|
5192
5103
|
}
|
5104
|
+
],
|
5105
|
+
"slots": [
|
5106
|
+
|
5107
|
+
],
|
5108
|
+
"methods": [
|
5109
|
+
|
5193
5110
|
],
|
5194
5111
|
"previews": [
|
5195
5112
|
|
@@ -5199,218 +5116,24 @@
|
|
5199
5116
|
]
|
5200
5117
|
},
|
5201
5118
|
{
|
5202
|
-
"fully_qualified_name": "Primer::Alpha::NavList::
|
5203
|
-
"description": "
|
5119
|
+
"fully_qualified_name": "Primer::Alpha::NavList::Group",
|
5120
|
+
"description": "",
|
5204
5121
|
"accessibility_docs": null,
|
5205
5122
|
"is_form_component": false,
|
5206
5123
|
"is_published": true,
|
5207
5124
|
"requires_js": true,
|
5208
|
-
"component": "NavList::
|
5209
|
-
"status": "
|
5210
|
-
"a11y_reviewed":
|
5211
|
-
"short_name": "
|
5212
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/
|
5213
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/
|
5125
|
+
"component": "NavList::Group",
|
5126
|
+
"status": "deprecated",
|
5127
|
+
"a11y_reviewed": true,
|
5128
|
+
"short_name": "NavListGroup",
|
5129
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
5130
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
5214
5131
|
"parameters": [
|
5215
5132
|
{
|
5216
5133
|
"name": "selected_item_id",
|
5217
5134
|
"type": "Symbol",
|
5218
5135
|
"default": "`nil`",
|
5219
|
-
"description": "The ID of the currently selected
|
5220
|
-
},
|
5221
|
-
{
|
5222
|
-
"name": "selected_by_ids",
|
5223
|
-
"type": "Array<Symbol>",
|
5224
|
-
"default": "`[]`",
|
5225
|
-
"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."
|
5226
|
-
},
|
5227
|
-
{
|
5228
|
-
"name": "expanded",
|
5229
|
-
"type": "Boolean",
|
5230
|
-
"default": "`false`",
|
5231
|
-
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
5232
|
-
},
|
5233
|
-
{
|
5234
|
-
"name": "sub_item",
|
5235
|
-
"type": "Boolean",
|
5236
|
-
"default": "`false`",
|
5237
|
-
"description": "Whether or not this item is nested under a parent item. Used internally."
|
5238
|
-
},
|
5239
|
-
{
|
5240
|
-
"name": "system_arguments",
|
5241
|
-
"type": "Hash",
|
5242
|
-
"default": "N/A",
|
5243
|
-
"description": "{{link_to_system_arguments_docs}}"
|
5244
|
-
}
|
5245
|
-
],
|
5246
|
-
"slots": [
|
5247
|
-
{
|
5248
|
-
"name": "items",
|
5249
|
-
"description": null,
|
5250
|
-
"parameters": [
|
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
|
-
},
|
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
|
-
],
|
5348
|
-
"previews": [
|
5349
|
-
|
5350
|
-
],
|
5351
|
-
"subcomponents": [
|
5352
|
-
|
5353
|
-
]
|
5354
|
-
},
|
5355
|
-
{
|
5356
|
-
"fully_qualified_name": "Primer::Alpha::NavList::Divider",
|
5357
|
-
"description": "Separator with optional text rendered above groups or between individual items.",
|
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/",
|
5368
|
-
"parameters": [
|
5369
|
-
{
|
5370
|
-
"name": "scheme",
|
5371
|
-
"type": "Symbol",
|
5372
|
-
"default": "`:subtle`",
|
5373
|
-
"description": "Display a background color if scheme is `filled`."
|
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."
|
5136
|
+
"description": "The ID of the currently selected item. Used internally."
|
5414
5137
|
},
|
5415
5138
|
{
|
5416
5139
|
"name": "system_arguments",
|
@@ -5440,13 +5163,13 @@
|
|
5440
5163
|
"name": "component_klass",
|
5441
5164
|
"type": "Class",
|
5442
5165
|
"default": "N/A",
|
5443
|
-
"description": "A component class to use instead of the default `Primer::
|
5166
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
5444
5167
|
},
|
5445
5168
|
{
|
5446
5169
|
"name": "system_arguments",
|
5447
5170
|
"type": "Hash",
|
5448
5171
|
"default": "N/A",
|
5449
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
5172
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5450
5173
|
}
|
5451
5174
|
]
|
5452
5175
|
},
|
@@ -5458,7 +5181,7 @@
|
|
5458
5181
|
"name": "system_arguments",
|
5459
5182
|
"type": "Hash",
|
5460
5183
|
"default": "N/A",
|
5461
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
5184
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
5462
5185
|
}
|
5463
5186
|
]
|
5464
5187
|
},
|
@@ -5476,13 +5199,7 @@
|
|
5476
5199
|
}
|
5477
5200
|
],
|
5478
5201
|
"methods": [
|
5479
|
-
{
|
5480
|
-
"name": "expand!",
|
5481
|
-
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
5482
|
-
"parameters": [
|
5483
5202
|
|
5484
|
-
]
|
5485
|
-
}
|
5486
5203
|
],
|
5487
5204
|
"previews": [
|
5488
5205
|
|
@@ -6220,126 +5937,61 @@
|
|
6220
5937
|
|
6221
5938
|
],
|
6222
5939
|
"previews": [
|
5940
|
+
|
5941
|
+
],
|
5942
|
+
"subcomponents": [
|
5943
|
+
|
5944
|
+
]
|
5945
|
+
},
|
5946
|
+
{
|
5947
|
+
"fully_qualified_name": "Primer::Alpha::RadioButtonGroup",
|
5948
|
+
"description": "A group of mutually exclusive radio buttons.",
|
5949
|
+
"accessibility_docs": null,
|
5950
|
+
"is_form_component": true,
|
5951
|
+
"is_published": false,
|
5952
|
+
"requires_js": false,
|
5953
|
+
"component": "RadioButtonGroup",
|
5954
|
+
"status": "alpha",
|
5955
|
+
"a11y_reviewed": false,
|
5956
|
+
"short_name": "RadioButtonGroup",
|
5957
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/radio_button_group.rb",
|
5958
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/radio_button_group/default/",
|
5959
|
+
"parameters": [
|
6223
5960
|
{
|
6224
|
-
"
|
6225
|
-
"
|
6226
|
-
"
|
6227
|
-
"
|
6228
|
-
"wont_fix": [
|
6229
|
-
"region"
|
6230
|
-
],
|
6231
|
-
"will_fix": [
|
6232
|
-
"color-contrast"
|
6233
|
-
]
|
6234
|
-
}
|
5961
|
+
"name": "name",
|
5962
|
+
"type": "String",
|
5963
|
+
"default": "N/A",
|
5964
|
+
"description": "Value for the HTML name attribute."
|
6235
5965
|
},
|
6236
5966
|
{
|
6237
|
-
"
|
6238
|
-
"
|
6239
|
-
"
|
6240
|
-
"
|
6241
|
-
"wont_fix": [
|
6242
|
-
"region"
|
6243
|
-
],
|
6244
|
-
"will_fix": [
|
6245
|
-
"color-contrast"
|
6246
|
-
]
|
6247
|
-
}
|
5967
|
+
"name": "label",
|
5968
|
+
"type": "String",
|
5969
|
+
"default": "N/A",
|
5970
|
+
"description": "Label text displayed above the input."
|
6248
5971
|
},
|
6249
5972
|
{
|
6250
|
-
"
|
6251
|
-
"
|
6252
|
-
"
|
6253
|
-
"
|
6254
|
-
"wont_fix": [
|
6255
|
-
"region"
|
6256
|
-
],
|
6257
|
-
"will_fix": [
|
6258
|
-
"color-contrast"
|
6259
|
-
]
|
6260
|
-
}
|
5973
|
+
"name": "hidden",
|
5974
|
+
"type": "Boolean",
|
5975
|
+
"default": "N/A",
|
5976
|
+
"description": "When set to `true`, visually hides the group."
|
6261
5977
|
},
|
6262
5978
|
{
|
6263
|
-
"
|
6264
|
-
"name": "checked",
|
6265
|
-
"snapshot": "true",
|
6266
|
-
"skip_rules": {
|
6267
|
-
"wont_fix": [
|
6268
|
-
"region"
|
6269
|
-
],
|
6270
|
-
"will_fix": [
|
6271
|
-
"color-contrast"
|
6272
|
-
]
|
6273
|
-
}
|
6274
|
-
},
|
6275
|
-
{
|
6276
|
-
"preview_path": "primer/alpha/radio_button/visually_hide_label",
|
6277
|
-
"name": "visually_hide_label",
|
6278
|
-
"snapshot": "true",
|
6279
|
-
"skip_rules": {
|
6280
|
-
"wont_fix": [
|
6281
|
-
"region"
|
6282
|
-
],
|
6283
|
-
"will_fix": [
|
6284
|
-
"color-contrast"
|
6285
|
-
]
|
6286
|
-
}
|
6287
|
-
},
|
6288
|
-
{
|
6289
|
-
"preview_path": "primer/alpha/radio_button/disabled",
|
6290
|
-
"name": "disabled",
|
6291
|
-
"snapshot": "true",
|
6292
|
-
"skip_rules": {
|
6293
|
-
"wont_fix": [
|
6294
|
-
"region"
|
6295
|
-
],
|
6296
|
-
"will_fix": [
|
6297
|
-
"color-contrast"
|
6298
|
-
]
|
6299
|
-
}
|
6300
|
-
}
|
6301
|
-
],
|
6302
|
-
"subcomponents": [
|
6303
|
-
|
6304
|
-
]
|
6305
|
-
},
|
6306
|
-
{
|
6307
|
-
"fully_qualified_name": "Primer::Alpha::RadioButtonGroup",
|
6308
|
-
"description": "A group of mutually exclusive radio buttons.",
|
6309
|
-
"accessibility_docs": null,
|
6310
|
-
"is_form_component": true,
|
6311
|
-
"is_published": false,
|
6312
|
-
"requires_js": false,
|
6313
|
-
"component": "RadioButtonGroup",
|
6314
|
-
"status": "alpha",
|
6315
|
-
"a11y_reviewed": false,
|
6316
|
-
"short_name": "RadioButtonGroup",
|
6317
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/radio_button_group.rb",
|
6318
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/radio_button_group/default/",
|
6319
|
-
"parameters": [
|
6320
|
-
{
|
6321
|
-
"name": "name",
|
6322
|
-
"type": "String",
|
6323
|
-
"default": "N/A",
|
6324
|
-
"description": "Value for the HTML name attribute."
|
6325
|
-
},
|
6326
|
-
{
|
6327
|
-
"name": "label",
|
5979
|
+
"name": "caption",
|
6328
5980
|
"type": "String",
|
6329
5981
|
"default": "N/A",
|
6330
|
-
"description": "
|
5982
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
6331
5983
|
},
|
6332
5984
|
{
|
6333
|
-
"name": "
|
5985
|
+
"name": "invalid",
|
6334
5986
|
"type": "Boolean",
|
6335
5987
|
"default": "N/A",
|
6336
|
-
"description": "
|
5988
|
+
"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."
|
6337
5989
|
},
|
6338
5990
|
{
|
6339
|
-
"name": "
|
5991
|
+
"name": "validation_message",
|
6340
5992
|
"type": "String",
|
6341
5993
|
"default": "N/A",
|
6342
|
-
"description": "A string
|
5994
|
+
"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."
|
6343
5995
|
},
|
6344
5996
|
{
|
6345
5997
|
"name": "label_arguments",
|
@@ -6398,6 +6050,19 @@
|
|
6398
6050
|
]
|
6399
6051
|
}
|
6400
6052
|
},
|
6053
|
+
{
|
6054
|
+
"preview_path": "primer/alpha/radio_button_group/invalid",
|
6055
|
+
"name": "invalid",
|
6056
|
+
"snapshot": "true",
|
6057
|
+
"skip_rules": {
|
6058
|
+
"wont_fix": [
|
6059
|
+
"region"
|
6060
|
+
],
|
6061
|
+
"will_fix": [
|
6062
|
+
"color-contrast"
|
6063
|
+
]
|
6064
|
+
}
|
6065
|
+
},
|
6401
6066
|
{
|
6402
6067
|
"preview_path": "primer/alpha/radio_button_group/with_caption",
|
6403
6068
|
"name": "with_caption",
|
@@ -6616,6 +6281,45 @@
|
|
6616
6281
|
]
|
6617
6282
|
}
|
6618
6283
|
},
|
6284
|
+
{
|
6285
|
+
"preview_path": "primer/alpha/segmented_control/trailing_label_width_small",
|
6286
|
+
"name": "trailing_label_width_small",
|
6287
|
+
"snapshot": "true",
|
6288
|
+
"skip_rules": {
|
6289
|
+
"wont_fix": [
|
6290
|
+
"region"
|
6291
|
+
],
|
6292
|
+
"will_fix": [
|
6293
|
+
"color-contrast"
|
6294
|
+
]
|
6295
|
+
}
|
6296
|
+
},
|
6297
|
+
{
|
6298
|
+
"preview_path": "primer/alpha/segmented_control/trailing_label_width_medium",
|
6299
|
+
"name": "trailing_label_width_medium",
|
6300
|
+
"snapshot": "true",
|
6301
|
+
"skip_rules": {
|
6302
|
+
"wont_fix": [
|
6303
|
+
"region"
|
6304
|
+
],
|
6305
|
+
"will_fix": [
|
6306
|
+
"color-contrast"
|
6307
|
+
]
|
6308
|
+
}
|
6309
|
+
},
|
6310
|
+
{
|
6311
|
+
"preview_path": "primer/alpha/segmented_control/trailing_label_width_large",
|
6312
|
+
"name": "trailing_label_width_large",
|
6313
|
+
"snapshot": "true",
|
6314
|
+
"skip_rules": {
|
6315
|
+
"wont_fix": [
|
6316
|
+
"region"
|
6317
|
+
],
|
6318
|
+
"will_fix": [
|
6319
|
+
"color-contrast"
|
6320
|
+
]
|
6321
|
+
}
|
6322
|
+
},
|
6619
6323
|
{
|
6620
6324
|
"preview_path": "primer/alpha/segmented_control/icon_only_small",
|
6621
6325
|
"name": "icon_only_small",
|
@@ -6775,10 +6479,32 @@
|
|
6775
6479
|
}
|
6776
6480
|
],
|
6777
6481
|
"slots": [
|
6778
|
-
|
6482
|
+
{
|
6483
|
+
"name": "trailing_visual_label",
|
6484
|
+
"description": "Optional trailing Label",
|
6485
|
+
"parameters": [
|
6486
|
+
{
|
6487
|
+
"name": "system_arguments",
|
6488
|
+
"type": "Hash",
|
6489
|
+
"default": "N/A",
|
6490
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}'s `with_trailing_visual_label` slot."
|
6491
|
+
}
|
6492
|
+
]
|
6493
|
+
}
|
6779
6494
|
],
|
6780
6495
|
"methods": [
|
6781
|
-
|
6496
|
+
{
|
6497
|
+
"name": "with_trailing_visual_label",
|
6498
|
+
"description": "Optional trailing label.",
|
6499
|
+
"parameters": [
|
6500
|
+
{
|
6501
|
+
"name": "system_arguments",
|
6502
|
+
"type": "Hash",
|
6503
|
+
"default": "N/A",
|
6504
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}'s `with_trailing_visual_label` slot."
|
6505
|
+
}
|
6506
|
+
]
|
6507
|
+
}
|
6782
6508
|
],
|
6783
6509
|
"previews": [
|
6784
6510
|
|
@@ -8117,6 +7843,45 @@
|
|
8117
7843
|
"color-contrast"
|
8118
7844
|
]
|
8119
7845
|
}
|
7846
|
+
},
|
7847
|
+
{
|
7848
|
+
"preview_path": "primer/alpha/text_field/input_group_leading_button",
|
7849
|
+
"name": "input_group_leading_button",
|
7850
|
+
"snapshot": "true",
|
7851
|
+
"skip_rules": {
|
7852
|
+
"wont_fix": [
|
7853
|
+
"region"
|
7854
|
+
],
|
7855
|
+
"will_fix": [
|
7856
|
+
"color-contrast"
|
7857
|
+
]
|
7858
|
+
}
|
7859
|
+
},
|
7860
|
+
{
|
7861
|
+
"preview_path": "primer/alpha/text_field/input_group_trailing_button",
|
7862
|
+
"name": "input_group_trailing_button",
|
7863
|
+
"snapshot": "true",
|
7864
|
+
"skip_rules": {
|
7865
|
+
"wont_fix": [
|
7866
|
+
"region"
|
7867
|
+
],
|
7868
|
+
"will_fix": [
|
7869
|
+
"color-contrast"
|
7870
|
+
]
|
7871
|
+
}
|
7872
|
+
},
|
7873
|
+
{
|
7874
|
+
"preview_path": "primer/alpha/text_field/input_group_leading_action_menu",
|
7875
|
+
"name": "input_group_leading_action_menu",
|
7876
|
+
"snapshot": "true",
|
7877
|
+
"skip_rules": {
|
7878
|
+
"wont_fix": [
|
7879
|
+
"region"
|
7880
|
+
],
|
7881
|
+
"will_fix": [
|
7882
|
+
"color-contrast"
|
7883
|
+
]
|
7884
|
+
}
|
8120
7885
|
}
|
8121
7886
|
],
|
8122
7887
|
"subcomponents": [
|
@@ -8395,7 +8160,13 @@
|
|
8395
8160
|
|
8396
8161
|
],
|
8397
8162
|
"methods": [
|
8163
|
+
{
|
8164
|
+
"name": "id",
|
8165
|
+
"description": "Returns the value of attribute id.",
|
8166
|
+
"parameters": [
|
8398
8167
|
|
8168
|
+
]
|
8169
|
+
}
|
8399
8170
|
],
|
8400
8171
|
"previews": [
|
8401
8172
|
{
|
@@ -8514,6 +8285,19 @@
|
|
8514
8285
|
"color-contrast"
|
8515
8286
|
]
|
8516
8287
|
}
|
8288
|
+
},
|
8289
|
+
{
|
8290
|
+
"preview_path": "primer/alpha/tooltip/tooltip_with_dialog_moving_focus_to_input",
|
8291
|
+
"name": "tooltip_with_dialog_moving_focus_to_input",
|
8292
|
+
"snapshot": "false",
|
8293
|
+
"skip_rules": {
|
8294
|
+
"wont_fix": [
|
8295
|
+
"region"
|
8296
|
+
],
|
8297
|
+
"will_fix": [
|
8298
|
+
"color-contrast"
|
8299
|
+
]
|
8300
|
+
}
|
8517
8301
|
}
|
8518
8302
|
],
|
8519
8303
|
"subcomponents": [
|
@@ -9707,6 +9491,12 @@
|
|
9707
9491
|
"default": "`false`",
|
9708
9492
|
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
9709
9493
|
},
|
9494
|
+
{
|
9495
|
+
"name": "inactive",
|
9496
|
+
"type": "Boolean",
|
9497
|
+
"default": "`false`",
|
9498
|
+
"description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
|
9499
|
+
},
|
9710
9500
|
{
|
9711
9501
|
"name": "system_arguments",
|
9712
9502
|
"type": "Hash",
|
@@ -10772,6 +10562,19 @@
|
|
10772
10562
|
"color-contrast"
|
10773
10563
|
]
|
10774
10564
|
}
|
10565
|
+
},
|
10566
|
+
{
|
10567
|
+
"preview_path": "primer/beta/button/inactive",
|
10568
|
+
"name": "inactive",
|
10569
|
+
"snapshot": "true",
|
10570
|
+
"skip_rules": {
|
10571
|
+
"wont_fix": [
|
10572
|
+
"region"
|
10573
|
+
],
|
10574
|
+
"will_fix": [
|
10575
|
+
"color-contrast"
|
10576
|
+
]
|
10577
|
+
}
|
10775
10578
|
}
|
10776
10579
|
],
|
10777
10580
|
"subcomponents": [
|
@@ -12151,7 +11954,7 @@
|
|
12151
11954
|
{
|
12152
11955
|
"name": "underline",
|
12153
11956
|
"type": "Boolean",
|
12154
|
-
"default": "`
|
11957
|
+
"default": "`false`",
|
12155
11958
|
"description": "Whether or not to underline the link."
|
12156
11959
|
},
|
12157
11960
|
{
|
@@ -12326,12 +12129,662 @@
|
|
12326
12129
|
],
|
12327
12130
|
"methods": [
|
12328
12131
|
|
12329
|
-
],
|
12330
|
-
"previews": [
|
12132
|
+
],
|
12133
|
+
"previews": [
|
12134
|
+
|
12135
|
+
],
|
12136
|
+
"subcomponents": [
|
12137
|
+
|
12138
|
+
]
|
12139
|
+
},
|
12140
|
+
{
|
12141
|
+
"fully_qualified_name": "Primer::Beta::NavList",
|
12142
|
+
"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.",
|
12143
|
+
"accessibility_docs": null,
|
12144
|
+
"is_form_component": false,
|
12145
|
+
"is_published": true,
|
12146
|
+
"requires_js": true,
|
12147
|
+
"component": "NavList",
|
12148
|
+
"status": "beta",
|
12149
|
+
"a11y_reviewed": true,
|
12150
|
+
"short_name": "NavList",
|
12151
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list.rb",
|
12152
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/default/",
|
12153
|
+
"parameters": [
|
12154
|
+
{
|
12155
|
+
"name": "selected_item_id",
|
12156
|
+
"type": "Symbol",
|
12157
|
+
"default": "`nil`",
|
12158
|
+
"description": "The ID of the currently selected item. The default is `nil`, meaning no item is selected."
|
12159
|
+
},
|
12160
|
+
{
|
12161
|
+
"name": "system_arguments",
|
12162
|
+
"type": "Hash",
|
12163
|
+
"default": "N/A",
|
12164
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12165
|
+
}
|
12166
|
+
],
|
12167
|
+
"slots": [
|
12168
|
+
{
|
12169
|
+
"name": "heading",
|
12170
|
+
"description": "The heading for the list at large. Accepts the arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Heading{{/link_to_component}}.",
|
12171
|
+
"parameters": [
|
12172
|
+
|
12173
|
+
]
|
12174
|
+
},
|
12175
|
+
{
|
12176
|
+
"name": "items",
|
12177
|
+
"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.",
|
12178
|
+
"parameters": [
|
12179
|
+
|
12180
|
+
]
|
12181
|
+
}
|
12182
|
+
],
|
12183
|
+
"methods": [
|
12184
|
+
{
|
12185
|
+
"name": "with_item",
|
12186
|
+
"description": "Adds an item to the list.",
|
12187
|
+
"parameters": [
|
12188
|
+
{
|
12189
|
+
"name": "component_klass",
|
12190
|
+
"type": "Class",
|
12191
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12192
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12193
|
+
},
|
12194
|
+
{
|
12195
|
+
"name": "system_arguments",
|
12196
|
+
"type": "Hash",
|
12197
|
+
"default": "N/A",
|
12198
|
+
"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."
|
12199
|
+
}
|
12200
|
+
]
|
12201
|
+
},
|
12202
|
+
{
|
12203
|
+
"name": "with_avatar_item",
|
12204
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
12205
|
+
"parameters": [
|
12206
|
+
{
|
12207
|
+
"name": "src",
|
12208
|
+
"type": "String",
|
12209
|
+
"default": "N/A",
|
12210
|
+
"description": "The source url of the avatar image."
|
12211
|
+
},
|
12212
|
+
{
|
12213
|
+
"name": "username",
|
12214
|
+
"type": "String",
|
12215
|
+
"default": "N/A",
|
12216
|
+
"description": "The username associated with the avatar."
|
12217
|
+
},
|
12218
|
+
{
|
12219
|
+
"name": "full_name",
|
12220
|
+
"type": "String",
|
12221
|
+
"default": "`nil`",
|
12222
|
+
"description": "Optional. The user's full name."
|
12223
|
+
},
|
12224
|
+
{
|
12225
|
+
"name": "full_name_scheme",
|
12226
|
+
"type": "Symbol",
|
12227
|
+
"default": "`:block`",
|
12228
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
12229
|
+
},
|
12230
|
+
{
|
12231
|
+
"name": "component_klass",
|
12232
|
+
"type": "Class",
|
12233
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12234
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12235
|
+
},
|
12236
|
+
{
|
12237
|
+
"name": "avatar_arguments",
|
12238
|
+
"type": "Hash",
|
12239
|
+
"default": "`{}`",
|
12240
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
12241
|
+
},
|
12242
|
+
{
|
12243
|
+
"name": "system_arguments",
|
12244
|
+
"type": "Hash",
|
12245
|
+
"default": "N/A",
|
12246
|
+
"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."
|
12247
|
+
}
|
12248
|
+
]
|
12249
|
+
},
|
12250
|
+
{
|
12251
|
+
"name": "with_group",
|
12252
|
+
"description": "Adds a group to the list. A group is a list of links and a (required) heading.",
|
12253
|
+
"parameters": [
|
12254
|
+
{
|
12255
|
+
"name": "system_arguments",
|
12256
|
+
"type": "Hash",
|
12257
|
+
"default": "N/A",
|
12258
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Group{{/link_to_component}}."
|
12259
|
+
}
|
12260
|
+
]
|
12261
|
+
},
|
12262
|
+
{
|
12263
|
+
"name": "with_divider",
|
12264
|
+
"description": "Adds a divider to the list. Dividers visually separate items and groups.",
|
12265
|
+
"parameters": [
|
12266
|
+
{
|
12267
|
+
"name": "system_arguments",
|
12268
|
+
"type": "Hash",
|
12269
|
+
"default": "N/A",
|
12270
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Divider{{/link_to_component}}."
|
12271
|
+
}
|
12272
|
+
]
|
12273
|
+
},
|
12274
|
+
{
|
12275
|
+
"name": "build_item",
|
12276
|
+
"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.",
|
12277
|
+
"parameters": [
|
12278
|
+
{
|
12279
|
+
"name": "component_klass",
|
12280
|
+
"type": "Class",
|
12281
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12282
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12283
|
+
},
|
12284
|
+
{
|
12285
|
+
"name": "system_arguments",
|
12286
|
+
"type": "Hash",
|
12287
|
+
"default": "N/A",
|
12288
|
+
"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."
|
12289
|
+
}
|
12290
|
+
]
|
12291
|
+
},
|
12292
|
+
{
|
12293
|
+
"name": "build_avatar_item",
|
12294
|
+
"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.",
|
12295
|
+
"parameters": [
|
12296
|
+
{
|
12297
|
+
"name": "src",
|
12298
|
+
"type": "String",
|
12299
|
+
"default": "N/A",
|
12300
|
+
"description": "The source url of the avatar image."
|
12301
|
+
},
|
12302
|
+
{
|
12303
|
+
"name": "username",
|
12304
|
+
"type": "String",
|
12305
|
+
"default": "N/A",
|
12306
|
+
"description": "The username associated with the avatar."
|
12307
|
+
},
|
12308
|
+
{
|
12309
|
+
"name": "full_name",
|
12310
|
+
"type": "String",
|
12311
|
+
"default": "`nil`",
|
12312
|
+
"description": "Optional. The user's full name."
|
12313
|
+
},
|
12314
|
+
{
|
12315
|
+
"name": "full_name_scheme",
|
12316
|
+
"type": "Symbol",
|
12317
|
+
"default": "`:block`",
|
12318
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
12319
|
+
},
|
12320
|
+
{
|
12321
|
+
"name": "component_klass",
|
12322
|
+
"type": "Class",
|
12323
|
+
"default": "`Primer::Beta::NavList::Item`",
|
12324
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}"
|
12325
|
+
},
|
12326
|
+
{
|
12327
|
+
"name": "avatar_arguments",
|
12328
|
+
"type": "Hash",
|
12329
|
+
"default": "`{}`",
|
12330
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
12331
|
+
},
|
12332
|
+
{
|
12333
|
+
"name": "system_arguments",
|
12334
|
+
"type": "Hash",
|
12335
|
+
"default": "N/A",
|
12336
|
+
"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."
|
12337
|
+
}
|
12338
|
+
]
|
12339
|
+
},
|
12340
|
+
{
|
12341
|
+
"name": "render_outer_list?",
|
12342
|
+
"description": "Lists that contain top-level items (i.e. items outside of a group) should be wrapped in a <ul>",
|
12343
|
+
"parameters": [
|
12344
|
+
|
12345
|
+
]
|
12346
|
+
}
|
12347
|
+
],
|
12348
|
+
"previews": [
|
12349
|
+
{
|
12350
|
+
"preview_path": "primer/beta/nav_list/playground",
|
12351
|
+
"name": "playground",
|
12352
|
+
"snapshot": "false",
|
12353
|
+
"skip_rules": {
|
12354
|
+
"wont_fix": [
|
12355
|
+
"region"
|
12356
|
+
],
|
12357
|
+
"will_fix": [
|
12358
|
+
"color-contrast"
|
12359
|
+
]
|
12360
|
+
}
|
12361
|
+
},
|
12362
|
+
{
|
12363
|
+
"preview_path": "primer/beta/nav_list/default",
|
12364
|
+
"name": "default",
|
12365
|
+
"snapshot": "true",
|
12366
|
+
"skip_rules": {
|
12367
|
+
"wont_fix": [
|
12368
|
+
"region"
|
12369
|
+
],
|
12370
|
+
"will_fix": [
|
12371
|
+
"color-contrast"
|
12372
|
+
]
|
12373
|
+
}
|
12374
|
+
},
|
12375
|
+
{
|
12376
|
+
"preview_path": "primer/beta/nav_list/top_level_items",
|
12377
|
+
"name": "top_level_items",
|
12378
|
+
"snapshot": "false",
|
12379
|
+
"skip_rules": {
|
12380
|
+
"wont_fix": [
|
12381
|
+
"region"
|
12382
|
+
],
|
12383
|
+
"will_fix": [
|
12384
|
+
"color-contrast"
|
12385
|
+
]
|
12386
|
+
}
|
12387
|
+
},
|
12388
|
+
{
|
12389
|
+
"preview_path": "primer/beta/nav_list/show_more_item",
|
12390
|
+
"name": "show_more_item",
|
12391
|
+
"snapshot": "true",
|
12392
|
+
"skip_rules": {
|
12393
|
+
"wont_fix": [
|
12394
|
+
"region"
|
12395
|
+
],
|
12396
|
+
"will_fix": [
|
12397
|
+
"color-contrast"
|
12398
|
+
]
|
12399
|
+
}
|
12400
|
+
},
|
12401
|
+
{
|
12402
|
+
"preview_path": "primer/beta/nav_list/trailing_action",
|
12403
|
+
"name": "trailing_action",
|
12404
|
+
"snapshot": "true",
|
12405
|
+
"skip_rules": {
|
12406
|
+
"wont_fix": [
|
12407
|
+
"region"
|
12408
|
+
],
|
12409
|
+
"will_fix": [
|
12410
|
+
"color-contrast"
|
12411
|
+
]
|
12412
|
+
}
|
12413
|
+
}
|
12414
|
+
],
|
12415
|
+
"subcomponents": [
|
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::Item",
|
12497
|
+
"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.",
|
12498
|
+
"accessibility_docs": null,
|
12499
|
+
"is_form_component": false,
|
12500
|
+
"is_published": true,
|
12501
|
+
"requires_js": true,
|
12502
|
+
"component": "NavList::Item",
|
12503
|
+
"status": "alpha",
|
12504
|
+
"a11y_reviewed": false,
|
12505
|
+
"short_name": "NavListItem",
|
12506
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/item.rb",
|
12507
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/item/default/",
|
12508
|
+
"parameters": [
|
12509
|
+
{
|
12510
|
+
"name": "selected_item_id",
|
12511
|
+
"type": "Symbol",
|
12512
|
+
"default": "`nil`",
|
12513
|
+
"description": "The ID of the currently selected list item. Used internally."
|
12514
|
+
},
|
12515
|
+
{
|
12516
|
+
"name": "selected_by_ids",
|
12517
|
+
"type": "Array<Symbol>",
|
12518
|
+
"default": "`[]`",
|
12519
|
+
"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."
|
12520
|
+
},
|
12521
|
+
{
|
12522
|
+
"name": "expanded",
|
12523
|
+
"type": "Boolean",
|
12524
|
+
"default": "`false`",
|
12525
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
12526
|
+
},
|
12527
|
+
{
|
12528
|
+
"name": "sub_item",
|
12529
|
+
"type": "Boolean",
|
12530
|
+
"default": "`false`",
|
12531
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
12532
|
+
},
|
12533
|
+
{
|
12534
|
+
"name": "system_arguments",
|
12535
|
+
"type": "Hash",
|
12536
|
+
"default": "N/A",
|
12537
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12538
|
+
}
|
12539
|
+
],
|
12540
|
+
"slots": [
|
12541
|
+
{
|
12542
|
+
"name": "items",
|
12543
|
+
"description": null,
|
12544
|
+
"parameters": [
|
12545
|
+
{
|
12546
|
+
"name": "system_arguments",
|
12547
|
+
"type": "Hash",
|
12548
|
+
"default": "N/A",
|
12549
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
12550
|
+
}
|
12551
|
+
]
|
12552
|
+
},
|
12553
|
+
{
|
12554
|
+
"name": "description",
|
12555
|
+
"description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
|
12556
|
+
"parameters": [
|
12557
|
+
|
12558
|
+
]
|
12559
|
+
},
|
12560
|
+
{
|
12561
|
+
"name": "leading_visual",
|
12562
|
+
"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.",
|
12563
|
+
"parameters": [
|
12564
|
+
|
12565
|
+
]
|
12566
|
+
},
|
12567
|
+
{
|
12568
|
+
"name": "trailing_visual",
|
12569
|
+
"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```",
|
12570
|
+
"parameters": [
|
12571
|
+
|
12572
|
+
]
|
12573
|
+
},
|
12574
|
+
{
|
12575
|
+
"name": "trailing_action",
|
12576
|
+
"description": "A button rendered after the trailing icon that can be used to show a menu, activate\na dialog, etc.",
|
12577
|
+
"parameters": [
|
12578
|
+
{
|
12579
|
+
"name": "system_arguments",
|
12580
|
+
"type": "Hash",
|
12581
|
+
"default": "N/A",
|
12582
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
12583
|
+
}
|
12584
|
+
]
|
12585
|
+
},
|
12586
|
+
{
|
12587
|
+
"name": "tooltip",
|
12588
|
+
"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.",
|
12589
|
+
"parameters": [
|
12590
|
+
{
|
12591
|
+
"name": "type",
|
12592
|
+
"type": "Symbol",
|
12593
|
+
"default": "`:description`",
|
12594
|
+
"description": "One of `:description` or `:label`."
|
12595
|
+
},
|
12596
|
+
{
|
12597
|
+
"name": "system_arguments",
|
12598
|
+
"type": "Hash",
|
12599
|
+
"default": "N/A",
|
12600
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
12601
|
+
}
|
12602
|
+
]
|
12603
|
+
}
|
12604
|
+
],
|
12605
|
+
"methods": [
|
12606
|
+
{
|
12607
|
+
"name": "selected_by_ids",
|
12608
|
+
"description": "Returns the value of attribute selected_by_ids.",
|
12609
|
+
"parameters": [
|
12610
|
+
|
12611
|
+
]
|
12612
|
+
},
|
12613
|
+
{
|
12614
|
+
"name": "sub_item",
|
12615
|
+
"description": "Returns the value of attribute sub_item.",
|
12616
|
+
"parameters": [
|
12617
|
+
|
12618
|
+
]
|
12619
|
+
},
|
12620
|
+
{
|
12621
|
+
"name": "sub_item?",
|
12622
|
+
"description": "Returns the value of attribute sub_item.\nWhether or not this item is nested under a parent item.",
|
12623
|
+
"parameters": [
|
12624
|
+
|
12625
|
+
]
|
12626
|
+
},
|
12627
|
+
{
|
12628
|
+
"name": "expand!",
|
12629
|
+
"description": "Cause this item to show its list of sub items when rendered.",
|
12630
|
+
"parameters": [
|
12631
|
+
|
12632
|
+
]
|
12633
|
+
},
|
12634
|
+
{
|
12635
|
+
"name": "item_active?",
|
12636
|
+
"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.",
|
12637
|
+
"parameters": [
|
12638
|
+
|
12639
|
+
]
|
12640
|
+
}
|
12641
|
+
],
|
12642
|
+
"previews": [
|
12643
|
+
|
12644
|
+
],
|
12645
|
+
"subcomponents": [
|
12646
|
+
|
12647
|
+
]
|
12648
|
+
},
|
12649
|
+
{
|
12650
|
+
"fully_qualified_name": "Primer::Beta::NavList::Divider",
|
12651
|
+
"description": "Separator with optional text rendered above groups or between individual items.",
|
12652
|
+
"accessibility_docs": null,
|
12653
|
+
"is_form_component": false,
|
12654
|
+
"is_published": true,
|
12655
|
+
"requires_js": false,
|
12656
|
+
"component": "NavList::Divider",
|
12657
|
+
"status": "alpha",
|
12658
|
+
"a11y_reviewed": false,
|
12659
|
+
"short_name": "NavListDivider",
|
12660
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/divider.rb",
|
12661
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/divider/default/",
|
12662
|
+
"parameters": [
|
12663
|
+
{
|
12664
|
+
"name": "scheme",
|
12665
|
+
"type": "Symbol",
|
12666
|
+
"default": "`:subtle`",
|
12667
|
+
"description": "Display a background color if scheme is `filled`."
|
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
|
+
],
|
12679
|
+
"methods": [
|
12680
|
+
|
12681
|
+
],
|
12682
|
+
"previews": [
|
12683
|
+
|
12684
|
+
],
|
12685
|
+
"subcomponents": [
|
12686
|
+
|
12687
|
+
]
|
12688
|
+
},
|
12689
|
+
{
|
12690
|
+
"fully_qualified_name": "Primer::Beta::NavList::Group",
|
12691
|
+
"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.",
|
12692
|
+
"accessibility_docs": null,
|
12693
|
+
"is_form_component": false,
|
12694
|
+
"is_published": true,
|
12695
|
+
"requires_js": true,
|
12696
|
+
"component": "NavList::Group",
|
12697
|
+
"status": "alpha",
|
12698
|
+
"a11y_reviewed": true,
|
12699
|
+
"short_name": "NavListGroup",
|
12700
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/nav_list/group.rb",
|
12701
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/nav_list/group/default/",
|
12702
|
+
"parameters": [
|
12703
|
+
{
|
12704
|
+
"name": "selected_item_id",
|
12705
|
+
"type": "Symbol",
|
12706
|
+
"default": "`nil`",
|
12707
|
+
"description": "The ID of the currently selected item. Used internally."
|
12708
|
+
},
|
12709
|
+
{
|
12710
|
+
"name": "system_arguments",
|
12711
|
+
"type": "Hash",
|
12712
|
+
"default": "N/A",
|
12713
|
+
"description": "{{link_to_system_arguments_docs}}"
|
12714
|
+
}
|
12715
|
+
],
|
12716
|
+
"slots": [
|
12717
|
+
{
|
12718
|
+
"name": "show_more_item",
|
12719
|
+
"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.",
|
12720
|
+
"parameters": [
|
12721
|
+
{
|
12722
|
+
"name": "src",
|
12723
|
+
"type": "String",
|
12724
|
+
"default": "N/A",
|
12725
|
+
"description": "The URL to query for additional pages of list items."
|
12726
|
+
},
|
12727
|
+
{
|
12728
|
+
"name": "pages",
|
12729
|
+
"type": "Integer",
|
12730
|
+
"default": "N/A",
|
12731
|
+
"description": "The total number of pages in the result set."
|
12732
|
+
},
|
12733
|
+
{
|
12734
|
+
"name": "component_klass",
|
12735
|
+
"type": "Class",
|
12736
|
+
"default": "N/A",
|
12737
|
+
"description": "A component class to use instead of the default `Primer::Beta::NavList::Item` class."
|
12738
|
+
},
|
12739
|
+
{
|
12740
|
+
"name": "system_arguments",
|
12741
|
+
"type": "Hash",
|
12742
|
+
"default": "N/A",
|
12743
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12744
|
+
}
|
12745
|
+
]
|
12746
|
+
},
|
12747
|
+
{
|
12748
|
+
"name": "items",
|
12749
|
+
"description": "Items.",
|
12750
|
+
"parameters": [
|
12751
|
+
{
|
12752
|
+
"name": "system_arguments",
|
12753
|
+
"type": "Hash",
|
12754
|
+
"default": "N/A",
|
12755
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::NavList::Item{{/link_to_component}}."
|
12756
|
+
}
|
12757
|
+
]
|
12758
|
+
},
|
12759
|
+
{
|
12760
|
+
"name": "heading",
|
12761
|
+
"description": "Heading text rendered above the list of items.",
|
12762
|
+
"parameters": [
|
12763
|
+
{
|
12764
|
+
"name": "system_arguments",
|
12765
|
+
"type": "Hash",
|
12766
|
+
"default": "N/A",
|
12767
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}."
|
12768
|
+
}
|
12769
|
+
]
|
12770
|
+
}
|
12771
|
+
],
|
12772
|
+
"methods": [
|
12773
|
+
{
|
12774
|
+
"name": "expand!",
|
12775
|
+
"description": "Cause this group to show its list of sub items when rendered.\n:nocov:",
|
12776
|
+
"parameters": [
|
12777
|
+
|
12778
|
+
]
|
12779
|
+
}
|
12780
|
+
],
|
12781
|
+
"previews": [
|
12331
12782
|
|
12332
|
-
|
12333
|
-
|
12783
|
+
],
|
12784
|
+
"subcomponents": [
|
12334
12785
|
|
12786
|
+
]
|
12787
|
+
}
|
12335
12788
|
]
|
12336
12789
|
},
|
12337
12790
|
{
|
@@ -14559,6 +15012,259 @@
|
|
14559
15012
|
|
14560
15013
|
]
|
14561
15014
|
},
|
15015
|
+
{
|
15016
|
+
"fully_qualified_name": "Primer::OpenProject::FlexLayout",
|
15017
|
+
"description": "A layouting component used to arrange multiple components next / below each other",
|
15018
|
+
"accessibility_docs": null,
|
15019
|
+
"is_form_component": false,
|
15020
|
+
"is_published": true,
|
15021
|
+
"requires_js": false,
|
15022
|
+
"component": "OpenProject::FlexLayout",
|
15023
|
+
"status": "open_project",
|
15024
|
+
"a11y_reviewed": false,
|
15025
|
+
"short_name": "OpenProjectFlexLayout",
|
15026
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/flex_layout.rb",
|
15027
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/flex_layout/default/",
|
15028
|
+
"parameters": [
|
15029
|
+
{
|
15030
|
+
"name": "system_arguments",
|
15031
|
+
"type": "Hash",
|
15032
|
+
"default": "N/A",
|
15033
|
+
"description": "{{link_to_system_arguments_docs}}"
|
15034
|
+
}
|
15035
|
+
],
|
15036
|
+
"slots": [
|
15037
|
+
{
|
15038
|
+
"name": "rows",
|
15039
|
+
"description": null,
|
15040
|
+
"parameters": [
|
15041
|
+
|
15042
|
+
]
|
15043
|
+
},
|
15044
|
+
{
|
15045
|
+
"name": "columns",
|
15046
|
+
"description": null,
|
15047
|
+
"parameters": [
|
15048
|
+
|
15049
|
+
]
|
15050
|
+
},
|
15051
|
+
{
|
15052
|
+
"name": "boxes",
|
15053
|
+
"description": "boxes are used when direction is set to row or column based on responsive breakpoints",
|
15054
|
+
"parameters": [
|
15055
|
+
|
15056
|
+
]
|
15057
|
+
}
|
15058
|
+
],
|
15059
|
+
"methods": [
|
15060
|
+
|
15061
|
+
],
|
15062
|
+
"previews": [
|
15063
|
+
{
|
15064
|
+
"preview_path": "primer/open_project/flex_layout/playground",
|
15065
|
+
"name": "playground",
|
15066
|
+
"snapshot": "false",
|
15067
|
+
"skip_rules": {
|
15068
|
+
"wont_fix": [
|
15069
|
+
"region"
|
15070
|
+
],
|
15071
|
+
"will_fix": [
|
15072
|
+
"color-contrast"
|
15073
|
+
]
|
15074
|
+
}
|
15075
|
+
},
|
15076
|
+
{
|
15077
|
+
"preview_path": "primer/open_project/flex_layout/default",
|
15078
|
+
"name": "default",
|
15079
|
+
"snapshot": "false",
|
15080
|
+
"skip_rules": {
|
15081
|
+
"wont_fix": [
|
15082
|
+
"region"
|
15083
|
+
],
|
15084
|
+
"will_fix": [
|
15085
|
+
"color-contrast"
|
15086
|
+
]
|
15087
|
+
}
|
15088
|
+
},
|
15089
|
+
{
|
15090
|
+
"preview_path": "primer/open_project/flex_layout/row_layout",
|
15091
|
+
"name": "row_layout",
|
15092
|
+
"snapshot": "false",
|
15093
|
+
"skip_rules": {
|
15094
|
+
"wont_fix": [
|
15095
|
+
"region"
|
15096
|
+
],
|
15097
|
+
"will_fix": [
|
15098
|
+
"color-contrast"
|
15099
|
+
]
|
15100
|
+
}
|
15101
|
+
},
|
15102
|
+
{
|
15103
|
+
"preview_path": "primer/open_project/flex_layout/column_layout",
|
15104
|
+
"name": "column_layout",
|
15105
|
+
"snapshot": "false",
|
15106
|
+
"skip_rules": {
|
15107
|
+
"wont_fix": [
|
15108
|
+
"region"
|
15109
|
+
],
|
15110
|
+
"will_fix": [
|
15111
|
+
"color-contrast"
|
15112
|
+
]
|
15113
|
+
}
|
15114
|
+
},
|
15115
|
+
{
|
15116
|
+
"preview_path": "primer/open_project/flex_layout/nested_layout",
|
15117
|
+
"name": "nested_layout",
|
15118
|
+
"snapshot": "false",
|
15119
|
+
"skip_rules": {
|
15120
|
+
"wont_fix": [
|
15121
|
+
"region"
|
15122
|
+
],
|
15123
|
+
"will_fix": [
|
15124
|
+
"color-contrast"
|
15125
|
+
]
|
15126
|
+
}
|
15127
|
+
}
|
15128
|
+
],
|
15129
|
+
"subcomponents": [
|
15130
|
+
|
15131
|
+
]
|
15132
|
+
},
|
15133
|
+
{
|
15134
|
+
"fully_qualified_name": "Primer::OpenProject::GridLayout",
|
15135
|
+
"description": "A layouting component used to arrange multiple components in a CSS Grid\nNote that this component only provides helpers (as the class names and grid-area styles).\nHowever, it does not define the actual Grid which should be done in a separate CSS-file.",
|
15136
|
+
"accessibility_docs": null,
|
15137
|
+
"is_form_component": false,
|
15138
|
+
"is_published": true,
|
15139
|
+
"requires_js": false,
|
15140
|
+
"component": "OpenProject::GridLayout",
|
15141
|
+
"status": "open_project",
|
15142
|
+
"a11y_reviewed": false,
|
15143
|
+
"short_name": "OpenProjectGridLayout",
|
15144
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/grid_layout.rb",
|
15145
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/grid_layout/default/",
|
15146
|
+
"parameters": [
|
15147
|
+
{
|
15148
|
+
"name": "css_class",
|
15149
|
+
"type": "String",
|
15150
|
+
"default": "N/A",
|
15151
|
+
"description": "The basic css class applied on the grid-container"
|
15152
|
+
},
|
15153
|
+
{
|
15154
|
+
"name": "system_arguments",
|
15155
|
+
"type": "Hash",
|
15156
|
+
"default": "N/A",
|
15157
|
+
"description": "{{link_to_system_arguments_docs}}"
|
15158
|
+
}
|
15159
|
+
],
|
15160
|
+
"slots": [
|
15161
|
+
{
|
15162
|
+
"name": "areas",
|
15163
|
+
"description": null,
|
15164
|
+
"parameters": [
|
15165
|
+
|
15166
|
+
]
|
15167
|
+
}
|
15168
|
+
],
|
15169
|
+
"methods": [
|
15170
|
+
{
|
15171
|
+
"name": "css_class",
|
15172
|
+
"description": "Returns the value of attribute css_class.",
|
15173
|
+
"parameters": [
|
15174
|
+
|
15175
|
+
]
|
15176
|
+
}
|
15177
|
+
],
|
15178
|
+
"previews": [
|
15179
|
+
{
|
15180
|
+
"preview_path": "primer/open_project/grid_layout/playground",
|
15181
|
+
"name": "playground",
|
15182
|
+
"snapshot": "false",
|
15183
|
+
"skip_rules": {
|
15184
|
+
"wont_fix": [
|
15185
|
+
"region"
|
15186
|
+
],
|
15187
|
+
"will_fix": [
|
15188
|
+
"color-contrast"
|
15189
|
+
]
|
15190
|
+
}
|
15191
|
+
},
|
15192
|
+
{
|
15193
|
+
"preview_path": "primer/open_project/grid_layout/default",
|
15194
|
+
"name": "default",
|
15195
|
+
"snapshot": "false",
|
15196
|
+
"skip_rules": {
|
15197
|
+
"wont_fix": [
|
15198
|
+
"region"
|
15199
|
+
],
|
15200
|
+
"will_fix": [
|
15201
|
+
"color-contrast"
|
15202
|
+
]
|
15203
|
+
}
|
15204
|
+
}
|
15205
|
+
],
|
15206
|
+
"subcomponents": [
|
15207
|
+
|
15208
|
+
]
|
15209
|
+
},
|
15210
|
+
{
|
15211
|
+
"fully_qualified_name": "Primer::OpenProject::GridLayout::Area",
|
15212
|
+
"description": "GridLayout::Area is an internal component that wraps the items in a div with the given new class and responding \"grid-area\"",
|
15213
|
+
"accessibility_docs": null,
|
15214
|
+
"is_form_component": false,
|
15215
|
+
"is_published": true,
|
15216
|
+
"requires_js": false,
|
15217
|
+
"component": "OpenProject::GridLayout::Area",
|
15218
|
+
"status": "open_project",
|
15219
|
+
"a11y_reviewed": false,
|
15220
|
+
"short_name": "OpenProjectGridLayoutArea",
|
15221
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/grid_layout/area.rb",
|
15222
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/grid_layout/area/default/",
|
15223
|
+
"parameters": [
|
15224
|
+
{
|
15225
|
+
"name": "css_class",
|
15226
|
+
"type": "String",
|
15227
|
+
"default": "N/A",
|
15228
|
+
"description": "The basic css class applied on the grid-container"
|
15229
|
+
},
|
15230
|
+
{
|
15231
|
+
"name": "area_name",
|
15232
|
+
"type": "Symbol",
|
15233
|
+
"default": "N/A",
|
15234
|
+
"description": "The specific area name, used for creating the element class and the \"grid-area\" style"
|
15235
|
+
},
|
15236
|
+
{
|
15237
|
+
"name": "component",
|
15238
|
+
"type": "ViewComponent::Base",
|
15239
|
+
"default": "`Primer::BaseComponent`",
|
15240
|
+
"description": "The instance of the component to be rendered."
|
15241
|
+
},
|
15242
|
+
{
|
15243
|
+
"name": "tag",
|
15244
|
+
"type": "Symbol",
|
15245
|
+
"default": "`:div`",
|
15246
|
+
"description": "One of `:div` or `:span`."
|
15247
|
+
},
|
15248
|
+
{
|
15249
|
+
"name": "system_arguments",
|
15250
|
+
"type": "Hash",
|
15251
|
+
"default": "N/A",
|
15252
|
+
"description": "{{link_to_system_arguments_docs}}"
|
15253
|
+
}
|
15254
|
+
],
|
15255
|
+
"slots": [
|
15256
|
+
|
15257
|
+
],
|
15258
|
+
"methods": [
|
15259
|
+
|
15260
|
+
],
|
15261
|
+
"previews": [
|
15262
|
+
|
15263
|
+
],
|
15264
|
+
"subcomponents": [
|
15265
|
+
|
15266
|
+
]
|
15267
|
+
},
|
14562
15268
|
{
|
14563
15269
|
"fully_qualified_name": "Primer::OpenProject::PageHeader",
|
14564
15270
|
"description": "A ViewComponent PageHeader inspired by the primer react variant",
|