openproject-primer_view_components 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +2931 -0
- data/LICENSE.txt +21 -0
- data/README.md +17 -0
- data/app/assets/javascripts/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- data/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +31 -0
- data/app/assets/javascripts/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/alpha/dropdown.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/alpha/image_crop.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- data/app/assets/javascripts/app/components/primer/alpha/nav_list.d.ts +28 -0
- data/app/assets/javascripts/app/components/primer/alpha/segmented_control.d.ts +12 -0
- data/app/assets/javascripts/app/components/primer/alpha/tab_container.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/alpha/toggle_switch.d.ts +30 -0
- data/app/assets/javascripts/app/components/primer/alpha/tool_tip.d.ts +26 -0
- data/app/assets/javascripts/app/components/primer/alpha/x_banner.d.ts +13 -0
- data/app/assets/javascripts/app/components/primer/anchored_position.d.ts +27 -0
- data/app/assets/javascripts/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/beta/relative_time.d.ts +1 -0
- data/app/assets/javascripts/app/components/primer/focus_group.d.ts +19 -0
- data/app/assets/javascripts/app/components/primer/primer.d.ts +21 -0
- data/app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts +10 -0
- data/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +1 -0
- data/app/assets/javascripts/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- data/app/assets/javascripts/primer_view_components.js +2 -0
- data/app/assets/javascripts/primer_view_components.js.map +1 -0
- data/app/assets/styles/primer_view_components.css +1 -0
- data/app/assets/styles/primer_view_components.css.map +1 -0
- data/app/components/primer/alpha/action_bar/divider.rb +30 -0
- data/app/components/primer/alpha/action_bar/item.rb +26 -0
- data/app/components/primer/alpha/action_bar.css +1 -0
- data/app/components/primer/alpha/action_bar.css.json +17 -0
- data/app/components/primer/alpha/action_bar.css.map +1 -0
- data/app/components/primer/alpha/action_bar.html.erb +12 -0
- data/app/components/primer/alpha/action_bar.pcss +69 -0
- data/app/components/primer/alpha/action_bar.rb +109 -0
- data/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- data/app/components/primer/alpha/action_bar_element.js +172 -0
- data/app/components/primer/alpha/action_bar_element.ts +175 -0
- data/app/components/primer/alpha/action_list/divider.rb +35 -0
- data/app/components/primer/alpha/action_list/form_wrapper.html.erb +10 -0
- data/app/components/primer/alpha/action_list/form_wrapper.rb +61 -0
- data/app/components/primer/alpha/action_list/heading.html.erb +8 -0
- data/app/components/primer/alpha/action_list/heading.rb +50 -0
- data/app/components/primer/alpha/action_list/item.html.erb +53 -0
- data/app/components/primer/alpha/action_list/item.rb +301 -0
- data/app/components/primer/alpha/action_list.css +1 -0
- data/app/components/primer/alpha/action_list.css.json +134 -0
- data/app/components/primer/alpha/action_list.css.map +1 -0
- data/app/components/primer/alpha/action_list.html.erb +20 -0
- data/app/components/primer/alpha/action_list.pcss +697 -0
- data/app/components/primer/alpha/action_list.rb +256 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +31 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.js +241 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +252 -0
- data/app/components/primer/alpha/action_menu/list.rb +123 -0
- data/app/components/primer/alpha/action_menu.html.erb +26 -0
- data/app/components/primer/alpha/action_menu.rb +411 -0
- data/app/components/primer/alpha/auto_complete/auto_complete.html.erb +24 -0
- data/app/components/primer/alpha/auto_complete/item.rb +46 -0
- data/app/components/primer/alpha/auto_complete.css +1 -0
- data/app/components/primer/alpha/auto_complete.css.json +23 -0
- data/app/components/primer/alpha/auto_complete.css.map +1 -0
- data/app/components/primer/alpha/auto_complete.pcss +118 -0
- data/app/components/primer/alpha/auto_complete.rb +158 -0
- data/app/components/primer/alpha/banner.css +1 -0
- data/app/components/primer/alpha/banner.css.json +24 -0
- data/app/components/primer/alpha/banner.css.map +1 -0
- data/app/components/primer/alpha/banner.html.erb +33 -0
- data/app/components/primer/alpha/banner.pcss +126 -0
- data/app/components/primer/alpha/banner.rb +141 -0
- data/app/components/primer/alpha/button_marketing.css +1 -0
- data/app/components/primer/alpha/button_marketing.css.json +33 -0
- data/app/components/primer/alpha/button_marketing.css.map +1 -0
- data/app/components/primer/alpha/button_marketing.pcss +168 -0
- data/app/components/primer/alpha/button_marketing.rb +73 -0
- data/app/components/primer/alpha/check_box.rb +74 -0
- data/app/components/primer/alpha/check_box_group.rb +36 -0
- data/app/components/primer/alpha/dialog/body.rb +28 -0
- data/app/components/primer/alpha/dialog/footer.rb +34 -0
- data/app/components/primer/alpha/dialog/header.html.erb +17 -0
- data/app/components/primer/alpha/dialog/header.rb +40 -0
- data/app/components/primer/alpha/dialog.css +1 -0
- data/app/components/primer/alpha/dialog.css.json +80 -0
- data/app/components/primer/alpha/dialog.css.map +1 -0
- data/app/components/primer/alpha/dialog.html.erb +12 -0
- data/app/components/primer/alpha/dialog.pcss +482 -0
- data/app/components/primer/alpha/dialog.rb +176 -0
- data/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- data/app/components/primer/alpha/dropdown/menu.html.erb +25 -0
- data/app/components/primer/alpha/dropdown/menu.js +1 -0
- data/app/components/primer/alpha/dropdown/menu.rb +107 -0
- data/app/components/primer/alpha/dropdown/menu.ts +1 -0
- data/app/components/primer/alpha/dropdown.css +1 -0
- data/app/components/primer/alpha/dropdown.css.json +40 -0
- data/app/components/primer/alpha/dropdown.css.map +1 -0
- data/app/components/primer/alpha/dropdown.d.ts +1 -0
- data/app/components/primer/alpha/dropdown.html.erb +9 -0
- data/app/components/primer/alpha/dropdown.js +1 -0
- data/app/components/primer/alpha/dropdown.pcss +261 -0
- data/app/components/primer/alpha/dropdown.rb +154 -0
- data/app/components/primer/alpha/dropdown.ts +1 -0
- data/app/components/primer/alpha/form_button.rb +32 -0
- data/app/components/primer/alpha/form_control.html.erb +26 -0
- data/app/components/primer/alpha/form_control.rb +105 -0
- data/app/components/primer/alpha/hellip_button.rb +43 -0
- data/app/components/primer/alpha/hidden_text_expander.rb +57 -0
- data/app/components/primer/alpha/image.rb +50 -0
- data/app/components/primer/alpha/image_crop.d.ts +1 -0
- data/app/components/primer/alpha/image_crop.html.erb +12 -0
- data/app/components/primer/alpha/image_crop.js +1 -0
- data/app/components/primer/alpha/image_crop.rb +39 -0
- data/app/components/primer/alpha/image_crop.ts +1 -0
- data/app/components/primer/alpha/layout.css +1 -0
- data/app/components/primer/alpha/layout.css.json +80 -0
- data/app/components/primer/alpha/layout.css.map +1 -0
- data/app/components/primer/alpha/layout.html.erb +5 -0
- data/app/components/primer/alpha/layout.pcss +268 -0
- data/app/components/primer/alpha/layout.rb +278 -0
- data/app/components/primer/alpha/menu.css +1 -0
- data/app/components/primer/alpha/menu.css.json +28 -0
- data/app/components/primer/alpha/menu.css.map +1 -0
- data/app/components/primer/alpha/menu.html.erb +6 -0
- data/app/components/primer/alpha/menu.pcss +119 -0
- data/app/components/primer/alpha/menu.rb +76 -0
- data/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- data/app/components/primer/alpha/modal_dialog.js +189 -0
- data/app/components/primer/alpha/modal_dialog.ts +202 -0
- data/app/components/primer/alpha/multi_input.rb +81 -0
- data/app/components/primer/alpha/nav_list/divider.rb +14 -0
- data/app/components/primer/alpha/nav_list/group.html.erb +7 -0
- data/app/components/primer/alpha/nav_list/group.rb +107 -0
- data/app/components/primer/alpha/nav_list/heading.rb +36 -0
- data/app/components/primer/alpha/nav_list/item.html.erb +13 -0
- data/app/components/primer/alpha/nav_list/item.rb +156 -0
- data/app/components/primer/alpha/nav_list.d.ts +28 -0
- data/app/components/primer/alpha/nav_list.html.erb +15 -0
- data/app/components/primer/alpha/nav_list.js +248 -0
- data/app/components/primer/alpha/nav_list.rb +281 -0
- data/app/components/primer/alpha/nav_list.ts +267 -0
- data/app/components/primer/alpha/navigation/tab.html.erb +11 -0
- data/app/components/primer/alpha/navigation/tab.rb +168 -0
- data/app/components/primer/alpha/octicon_symbols.html.erb +3 -0
- data/app/components/primer/alpha/octicon_symbols.rb +59 -0
- data/app/components/primer/alpha/overlay/body.rb +26 -0
- data/app/components/primer/alpha/overlay/footer.rb +41 -0
- data/app/components/primer/alpha/overlay/header.html.erb +17 -0
- data/app/components/primer/alpha/overlay/header.rb +50 -0
- data/app/components/primer/alpha/overlay.css +1 -0
- data/app/components/primer/alpha/overlay.css.json +8 -0
- data/app/components/primer/alpha/overlay.css.map +1 -0
- data/app/components/primer/alpha/overlay.html.erb +13 -0
- data/app/components/primer/alpha/overlay.pcss +30 -0
- data/app/components/primer/alpha/overlay.rb +214 -0
- data/app/components/primer/alpha/radio_button.rb +25 -0
- data/app/components/primer/alpha/radio_button_group.rb +36 -0
- data/app/components/primer/alpha/segmented_control/item.html.erb +13 -0
- data/app/components/primer/alpha/segmented_control/item.rb +30 -0
- data/app/components/primer/alpha/segmented_control.css +1 -0
- data/app/components/primer/alpha/segmented_control.css.json +33 -0
- data/app/components/primer/alpha/segmented_control.css.map +1 -0
- data/app/components/primer/alpha/segmented_control.d.ts +12 -0
- data/app/components/primer/alpha/segmented_control.html.erb +7 -0
- data/app/components/primer/alpha/segmented_control.js +47 -0
- data/app/components/primer/alpha/segmented_control.pcss +157 -0
- data/app/components/primer/alpha/segmented_control.rb +122 -0
- data/app/components/primer/alpha/segmented_control.ts +41 -0
- data/app/components/primer/alpha/select.rb +37 -0
- data/app/components/primer/alpha/submit_button.rb +32 -0
- data/app/components/primer/alpha/tab_container.d.ts +1 -0
- data/app/components/primer/alpha/tab_container.js +1 -0
- data/app/components/primer/alpha/tab_container.rb +43 -0
- data/app/components/primer/alpha/tab_container.ts +1 -0
- data/app/components/primer/alpha/tab_nav.css +1 -0
- data/app/components/primer/alpha/tab_nav.css.json +24 -0
- data/app/components/primer/alpha/tab_nav.css.map +1 -0
- data/app/components/primer/alpha/tab_nav.html.erb +11 -0
- data/app/components/primer/alpha/tab_nav.pcss +100 -0
- data/app/components/primer/alpha/tab_nav.rb +136 -0
- data/app/components/primer/alpha/tab_panels.html.erb +14 -0
- data/app/components/primer/alpha/tab_panels.rb +89 -0
- data/app/components/primer/alpha/text_area.rb +24 -0
- data/app/components/primer/alpha/text_field.css +1 -0
- data/app/components/primer/alpha/text_field.css.json +135 -0
- data/app/components/primer/alpha/text_field.css.map +1 -0
- data/app/components/primer/alpha/text_field.pcss +706 -0
- data/app/components/primer/alpha/text_field.rb +101 -0
- data/app/components/primer/alpha/toggle_switch.css +1 -0
- data/app/components/primer/alpha/toggle_switch.css.json +40 -0
- data/app/components/primer/alpha/toggle_switch.css.map +1 -0
- data/app/components/primer/alpha/toggle_switch.d.ts +30 -0
- data/app/components/primer/alpha/toggle_switch.html.erb +46 -0
- data/app/components/primer/alpha/toggle_switch.js +165 -0
- data/app/components/primer/alpha/toggle_switch.pcss +220 -0
- data/app/components/primer/alpha/toggle_switch.rb +96 -0
- data/app/components/primer/alpha/toggle_switch.ts +189 -0
- data/app/components/primer/alpha/tool_tip.d.ts +26 -0
- data/app/components/primer/alpha/tool_tip.js +427 -0
- data/app/components/primer/alpha/tool_tip.ts +430 -0
- data/app/components/primer/alpha/tooltip.rb +128 -0
- data/app/components/primer/alpha/underline_nav.css +1 -0
- data/app/components/primer/alpha/underline_nav.css.json +28 -0
- data/app/components/primer/alpha/underline_nav.css.map +1 -0
- data/app/components/primer/alpha/underline_nav.html.erb +15 -0
- data/app/components/primer/alpha/underline_nav.pcss +134 -0
- data/app/components/primer/alpha/underline_nav.rb +138 -0
- data/app/components/primer/alpha/underline_panels.html.erb +18 -0
- data/app/components/primer/alpha/underline_panels.rb +86 -0
- data/app/components/primer/alpha/x_banner.d.ts +13 -0
- data/app/components/primer/alpha/x_banner.js +49 -0
- data/app/components/primer/alpha/x_banner.ts +40 -0
- data/app/components/primer/anchored_position.d.ts +27 -0
- data/app/components/primer/anchored_position.js +147 -0
- data/app/components/primer/anchored_position.ts +153 -0
- data/app/components/primer/base_component.rb +172 -0
- data/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- data/app/components/primer/beta/auto_complete/auto_complete.html.erb +28 -0
- data/app/components/primer/beta/auto_complete/auto_complete.js +1 -0
- data/app/components/primer/beta/auto_complete/auto_complete.ts +1 -0
- data/app/components/primer/beta/auto_complete/item.html.erb +21 -0
- data/app/components/primer/beta/auto_complete/item.rb +84 -0
- data/app/components/primer/beta/auto_complete.rb +218 -0
- data/app/components/primer/beta/avatar.css +1 -0
- data/app/components/primer/beta/avatar.css.json +17 -0
- data/app/components/primer/beta/avatar.css.map +1 -0
- data/app/components/primer/beta/avatar.pcss +73 -0
- data/app/components/primer/beta/avatar.rb +84 -0
- data/app/components/primer/beta/avatar_stack.css +1 -0
- data/app/components/primer/beta/avatar_stack.css.json +28 -0
- data/app/components/primer/beta/avatar_stack.css.map +1 -0
- data/app/components/primer/beta/avatar_stack.html.erb +10 -0
- data/app/components/primer/beta/avatar_stack.pcss +141 -0
- data/app/components/primer/beta/avatar_stack.rb +92 -0
- data/app/components/primer/beta/base_button.rb +56 -0
- data/app/components/primer/beta/blankslate.css +1 -0
- data/app/components/primer/beta/blankslate.css.json +22 -0
- data/app/components/primer/beta/blankslate.css.map +1 -0
- data/app/components/primer/beta/blankslate.html.erb +19 -0
- data/app/components/primer/beta/blankslate.pcss +90 -0
- data/app/components/primer/beta/blankslate.rb +238 -0
- data/app/components/primer/beta/border_box/header.html.erb +4 -0
- data/app/components/primer/beta/border_box/header.rb +52 -0
- data/app/components/primer/beta/border_box.css +1 -0
- data/app/components/primer/beta/border_box.css.json +54 -0
- data/app/components/primer/beta/border_box.css.map +1 -0
- data/app/components/primer/beta/border_box.html.erb +12 -0
- data/app/components/primer/beta/border_box.pcss +284 -0
- data/app/components/primer/beta/border_box.rb +147 -0
- data/app/components/primer/beta/breadcrumbs.css +1 -0
- data/app/components/primer/beta/breadcrumbs.css.json +11 -0
- data/app/components/primer/beta/breadcrumbs.css.map +1 -0
- data/app/components/primer/beta/breadcrumbs.html.erb +8 -0
- data/app/components/primer/beta/breadcrumbs.pcss +30 -0
- data/app/components/primer/beta/breadcrumbs.rb +82 -0
- data/app/components/primer/beta/button.css +1 -0
- data/app/components/primer/beta/button.css.json +75 -0
- data/app/components/primer/beta/button.css.map +1 -0
- data/app/components/primer/beta/button.html.erb +23 -0
- data/app/components/primer/beta/button.pcss +366 -0
- data/app/components/primer/beta/button.rb +197 -0
- data/app/components/primer/beta/button_group.css +1 -0
- data/app/components/primer/beta/button_group.css.json +14 -0
- data/app/components/primer/beta/button_group.css.map +1 -0
- data/app/components/primer/beta/button_group.html.erb +5 -0
- data/app/components/primer/beta/button_group.pcss +27 -0
- data/app/components/primer/beta/button_group.rb +59 -0
- data/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- data/app/components/primer/beta/clipboard_copy.html.erb +8 -0
- data/app/components/primer/beta/clipboard_copy.js +43 -0
- data/app/components/primer/beta/clipboard_copy.rb +50 -0
- data/app/components/primer/beta/clipboard_copy.ts +55 -0
- data/app/components/primer/beta/close_button.rb +43 -0
- data/app/components/primer/beta/counter.css +1 -0
- data/app/components/primer/beta/counter.css.json +10 -0
- data/app/components/primer/beta/counter.css.map +1 -0
- data/app/components/primer/beta/counter.pcss +35 -0
- data/app/components/primer/beta/counter.rb +113 -0
- data/app/components/primer/beta/details.html.erb +8 -0
- data/app/components/primer/beta/details.rb +80 -0
- data/app/components/primer/beta/flash.css +1 -0
- data/app/components/primer/beta/flash.css.json +27 -0
- data/app/components/primer/beta/flash.css.map +1 -0
- data/app/components/primer/beta/flash.html.erb +10 -0
- data/app/components/primer/beta/flash.pcss +142 -0
- data/app/components/primer/beta/flash.rb +71 -0
- data/app/components/primer/beta/heading.rb +46 -0
- data/app/components/primer/beta/icon_button.html.erb +6 -0
- data/app/components/primer/beta/icon_button.rb +112 -0
- data/app/components/primer/beta/label.css +1 -0
- data/app/components/primer/beta/label.css.json +25 -0
- data/app/components/primer/beta/label.css.map +1 -0
- data/app/components/primer/beta/label.pcss +103 -0
- data/app/components/primer/beta/label.rb +100 -0
- data/app/components/primer/beta/link.css +1 -0
- data/app/components/primer/beta/link.css.json +19 -0
- data/app/components/primer/beta/link.css.map +1 -0
- data/app/components/primer/beta/link.pcss +64 -0
- data/app/components/primer/beta/link.rb +95 -0
- data/app/components/primer/beta/markdown.rb +290 -0
- data/app/components/primer/beta/octicon.html.erb +7 -0
- data/app/components/primer/beta/octicon.rb +88 -0
- data/app/components/primer/beta/popover.css +1 -0
- data/app/components/primer/beta/popover.css.json +39 -0
- data/app/components/primer/beta/popover.css.map +1 -0
- data/app/components/primer/beta/popover.html.erb +6 -0
- data/app/components/primer/beta/popover.pcss +225 -0
- data/app/components/primer/beta/popover.rb +127 -0
- data/app/components/primer/beta/progress_bar.css +1 -0
- data/app/components/primer/beta/progress_bar.css.json +10 -0
- data/app/components/primer/beta/progress_bar.css.map +1 -0
- data/app/components/primer/beta/progress_bar.html.erb +5 -0
- data/app/components/primer/beta/progress_bar.pcss +26 -0
- data/app/components/primer/beta/progress_bar.rb +72 -0
- data/app/components/primer/beta/relative_time.d.ts +1 -0
- data/app/components/primer/beta/relative_time.js +1 -0
- data/app/components/primer/beta/relative_time.rb +166 -0
- data/app/components/primer/beta/relative_time.ts +1 -0
- data/app/components/primer/beta/spinner.html.erb +4 -0
- data/app/components/primer/beta/spinner.rb +45 -0
- data/app/components/primer/beta/state.css +1 -0
- data/app/components/primer/beta/state.css.json +13 -0
- data/app/components/primer/beta/state.css.map +1 -0
- data/app/components/primer/beta/state.pcss +50 -0
- data/app/components/primer/beta/state.rb +76 -0
- data/app/components/primer/beta/subhead.css +1 -0
- data/app/components/primer/beta/subhead.css.json +12 -0
- data/app/components/primer/beta/subhead.css.map +1 -0
- data/app/components/primer/beta/subhead.html.erb +5 -0
- data/app/components/primer/beta/subhead.pcss +49 -0
- data/app/components/primer/beta/subhead.rb +135 -0
- data/app/components/primer/beta/text.rb +27 -0
- data/app/components/primer/beta/timeline_item.css +1 -0
- data/app/components/primer/beta/timeline_item.css.json +16 -0
- data/app/components/primer/beta/timeline_item.css.map +1 -0
- data/app/components/primer/beta/timeline_item.html.erb +5 -0
- data/app/components/primer/beta/timeline_item.pcss +93 -0
- data/app/components/primer/beta/timeline_item.rb +90 -0
- data/app/components/primer/beta/truncate.css +1 -0
- data/app/components/primer/beta/truncate.css.json +12 -0
- data/app/components/primer/beta/truncate.css.map +1 -0
- data/app/components/primer/beta/truncate.html.erb +5 -0
- data/app/components/primer/beta/truncate.pcss +31 -0
- data/app/components/primer/beta/truncate.rb +111 -0
- data/app/components/primer/blankslate_component.html.erb +25 -0
- data/app/components/primer/blankslate_component.rb +156 -0
- data/app/components/primer/box.rb +25 -0
- data/app/components/primer/button_component.html.erb +12 -0
- data/app/components/primer/button_component.rb +175 -0
- data/app/components/primer/component.rb +145 -0
- data/app/components/primer/conditional_wrapper.rb +36 -0
- data/app/components/primer/content.rb +12 -0
- data/app/components/primer/focus_group.d.ts +19 -0
- data/app/components/primer/focus_group.js +139 -0
- data/app/components/primer/focus_group.ts +133 -0
- data/app/components/primer/icon_button.html.erb +12 -0
- data/app/components/primer/icon_button.rb +108 -0
- data/app/components/primer/layout_component.html.erb +11 -0
- data/app/components/primer/layout_component.rb +73 -0
- data/app/components/primer/navigation/tab_component.rb +10 -0
- data/app/components/primer/primer.d.ts +21 -0
- data/app/components/primer/primer.js +21 -0
- data/app/components/primer/primer.pcss +42 -0
- data/app/components/primer/primer.ts +21 -0
- data/app/components/primer/tooltip.rb +91 -0
- data/app/components/primer/truncate.css +1 -0
- data/app/components/primer/truncate.css.json +13 -0
- data/app/components/primer/truncate.css.map +1 -0
- data/app/components/primer/truncate.pcss +30 -0
- data/app/components/primer/truncate.rb +52 -0
- data/app/forms/after_content_form/after_content.html.erb +1 -0
- data/app/forms/after_content_form.rb +13 -0
- data/app/forms/application_form.rb +5 -0
- data/app/forms/array_check_box_group_form/places_lopez_caption.html.erb +1 -0
- data/app/forms/array_check_box_group_form.rb +15 -0
- data/app/forms/both_types_of_caption_form/first_name_caption.html.erb +1 -0
- data/app/forms/both_types_of_caption_form.rb +13 -0
- data/app/forms/caption_template_form/age_middle_aged_caption.html.erb +1 -0
- data/app/forms/caption_template_form/age_young_caption.html.erb +1 -0
- data/app/forms/caption_template_form/cool_caption.html.erb +1 -0
- data/app/forms/caption_template_form/first_name_caption.html.erb +1 -0
- data/app/forms/caption_template_form.rb +22 -0
- data/app/forms/check_box_group_form.rb +28 -0
- data/app/forms/check_box_with_nested_form.rb +39 -0
- data/app/forms/composed_form.rb +14 -0
- data/app/forms/example_toggle_switch_form/example_field_caption.html.erb +1 -0
- data/app/forms/example_toggle_switch_form.rb +8 -0
- data/app/forms/first_name_form.rb +13 -0
- data/app/forms/horizontal_form.rb +34 -0
- data/app/forms/immediate_validation_form.rb +29 -0
- data/app/forms/invalid_form.rb +21 -0
- data/app/forms/last_name_form.rb +13 -0
- data/app/forms/multi_input_form.rb +27 -0
- data/app/forms/multi_text_field_form.rb +27 -0
- data/app/forms/name_with_question_mark_form/enabled_caption.html.erb +1 -0
- data/app/forms/name_with_question_mark_form.rb +11 -0
- data/app/forms/radio_button_group_form.rb +12 -0
- data/app/forms/radio_button_with_nested_form.rb +39 -0
- data/app/forms/select_form.rb +12 -0
- data/app/forms/single_text_field_form.rb +13 -0
- data/app/forms/submit_button_form.rb +26 -0
- data/app/forms/text_field_and_checkbox_form.rb +19 -0
- data/app/helpers/primer/form_helper.rb +23 -0
- data/app/lib/primer/attributes_helper.rb +105 -0
- data/app/lib/primer/audited/dsl.rb +32 -0
- data/app/lib/primer/class_name_helper.rb +29 -0
- data/app/lib/primer/css/layout.css +1541 -0
- data/app/lib/primer/css/layout.css.json +316 -0
- data/app/lib/primer/css/utilities.css +7304 -0
- data/app/lib/primer/css/utilities.css.json +1659 -0
- data/app/lib/primer/fetch_or_fallback_helper.rb +65 -0
- data/app/lib/primer/join_style_arguments_helper.rb +14 -0
- data/app/lib/primer/octicon/cache.rb +44 -0
- data/app/lib/primer/status/dsl.rb +44 -0
- data/app/lib/primer/tab_nav_helper.rb +35 -0
- data/app/lib/primer/tabbed_component_helper.rb +39 -0
- data/app/lib/primer/test_selector_helper.rb +20 -0
- data/app/lib/primer/underline_nav_helper.rb +44 -0
- data/app/lib/primer/view_helper.rb +21 -0
- data/lib/postcss_mixins/activeIndicatorLine.pcss +11 -0
- data/lib/postcss_mixins/clearfix.pcss +12 -0
- data/lib/postcss_mixins/focusBoxShadowInset.pcss +6 -0
- data/lib/postcss_mixins/focusOutline.pcss +5 -0
- data/lib/postcss_mixins/focusOutlineOnEmphasis.pcss +6 -0
- data/lib/postcss_mixins/minTouchTarget.js +20 -0
- data/lib/postcss_mixins/targetBoxShadow.pcss +6 -0
- data/lib/primer/accessibility.rb +74 -0
- data/lib/primer/classify/utilities.rb +201 -0
- data/lib/primer/classify/utilities.yml +1879 -0
- data/lib/primer/classify/validation.rb +18 -0
- data/lib/primer/classify.rb +135 -0
- data/lib/primer/deprecations.rb +99 -0
- data/lib/primer/deprecations.yml +45 -0
- data/lib/primer/example_image.rb +8 -0
- data/lib/primer/form_components.rb +57 -0
- data/lib/primer/forms/acts_as_component.rb +129 -0
- data/lib/primer/forms/base.html.erb +8 -0
- data/lib/primer/forms/base.rb +133 -0
- data/lib/primer/forms/base_component.rb +76 -0
- data/lib/primer/forms/buffer_rewriter.rb +51 -0
- data/lib/primer/forms/builder.rb +71 -0
- data/lib/primer/forms/button.html.erb +4 -0
- data/lib/primer/forms/button.rb +66 -0
- data/lib/primer/forms/caption.html.erb +10 -0
- data/lib/primer/forms/caption.rb +29 -0
- data/lib/primer/forms/check_box.html.erb +16 -0
- data/lib/primer/forms/check_box.rb +46 -0
- data/lib/primer/forms/check_box_group.html.erb +17 -0
- data/lib/primer/forms/check_box_group.rb +19 -0
- data/lib/primer/forms/dsl/button_input.rb +29 -0
- data/lib/primer/forms/dsl/check_box_group_input.rb +53 -0
- data/lib/primer/forms/dsl/check_box_input.rb +54 -0
- data/lib/primer/forms/dsl/form_object.rb +25 -0
- data/lib/primer/forms/dsl/form_reference_input.rb +59 -0
- data/lib/primer/forms/dsl/hidden_input.rb +29 -0
- data/lib/primer/forms/dsl/input.rb +315 -0
- data/lib/primer/forms/dsl/input_group.rb +34 -0
- data/lib/primer/forms/dsl/input_methods.rb +139 -0
- data/lib/primer/forms/dsl/multi_input.rb +55 -0
- data/lib/primer/forms/dsl/radio_button_group_input.rb +37 -0
- data/lib/primer/forms/dsl/radio_button_input.rb +37 -0
- data/lib/primer/forms/dsl/select_input.rb +61 -0
- data/lib/primer/forms/dsl/submit_button_input.rb +29 -0
- data/lib/primer/forms/dsl/text_area_input.rb +33 -0
- data/lib/primer/forms/dsl/text_field_input.rb +86 -0
- data/lib/primer/forms/dsl/toggle_switch_input.rb +39 -0
- data/lib/primer/forms/form_control.html.erb +20 -0
- data/lib/primer/forms/form_control.rb +28 -0
- data/lib/primer/forms/form_list.html.erb +5 -0
- data/lib/primer/forms/form_list.rb +21 -0
- data/lib/primer/forms/form_reference.html.erb +3 -0
- data/lib/primer/forms/form_reference.rb +18 -0
- data/lib/primer/forms/group.html.erb +5 -0
- data/lib/primer/forms/group.rb +27 -0
- data/lib/primer/forms/hidden_field.html.erb +1 -0
- data/lib/primer/forms/hidden_field.rb +15 -0
- data/lib/primer/forms/multi.html.erb +7 -0
- data/lib/primer/forms/multi.rb +16 -0
- data/lib/primer/forms/primer_base_component_wrapper.html.erb +3 -0
- data/lib/primer/forms/primer_base_component_wrapper.rb +24 -0
- data/lib/primer/forms/primer_multi_input.d.ts +10 -0
- data/lib/primer/forms/primer_multi_input.js +45 -0
- data/lib/primer/forms/primer_multi_input.ts +46 -0
- data/lib/primer/forms/primer_text_field.d.ts +1 -0
- data/lib/primer/forms/primer_text_field.js +73 -0
- data/lib/primer/forms/primer_text_field.ts +56 -0
- data/lib/primer/forms/radio_button.html.erb +16 -0
- data/lib/primer/forms/radio_button.rb +29 -0
- data/lib/primer/forms/radio_button_group.html.erb +17 -0
- data/lib/primer/forms/radio_button_group.rb +19 -0
- data/lib/primer/forms/select.html.erb +5 -0
- data/lib/primer/forms/select.rb +29 -0
- data/lib/primer/forms/separator.html.erb +1 -0
- data/lib/primer/forms/separator.rb +8 -0
- data/lib/primer/forms/spacing_wrapper.html.erb +3 -0
- data/lib/primer/forms/spacing_wrapper.rb +8 -0
- data/lib/primer/forms/submit_button.html.erb +1 -0
- data/lib/primer/forms/submit_button.rb +14 -0
- data/lib/primer/forms/text_area.html.erb +5 -0
- data/lib/primer/forms/text_area.rb +20 -0
- data/lib/primer/forms/text_field.html.erb +17 -0
- data/lib/primer/forms/text_field.rb +46 -0
- data/lib/primer/forms/toggle_switch.html.erb +22 -0
- data/lib/primer/forms/toggle_switch.rb +21 -0
- data/lib/primer/forms/toggle_switch_form.rb +81 -0
- data/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- data/lib/primer/forms/toggle_switch_input.js +34 -0
- data/lib/primer/forms/toggle_switch_input.ts +26 -0
- data/lib/primer/forms/utils.rb +48 -0
- data/lib/primer/static/generate_arguments.rb +55 -0
- data/lib/primer/static/generate_audited_at.rb +17 -0
- data/lib/primer/static/generate_constants.rb +19 -0
- data/lib/primer/static/generate_info_arch.rb +160 -0
- data/lib/primer/static/generate_previews.rb +61 -0
- data/lib/primer/static/generate_statuses.rb +17 -0
- data/lib/primer/static.rb +72 -0
- data/lib/primer/view_components/audited.rb +14 -0
- data/lib/primer/view_components/constants.rb +55 -0
- data/lib/primer/view_components/engine.rb +69 -0
- data/lib/primer/view_components/linters/accessibility.yml +9 -0
- data/lib/primer/view_components/linters/argument_mappers/base.rb +100 -0
- data/lib/primer/view_components/linters/argument_mappers/button.rb +72 -0
- data/lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb +21 -0
- data/lib/primer/view_components/linters/argument_mappers/close_button.rb +43 -0
- data/lib/primer/view_components/linters/argument_mappers/conversion_error.rb +10 -0
- data/lib/primer/view_components/linters/argument_mappers/flash.rb +32 -0
- data/lib/primer/view_components/linters/argument_mappers/helpers/erb_block.rb +67 -0
- data/lib/primer/view_components/linters/argument_mappers/label.rb +56 -0
- data/lib/primer/view_components/linters/argument_mappers/system_arguments.rb +48 -0
- data/lib/primer/view_components/linters/autocorrectable.rb +32 -0
- data/lib/primer/view_components/linters/base_linter.rb +190 -0
- data/lib/primer/view_components/linters/blankslate_api_migration.rb +152 -0
- data/lib/primer/view_components/linters/blankslate_component_migration_counter.rb +14 -0
- data/lib/primer/view_components/linters/breadcrumbs_component_migration_counter.rb +14 -0
- data/lib/primer/view_components/linters/button_component_migration_counter.rb +26 -0
- data/lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb +20 -0
- data/lib/primer/view_components/linters/close_button_component_migration_counter.rb +121 -0
- data/lib/primer/view_components/linters/deprecated_components_counter.rb +84 -0
- data/lib/primer/view_components/linters/details_menu_migration.rb +35 -0
- data/lib/primer/view_components/linters/disallow_action_list.rb +73 -0
- data/lib/primer/view_components/linters/disallow_component_css_counter.rb +69 -0
- data/lib/primer/view_components/linters/flash_migration_counter.rb +36 -0
- data/lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb +20 -0
- data/lib/primer/view_components/linters/helpers/rubocop_helpers.rb +14 -0
- data/lib/primer/view_components/linters/helpers/rule_helpers.rb +39 -0
- data/lib/primer/view_components/linters/label_component_migration_counter.rb +24 -0
- data/lib/primer/view_components/linters/migrate_deprecated_flash_arguments.rb +140 -0
- data/lib/primer/view_components/linters/severity_schema.rb +14 -0
- data/lib/primer/view_components/linters/subhead_component_migration_counter.rb +14 -0
- data/lib/primer/view_components/linters/super_in_component_templates.rb +65 -0
- data/lib/primer/view_components/linters/tag_tree_helpers.rb +61 -0
- data/lib/primer/view_components/linters/tooltipped_migration.rb +35 -0
- data/lib/primer/view_components/linters/two_column_layout_migration_counter.rb +158 -0
- data/lib/primer/view_components/linters.rb +3 -0
- data/lib/primer/view_components/statuses.rb +14 -0
- data/lib/primer/view_components/version.rb +18 -0
- data/lib/primer/view_components.rb +15 -0
- data/lib/primer/yard/backend.rb +24 -0
- data/lib/primer/yard/component_manifest.rb +144 -0
- data/lib/primer/yard/component_ref.rb +54 -0
- data/lib/primer/yard/docs_helper.rb +98 -0
- data/lib/primer/yard/info_arch_docs_helper.rb +31 -0
- data/lib/primer/yard/legacy_gatsby_backend.rb +233 -0
- data/lib/primer/yard/lookbook_docs_helper.rb +32 -0
- data/lib/primer/yard/lookbook_pages_backend.rb +231 -0
- data/lib/primer/yard/registry.rb +136 -0
- data/lib/primer/yard/renders_many_handler.rb +23 -0
- data/lib/primer/yard/renders_one_handler.rb +23 -0
- data/lib/primer/yard.rb +20 -0
- data/lib/rubocop/config/default.yml +20 -0
- data/lib/rubocop/cop/primer/base_cop.rb +28 -0
- data/lib/rubocop/cop/primer/component_name_migration.rb +37 -0
- data/lib/rubocop/cop/primer/deprecated_arguments.rb +317 -0
- data/lib/rubocop/cop/primer/deprecated_button_arguments.rb +51 -0
- data/lib/rubocop/cop/primer/deprecated_components.rb +49 -0
- data/lib/rubocop/cop/primer/deprecated_label_schemes.rb +68 -0
- data/lib/rubocop/cop/primer/deprecated_label_variants.rb +71 -0
- data/lib/rubocop/cop/primer/deprecated_layout_component.rb +30 -0
- data/lib/rubocop/cop/primer/no_tag_memoize.rb +43 -0
- data/lib/rubocop/cop/primer/primer_octicon.rb +217 -0
- data/lib/rubocop/cop/primer/system_argument_instead_of_class.rb +57 -0
- data/lib/rubocop/cop/primer/test_selector.rb +48 -0
- data/lib/rubocop/cop/primer.rb +3 -0
- data/lib/tasks/custom_utilities.yml +372 -0
- data/previews/pages/forms/01_introduction.md.erb +44 -0
- data/previews/pages/forms/02_getting_started.md.erb +125 -0
- data/previews/pages/forms/03_caption_templates.md.erb +30 -0
- data/previews/pages/forms/04_after_content.md.erb +39 -0
- data/previews/pages/forms/05_groups_layouts.md.erb +22 -0
- data/previews/pages/forms/06_miscellaneous_inputs.md.erb +43 -0
- data/previews/pages/forms/07_toggle_switch_forms.md.erb +58 -0
- data/previews/pages/forms/08_validations.md.erb +28 -0
- data/previews/pages/forms/09_compound_forms.md.erb +97 -0
- data/previews/primer/alpha/action_bar_preview/inline.html.erb +16 -0
- data/previews/primer/alpha/action_bar_preview.rb +77 -0
- data/previews/primer/alpha/action_list_preview.rb +464 -0
- data/previews/primer/alpha/action_menu_preview/align_end.html.erb +6 -0
- data/previews/primer/alpha/action_menu_preview/content_labels.html.erb +9 -0
- data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +13 -0
- data/previews/primer/alpha/action_menu_preview/opens_dialog.html.erb +21 -0
- data/previews/primer/alpha/action_menu_preview/single_select_form.html.erb +13 -0
- data/previews/primer/alpha/action_menu_preview/submitting_forms.html.erb +15 -0
- data/previews/primer/alpha/action_menu_preview/two_menus.html.erb +13 -0
- data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +21 -0
- data/previews/primer/alpha/action_menu_preview.rb +328 -0
- data/previews/primer/alpha/auto_complete_preview.rb +121 -0
- data/previews/primer/alpha/banner_preview/with_action_button.html.erb +4 -0
- data/previews/primer/alpha/banner_preview/with_action_content.html.erb +6 -0
- data/previews/primer/alpha/banner_preview.rb +102 -0
- data/previews/primer/alpha/button_marketing_preview.rb +65 -0
- data/previews/primer/alpha/check_box_group_preview.rb +90 -0
- data/previews/primer/alpha/check_box_preview.rb +68 -0
- data/previews/primer/alpha/dialog_preview/body_has_scrollbar_overflow.html.erb +9 -0
- data/previews/primer/alpha/dialog_preview/custom_header.html.erb +7 -0
- data/previews/primer/alpha/dialog_preview/nested_dialog.html.erb +14 -0
- data/previews/primer/alpha/dialog_preview/test.html.erb +7 -0
- data/previews/primer/alpha/dialog_preview/with_footer.html.erb +8 -0
- data/previews/primer/alpha/dialog_preview/with_form.html.erb +12 -0
- data/previews/primer/alpha/dialog_preview/with_text_input.html.erb +10 -0
- data/previews/primer/alpha/dialog_preview.rb +154 -0
- data/previews/primer/alpha/dropdown_preview.rb +211 -0
- data/previews/primer/alpha/form_control_preview/playground.html.erb +9 -0
- data/previews/primer/alpha/form_control_preview.rb +106 -0
- data/previews/primer/alpha/hellip_button_preview.rb +26 -0
- data/previews/primer/alpha/hidden_text_expander_preview.rb +23 -0
- data/previews/primer/alpha/image_crop_preview.rb +31 -0
- data/previews/primer/alpha/layout_preview.rb +215 -0
- data/previews/primer/alpha/menu_preview/default.html.erb +17 -0
- data/previews/primer/alpha/menu_preview/playground.html.erb +17 -0
- data/previews/primer/alpha/menu_preview.rb +15 -0
- data/previews/primer/alpha/multi_input_preview/playground.html.erb +41 -0
- data/previews/primer/alpha/multi_input_preview.rb +84 -0
- data/previews/primer/alpha/nav_list_preview/trailing_action.html.erb +19 -0
- data/previews/primer/alpha/nav_list_preview.rb +125 -0
- data/previews/primer/alpha/overlay_preview/middle_of_page.html.erb +17 -0
- data/previews/primer/alpha/overlay_preview/middle_of_page_with_relative_container.html.erb +19 -0
- data/previews/primer/alpha/overlay_preview.rb +179 -0
- data/previews/primer/alpha/radio_button_group_preview.rb +85 -0
- data/previews/primer/alpha/radio_button_preview.rb +72 -0
- data/previews/primer/alpha/segmented_control_preview/with_label_and_caption.html.erb +9 -0
- data/previews/primer/alpha/segmented_control_preview/with_subhead_actions.html.erb +11 -0
- data/previews/primer/alpha/segmented_control_preview.rb +183 -0
- data/previews/primer/alpha/select_preview.rb +136 -0
- data/previews/primer/alpha/tab_nav_preview/with_extra.html.erb +8 -0
- data/previews/primer/alpha/tab_nav_preview.rb +63 -0
- data/previews/primer/alpha/tab_panels_preview/with_extra.html.erb +17 -0
- data/previews/primer/alpha/tab_panels_preview.rb +44 -0
- data/previews/primer/alpha/text_area_preview.rb +94 -0
- data/previews/primer/alpha/text_field_preview.rb +194 -0
- data/previews/primer/alpha/toggle_switch_preview.rb +63 -0
- data/previews/primer/alpha/tooltip_preview/tooltip_inside_primer_overlay.html.erb +20 -0
- data/previews/primer/alpha/tooltip_preview/with_multiple_on_a_page.html.erb +14 -0
- data/previews/primer/alpha/tooltip_preview/with_right_most_position.html.erb +7 -0
- data/previews/primer/alpha/tooltip_preview.rb +88 -0
- data/previews/primer/alpha/underline_nav_preview/default.html.erb +8 -0
- data/previews/primer/alpha/underline_nav_preview/playground.html.erb +8 -0
- data/previews/primer/alpha/underline_nav_preview.rb +58 -0
- data/previews/primer/alpha/underline_panels_preview.rb +38 -0
- data/previews/primer/beta/auto_complete_item_preview/default.html.erb +9 -0
- data/previews/primer/beta/auto_complete_item_preview/playground.html.erb +9 -0
- data/previews/primer/beta/auto_complete_item_preview/with_description.html.erb +11 -0
- data/previews/primer/beta/auto_complete_item_preview.rb +57 -0
- data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +20 -0
- data/previews/primer/beta/auto_complete_preview.rb +287 -0
- data/previews/primer/beta/avatar_preview.rb +92 -0
- data/previews/primer/beta/avatar_stack_preview.rb +104 -0
- data/previews/primer/beta/base_button_preview.rb +33 -0
- data/previews/primer/beta/blankslate_preview.rb +139 -0
- data/previews/primer/beta/border_box_preview.rb +102 -0
- data/previews/primer/beta/breadcrumbs_preview.rb +31 -0
- data/previews/primer/beta/button_group_preview/action_menus.html.erb +8 -0
- data/previews/primer/beta/button_group_preview.rb +74 -0
- data/previews/primer/beta/button_preview/all_schemes.html.erb +30 -0
- data/previews/primer/beta/button_preview/invisible_all_visuals.html.erb +54 -0
- data/previews/primer/beta/button_preview/leading_visual.html.erb +10 -0
- data/previews/primer/beta/button_preview/trailing_action.html.erb +10 -0
- data/previews/primer/beta/button_preview/trailing_counter.html.erb +11 -0
- data/previews/primer/beta/button_preview/trailing_visual.html.erb +11 -0
- data/previews/primer/beta/button_preview/with_tooltip.html.erb +10 -0
- data/previews/primer/beta/button_preview.rb +324 -0
- data/previews/primer/beta/clipboard_copy_preview/element.html.erb +2 -0
- data/previews/primer/beta/clipboard_copy_preview.rb +41 -0
- data/previews/primer/beta/close_button_preview.rb +24 -0
- data/previews/primer/beta/counter_preview.rb +93 -0
- data/previews/primer/beta/details_preview.rb +63 -0
- data/previews/primer/beta/flash_preview.rb +77 -0
- data/previews/primer/beta/heading_preview.rb +25 -0
- data/previews/primer/beta/icon_button_preview.rb +113 -0
- data/previews/primer/beta/label_preview.rb +117 -0
- data/previews/primer/beta/link_preview.rb +71 -0
- data/previews/primer/beta/markdown_preview.rb +294 -0
- data/previews/primer/beta/octicon_preview.rb +25 -0
- data/previews/primer/beta/popover_preview.rb +85 -0
- data/previews/primer/beta/progress_bar_preview.rb +64 -0
- data/previews/primer/beta/relative_time_preview.rb +286 -0
- data/previews/primer/beta/spinner_preview.rb +23 -0
- data/previews/primer/beta/state_preview.rb +72 -0
- data/previews/primer/beta/subhead_preview/actions.html.erb +14 -0
- data/previews/primer/beta/subhead_preview.rb +103 -0
- data/previews/primer/beta/text_preview.rb +25 -0
- data/previews/primer/beta/timeline_item_preview.rb +31 -0
- data/previews/primer/beta/truncate_preview.rb +55 -0
- data/previews/primer/box_preview.rb +30 -0
- data/previews/primer/forms_preview/after_content_form.html.erb +3 -0
- data/previews/primer/forms_preview/array_check_box_group_form.html.erb +3 -0
- data/previews/primer/forms_preview/caption_template_form.html.erb +3 -0
- data/previews/primer/forms_preview/check_box_group_form.html.erb +3 -0
- data/previews/primer/forms_preview/check_box_with_nested_form.html.erb +3 -0
- data/previews/primer/forms_preview/composed_form.html.erb +4 -0
- data/previews/primer/forms_preview/example_toggle_switch_form.html.erb +3 -0
- data/previews/primer/forms_preview/horizontal_form.html.erb +3 -0
- data/previews/primer/forms_preview/immediate_validation_form.html.erb +3 -0
- data/previews/primer/forms_preview/invalid_form.html.erb +3 -0
- data/previews/primer/forms_preview/multi_input_form.html.erb +14 -0
- data/previews/primer/forms_preview/multi_text_field_form.html.erb +3 -0
- data/previews/primer/forms_preview/name_with_question_mark_form.html.erb +3 -0
- data/previews/primer/forms_preview/radio_button_group_form.html.erb +3 -0
- data/previews/primer/forms_preview/radio_button_with_nested_form.html.erb +3 -0
- data/previews/primer/forms_preview/select_form.html.erb +3 -0
- data/previews/primer/forms_preview/single_text_field_form.html.erb +3 -0
- data/previews/primer/forms_preview/submit_button_form.html.erb +3 -0
- data/previews/primer/forms_preview/text_field_and_checkbox_form.html.erb +3 -0
- data/previews/primer/forms_preview.rb +44 -0
- data/previews/primer/url_helpers.rb +15 -0
- data/static/arguments.json +4501 -0
- data/static/assets/view-components.svg +18 -0
- data/static/audited_at.json +107 -0
- data/static/classes.json +606 -0
- data/static/constants.json +1335 -0
- data/static/info_arch.json +14465 -0
- data/static/previews.json +6408 -0
- data/static/statuses.json +107 -0
- metadata +1145 -0
@@ -0,0 +1,4501 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"component": "ActionBar",
|
4
|
+
"status": "alpha",
|
5
|
+
"a11y_reviewed": false,
|
6
|
+
"short_name": "ActionBar",
|
7
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar.rb",
|
8
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/default/",
|
9
|
+
"parameters": [
|
10
|
+
{
|
11
|
+
"name": "size",
|
12
|
+
"type": "Symbol",
|
13
|
+
"default": "`:medium`",
|
14
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"name": "overflow_menu",
|
18
|
+
"type": "Boolean",
|
19
|
+
"default": "`true`",
|
20
|
+
"description": "Whether to render the overflow menu."
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"name": "system_arguments",
|
24
|
+
"type": "Hash",
|
25
|
+
"default": "N/A",
|
26
|
+
"description": "[System arguments](/system-arguments)"
|
27
|
+
}
|
28
|
+
]
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"component": "ActionBar::Divider",
|
32
|
+
"status": "alpha",
|
33
|
+
"a11y_reviewed": false,
|
34
|
+
"short_name": "ActionBarDivider",
|
35
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/divider.rb",
|
36
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/divider/default/",
|
37
|
+
"parameters": [
|
38
|
+
|
39
|
+
]
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"component": "ActionBar::Item",
|
43
|
+
"status": "alpha",
|
44
|
+
"a11y_reviewed": false,
|
45
|
+
"short_name": "ActionBarItem",
|
46
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/item.rb",
|
47
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/item/default/",
|
48
|
+
"parameters": [
|
49
|
+
|
50
|
+
]
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"component": "ActionList",
|
54
|
+
"status": "alpha",
|
55
|
+
"a11y_reviewed": true,
|
56
|
+
"short_name": "ActionList",
|
57
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list.rb",
|
58
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/default/",
|
59
|
+
"parameters": [
|
60
|
+
{
|
61
|
+
"name": "id",
|
62
|
+
"type": "String",
|
63
|
+
"default": "`self.class.generate_id`",
|
64
|
+
"description": "HTML ID value."
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "role",
|
68
|
+
"type": "Boolean",
|
69
|
+
"default": "`nil`",
|
70
|
+
"description": "ARIA role describing the function of the list. listbox and menu are a common values."
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "item_classes",
|
74
|
+
"type": "String",
|
75
|
+
"default": "`nil`",
|
76
|
+
"description": "Additional CSS classes to attach to items."
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"name": "scheme",
|
80
|
+
"type": "Symbol",
|
81
|
+
"default": "`:full`",
|
82
|
+
"description": "One of `:full` or `:inset`. `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges."
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"name": "show_dividers",
|
86
|
+
"type": "Boolean",
|
87
|
+
"default": "`false`",
|
88
|
+
"description": "Display a divider above each item in the list when it does not follow a header or divider."
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"name": "select_variant",
|
92
|
+
"type": "Symbol",
|
93
|
+
"default": "`:none`",
|
94
|
+
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"name": "form_arguments",
|
98
|
+
"type": "Hash",
|
99
|
+
"default": "`{}`",
|
100
|
+
"description": "Allows an `ActionList` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission. *NOTE*: Consider using an [ActionMenu](/components/alpha/actionmenu) instead of using this feature directly."
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "system_arguments",
|
104
|
+
"type": "Hash",
|
105
|
+
"default": "N/A",
|
106
|
+
"description": "[System arguments](/system-arguments)"
|
107
|
+
}
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"component": "ActionList::Divider",
|
112
|
+
"status": "alpha",
|
113
|
+
"a11y_reviewed": false,
|
114
|
+
"short_name": "ActionListDivider",
|
115
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
|
116
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
|
117
|
+
"parameters": [
|
118
|
+
{
|
119
|
+
"name": "scheme",
|
120
|
+
"type": "Symbol",
|
121
|
+
"default": "`:subtle`",
|
122
|
+
"description": "Display a background color if scheme is `filled`."
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"name": "system_arguments",
|
126
|
+
"type": "Hash",
|
127
|
+
"default": "N/A",
|
128
|
+
"description": "[System arguments](/system-arguments)"
|
129
|
+
}
|
130
|
+
]
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"component": "ActionList::FormWrapper",
|
134
|
+
"status": "alpha",
|
135
|
+
"a11y_reviewed": false,
|
136
|
+
"short_name": "ActionListFormWrapper",
|
137
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
138
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
139
|
+
"parameters": [
|
140
|
+
|
141
|
+
]
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"component": "ActionList::Heading",
|
145
|
+
"status": "alpha",
|
146
|
+
"a11y_reviewed": false,
|
147
|
+
"short_name": "ActionListHeading",
|
148
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
|
149
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
|
150
|
+
"parameters": [
|
151
|
+
{
|
152
|
+
"name": "title",
|
153
|
+
"type": "String",
|
154
|
+
"default": "N/A",
|
155
|
+
"description": "Sub list title."
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"name": "heading_level",
|
159
|
+
"type": "Integer",
|
160
|
+
"default": "`3`",
|
161
|
+
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"name": "subtitle",
|
165
|
+
"type": "String",
|
166
|
+
"default": "`nil`",
|
167
|
+
"description": "Optional sub list description."
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"name": "scheme",
|
171
|
+
"type": "Symbol",
|
172
|
+
"default": "`:subtle`",
|
173
|
+
"description": "Display a background color if scheme is `filled`."
|
174
|
+
},
|
175
|
+
{
|
176
|
+
"name": "system_arguments",
|
177
|
+
"type": "Hash",
|
178
|
+
"default": "N/A",
|
179
|
+
"description": "[System arguments](/system-arguments)"
|
180
|
+
}
|
181
|
+
]
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"component": "ActionList::Item",
|
185
|
+
"status": "alpha",
|
186
|
+
"a11y_reviewed": false,
|
187
|
+
"short_name": "ActionListItem",
|
188
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/item.rb",
|
189
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/item/default/",
|
190
|
+
"parameters": [
|
191
|
+
{
|
192
|
+
"name": "list",
|
193
|
+
"type": "Primer::Alpha::ActionList",
|
194
|
+
"default": "N/A",
|
195
|
+
"description": "The list that contains this item. Used internally."
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"name": "parent",
|
199
|
+
"type": "Primer::Alpha::ActionList::Item",
|
200
|
+
"default": "`nil`",
|
201
|
+
"description": "This item's parent item. `nil` if this item is at the root. Used internally."
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"name": "label",
|
205
|
+
"type": "String",
|
206
|
+
"default": "`nil`",
|
207
|
+
"description": "Item label. If no label is provided, content is used."
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"name": "label_classes",
|
211
|
+
"type": "String",
|
212
|
+
"default": "`nil`",
|
213
|
+
"description": "CSS classes that will be added to the label."
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"name": "label_arguments",
|
217
|
+
"type": "Hash",
|
218
|
+
"default": "`{}`",
|
219
|
+
"description": "[System arguments](/system-arguments) used to construct the label."
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"name": "content_arguments",
|
223
|
+
"type": "Hash",
|
224
|
+
"default": "`{}`",
|
225
|
+
"description": "[System arguments](/system-arguments) used to construct the item's anchor or button tag."
|
226
|
+
},
|
227
|
+
{
|
228
|
+
"name": "form_arguments",
|
229
|
+
"type": "Hash",
|
230
|
+
"default": "`{}`",
|
231
|
+
"description": "Allows the item to submit a form on click. The URL passed in the `href:` option will be used as the form action. Pass the `method:` option to this hash to control what kind of request is made, One of `:delete`, `:get`, `:head`, `:patch`, `:post`, or `:put`. The `name:` option is required and specifies the desired name of the field that will be included in the params sent to the server on form submission. Specify the `value:` option to send a custom value to the server; otherwise the value of `name:` is sent."
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"name": "truncate_label",
|
235
|
+
"type": "Boolean",
|
236
|
+
"default": "`false`",
|
237
|
+
"description": "Truncate label with ellipsis."
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"name": "href",
|
241
|
+
"type": "String",
|
242
|
+
"default": "`nil`",
|
243
|
+
"description": "Link URL."
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"name": "role",
|
247
|
+
"type": "String",
|
248
|
+
"default": "`nil`",
|
249
|
+
"description": "ARIA role describing the function of the item."
|
250
|
+
},
|
251
|
+
{
|
252
|
+
"name": "size",
|
253
|
+
"type": "Symbol",
|
254
|
+
"default": "`:medium`",
|
255
|
+
"description": "Controls block sizing of the item."
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"name": "scheme",
|
259
|
+
"type": "Symbol",
|
260
|
+
"default": "`:default`",
|
261
|
+
"description": "Controls color/style based on behavior."
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"name": "disabled",
|
265
|
+
"type": "Boolean",
|
266
|
+
"default": "`false`",
|
267
|
+
"description": "Disabled items are not clickable and visually dim."
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"name": "description_scheme",
|
271
|
+
"type": "Symbol",
|
272
|
+
"default": "`:block`",
|
273
|
+
"description": "Display description inline with label, or block on the next line. One of `:block` or `:inline`."
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"name": "active",
|
277
|
+
"type": "Boolean",
|
278
|
+
"default": "`false`",
|
279
|
+
"description": "If the parent list's `select_variant` is set to `:single` or `:multiple`, causes this item to render checked."
|
280
|
+
},
|
281
|
+
{
|
282
|
+
"name": "on_click",
|
283
|
+
"type": "String",
|
284
|
+
"default": "`nil`",
|
285
|
+
"description": "JavaScript to execute when the item is clicked."
|
286
|
+
},
|
287
|
+
{
|
288
|
+
"name": "id",
|
289
|
+
"type": "String",
|
290
|
+
"default": "`self.class.generate_id`",
|
291
|
+
"description": "Used internally."
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"name": "system_arguments",
|
295
|
+
"type": "Hash",
|
296
|
+
"default": "N/A",
|
297
|
+
"description": "[System arguments](/system-arguments)"
|
298
|
+
}
|
299
|
+
]
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"component": "ActionMenu",
|
303
|
+
"status": "alpha",
|
304
|
+
"a11y_reviewed": false,
|
305
|
+
"short_name": "ActionMenu",
|
306
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
307
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
308
|
+
"parameters": [
|
309
|
+
{
|
310
|
+
"name": "menu_id",
|
311
|
+
"type": "String",
|
312
|
+
"default": "`self.class.generate_id`",
|
313
|
+
"description": "Id of the menu."
|
314
|
+
},
|
315
|
+
{
|
316
|
+
"name": "anchor_align",
|
317
|
+
"type": "Symbol",
|
318
|
+
"default": "`:start`",
|
319
|
+
"description": "One of `:center`, `:end`, or `:start`.."
|
320
|
+
},
|
321
|
+
{
|
322
|
+
"name": "anchor_side",
|
323
|
+
"type": "Symbol",
|
324
|
+
"default": "`:outside_bottom`",
|
325
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"name": "size",
|
329
|
+
"type": "Symbol",
|
330
|
+
"default": "`:auto`",
|
331
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
332
|
+
},
|
333
|
+
{
|
334
|
+
"name": "src",
|
335
|
+
"type": "String",
|
336
|
+
"default": "`nil`",
|
337
|
+
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"name": "preload",
|
341
|
+
"type": "Boolean",
|
342
|
+
"default": "`false`",
|
343
|
+
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
344
|
+
},
|
345
|
+
{
|
346
|
+
"name": "dynamic_label",
|
347
|
+
"type": "Boolean",
|
348
|
+
"default": "`false`",
|
349
|
+
"description": "Whether or not to display the text of the currently selected item in the show button."
|
350
|
+
},
|
351
|
+
{
|
352
|
+
"name": "dynamic_label_prefix",
|
353
|
+
"type": "String",
|
354
|
+
"default": "`nil`",
|
355
|
+
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
356
|
+
},
|
357
|
+
{
|
358
|
+
"name": "select_variant",
|
359
|
+
"type": "Symbol",
|
360
|
+
"default": "`:none`",
|
361
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"name": "form_arguments",
|
365
|
+
"type": "Hash",
|
366
|
+
"default": "`{}`",
|
367
|
+
"description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
368
|
+
},
|
369
|
+
{
|
370
|
+
"name": "system_arguments",
|
371
|
+
"type": "Hash",
|
372
|
+
"default": "N/A",
|
373
|
+
"description": "[System arguments](/system-arguments)."
|
374
|
+
}
|
375
|
+
]
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"component": "ActionMenu::List",
|
379
|
+
"status": "alpha",
|
380
|
+
"a11y_reviewed": true,
|
381
|
+
"short_name": "ActionMenuList",
|
382
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
|
383
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
|
384
|
+
"parameters": [
|
385
|
+
{
|
386
|
+
"name": "menu_id",
|
387
|
+
"type": "String",
|
388
|
+
"default": "N/A",
|
389
|
+
"description": "ID of the parent menu."
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"name": "system_arguments",
|
393
|
+
"type": "Hash",
|
394
|
+
"default": "N/A",
|
395
|
+
"description": "The arguments accepted by [ActionList](/components/alpha/actionlist)"
|
396
|
+
}
|
397
|
+
]
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"component": "AutoComplete",
|
401
|
+
"status": "deprecated",
|
402
|
+
"a11y_reviewed": false,
|
403
|
+
"short_name": "AutoComplete",
|
404
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/auto_complete.rb",
|
405
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/auto_complete/default/",
|
406
|
+
"parameters": [
|
407
|
+
{
|
408
|
+
"name": "label_text",
|
409
|
+
"type": "String",
|
410
|
+
"default": "N/A",
|
411
|
+
"description": "The label of the input."
|
412
|
+
},
|
413
|
+
{
|
414
|
+
"name": "src",
|
415
|
+
"type": "String",
|
416
|
+
"default": "N/A",
|
417
|
+
"description": "The route to query."
|
418
|
+
},
|
419
|
+
{
|
420
|
+
"name": "input_id",
|
421
|
+
"type": "String",
|
422
|
+
"default": "N/A",
|
423
|
+
"description": "Id of the input element."
|
424
|
+
},
|
425
|
+
{
|
426
|
+
"name": "input_name",
|
427
|
+
"type": "String",
|
428
|
+
"default": "`nil`",
|
429
|
+
"description": "Optional name of the input element, defaults to `input_id` when not set."
|
430
|
+
},
|
431
|
+
{
|
432
|
+
"name": "list_id",
|
433
|
+
"type": "String",
|
434
|
+
"default": "N/A",
|
435
|
+
"description": "Id of the list element."
|
436
|
+
},
|
437
|
+
{
|
438
|
+
"name": "with_icon",
|
439
|
+
"type": "Boolean",
|
440
|
+
"default": "`false`",
|
441
|
+
"description": "Controls if a search icon is visible, defaults to `false`."
|
442
|
+
},
|
443
|
+
{
|
444
|
+
"name": "is_label_visible",
|
445
|
+
"type": "Boolean",
|
446
|
+
"default": "`true`",
|
447
|
+
"description": "Controls if the label is visible. If `false`, screen reader only text will be added."
|
448
|
+
},
|
449
|
+
{
|
450
|
+
"name": "is_clearable",
|
451
|
+
"type": "Boolean",
|
452
|
+
"default": "`false`",
|
453
|
+
"description": "Adds optional clear button."
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"name": "is_label_inline",
|
457
|
+
"type": "Boolean",
|
458
|
+
"default": "`false`",
|
459
|
+
"description": "Controls if the label is inline. On smaller screens, label will always become stacked."
|
460
|
+
},
|
461
|
+
{
|
462
|
+
"name": "system_arguments",
|
463
|
+
"type": "Hash",
|
464
|
+
"default": "N/A",
|
465
|
+
"description": "[System arguments](/system-arguments)"
|
466
|
+
}
|
467
|
+
]
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"component": "AutoComplete::Item",
|
471
|
+
"status": "deprecated",
|
472
|
+
"a11y_reviewed": false,
|
473
|
+
"short_name": "AutoCompleteItem",
|
474
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/auto_complete/item.rb",
|
475
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/auto_complete/item/default/",
|
476
|
+
"parameters": [
|
477
|
+
{
|
478
|
+
"name": "value",
|
479
|
+
"type": "String",
|
480
|
+
"default": "N/A",
|
481
|
+
"description": "Value of the item."
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"name": "selected",
|
485
|
+
"type": "Boolean",
|
486
|
+
"default": "`false`",
|
487
|
+
"description": "Whether the item is selected."
|
488
|
+
},
|
489
|
+
{
|
490
|
+
"name": "disabled",
|
491
|
+
"type": "Boolean",
|
492
|
+
"default": "`false`",
|
493
|
+
"description": "Whether the item is disabled."
|
494
|
+
},
|
495
|
+
{
|
496
|
+
"name": "system_arguments",
|
497
|
+
"type": "Hash",
|
498
|
+
"default": "N/A",
|
499
|
+
"description": "[System arguments](/system-arguments)"
|
500
|
+
}
|
501
|
+
]
|
502
|
+
},
|
503
|
+
{
|
504
|
+
"component": "Banner",
|
505
|
+
"status": "alpha",
|
506
|
+
"a11y_reviewed": false,
|
507
|
+
"short_name": "Banner",
|
508
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/banner.rb",
|
509
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/banner/default/",
|
510
|
+
"parameters": [
|
511
|
+
{
|
512
|
+
"name": "full",
|
513
|
+
"type": "Boolean",
|
514
|
+
"default": "`false`",
|
515
|
+
"description": "Whether the component should take up the full width of the screen."
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"name": "full_when_narrow",
|
519
|
+
"type": "Boolean",
|
520
|
+
"default": "`false`",
|
521
|
+
"description": "Whether the component should take up the full width of the screen when rendered inside smaller viewports."
|
522
|
+
},
|
523
|
+
{
|
524
|
+
"name": "dismiss_scheme",
|
525
|
+
"type": "Symbol",
|
526
|
+
"default": "`:none`",
|
527
|
+
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
|
528
|
+
},
|
529
|
+
{
|
530
|
+
"name": "description",
|
531
|
+
"type": "String",
|
532
|
+
"default": "`nil`",
|
533
|
+
"description": "Description text rendered underneath the message."
|
534
|
+
},
|
535
|
+
{
|
536
|
+
"name": "icon",
|
537
|
+
"type": "Symbol",
|
538
|
+
"default": "`nil`",
|
539
|
+
"description": "The name of an [Octicon](https://primer.style/octicons/) icon to use. If no icon is provided, a default one will be chosen based on the scheme."
|
540
|
+
},
|
541
|
+
{
|
542
|
+
"name": "scheme",
|
543
|
+
"type": "Symbol",
|
544
|
+
"default": "`:default`",
|
545
|
+
"description": "One of `:danger`, `:default`, `:success`, or `:warning`."
|
546
|
+
},
|
547
|
+
{
|
548
|
+
"name": "system_arguments",
|
549
|
+
"type": "Hash",
|
550
|
+
"default": "N/A",
|
551
|
+
"description": "[System arguments](/system-arguments)"
|
552
|
+
}
|
553
|
+
]
|
554
|
+
},
|
555
|
+
{
|
556
|
+
"component": "ButtonMarketing",
|
557
|
+
"status": "alpha",
|
558
|
+
"a11y_reviewed": false,
|
559
|
+
"short_name": "ButtonMarketing",
|
560
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb",
|
561
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/button_marketing/default/",
|
562
|
+
"parameters": [
|
563
|
+
{
|
564
|
+
"name": "scheme",
|
565
|
+
"type": "Symbol",
|
566
|
+
"default": "`:default`",
|
567
|
+
"description": "One of `:default`, `:outline`, `:primary`, or `:transparent`."
|
568
|
+
},
|
569
|
+
{
|
570
|
+
"name": "variant",
|
571
|
+
"type": "Symbol",
|
572
|
+
"default": "`:default`",
|
573
|
+
"description": "One of `:default` or `:large`."
|
574
|
+
},
|
575
|
+
{
|
576
|
+
"name": "tag",
|
577
|
+
"type": "Symbol",
|
578
|
+
"default": "`:button`",
|
579
|
+
"description": "One of `:a` or `:button`."
|
580
|
+
},
|
581
|
+
{
|
582
|
+
"name": "type",
|
583
|
+
"type": "Symbol",
|
584
|
+
"default": "`:button`",
|
585
|
+
"description": "One of `:button` or `:submit`."
|
586
|
+
},
|
587
|
+
{
|
588
|
+
"name": "disabled",
|
589
|
+
"type": "Boolean",
|
590
|
+
"default": "`false`",
|
591
|
+
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
592
|
+
},
|
593
|
+
{
|
594
|
+
"name": "system_arguments",
|
595
|
+
"type": "Hash",
|
596
|
+
"default": "N/A",
|
597
|
+
"description": "[System arguments](/system-arguments)"
|
598
|
+
}
|
599
|
+
]
|
600
|
+
},
|
601
|
+
{
|
602
|
+
"component": "CheckBox",
|
603
|
+
"status": "alpha",
|
604
|
+
"a11y_reviewed": false,
|
605
|
+
"short_name": "CheckBox",
|
606
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/check_box.rb",
|
607
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/check_box/default/",
|
608
|
+
"parameters": [
|
609
|
+
{
|
610
|
+
"name": "name",
|
611
|
+
"type": "String",
|
612
|
+
"default": "N/A",
|
613
|
+
"description": "Value for the HTML name attribute."
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"name": "id",
|
617
|
+
"type": "String",
|
618
|
+
"default": "N/A",
|
619
|
+
"description": "Value for the HTML id attribute."
|
620
|
+
},
|
621
|
+
{
|
622
|
+
"name": "class",
|
623
|
+
"type": "String",
|
624
|
+
"default": "N/A",
|
625
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
626
|
+
},
|
627
|
+
{
|
628
|
+
"name": "classes",
|
629
|
+
"type": "Array",
|
630
|
+
"default": "N/A",
|
631
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
632
|
+
},
|
633
|
+
{
|
634
|
+
"name": "caption",
|
635
|
+
"type": "String",
|
636
|
+
"default": "N/A",
|
637
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
638
|
+
},
|
639
|
+
{
|
640
|
+
"name": "label",
|
641
|
+
"type": "String",
|
642
|
+
"default": "N/A",
|
643
|
+
"description": "Label text displayed above the input."
|
644
|
+
},
|
645
|
+
{
|
646
|
+
"name": "visually_hide_label",
|
647
|
+
"type": "Boolean",
|
648
|
+
"default": "N/A",
|
649
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
650
|
+
},
|
651
|
+
{
|
652
|
+
"name": "disabled",
|
653
|
+
"type": "Boolean",
|
654
|
+
"default": "N/A",
|
655
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
656
|
+
},
|
657
|
+
{
|
658
|
+
"name": "hidden",
|
659
|
+
"type": "Boolean",
|
660
|
+
"default": "N/A",
|
661
|
+
"description": "When set to `true`, visually hides the field."
|
662
|
+
},
|
663
|
+
{
|
664
|
+
"name": "invalid",
|
665
|
+
"type": "Boolean",
|
666
|
+
"default": "N/A",
|
667
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
668
|
+
},
|
669
|
+
{
|
670
|
+
"name": "validation_message",
|
671
|
+
"type": "String",
|
672
|
+
"default": "N/A",
|
673
|
+
"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."
|
674
|
+
},
|
675
|
+
{
|
676
|
+
"name": "label_arguments",
|
677
|
+
"type": "Hash",
|
678
|
+
"default": "N/A",
|
679
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
680
|
+
},
|
681
|
+
{
|
682
|
+
"name": "scope_name_to_model",
|
683
|
+
"type": "Boolean",
|
684
|
+
"default": "N/A",
|
685
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
686
|
+
},
|
687
|
+
{
|
688
|
+
"name": "scope_id_to_model",
|
689
|
+
"type": "Boolean",
|
690
|
+
"default": "N/A",
|
691
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
692
|
+
},
|
693
|
+
{
|
694
|
+
"name": "required",
|
695
|
+
"type": "Boolean",
|
696
|
+
"default": "N/A",
|
697
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
698
|
+
},
|
699
|
+
{
|
700
|
+
"name": "aria",
|
701
|
+
"type": "Hash",
|
702
|
+
"default": "N/A",
|
703
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
704
|
+
},
|
705
|
+
{
|
706
|
+
"name": "data",
|
707
|
+
"type": "Hash",
|
708
|
+
"default": "N/A",
|
709
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
710
|
+
},
|
711
|
+
{
|
712
|
+
"name": "system_arguments",
|
713
|
+
"type": "Hash",
|
714
|
+
"default": "N/A",
|
715
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
716
|
+
},
|
717
|
+
{
|
718
|
+
"name": "name",
|
719
|
+
"type": "String",
|
720
|
+
"default": "N/A",
|
721
|
+
"description": "Value for the HTML name attribute."
|
722
|
+
},
|
723
|
+
{
|
724
|
+
"name": "value",
|
725
|
+
"type": "String",
|
726
|
+
"default": "N/A",
|
727
|
+
"description": "On form submission, this value will be sent to the server if the check box is checked. Defaults to \"1\"."
|
728
|
+
},
|
729
|
+
{
|
730
|
+
"name": "unchecked_value",
|
731
|
+
"type": "String",
|
732
|
+
"default": "N/A",
|
733
|
+
"description": "On form submission, this value will be sent to the server if the check box is _not_ checked. Defaults to \"0\"."
|
734
|
+
},
|
735
|
+
{
|
736
|
+
"name": "scheme",
|
737
|
+
"type": "Symbol",
|
738
|
+
"default": "N/A",
|
739
|
+
"description": "Controls how check box values are submitted to the server. One of `:array` or `:boolean`.."
|
740
|
+
}
|
741
|
+
]
|
742
|
+
},
|
743
|
+
{
|
744
|
+
"component": "CheckBoxGroup",
|
745
|
+
"status": "alpha",
|
746
|
+
"a11y_reviewed": false,
|
747
|
+
"short_name": "CheckBoxGroup",
|
748
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/check_box_group.rb",
|
749
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/check_box_group/default/",
|
750
|
+
"parameters": [
|
751
|
+
{
|
752
|
+
"name": "name",
|
753
|
+
"type": "String",
|
754
|
+
"default": "N/A",
|
755
|
+
"description": "Value for the HTML name attribute. When provided, the check box values will be submitted in to the server in `:array` mode. See the [CheckBox](/components/alpha/checkbox) for more information."
|
756
|
+
},
|
757
|
+
{
|
758
|
+
"name": "label",
|
759
|
+
"type": "String",
|
760
|
+
"default": "N/A",
|
761
|
+
"description": "Label text displayed above the input."
|
762
|
+
},
|
763
|
+
{
|
764
|
+
"name": "hidden",
|
765
|
+
"type": "Boolean",
|
766
|
+
"default": "N/A",
|
767
|
+
"description": "When set to `true`, visually hides the group."
|
768
|
+
},
|
769
|
+
{
|
770
|
+
"name": "caption",
|
771
|
+
"type": "String",
|
772
|
+
"default": "N/A",
|
773
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
774
|
+
},
|
775
|
+
{
|
776
|
+
"name": "label_arguments",
|
777
|
+
"type": "Hash",
|
778
|
+
"default": "N/A",
|
779
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
780
|
+
}
|
781
|
+
]
|
782
|
+
},
|
783
|
+
{
|
784
|
+
"component": "Dialog",
|
785
|
+
"status": "alpha",
|
786
|
+
"a11y_reviewed": true,
|
787
|
+
"short_name": "Dialog",
|
788
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog.rb",
|
789
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/default/",
|
790
|
+
"parameters": [
|
791
|
+
{
|
792
|
+
"name": "id",
|
793
|
+
"type": "String",
|
794
|
+
"default": "`self.class.generate_id`",
|
795
|
+
"description": "The id of the dialog."
|
796
|
+
},
|
797
|
+
{
|
798
|
+
"name": "title",
|
799
|
+
"type": "String",
|
800
|
+
"default": "N/A",
|
801
|
+
"description": "Describes the content of the dialog."
|
802
|
+
},
|
803
|
+
{
|
804
|
+
"name": "subtitle",
|
805
|
+
"type": "String",
|
806
|
+
"default": "`nil`",
|
807
|
+
"description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
|
808
|
+
},
|
809
|
+
{
|
810
|
+
"name": "size",
|
811
|
+
"type": "Symbol",
|
812
|
+
"default": "`:medium`",
|
813
|
+
"description": "The size of the dialog. One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
|
814
|
+
},
|
815
|
+
{
|
816
|
+
"name": "position",
|
817
|
+
"type": "Symbol",
|
818
|
+
"default": "`:center`",
|
819
|
+
"description": "The position of the dialog. One of `:center`, `:left`, or `:right`."
|
820
|
+
},
|
821
|
+
{
|
822
|
+
"name": "position_narrow",
|
823
|
+
"type": "Symbol",
|
824
|
+
"default": "`:inherit`",
|
825
|
+
"description": "The position of the dialog when narrow. One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`."
|
826
|
+
},
|
827
|
+
{
|
828
|
+
"name": "visually_hide_title",
|
829
|
+
"type": "Boolean",
|
830
|
+
"default": "`false`",
|
831
|
+
"description": "If true will hide the heading title, while still making it available to Screen Readers."
|
832
|
+
},
|
833
|
+
{
|
834
|
+
"name": "system_arguments",
|
835
|
+
"type": "Hash",
|
836
|
+
"default": "N/A",
|
837
|
+
"description": "[System arguments](/system-arguments)"
|
838
|
+
}
|
839
|
+
]
|
840
|
+
},
|
841
|
+
{
|
842
|
+
"component": "Dialog::Body",
|
843
|
+
"status": "alpha",
|
844
|
+
"a11y_reviewed": true,
|
845
|
+
"short_name": "DialogBody",
|
846
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/body.rb",
|
847
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/body/default/",
|
848
|
+
"parameters": [
|
849
|
+
{
|
850
|
+
"name": "system_arguments",
|
851
|
+
"type": "Hash",
|
852
|
+
"default": "N/A",
|
853
|
+
"description": "[System arguments](/system-arguments)"
|
854
|
+
}
|
855
|
+
]
|
856
|
+
},
|
857
|
+
{
|
858
|
+
"component": "Dialog::Footer",
|
859
|
+
"status": "alpha",
|
860
|
+
"a11y_reviewed": true,
|
861
|
+
"short_name": "DialogFooter",
|
862
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/footer.rb",
|
863
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/footer/default/",
|
864
|
+
"parameters": [
|
865
|
+
{
|
866
|
+
"name": "show_divider",
|
867
|
+
"type": "Boolean",
|
868
|
+
"default": "`false`",
|
869
|
+
"description": "Show a divider between the footer and body."
|
870
|
+
},
|
871
|
+
{
|
872
|
+
"name": "system_arguments",
|
873
|
+
"type": "Hash",
|
874
|
+
"default": "N/A",
|
875
|
+
"description": "[System arguments](/system-arguments)"
|
876
|
+
}
|
877
|
+
]
|
878
|
+
},
|
879
|
+
{
|
880
|
+
"component": "Dialog::Header",
|
881
|
+
"status": "alpha",
|
882
|
+
"a11y_reviewed": true,
|
883
|
+
"short_name": "DialogHeader",
|
884
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog/header.rb",
|
885
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dialog/header/default/",
|
886
|
+
"parameters": [
|
887
|
+
{
|
888
|
+
"name": "title",
|
889
|
+
"type": "String",
|
890
|
+
"default": "N/A",
|
891
|
+
"description": "Describes the content of the dialog."
|
892
|
+
},
|
893
|
+
{
|
894
|
+
"name": "subtitle",
|
895
|
+
"type": "String",
|
896
|
+
"default": "`nil`",
|
897
|
+
"description": "Provides dditional context for the dialog, also setting the `aria-describedby` attribute."
|
898
|
+
},
|
899
|
+
{
|
900
|
+
"name": "show_divider",
|
901
|
+
"type": "Boolean",
|
902
|
+
"default": "`false`",
|
903
|
+
"description": "Show a divider between the header and body."
|
904
|
+
},
|
905
|
+
{
|
906
|
+
"name": "visually_hide_title",
|
907
|
+
"type": "Boolean",
|
908
|
+
"default": "`false`",
|
909
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
910
|
+
},
|
911
|
+
{
|
912
|
+
"name": "system_arguments",
|
913
|
+
"type": "Hash",
|
914
|
+
"default": "N/A",
|
915
|
+
"description": "[System arguments](/system-arguments)"
|
916
|
+
}
|
917
|
+
]
|
918
|
+
},
|
919
|
+
{
|
920
|
+
"component": "Dropdown",
|
921
|
+
"status": "alpha",
|
922
|
+
"a11y_reviewed": false,
|
923
|
+
"short_name": "Dropdown",
|
924
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dropdown.rb",
|
925
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/default/",
|
926
|
+
"parameters": [
|
927
|
+
{
|
928
|
+
"name": "overlay",
|
929
|
+
"type": "Symbol",
|
930
|
+
"default": "`:default`",
|
931
|
+
"description": "One of `:dark`, `:default`, or `:none`."
|
932
|
+
},
|
933
|
+
{
|
934
|
+
"name": "with_caret",
|
935
|
+
"type": "Boolean",
|
936
|
+
"default": "`false`",
|
937
|
+
"description": "Whether or not a caret should be rendered in the button."
|
938
|
+
},
|
939
|
+
{
|
940
|
+
"name": "system_arguments",
|
941
|
+
"type": "Hash",
|
942
|
+
"default": "N/A",
|
943
|
+
"description": "[System arguments](/system-arguments)"
|
944
|
+
}
|
945
|
+
]
|
946
|
+
},
|
947
|
+
{
|
948
|
+
"component": "Dropdown::Menu",
|
949
|
+
"status": "alpha",
|
950
|
+
"a11y_reviewed": false,
|
951
|
+
"short_name": "DropdownMenu",
|
952
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dropdown/menu.rb",
|
953
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/menu/default/",
|
954
|
+
"parameters": [
|
955
|
+
{
|
956
|
+
"name": "as",
|
957
|
+
"type": "Symbol",
|
958
|
+
"default": "`:default`",
|
959
|
+
"description": "When `as` is `:list`, wraps the menu in a `<ul>` with a `<li>` for each item."
|
960
|
+
},
|
961
|
+
{
|
962
|
+
"name": "direction",
|
963
|
+
"type": "Symbol",
|
964
|
+
"default": "`:se`",
|
965
|
+
"description": "One of `:e`, `:ne`, `:s`, `:se`, `:sw`, or `:w`.."
|
966
|
+
},
|
967
|
+
{
|
968
|
+
"name": "header",
|
969
|
+
"type": "String",
|
970
|
+
"default": "`nil`",
|
971
|
+
"description": "Header to be displayed above the menu."
|
972
|
+
},
|
973
|
+
{
|
974
|
+
"name": "system_arguments",
|
975
|
+
"type": "Hash",
|
976
|
+
"default": "N/A",
|
977
|
+
"description": "[System arguments](/system-arguments)"
|
978
|
+
}
|
979
|
+
]
|
980
|
+
},
|
981
|
+
{
|
982
|
+
"component": "Dropdown::Menu::Item",
|
983
|
+
"status": "alpha",
|
984
|
+
"a11y_reviewed": false,
|
985
|
+
"short_name": "DropdownMenuItem",
|
986
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dropdown/menu/item.rb",
|
987
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/menu/item/default/",
|
988
|
+
"parameters": [
|
989
|
+
|
990
|
+
]
|
991
|
+
},
|
992
|
+
{
|
993
|
+
"component": "FormButton",
|
994
|
+
"status": "alpha",
|
995
|
+
"a11y_reviewed": false,
|
996
|
+
"short_name": "FormButton",
|
997
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/form_button.rb",
|
998
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/form_button/default/",
|
999
|
+
"parameters": [
|
1000
|
+
{
|
1001
|
+
"name": "name",
|
1002
|
+
"type": "String",
|
1003
|
+
"default": "N/A",
|
1004
|
+
"description": "Value for the HTML name attribute."
|
1005
|
+
},
|
1006
|
+
{
|
1007
|
+
"name": "id",
|
1008
|
+
"type": "String",
|
1009
|
+
"default": "N/A",
|
1010
|
+
"description": "Value for the HTML id attribute."
|
1011
|
+
},
|
1012
|
+
{
|
1013
|
+
"name": "class",
|
1014
|
+
"type": "String",
|
1015
|
+
"default": "N/A",
|
1016
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
1017
|
+
},
|
1018
|
+
{
|
1019
|
+
"name": "classes",
|
1020
|
+
"type": "Array",
|
1021
|
+
"default": "N/A",
|
1022
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
1023
|
+
},
|
1024
|
+
{
|
1025
|
+
"name": "label",
|
1026
|
+
"type": "String",
|
1027
|
+
"default": "N/A",
|
1028
|
+
"description": "Label text displayed above the input."
|
1029
|
+
},
|
1030
|
+
{
|
1031
|
+
"name": "aria",
|
1032
|
+
"type": "Hash",
|
1033
|
+
"default": "N/A",
|
1034
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
1035
|
+
},
|
1036
|
+
{
|
1037
|
+
"name": "data",
|
1038
|
+
"type": "Hash",
|
1039
|
+
"default": "N/A",
|
1040
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
1041
|
+
},
|
1042
|
+
{
|
1043
|
+
"name": "system_arguments",
|
1044
|
+
"type": "Hash",
|
1045
|
+
"default": "N/A",
|
1046
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
1047
|
+
}
|
1048
|
+
]
|
1049
|
+
},
|
1050
|
+
{
|
1051
|
+
"component": "FormControl",
|
1052
|
+
"status": "alpha",
|
1053
|
+
"a11y_reviewed": false,
|
1054
|
+
"short_name": "FormControl",
|
1055
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/form_control.rb",
|
1056
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/form_control/default/",
|
1057
|
+
"parameters": [
|
1058
|
+
{
|
1059
|
+
"name": "label",
|
1060
|
+
"type": "String",
|
1061
|
+
"default": "N/A",
|
1062
|
+
"description": "Label text displayed above the input."
|
1063
|
+
},
|
1064
|
+
{
|
1065
|
+
"name": "caption",
|
1066
|
+
"type": "String",
|
1067
|
+
"default": "`nil`",
|
1068
|
+
"description": "Describes the field and what sort of input it expects. Displayed below the input. Note that the `caption` slot is also available and takes precedence over this argument when provided."
|
1069
|
+
},
|
1070
|
+
{
|
1071
|
+
"name": "validation_message",
|
1072
|
+
"type": "String",
|
1073
|
+
"default": "`nil`",
|
1074
|
+
"description": "A string displayed in red between the caption and the input indicating the input's contents are invalid."
|
1075
|
+
},
|
1076
|
+
{
|
1077
|
+
"name": "required",
|
1078
|
+
"type": "Boolean",
|
1079
|
+
"default": "`false`",
|
1080
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
1081
|
+
},
|
1082
|
+
{
|
1083
|
+
"name": "visually_hide_label",
|
1084
|
+
"type": "Boolean",
|
1085
|
+
"default": "`false`",
|
1086
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
1087
|
+
},
|
1088
|
+
{
|
1089
|
+
"name": "full_width",
|
1090
|
+
"type": "Boolean",
|
1091
|
+
"default": "`false`",
|
1092
|
+
"description": "When set to `true`, the form control will take up all the horizontal space allowed by its container."
|
1093
|
+
},
|
1094
|
+
{
|
1095
|
+
"name": "system_arguments",
|
1096
|
+
"type": "Hash",
|
1097
|
+
"default": "N/A",
|
1098
|
+
"description": "[System arguments](/system-arguments)"
|
1099
|
+
}
|
1100
|
+
]
|
1101
|
+
},
|
1102
|
+
{
|
1103
|
+
"component": "HellipButton",
|
1104
|
+
"status": "alpha",
|
1105
|
+
"a11y_reviewed": false,
|
1106
|
+
"short_name": "HellipButton",
|
1107
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hellip_button.rb",
|
1108
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/hellip_button/default/",
|
1109
|
+
"parameters": [
|
1110
|
+
{
|
1111
|
+
"name": "inline",
|
1112
|
+
"type": "Boolean",
|
1113
|
+
"default": "`false`",
|
1114
|
+
"description": "Whether or not the button is inline."
|
1115
|
+
},
|
1116
|
+
{
|
1117
|
+
"name": "disabled",
|
1118
|
+
"type": "Boolean",
|
1119
|
+
"default": "`false`",
|
1120
|
+
"description": "Whether or not the button is disabled."
|
1121
|
+
},
|
1122
|
+
{
|
1123
|
+
"name": "system_arguments",
|
1124
|
+
"type": "Hash",
|
1125
|
+
"default": "N/A",
|
1126
|
+
"description": "[System arguments](/system-arguments)"
|
1127
|
+
}
|
1128
|
+
]
|
1129
|
+
},
|
1130
|
+
{
|
1131
|
+
"component": "HiddenTextExpander",
|
1132
|
+
"status": "alpha",
|
1133
|
+
"a11y_reviewed": false,
|
1134
|
+
"short_name": "HiddenTextExpander",
|
1135
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hidden_text_expander.rb",
|
1136
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/hidden_text_expander/default/",
|
1137
|
+
"parameters": [
|
1138
|
+
{
|
1139
|
+
"name": "inline",
|
1140
|
+
"type": "Boolean",
|
1141
|
+
"default": "`false`",
|
1142
|
+
"description": "Whether or not the expander is inline."
|
1143
|
+
},
|
1144
|
+
{
|
1145
|
+
"name": "button_arguments",
|
1146
|
+
"type": "Hash",
|
1147
|
+
"default": "`{}`",
|
1148
|
+
"description": "[System arguments](/system-arguments) for the button element."
|
1149
|
+
},
|
1150
|
+
{
|
1151
|
+
"name": "system_arguments",
|
1152
|
+
"type": "Hash",
|
1153
|
+
"default": "N/A",
|
1154
|
+
"description": "[System arguments](/system-arguments)"
|
1155
|
+
}
|
1156
|
+
]
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
"component": "Image",
|
1160
|
+
"status": "alpha",
|
1161
|
+
"a11y_reviewed": false,
|
1162
|
+
"short_name": "Image",
|
1163
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/image.rb",
|
1164
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/image/default/",
|
1165
|
+
"parameters": [
|
1166
|
+
{
|
1167
|
+
"name": "src",
|
1168
|
+
"type": "String",
|
1169
|
+
"default": "N/A",
|
1170
|
+
"description": "The source url of the image."
|
1171
|
+
},
|
1172
|
+
{
|
1173
|
+
"name": "alt",
|
1174
|
+
"type": "String",
|
1175
|
+
"default": "N/A",
|
1176
|
+
"description": "Specifies an alternate text for the image."
|
1177
|
+
},
|
1178
|
+
{
|
1179
|
+
"name": "lazy",
|
1180
|
+
"type": "Boolean",
|
1181
|
+
"default": "`false`",
|
1182
|
+
"description": "Whether or not to lazily load the image."
|
1183
|
+
},
|
1184
|
+
{
|
1185
|
+
"name": "system_arguments",
|
1186
|
+
"type": "Hash",
|
1187
|
+
"default": "N/A",
|
1188
|
+
"description": "[System arguments](/system-arguments)"
|
1189
|
+
}
|
1190
|
+
]
|
1191
|
+
},
|
1192
|
+
{
|
1193
|
+
"component": "ImageCrop",
|
1194
|
+
"status": "alpha",
|
1195
|
+
"a11y_reviewed": false,
|
1196
|
+
"short_name": "ImageCrop",
|
1197
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/image_crop.rb",
|
1198
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/image_crop/default/",
|
1199
|
+
"parameters": [
|
1200
|
+
{
|
1201
|
+
"name": "src",
|
1202
|
+
"type": "String",
|
1203
|
+
"default": "N/A",
|
1204
|
+
"description": "The path of the image to crop."
|
1205
|
+
},
|
1206
|
+
{
|
1207
|
+
"name": "rounded",
|
1208
|
+
"type": "Boolean",
|
1209
|
+
"default": "`true`",
|
1210
|
+
"description": "If the crop mask should be a circle. Defaults to true."
|
1211
|
+
},
|
1212
|
+
{
|
1213
|
+
"name": "system_arguments",
|
1214
|
+
"type": "Hash",
|
1215
|
+
"default": "N/A",
|
1216
|
+
"description": "[System arguments](/system-arguments)"
|
1217
|
+
}
|
1218
|
+
]
|
1219
|
+
},
|
1220
|
+
{
|
1221
|
+
"component": "Layout",
|
1222
|
+
"status": "alpha",
|
1223
|
+
"a11y_reviewed": false,
|
1224
|
+
"short_name": "Layout",
|
1225
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout.rb",
|
1226
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/default/",
|
1227
|
+
"parameters": [
|
1228
|
+
{
|
1229
|
+
"name": "stacking_breakpoint",
|
1230
|
+
"type": "Symbol",
|
1231
|
+
"default": "`:md`",
|
1232
|
+
"description": "When the `Layout` should change from rows into columns. One of `:lg`, `:md`, or `:sm`."
|
1233
|
+
},
|
1234
|
+
{
|
1235
|
+
"name": "first_in_source",
|
1236
|
+
"type": "Symbol",
|
1237
|
+
"default": "`:sidebar`",
|
1238
|
+
"description": "Which element to render first in the HTML. This will change the keyboard navigation order. One of `:main` or `:sidebar`."
|
1239
|
+
},
|
1240
|
+
{
|
1241
|
+
"name": "gutter",
|
1242
|
+
"type": "Symbol",
|
1243
|
+
"default": "`:default`",
|
1244
|
+
"description": "The amount of space between the main section and the sidebar. One of `:condensed`, `:default`, `:none`, or `:spacious`."
|
1245
|
+
},
|
1246
|
+
{
|
1247
|
+
"name": "system_arguments",
|
1248
|
+
"type": "Hash",
|
1249
|
+
"default": "N/A",
|
1250
|
+
"description": "[System arguments](/system-arguments)"
|
1251
|
+
}
|
1252
|
+
]
|
1253
|
+
},
|
1254
|
+
{
|
1255
|
+
"component": "Layout::Main",
|
1256
|
+
"status": "alpha",
|
1257
|
+
"a11y_reviewed": false,
|
1258
|
+
"short_name": "LayoutMain",
|
1259
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/main.rb",
|
1260
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/main/default/",
|
1261
|
+
"parameters": [
|
1262
|
+
{
|
1263
|
+
"name": "width",
|
1264
|
+
"type": "Symbol",
|
1265
|
+
"default": "`:full`",
|
1266
|
+
"description": "One of `:full`, `:lg`, `:md`, or `:xl`."
|
1267
|
+
},
|
1268
|
+
{
|
1269
|
+
"name": "system_arguments",
|
1270
|
+
"type": "Hash",
|
1271
|
+
"default": "N/A",
|
1272
|
+
"description": "[System arguments](/system-arguments)"
|
1273
|
+
}
|
1274
|
+
]
|
1275
|
+
},
|
1276
|
+
{
|
1277
|
+
"component": "Layout::Sidebar",
|
1278
|
+
"status": "alpha",
|
1279
|
+
"a11y_reviewed": false,
|
1280
|
+
"short_name": "LayoutSidebar",
|
1281
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout/sidebar.rb",
|
1282
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/layout/sidebar/default/",
|
1283
|
+
"parameters": [
|
1284
|
+
|
1285
|
+
]
|
1286
|
+
},
|
1287
|
+
{
|
1288
|
+
"component": "Menu",
|
1289
|
+
"status": "alpha",
|
1290
|
+
"a11y_reviewed": false,
|
1291
|
+
"short_name": "Menu",
|
1292
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/menu.rb",
|
1293
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/menu/default/",
|
1294
|
+
"parameters": [
|
1295
|
+
{
|
1296
|
+
"name": "system_arguments",
|
1297
|
+
"type": "Hash",
|
1298
|
+
"default": "N/A",
|
1299
|
+
"description": "[System arguments](/system-arguments)"
|
1300
|
+
}
|
1301
|
+
]
|
1302
|
+
},
|
1303
|
+
{
|
1304
|
+
"component": "MultiInput",
|
1305
|
+
"status": "alpha",
|
1306
|
+
"a11y_reviewed": false,
|
1307
|
+
"short_name": "MultiInput",
|
1308
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/multi_input.rb",
|
1309
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/multi_input/default/",
|
1310
|
+
"parameters": [
|
1311
|
+
{
|
1312
|
+
"name": "name",
|
1313
|
+
"type": "String",
|
1314
|
+
"default": "N/A",
|
1315
|
+
"description": "Value for the HTML name attribute."
|
1316
|
+
},
|
1317
|
+
{
|
1318
|
+
"name": "id",
|
1319
|
+
"type": "String",
|
1320
|
+
"default": "N/A",
|
1321
|
+
"description": "Value for the HTML id attribute."
|
1322
|
+
},
|
1323
|
+
{
|
1324
|
+
"name": "class",
|
1325
|
+
"type": "String",
|
1326
|
+
"default": "N/A",
|
1327
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
1328
|
+
},
|
1329
|
+
{
|
1330
|
+
"name": "classes",
|
1331
|
+
"type": "Array",
|
1332
|
+
"default": "N/A",
|
1333
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
1334
|
+
},
|
1335
|
+
{
|
1336
|
+
"name": "caption",
|
1337
|
+
"type": "String",
|
1338
|
+
"default": "N/A",
|
1339
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
1340
|
+
},
|
1341
|
+
{
|
1342
|
+
"name": "label",
|
1343
|
+
"type": "String",
|
1344
|
+
"default": "N/A",
|
1345
|
+
"description": "Label text displayed above the input."
|
1346
|
+
},
|
1347
|
+
{
|
1348
|
+
"name": "visually_hide_label",
|
1349
|
+
"type": "Boolean",
|
1350
|
+
"default": "N/A",
|
1351
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
1352
|
+
},
|
1353
|
+
{
|
1354
|
+
"name": "disabled",
|
1355
|
+
"type": "Boolean",
|
1356
|
+
"default": "N/A",
|
1357
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
1358
|
+
},
|
1359
|
+
{
|
1360
|
+
"name": "hidden",
|
1361
|
+
"type": "Boolean",
|
1362
|
+
"default": "N/A",
|
1363
|
+
"description": "When set to `true`, visually hides the field."
|
1364
|
+
},
|
1365
|
+
{
|
1366
|
+
"name": "invalid",
|
1367
|
+
"type": "Boolean",
|
1368
|
+
"default": "N/A",
|
1369
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
1370
|
+
},
|
1371
|
+
{
|
1372
|
+
"name": "validation_message",
|
1373
|
+
"type": "String",
|
1374
|
+
"default": "N/A",
|
1375
|
+
"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."
|
1376
|
+
},
|
1377
|
+
{
|
1378
|
+
"name": "label_arguments",
|
1379
|
+
"type": "Hash",
|
1380
|
+
"default": "N/A",
|
1381
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
"name": "scope_name_to_model",
|
1385
|
+
"type": "Boolean",
|
1386
|
+
"default": "N/A",
|
1387
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
1388
|
+
},
|
1389
|
+
{
|
1390
|
+
"name": "scope_id_to_model",
|
1391
|
+
"type": "Boolean",
|
1392
|
+
"default": "N/A",
|
1393
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
1394
|
+
},
|
1395
|
+
{
|
1396
|
+
"name": "required",
|
1397
|
+
"type": "Boolean",
|
1398
|
+
"default": "N/A",
|
1399
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
1400
|
+
},
|
1401
|
+
{
|
1402
|
+
"name": "aria",
|
1403
|
+
"type": "Hash",
|
1404
|
+
"default": "N/A",
|
1405
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
1406
|
+
},
|
1407
|
+
{
|
1408
|
+
"name": "data",
|
1409
|
+
"type": "Hash",
|
1410
|
+
"default": "N/A",
|
1411
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
1412
|
+
},
|
1413
|
+
{
|
1414
|
+
"name": "system_arguments",
|
1415
|
+
"type": "Hash",
|
1416
|
+
"default": "N/A",
|
1417
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
1418
|
+
}
|
1419
|
+
]
|
1420
|
+
},
|
1421
|
+
{
|
1422
|
+
"component": "NavList",
|
1423
|
+
"status": "alpha",
|
1424
|
+
"a11y_reviewed": true,
|
1425
|
+
"short_name": "NavList",
|
1426
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list.rb",
|
1427
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/default/",
|
1428
|
+
"parameters": [
|
1429
|
+
{
|
1430
|
+
"name": "selected_item_id",
|
1431
|
+
"type": "Symbol",
|
1432
|
+
"default": "`nil`",
|
1433
|
+
"description": "The ID of the currently selected item. The default is `nil`, meaning no item is selected."
|
1434
|
+
},
|
1435
|
+
{
|
1436
|
+
"name": "system_arguments",
|
1437
|
+
"type": "Hash",
|
1438
|
+
"default": "N/A",
|
1439
|
+
"description": "[System arguments](/system-arguments)"
|
1440
|
+
}
|
1441
|
+
]
|
1442
|
+
},
|
1443
|
+
{
|
1444
|
+
"component": "NavList::Divider",
|
1445
|
+
"status": "alpha",
|
1446
|
+
"a11y_reviewed": false,
|
1447
|
+
"short_name": "NavListDivider",
|
1448
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/divider.rb",
|
1449
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/divider/default/",
|
1450
|
+
"parameters": [
|
1451
|
+
{
|
1452
|
+
"name": "scheme",
|
1453
|
+
"type": "Symbol",
|
1454
|
+
"default": "`:subtle`",
|
1455
|
+
"description": "Display a background color if scheme is `filled`."
|
1456
|
+
},
|
1457
|
+
{
|
1458
|
+
"name": "system_arguments",
|
1459
|
+
"type": "Hash",
|
1460
|
+
"default": "N/A",
|
1461
|
+
"description": "[System arguments](/system-arguments)"
|
1462
|
+
}
|
1463
|
+
]
|
1464
|
+
},
|
1465
|
+
{
|
1466
|
+
"component": "NavList::Group",
|
1467
|
+
"status": "alpha",
|
1468
|
+
"a11y_reviewed": true,
|
1469
|
+
"short_name": "NavListGroup",
|
1470
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/group.rb",
|
1471
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/group/default/",
|
1472
|
+
"parameters": [
|
1473
|
+
{
|
1474
|
+
"name": "selected_item_id",
|
1475
|
+
"type": "Symbol",
|
1476
|
+
"default": "`nil`",
|
1477
|
+
"description": "The ID of the currently selected item. Used internally."
|
1478
|
+
},
|
1479
|
+
{
|
1480
|
+
"name": "system_arguments",
|
1481
|
+
"type": "Hash",
|
1482
|
+
"default": "N/A",
|
1483
|
+
"description": "[System arguments](/system-arguments)"
|
1484
|
+
}
|
1485
|
+
]
|
1486
|
+
},
|
1487
|
+
{
|
1488
|
+
"component": "NavList::Heading",
|
1489
|
+
"status": "alpha",
|
1490
|
+
"a11y_reviewed": false,
|
1491
|
+
"short_name": "NavListHeading",
|
1492
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/heading.rb",
|
1493
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/heading/default/",
|
1494
|
+
"parameters": [
|
1495
|
+
{
|
1496
|
+
"name": "title",
|
1497
|
+
"type": "String",
|
1498
|
+
"default": "N/A",
|
1499
|
+
"description": "The text content of the heading."
|
1500
|
+
},
|
1501
|
+
{
|
1502
|
+
"name": "id",
|
1503
|
+
"type": "String",
|
1504
|
+
"default": "`self.class.generate_id`",
|
1505
|
+
"description": "The value of the ID HTML attribute. Auto-generated by default."
|
1506
|
+
},
|
1507
|
+
{
|
1508
|
+
"name": "heading_level",
|
1509
|
+
"type": "Integer",
|
1510
|
+
"default": "`2`",
|
1511
|
+
"description": "The heading level, i.e. 2 for an `<h2>`, 3 for an `<h3>`, etc."
|
1512
|
+
},
|
1513
|
+
{
|
1514
|
+
"name": "system_arguments",
|
1515
|
+
"type": "Hash",
|
1516
|
+
"default": "N/A",
|
1517
|
+
"description": "[System arguments](/system-arguments)"
|
1518
|
+
}
|
1519
|
+
]
|
1520
|
+
},
|
1521
|
+
{
|
1522
|
+
"component": "NavList::Item",
|
1523
|
+
"status": "alpha",
|
1524
|
+
"a11y_reviewed": false,
|
1525
|
+
"short_name": "NavListItem",
|
1526
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb",
|
1527
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/nav_list/item/default/",
|
1528
|
+
"parameters": [
|
1529
|
+
{
|
1530
|
+
"name": "selected_item_id",
|
1531
|
+
"type": "Symbol",
|
1532
|
+
"default": "`nil`",
|
1533
|
+
"description": "The ID of the currently selected list item. Used internally."
|
1534
|
+
},
|
1535
|
+
{
|
1536
|
+
"name": "selected_by_ids",
|
1537
|
+
"type": "Array<Symbol>",
|
1538
|
+
"default": "`[]`",
|
1539
|
+
"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."
|
1540
|
+
},
|
1541
|
+
{
|
1542
|
+
"name": "expanded",
|
1543
|
+
"type": "Boolean",
|
1544
|
+
"default": "`false`",
|
1545
|
+
"description": "Whether this item shows (expands) or hides (collapses) its list of sub items."
|
1546
|
+
},
|
1547
|
+
{
|
1548
|
+
"name": "sub_item",
|
1549
|
+
"type": "Boolean",
|
1550
|
+
"default": "`false`",
|
1551
|
+
"description": "Whether or not this item is nested under a parent item. Used internally."
|
1552
|
+
},
|
1553
|
+
{
|
1554
|
+
"name": "system_arguments",
|
1555
|
+
"type": "Hash",
|
1556
|
+
"default": "N/A",
|
1557
|
+
"description": "[System arguments](/system-arguments)"
|
1558
|
+
}
|
1559
|
+
]
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
"component": "Navigation::Tab",
|
1563
|
+
"status": "alpha",
|
1564
|
+
"a11y_reviewed": false,
|
1565
|
+
"short_name": "NavigationTab",
|
1566
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/navigation/tab.rb",
|
1567
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/navigation/tab/default/",
|
1568
|
+
"parameters": [
|
1569
|
+
{
|
1570
|
+
"name": "list",
|
1571
|
+
"type": "Boolean",
|
1572
|
+
"default": "`false`",
|
1573
|
+
"description": "Whether the Tab is an item in a `<ul>` list."
|
1574
|
+
},
|
1575
|
+
{
|
1576
|
+
"name": "selected",
|
1577
|
+
"type": "Boolean",
|
1578
|
+
"default": "`false`",
|
1579
|
+
"description": "Whether the Tab is selected or not."
|
1580
|
+
},
|
1581
|
+
{
|
1582
|
+
"name": "with_panel",
|
1583
|
+
"type": "Boolean",
|
1584
|
+
"default": "`false`",
|
1585
|
+
"description": "Whether the Tab has an associated panel."
|
1586
|
+
},
|
1587
|
+
{
|
1588
|
+
"name": "panel_id",
|
1589
|
+
"type": "String",
|
1590
|
+
"default": "`\"\"`",
|
1591
|
+
"description": "Only applies if `with_panel` is `true`. Unique id of panel."
|
1592
|
+
},
|
1593
|
+
{
|
1594
|
+
"name": "icon_classes",
|
1595
|
+
"type": "Boolean",
|
1596
|
+
"default": "`\"\"`",
|
1597
|
+
"description": "Classes that must always be applied to icons."
|
1598
|
+
},
|
1599
|
+
{
|
1600
|
+
"name": "wrapper_arguments",
|
1601
|
+
"type": "Hash",
|
1602
|
+
"default": "`{}`",
|
1603
|
+
"description": "[System arguments](/system-arguments) to be used in the `<li>` wrapper when the tab is an item in a list."
|
1604
|
+
},
|
1605
|
+
{
|
1606
|
+
"name": "system_arguments",
|
1607
|
+
"type": "Hash",
|
1608
|
+
"default": "N/A",
|
1609
|
+
"description": "[System arguments](/system-arguments)"
|
1610
|
+
}
|
1611
|
+
]
|
1612
|
+
},
|
1613
|
+
{
|
1614
|
+
"component": "OcticonSymbols",
|
1615
|
+
"status": "alpha",
|
1616
|
+
"a11y_reviewed": false,
|
1617
|
+
"short_name": "OcticonSymbols",
|
1618
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/octicon_symbols.rb",
|
1619
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/octicon_symbols/default/",
|
1620
|
+
"parameters": [
|
1621
|
+
{
|
1622
|
+
"name": "icons",
|
1623
|
+
"type": "Array<Hash>",
|
1624
|
+
"default": "`[]`",
|
1625
|
+
"description": "List of icons to render, in the format { symbol: :icon_name, size: :small }"
|
1626
|
+
}
|
1627
|
+
]
|
1628
|
+
},
|
1629
|
+
{
|
1630
|
+
"component": "Overlay",
|
1631
|
+
"status": "alpha",
|
1632
|
+
"a11y_reviewed": false,
|
1633
|
+
"short_name": "Overlay",
|
1634
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay.rb",
|
1635
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/default/",
|
1636
|
+
"parameters": [
|
1637
|
+
{
|
1638
|
+
"name": "id",
|
1639
|
+
"type": "String",
|
1640
|
+
"default": "`self.class.generate_id`",
|
1641
|
+
"description": "The id of the Overlay."
|
1642
|
+
},
|
1643
|
+
{
|
1644
|
+
"name": "title",
|
1645
|
+
"type": "String",
|
1646
|
+
"default": "N/A",
|
1647
|
+
"description": "Describes the content of the Overlay."
|
1648
|
+
},
|
1649
|
+
{
|
1650
|
+
"name": "subtitle",
|
1651
|
+
"type": "String",
|
1652
|
+
"default": "`nil`",
|
1653
|
+
"description": "Provides dditional context for the Overlay, also setting the `aria-describedby` attribute."
|
1654
|
+
},
|
1655
|
+
{
|
1656
|
+
"name": "popover",
|
1657
|
+
"type": "Symbol",
|
1658
|
+
"default": "`:auto`",
|
1659
|
+
"description": "The popover behaviour. One of `:auto` or `:manual`."
|
1660
|
+
},
|
1661
|
+
{
|
1662
|
+
"name": "size",
|
1663
|
+
"type": "Symbol",
|
1664
|
+
"default": "`:auto`",
|
1665
|
+
"description": "The size of the Overlay. One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
|
1666
|
+
},
|
1667
|
+
{
|
1668
|
+
"name": "padding",
|
1669
|
+
"type": "Symbol",
|
1670
|
+
"default": "`:normal`",
|
1671
|
+
"description": "The padding given to the Overlay body. One of `:condensed`, `:none`, or `:normal`."
|
1672
|
+
},
|
1673
|
+
{
|
1674
|
+
"name": "anchor",
|
1675
|
+
"type": "String",
|
1676
|
+
"default": "`nil`",
|
1677
|
+
"description": "An ID of the element to anchor onto. Defaults to the `show_button`."
|
1678
|
+
},
|
1679
|
+
{
|
1680
|
+
"name": "anchor_align",
|
1681
|
+
"type": "Symbol",
|
1682
|
+
"default": "`:start`",
|
1683
|
+
"description": "The anchor alignment of the Overlay. One of `:center`, `:end`, or `:start`."
|
1684
|
+
},
|
1685
|
+
{
|
1686
|
+
"name": "anchor_side",
|
1687
|
+
"type": "Symbol",
|
1688
|
+
"default": "`:outside_bottom`",
|
1689
|
+
"description": "The side to anchor the Overlay to. One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
|
1690
|
+
},
|
1691
|
+
{
|
1692
|
+
"name": "anchor_offset",
|
1693
|
+
"type": "Symbol",
|
1694
|
+
"default": "`:normal`",
|
1695
|
+
"description": "The anchor offset to give the Overlay. One of `:normal` or `:spacious`."
|
1696
|
+
},
|
1697
|
+
{
|
1698
|
+
"name": "allow_out_of_bounds",
|
1699
|
+
"type": "Boolean",
|
1700
|
+
"default": "`false`",
|
1701
|
+
"description": "Allow the Overlay to overflow its container."
|
1702
|
+
},
|
1703
|
+
{
|
1704
|
+
"name": "visually_hide_title",
|
1705
|
+
"type": "Boolean",
|
1706
|
+
"default": "`false`",
|
1707
|
+
"description": "If true will hide the heading title, while still making it available to Screen Readers."
|
1708
|
+
},
|
1709
|
+
{
|
1710
|
+
"name": "role",
|
1711
|
+
"type": "String",
|
1712
|
+
"default": "`nil`",
|
1713
|
+
"description": "The ARIA role. One of `nil`, `:dialog`, or `:menu`."
|
1714
|
+
},
|
1715
|
+
{
|
1716
|
+
"name": "system_arguments",
|
1717
|
+
"type": "Hash",
|
1718
|
+
"default": "N/A",
|
1719
|
+
"description": "[System arguments](/system-arguments)"
|
1720
|
+
}
|
1721
|
+
]
|
1722
|
+
},
|
1723
|
+
{
|
1724
|
+
"component": "Overlay::Body",
|
1725
|
+
"status": "alpha",
|
1726
|
+
"a11y_reviewed": false,
|
1727
|
+
"short_name": "OverlayBody",
|
1728
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/body.rb",
|
1729
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/body/default/",
|
1730
|
+
"parameters": [
|
1731
|
+
{
|
1732
|
+
"name": "system_arguments",
|
1733
|
+
"type": "Hash",
|
1734
|
+
"default": "N/A",
|
1735
|
+
"description": "[System arguments](/system-arguments)"
|
1736
|
+
}
|
1737
|
+
]
|
1738
|
+
},
|
1739
|
+
{
|
1740
|
+
"component": "Overlay::Footer",
|
1741
|
+
"status": "alpha",
|
1742
|
+
"a11y_reviewed": false,
|
1743
|
+
"short_name": "OverlayFooter",
|
1744
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/footer.rb",
|
1745
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/footer/default/",
|
1746
|
+
"parameters": [
|
1747
|
+
{
|
1748
|
+
"name": "show_divider",
|
1749
|
+
"type": "Boolean",
|
1750
|
+
"default": "`false`",
|
1751
|
+
"description": "Show a divider between the footer and body."
|
1752
|
+
},
|
1753
|
+
{
|
1754
|
+
"name": "align_content",
|
1755
|
+
"type": "Symbol",
|
1756
|
+
"default": "`DEFAULT_ALIGN_CONTENT`",
|
1757
|
+
"description": "The alginment of contents. One of `:center`, `:end`, or `:start`."
|
1758
|
+
},
|
1759
|
+
{
|
1760
|
+
"name": "system_arguments",
|
1761
|
+
"type": "Hash",
|
1762
|
+
"default": "N/A",
|
1763
|
+
"description": "[System arguments](/system-arguments)"
|
1764
|
+
}
|
1765
|
+
]
|
1766
|
+
},
|
1767
|
+
{
|
1768
|
+
"component": "Overlay::Header",
|
1769
|
+
"status": "alpha",
|
1770
|
+
"a11y_reviewed": false,
|
1771
|
+
"short_name": "OverlayHeader",
|
1772
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/header.rb",
|
1773
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/header/default/",
|
1774
|
+
"parameters": [
|
1775
|
+
{
|
1776
|
+
"name": "title",
|
1777
|
+
"type": "String",
|
1778
|
+
"default": "N/A",
|
1779
|
+
"description": "Describes the content of the Overlay."
|
1780
|
+
},
|
1781
|
+
{
|
1782
|
+
"name": "subtitle",
|
1783
|
+
"type": "String",
|
1784
|
+
"default": "`nil`",
|
1785
|
+
"description": "Provides additional context for the Overlay, also setting the `aria-describedby` attribute."
|
1786
|
+
},
|
1787
|
+
{
|
1788
|
+
"name": "overlay_id",
|
1789
|
+
"type": "String",
|
1790
|
+
"default": "`nil`",
|
1791
|
+
"description": "Provides the id of the overlay element so the close button can close it"
|
1792
|
+
},
|
1793
|
+
{
|
1794
|
+
"name": "size",
|
1795
|
+
"type": "Symbol",
|
1796
|
+
"default": "`:medium`",
|
1797
|
+
"description": "The size of the Header. One of `:large` or `:medium`."
|
1798
|
+
},
|
1799
|
+
{
|
1800
|
+
"name": "divider",
|
1801
|
+
"type": "Boolean",
|
1802
|
+
"default": "`false`",
|
1803
|
+
"description": "Show a divider between the header and body."
|
1804
|
+
},
|
1805
|
+
{
|
1806
|
+
"name": "visually_hide_title",
|
1807
|
+
"type": "Boolean",
|
1808
|
+
"default": "`false`",
|
1809
|
+
"description": "Visually hide the `title` while maintaining a label for assistive technologies."
|
1810
|
+
},
|
1811
|
+
{
|
1812
|
+
"name": "system_arguments",
|
1813
|
+
"type": "Hash",
|
1814
|
+
"default": "N/A",
|
1815
|
+
"description": "[System arguments](/system-arguments)"
|
1816
|
+
}
|
1817
|
+
]
|
1818
|
+
},
|
1819
|
+
{
|
1820
|
+
"component": "RadioButton",
|
1821
|
+
"status": "alpha",
|
1822
|
+
"a11y_reviewed": false,
|
1823
|
+
"short_name": "RadioButton",
|
1824
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/radio_button.rb",
|
1825
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/radio_button/default/",
|
1826
|
+
"parameters": [
|
1827
|
+
{
|
1828
|
+
"name": "name",
|
1829
|
+
"type": "String",
|
1830
|
+
"default": "N/A",
|
1831
|
+
"description": "Value for the HTML name attribute."
|
1832
|
+
},
|
1833
|
+
{
|
1834
|
+
"name": "id",
|
1835
|
+
"type": "String",
|
1836
|
+
"default": "N/A",
|
1837
|
+
"description": "Value for the HTML id attribute."
|
1838
|
+
},
|
1839
|
+
{
|
1840
|
+
"name": "class",
|
1841
|
+
"type": "String",
|
1842
|
+
"default": "N/A",
|
1843
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
1844
|
+
},
|
1845
|
+
{
|
1846
|
+
"name": "classes",
|
1847
|
+
"type": "Array",
|
1848
|
+
"default": "N/A",
|
1849
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
1850
|
+
},
|
1851
|
+
{
|
1852
|
+
"name": "caption",
|
1853
|
+
"type": "String",
|
1854
|
+
"default": "N/A",
|
1855
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
1856
|
+
},
|
1857
|
+
{
|
1858
|
+
"name": "label",
|
1859
|
+
"type": "String",
|
1860
|
+
"default": "N/A",
|
1861
|
+
"description": "Label text displayed above the input."
|
1862
|
+
},
|
1863
|
+
{
|
1864
|
+
"name": "visually_hide_label",
|
1865
|
+
"type": "Boolean",
|
1866
|
+
"default": "N/A",
|
1867
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
"name": "disabled",
|
1871
|
+
"type": "Boolean",
|
1872
|
+
"default": "N/A",
|
1873
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
1874
|
+
},
|
1875
|
+
{
|
1876
|
+
"name": "hidden",
|
1877
|
+
"type": "Boolean",
|
1878
|
+
"default": "N/A",
|
1879
|
+
"description": "When set to `true`, visually hides the field."
|
1880
|
+
},
|
1881
|
+
{
|
1882
|
+
"name": "invalid",
|
1883
|
+
"type": "Boolean",
|
1884
|
+
"default": "N/A",
|
1885
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
1886
|
+
},
|
1887
|
+
{
|
1888
|
+
"name": "validation_message",
|
1889
|
+
"type": "String",
|
1890
|
+
"default": "N/A",
|
1891
|
+
"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."
|
1892
|
+
},
|
1893
|
+
{
|
1894
|
+
"name": "label_arguments",
|
1895
|
+
"type": "Hash",
|
1896
|
+
"default": "N/A",
|
1897
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
1898
|
+
},
|
1899
|
+
{
|
1900
|
+
"name": "scope_name_to_model",
|
1901
|
+
"type": "Boolean",
|
1902
|
+
"default": "N/A",
|
1903
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
1904
|
+
},
|
1905
|
+
{
|
1906
|
+
"name": "scope_id_to_model",
|
1907
|
+
"type": "Boolean",
|
1908
|
+
"default": "N/A",
|
1909
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
1910
|
+
},
|
1911
|
+
{
|
1912
|
+
"name": "required",
|
1913
|
+
"type": "Boolean",
|
1914
|
+
"default": "N/A",
|
1915
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
1916
|
+
},
|
1917
|
+
{
|
1918
|
+
"name": "aria",
|
1919
|
+
"type": "Hash",
|
1920
|
+
"default": "N/A",
|
1921
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
1922
|
+
},
|
1923
|
+
{
|
1924
|
+
"name": "data",
|
1925
|
+
"type": "Hash",
|
1926
|
+
"default": "N/A",
|
1927
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
1928
|
+
},
|
1929
|
+
{
|
1930
|
+
"name": "system_arguments",
|
1931
|
+
"type": "Hash",
|
1932
|
+
"default": "N/A",
|
1933
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
1934
|
+
}
|
1935
|
+
]
|
1936
|
+
},
|
1937
|
+
{
|
1938
|
+
"component": "RadioButtonGroup",
|
1939
|
+
"status": "alpha",
|
1940
|
+
"a11y_reviewed": false,
|
1941
|
+
"short_name": "RadioButtonGroup",
|
1942
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/radio_button_group.rb",
|
1943
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/radio_button_group/default/",
|
1944
|
+
"parameters": [
|
1945
|
+
{
|
1946
|
+
"name": "name",
|
1947
|
+
"type": "String",
|
1948
|
+
"default": "N/A",
|
1949
|
+
"description": "Value for the HTML name attribute."
|
1950
|
+
},
|
1951
|
+
{
|
1952
|
+
"name": "label",
|
1953
|
+
"type": "String",
|
1954
|
+
"default": "N/A",
|
1955
|
+
"description": "Label text displayed above the input."
|
1956
|
+
},
|
1957
|
+
{
|
1958
|
+
"name": "hidden",
|
1959
|
+
"type": "Boolean",
|
1960
|
+
"default": "N/A",
|
1961
|
+
"description": "When set to `true`, visually hides the group."
|
1962
|
+
},
|
1963
|
+
{
|
1964
|
+
"name": "caption",
|
1965
|
+
"type": "String",
|
1966
|
+
"default": "N/A",
|
1967
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the group."
|
1968
|
+
},
|
1969
|
+
{
|
1970
|
+
"name": "label_arguments",
|
1971
|
+
"type": "Hash",
|
1972
|
+
"default": "N/A",
|
1973
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
1974
|
+
}
|
1975
|
+
]
|
1976
|
+
},
|
1977
|
+
{
|
1978
|
+
"component": "SegmentedControl",
|
1979
|
+
"status": "alpha",
|
1980
|
+
"a11y_reviewed": true,
|
1981
|
+
"short_name": "SegmentedControl",
|
1982
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/segmented_control.rb",
|
1983
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/segmented_control/default/",
|
1984
|
+
"parameters": [
|
1985
|
+
{
|
1986
|
+
"name": "hide_labels",
|
1987
|
+
"type": "Boolean",
|
1988
|
+
"default": "`false`",
|
1989
|
+
"description": "Whether to hide the labels and only show the icons"
|
1990
|
+
},
|
1991
|
+
{
|
1992
|
+
"name": "full_width",
|
1993
|
+
"type": "Boolean",
|
1994
|
+
"default": "`false`",
|
1995
|
+
"description": "If the component should be full width"
|
1996
|
+
},
|
1997
|
+
{
|
1998
|
+
"name": "size",
|
1999
|
+
"type": "Symbol",
|
2000
|
+
"default": "`:medium`",
|
2001
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
2002
|
+
},
|
2003
|
+
{
|
2004
|
+
"name": "system_arguments",
|
2005
|
+
"type": "Hash",
|
2006
|
+
"default": "N/A",
|
2007
|
+
"description": "[System arguments](/system-arguments)"
|
2008
|
+
}
|
2009
|
+
]
|
2010
|
+
},
|
2011
|
+
{
|
2012
|
+
"component": "SegmentedControl::Item",
|
2013
|
+
"status": "alpha",
|
2014
|
+
"a11y_reviewed": true,
|
2015
|
+
"short_name": "SegmentedControlItem",
|
2016
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/segmented_control/item.rb",
|
2017
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/segmented_control/item/default/",
|
2018
|
+
"parameters": [
|
2019
|
+
{
|
2020
|
+
"name": "label",
|
2021
|
+
"type": "String",
|
2022
|
+
"default": "N/A",
|
2023
|
+
"description": "The label to use"
|
2024
|
+
},
|
2025
|
+
{
|
2026
|
+
"name": "selected",
|
2027
|
+
"type": "Boolean",
|
2028
|
+
"default": "`false`",
|
2029
|
+
"description": "Whether the item is selected"
|
2030
|
+
},
|
2031
|
+
{
|
2032
|
+
"name": "icon",
|
2033
|
+
"type": "Symbol",
|
2034
|
+
"default": "`nil`",
|
2035
|
+
"description": "The icon to use"
|
2036
|
+
},
|
2037
|
+
{
|
2038
|
+
"name": "hide_labels",
|
2039
|
+
"type": "Symbol",
|
2040
|
+
"default": "`false`",
|
2041
|
+
"description": "Whether to only show the icon"
|
2042
|
+
}
|
2043
|
+
]
|
2044
|
+
},
|
2045
|
+
{
|
2046
|
+
"component": "Select",
|
2047
|
+
"status": "alpha",
|
2048
|
+
"a11y_reviewed": false,
|
2049
|
+
"short_name": "Select",
|
2050
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/select.rb",
|
2051
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/select/default/",
|
2052
|
+
"parameters": [
|
2053
|
+
{
|
2054
|
+
"name": "size",
|
2055
|
+
"type": "Symbol",
|
2056
|
+
"default": "N/A",
|
2057
|
+
"description": "The size of the field. One of `:large`, `:medium`, or `:small`."
|
2058
|
+
},
|
2059
|
+
{
|
2060
|
+
"name": "name",
|
2061
|
+
"type": "String",
|
2062
|
+
"default": "N/A",
|
2063
|
+
"description": "Value for the HTML name attribute."
|
2064
|
+
},
|
2065
|
+
{
|
2066
|
+
"name": "id",
|
2067
|
+
"type": "String",
|
2068
|
+
"default": "N/A",
|
2069
|
+
"description": "Value for the HTML id attribute."
|
2070
|
+
},
|
2071
|
+
{
|
2072
|
+
"name": "class",
|
2073
|
+
"type": "String",
|
2074
|
+
"default": "N/A",
|
2075
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
2076
|
+
},
|
2077
|
+
{
|
2078
|
+
"name": "classes",
|
2079
|
+
"type": "Array",
|
2080
|
+
"default": "N/A",
|
2081
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
2082
|
+
},
|
2083
|
+
{
|
2084
|
+
"name": "caption",
|
2085
|
+
"type": "String",
|
2086
|
+
"default": "N/A",
|
2087
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
2088
|
+
},
|
2089
|
+
{
|
2090
|
+
"name": "label",
|
2091
|
+
"type": "String",
|
2092
|
+
"default": "N/A",
|
2093
|
+
"description": "Label text displayed above the input."
|
2094
|
+
},
|
2095
|
+
{
|
2096
|
+
"name": "visually_hide_label",
|
2097
|
+
"type": "Boolean",
|
2098
|
+
"default": "N/A",
|
2099
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
2100
|
+
},
|
2101
|
+
{
|
2102
|
+
"name": "disabled",
|
2103
|
+
"type": "Boolean",
|
2104
|
+
"default": "N/A",
|
2105
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
2106
|
+
},
|
2107
|
+
{
|
2108
|
+
"name": "hidden",
|
2109
|
+
"type": "Boolean",
|
2110
|
+
"default": "N/A",
|
2111
|
+
"description": "When set to `true`, visually hides the field."
|
2112
|
+
},
|
2113
|
+
{
|
2114
|
+
"name": "invalid",
|
2115
|
+
"type": "Boolean",
|
2116
|
+
"default": "N/A",
|
2117
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
2118
|
+
},
|
2119
|
+
{
|
2120
|
+
"name": "validation_message",
|
2121
|
+
"type": "String",
|
2122
|
+
"default": "N/A",
|
2123
|
+
"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."
|
2124
|
+
},
|
2125
|
+
{
|
2126
|
+
"name": "label_arguments",
|
2127
|
+
"type": "Hash",
|
2128
|
+
"default": "N/A",
|
2129
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
2130
|
+
},
|
2131
|
+
{
|
2132
|
+
"name": "scope_name_to_model",
|
2133
|
+
"type": "Boolean",
|
2134
|
+
"default": "N/A",
|
2135
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2136
|
+
},
|
2137
|
+
{
|
2138
|
+
"name": "scope_id_to_model",
|
2139
|
+
"type": "Boolean",
|
2140
|
+
"default": "N/A",
|
2141
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2142
|
+
},
|
2143
|
+
{
|
2144
|
+
"name": "required",
|
2145
|
+
"type": "Boolean",
|
2146
|
+
"default": "N/A",
|
2147
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
2148
|
+
},
|
2149
|
+
{
|
2150
|
+
"name": "aria",
|
2151
|
+
"type": "Hash",
|
2152
|
+
"default": "N/A",
|
2153
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
2154
|
+
},
|
2155
|
+
{
|
2156
|
+
"name": "data",
|
2157
|
+
"type": "Hash",
|
2158
|
+
"default": "N/A",
|
2159
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
2160
|
+
},
|
2161
|
+
{
|
2162
|
+
"name": "system_arguments",
|
2163
|
+
"type": "Hash",
|
2164
|
+
"default": "N/A",
|
2165
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
2166
|
+
},
|
2167
|
+
{
|
2168
|
+
"name": "multiple",
|
2169
|
+
"type": "Boolean",
|
2170
|
+
"default": "N/A",
|
2171
|
+
"description": "If set to true, the selection will allow multiple choices."
|
2172
|
+
},
|
2173
|
+
{
|
2174
|
+
"name": "include_blank",
|
2175
|
+
"type": "Boolean, String",
|
2176
|
+
"default": "N/A",
|
2177
|
+
"description": "If set to true, an empty option will be created. If set to a string, the string will be used as the option's content and the value will be empty."
|
2178
|
+
},
|
2179
|
+
{
|
2180
|
+
"name": "prompt",
|
2181
|
+
"type": "String",
|
2182
|
+
"default": "N/A",
|
2183
|
+
"description": "Create a prompt option with blank value and the text asking user to select something."
|
2184
|
+
}
|
2185
|
+
]
|
2186
|
+
},
|
2187
|
+
{
|
2188
|
+
"component": "SubmitButton",
|
2189
|
+
"status": "alpha",
|
2190
|
+
"a11y_reviewed": false,
|
2191
|
+
"short_name": "SubmitButton",
|
2192
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/submit_button.rb",
|
2193
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/submit_button/default/",
|
2194
|
+
"parameters": [
|
2195
|
+
{
|
2196
|
+
"name": "name",
|
2197
|
+
"type": "String",
|
2198
|
+
"default": "N/A",
|
2199
|
+
"description": "Value for the HTML name attribute."
|
2200
|
+
},
|
2201
|
+
{
|
2202
|
+
"name": "id",
|
2203
|
+
"type": "String",
|
2204
|
+
"default": "N/A",
|
2205
|
+
"description": "Value for the HTML id attribute."
|
2206
|
+
},
|
2207
|
+
{
|
2208
|
+
"name": "class",
|
2209
|
+
"type": "String",
|
2210
|
+
"default": "N/A",
|
2211
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
2212
|
+
},
|
2213
|
+
{
|
2214
|
+
"name": "classes",
|
2215
|
+
"type": "Array",
|
2216
|
+
"default": "N/A",
|
2217
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
2218
|
+
},
|
2219
|
+
{
|
2220
|
+
"name": "label",
|
2221
|
+
"type": "String",
|
2222
|
+
"default": "N/A",
|
2223
|
+
"description": "Label text displayed above the input."
|
2224
|
+
},
|
2225
|
+
{
|
2226
|
+
"name": "aria",
|
2227
|
+
"type": "Hash",
|
2228
|
+
"default": "N/A",
|
2229
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
2230
|
+
},
|
2231
|
+
{
|
2232
|
+
"name": "data",
|
2233
|
+
"type": "Hash",
|
2234
|
+
"default": "N/A",
|
2235
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
2236
|
+
},
|
2237
|
+
{
|
2238
|
+
"name": "system_arguments",
|
2239
|
+
"type": "Hash",
|
2240
|
+
"default": "N/A",
|
2241
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
2242
|
+
}
|
2243
|
+
]
|
2244
|
+
},
|
2245
|
+
{
|
2246
|
+
"component": "TabContainer",
|
2247
|
+
"status": "alpha",
|
2248
|
+
"a11y_reviewed": false,
|
2249
|
+
"short_name": "TabContainer",
|
2250
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_container.rb",
|
2251
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tab_container/default/",
|
2252
|
+
"parameters": [
|
2253
|
+
{
|
2254
|
+
"name": "system_arguments",
|
2255
|
+
"type": "Hash",
|
2256
|
+
"default": "N/A",
|
2257
|
+
"description": "[System arguments](/system-arguments)"
|
2258
|
+
}
|
2259
|
+
]
|
2260
|
+
},
|
2261
|
+
{
|
2262
|
+
"component": "TabNav",
|
2263
|
+
"status": "alpha",
|
2264
|
+
"a11y_reviewed": false,
|
2265
|
+
"short_name": "TabNav",
|
2266
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_nav.rb",
|
2267
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tab_nav/default/",
|
2268
|
+
"parameters": [
|
2269
|
+
{
|
2270
|
+
"name": "tag",
|
2271
|
+
"type": "Symbol",
|
2272
|
+
"default": "`:nav`",
|
2273
|
+
"description": "One of `:div` or `:nav`."
|
2274
|
+
},
|
2275
|
+
{
|
2276
|
+
"name": "label",
|
2277
|
+
"type": "String",
|
2278
|
+
"default": "N/A",
|
2279
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the links, and distinguish it from similar elements."
|
2280
|
+
},
|
2281
|
+
{
|
2282
|
+
"name": "body_arguments",
|
2283
|
+
"type": "Hash",
|
2284
|
+
"default": "`{}`",
|
2285
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
2286
|
+
},
|
2287
|
+
{
|
2288
|
+
"name": "system_arguments",
|
2289
|
+
"type": "Hash",
|
2290
|
+
"default": "N/A",
|
2291
|
+
"description": "[System arguments](/system-arguments)"
|
2292
|
+
}
|
2293
|
+
]
|
2294
|
+
},
|
2295
|
+
{
|
2296
|
+
"component": "TabPanels",
|
2297
|
+
"status": "alpha",
|
2298
|
+
"a11y_reviewed": false,
|
2299
|
+
"short_name": "TabPanels",
|
2300
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_panels.rb",
|
2301
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tab_panels/default/",
|
2302
|
+
"parameters": [
|
2303
|
+
{
|
2304
|
+
"name": "label",
|
2305
|
+
"type": "String",
|
2306
|
+
"default": "N/A",
|
2307
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs."
|
2308
|
+
},
|
2309
|
+
{
|
2310
|
+
"name": "align",
|
2311
|
+
"type": "Symbol",
|
2312
|
+
"default": "N/A",
|
2313
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
2314
|
+
},
|
2315
|
+
{
|
2316
|
+
"name": "body_arguments",
|
2317
|
+
"type": "Hash",
|
2318
|
+
"default": "`{}`",
|
2319
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
2320
|
+
},
|
2321
|
+
{
|
2322
|
+
"name": "wrapper_arguments",
|
2323
|
+
"type": "Hash",
|
2324
|
+
"default": "`{}`",
|
2325
|
+
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
2326
|
+
},
|
2327
|
+
{
|
2328
|
+
"name": "system_arguments",
|
2329
|
+
"type": "Hash",
|
2330
|
+
"default": "N/A",
|
2331
|
+
"description": "[System arguments](/system-arguments)"
|
2332
|
+
}
|
2333
|
+
]
|
2334
|
+
},
|
2335
|
+
{
|
2336
|
+
"component": "TextArea",
|
2337
|
+
"status": "alpha",
|
2338
|
+
"a11y_reviewed": false,
|
2339
|
+
"short_name": "TextArea",
|
2340
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_area.rb",
|
2341
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/text_area/default/",
|
2342
|
+
"parameters": [
|
2343
|
+
{
|
2344
|
+
"name": "full_width",
|
2345
|
+
"type": "Boolean",
|
2346
|
+
"default": "N/A",
|
2347
|
+
"description": "When set to `true`, the field will take up all the horizontal space allowed by its container."
|
2348
|
+
},
|
2349
|
+
{
|
2350
|
+
"name": "name",
|
2351
|
+
"type": "String",
|
2352
|
+
"default": "N/A",
|
2353
|
+
"description": "Value for the HTML name attribute."
|
2354
|
+
},
|
2355
|
+
{
|
2356
|
+
"name": "id",
|
2357
|
+
"type": "String",
|
2358
|
+
"default": "N/A",
|
2359
|
+
"description": "Value for the HTML id attribute."
|
2360
|
+
},
|
2361
|
+
{
|
2362
|
+
"name": "class",
|
2363
|
+
"type": "String",
|
2364
|
+
"default": "N/A",
|
2365
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
2366
|
+
},
|
2367
|
+
{
|
2368
|
+
"name": "classes",
|
2369
|
+
"type": "Array",
|
2370
|
+
"default": "N/A",
|
2371
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
2372
|
+
},
|
2373
|
+
{
|
2374
|
+
"name": "caption",
|
2375
|
+
"type": "String",
|
2376
|
+
"default": "N/A",
|
2377
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
2378
|
+
},
|
2379
|
+
{
|
2380
|
+
"name": "label",
|
2381
|
+
"type": "String",
|
2382
|
+
"default": "N/A",
|
2383
|
+
"description": "Label text displayed above the input."
|
2384
|
+
},
|
2385
|
+
{
|
2386
|
+
"name": "visually_hide_label",
|
2387
|
+
"type": "Boolean",
|
2388
|
+
"default": "N/A",
|
2389
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
2390
|
+
},
|
2391
|
+
{
|
2392
|
+
"name": "disabled",
|
2393
|
+
"type": "Boolean",
|
2394
|
+
"default": "N/A",
|
2395
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
2396
|
+
},
|
2397
|
+
{
|
2398
|
+
"name": "hidden",
|
2399
|
+
"type": "Boolean",
|
2400
|
+
"default": "N/A",
|
2401
|
+
"description": "When set to `true`, visually hides the field."
|
2402
|
+
},
|
2403
|
+
{
|
2404
|
+
"name": "invalid",
|
2405
|
+
"type": "Boolean",
|
2406
|
+
"default": "N/A",
|
2407
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
2408
|
+
},
|
2409
|
+
{
|
2410
|
+
"name": "validation_message",
|
2411
|
+
"type": "String",
|
2412
|
+
"default": "N/A",
|
2413
|
+
"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."
|
2414
|
+
},
|
2415
|
+
{
|
2416
|
+
"name": "label_arguments",
|
2417
|
+
"type": "Hash",
|
2418
|
+
"default": "N/A",
|
2419
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
2420
|
+
},
|
2421
|
+
{
|
2422
|
+
"name": "scope_name_to_model",
|
2423
|
+
"type": "Boolean",
|
2424
|
+
"default": "N/A",
|
2425
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2426
|
+
},
|
2427
|
+
{
|
2428
|
+
"name": "scope_id_to_model",
|
2429
|
+
"type": "Boolean",
|
2430
|
+
"default": "N/A",
|
2431
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2432
|
+
},
|
2433
|
+
{
|
2434
|
+
"name": "required",
|
2435
|
+
"type": "Boolean",
|
2436
|
+
"default": "N/A",
|
2437
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
2438
|
+
},
|
2439
|
+
{
|
2440
|
+
"name": "aria",
|
2441
|
+
"type": "Hash",
|
2442
|
+
"default": "N/A",
|
2443
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
2444
|
+
},
|
2445
|
+
{
|
2446
|
+
"name": "data",
|
2447
|
+
"type": "Hash",
|
2448
|
+
"default": "N/A",
|
2449
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
2450
|
+
},
|
2451
|
+
{
|
2452
|
+
"name": "system_arguments",
|
2453
|
+
"type": "Hash",
|
2454
|
+
"default": "N/A",
|
2455
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
2456
|
+
}
|
2457
|
+
]
|
2458
|
+
},
|
2459
|
+
{
|
2460
|
+
"component": "TextField",
|
2461
|
+
"status": "alpha",
|
2462
|
+
"a11y_reviewed": false,
|
2463
|
+
"short_name": "TextField",
|
2464
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_field.rb",
|
2465
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/text_field/default/",
|
2466
|
+
"parameters": [
|
2467
|
+
{
|
2468
|
+
"name": "size",
|
2469
|
+
"type": "Symbol",
|
2470
|
+
"default": "N/A",
|
2471
|
+
"description": "The size of the field. One of `:large`, `:medium`, or `:small`."
|
2472
|
+
},
|
2473
|
+
{
|
2474
|
+
"name": "full_width",
|
2475
|
+
"type": "Boolean",
|
2476
|
+
"default": "N/A",
|
2477
|
+
"description": "When set to `true`, the field will take up all the horizontal space allowed by its container."
|
2478
|
+
},
|
2479
|
+
{
|
2480
|
+
"name": "name",
|
2481
|
+
"type": "String",
|
2482
|
+
"default": "N/A",
|
2483
|
+
"description": "Value for the HTML name attribute."
|
2484
|
+
},
|
2485
|
+
{
|
2486
|
+
"name": "id",
|
2487
|
+
"type": "String",
|
2488
|
+
"default": "N/A",
|
2489
|
+
"description": "Value for the HTML id attribute."
|
2490
|
+
},
|
2491
|
+
{
|
2492
|
+
"name": "class",
|
2493
|
+
"type": "String",
|
2494
|
+
"default": "N/A",
|
2495
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
|
2496
|
+
},
|
2497
|
+
{
|
2498
|
+
"name": "classes",
|
2499
|
+
"type": "Array",
|
2500
|
+
"default": "N/A",
|
2501
|
+
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
|
2502
|
+
},
|
2503
|
+
{
|
2504
|
+
"name": "caption",
|
2505
|
+
"type": "String",
|
2506
|
+
"default": "N/A",
|
2507
|
+
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
|
2508
|
+
},
|
2509
|
+
{
|
2510
|
+
"name": "label",
|
2511
|
+
"type": "String",
|
2512
|
+
"default": "N/A",
|
2513
|
+
"description": "Label text displayed above the input."
|
2514
|
+
},
|
2515
|
+
{
|
2516
|
+
"name": "visually_hide_label",
|
2517
|
+
"type": "Boolean",
|
2518
|
+
"default": "N/A",
|
2519
|
+
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
|
2520
|
+
},
|
2521
|
+
{
|
2522
|
+
"name": "disabled",
|
2523
|
+
"type": "Boolean",
|
2524
|
+
"default": "N/A",
|
2525
|
+
"description": "When set to `true`, the input will not accept keyboard or mouse input."
|
2526
|
+
},
|
2527
|
+
{
|
2528
|
+
"name": "hidden",
|
2529
|
+
"type": "Boolean",
|
2530
|
+
"default": "N/A",
|
2531
|
+
"description": "When set to `true`, visually hides the field."
|
2532
|
+
},
|
2533
|
+
{
|
2534
|
+
"name": "invalid",
|
2535
|
+
"type": "Boolean",
|
2536
|
+
"default": "N/A",
|
2537
|
+
"description": "If set to `true`, the input will be rendered with a red border. 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."
|
2538
|
+
},
|
2539
|
+
{
|
2540
|
+
"name": "validation_message",
|
2541
|
+
"type": "String",
|
2542
|
+
"default": "N/A",
|
2543
|
+
"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."
|
2544
|
+
},
|
2545
|
+
{
|
2546
|
+
"name": "label_arguments",
|
2547
|
+
"type": "Hash",
|
2548
|
+
"default": "N/A",
|
2549
|
+
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
|
2550
|
+
},
|
2551
|
+
{
|
2552
|
+
"name": "scope_name_to_model",
|
2553
|
+
"type": "Boolean",
|
2554
|
+
"default": "N/A",
|
2555
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2556
|
+
},
|
2557
|
+
{
|
2558
|
+
"name": "scope_id_to_model",
|
2559
|
+
"type": "Boolean",
|
2560
|
+
"default": "N/A",
|
2561
|
+
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
|
2562
|
+
},
|
2563
|
+
{
|
2564
|
+
"name": "required",
|
2565
|
+
"type": "Boolean",
|
2566
|
+
"default": "N/A",
|
2567
|
+
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
|
2568
|
+
},
|
2569
|
+
{
|
2570
|
+
"name": "aria",
|
2571
|
+
"type": "Hash",
|
2572
|
+
"default": "N/A",
|
2573
|
+
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
|
2574
|
+
},
|
2575
|
+
{
|
2576
|
+
"name": "data",
|
2577
|
+
"type": "Hash",
|
2578
|
+
"default": "N/A",
|
2579
|
+
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
|
2580
|
+
},
|
2581
|
+
{
|
2582
|
+
"name": "system_arguments",
|
2583
|
+
"type": "Hash",
|
2584
|
+
"default": "N/A",
|
2585
|
+
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
|
2586
|
+
},
|
2587
|
+
{
|
2588
|
+
"name": "placeholder",
|
2589
|
+
"type": "String",
|
2590
|
+
"default": "N/A",
|
2591
|
+
"description": "Placeholder text."
|
2592
|
+
},
|
2593
|
+
{
|
2594
|
+
"name": "inset",
|
2595
|
+
"type": "Boolean",
|
2596
|
+
"default": "N/A",
|
2597
|
+
"description": "If `true`, renders the input in a visually inset state."
|
2598
|
+
},
|
2599
|
+
{
|
2600
|
+
"name": "monospace",
|
2601
|
+
"type": "Boolean",
|
2602
|
+
"default": "N/A",
|
2603
|
+
"description": "If `true`, uses a monospace font for the input field."
|
2604
|
+
},
|
2605
|
+
{
|
2606
|
+
"name": "auto_check_src",
|
2607
|
+
"type": "String",
|
2608
|
+
"default": "N/A",
|
2609
|
+
"description": "When provided, makes a request to the given URL whenever the contents of the text field changes. If the server responds with a non-2xx status code, the response body is used as the validation message."
|
2610
|
+
},
|
2611
|
+
{
|
2612
|
+
"name": "leading_visual",
|
2613
|
+
"type": "Hash",
|
2614
|
+
"default": "N/A",
|
2615
|
+
"description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's [Octicon](/components/beta/octicon) component."
|
2616
|
+
},
|
2617
|
+
{
|
2618
|
+
"name": "show_clear_button",
|
2619
|
+
"type": "Boolean",
|
2620
|
+
"default": "N/A",
|
2621
|
+
"description": "Whether or not to include a clear button inside the input that clears the input's contents when clicked."
|
2622
|
+
},
|
2623
|
+
{
|
2624
|
+
"name": "clear_button_id",
|
2625
|
+
"type": "String",
|
2626
|
+
"default": "N/A",
|
2627
|
+
"description": "The HTML id attribute of the clear button."
|
2628
|
+
}
|
2629
|
+
]
|
2630
|
+
},
|
2631
|
+
{
|
2632
|
+
"component": "ToggleSwitch",
|
2633
|
+
"status": "alpha",
|
2634
|
+
"a11y_reviewed": false,
|
2635
|
+
"short_name": "ToggleSwitch",
|
2636
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/toggle_switch.rb",
|
2637
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/toggle_switch/default/",
|
2638
|
+
"parameters": [
|
2639
|
+
{
|
2640
|
+
"name": "src",
|
2641
|
+
"type": "String",
|
2642
|
+
"default": "`nil`",
|
2643
|
+
"description": "The URL to POST to when the toggle switch is toggled. If `nil`, the toggle switch will not make any requests."
|
2644
|
+
},
|
2645
|
+
{
|
2646
|
+
"name": "csrf_token",
|
2647
|
+
"type": "String",
|
2648
|
+
"default": "`nil`",
|
2649
|
+
"description": "A CSRF token that will be sent to the server as \"authenticity_token\" when the toggle switch is toggled. Unused if `src` is `nil`."
|
2650
|
+
},
|
2651
|
+
{
|
2652
|
+
"name": "checked",
|
2653
|
+
"type": "Boolean",
|
2654
|
+
"default": "`false`",
|
2655
|
+
"description": "Whether the toggle switch is on or off."
|
2656
|
+
},
|
2657
|
+
{
|
2658
|
+
"name": "enabled",
|
2659
|
+
"type": "Boolean",
|
2660
|
+
"default": "`true`",
|
2661
|
+
"description": "Whether or not the toggle switch responds to user input."
|
2662
|
+
},
|
2663
|
+
{
|
2664
|
+
"name": "size",
|
2665
|
+
"type": "Symbol",
|
2666
|
+
"default": "`:medium`",
|
2667
|
+
"description": "What size toggle switch to render. One of `:end` or `:start`."
|
2668
|
+
},
|
2669
|
+
{
|
2670
|
+
"name": "status_label_position",
|
2671
|
+
"type": "Symbol",
|
2672
|
+
"default": "`:start`",
|
2673
|
+
"description": "Which side of the toggle switch to render the status label. One of `:medium` or `:small`."
|
2674
|
+
},
|
2675
|
+
{
|
2676
|
+
"name": "system_arguments",
|
2677
|
+
"type": "Hash",
|
2678
|
+
"default": "N/A",
|
2679
|
+
"description": "[System arguments](/system-arguments)"
|
2680
|
+
}
|
2681
|
+
]
|
2682
|
+
},
|
2683
|
+
{
|
2684
|
+
"component": "Tooltip",
|
2685
|
+
"status": "alpha",
|
2686
|
+
"a11y_reviewed": false,
|
2687
|
+
"short_name": "Tooltip",
|
2688
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tooltip.rb",
|
2689
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tooltip/default/",
|
2690
|
+
"parameters": [
|
2691
|
+
{
|
2692
|
+
"name": "for_id",
|
2693
|
+
"type": "String",
|
2694
|
+
"default": "N/A",
|
2695
|
+
"description": "The ID of the element that the tooltip should be attached to."
|
2696
|
+
},
|
2697
|
+
{
|
2698
|
+
"name": "type",
|
2699
|
+
"type": "Symbol",
|
2700
|
+
"default": "N/A",
|
2701
|
+
"description": "One of `:description` or `:label`."
|
2702
|
+
},
|
2703
|
+
{
|
2704
|
+
"name": "direction",
|
2705
|
+
"type": "Symbol",
|
2706
|
+
"default": "`:s`",
|
2707
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
2708
|
+
},
|
2709
|
+
{
|
2710
|
+
"name": "text",
|
2711
|
+
"type": "String",
|
2712
|
+
"default": "N/A",
|
2713
|
+
"description": "The text content of the tooltip. This should be brief and no longer than a sentence."
|
2714
|
+
},
|
2715
|
+
{
|
2716
|
+
"name": "system_arguments",
|
2717
|
+
"type": "Hash",
|
2718
|
+
"default": "N/A",
|
2719
|
+
"description": "[System arguments](/system-arguments)"
|
2720
|
+
}
|
2721
|
+
]
|
2722
|
+
},
|
2723
|
+
{
|
2724
|
+
"component": "UnderlineNav",
|
2725
|
+
"status": "alpha",
|
2726
|
+
"a11y_reviewed": false,
|
2727
|
+
"short_name": "UnderlineNav",
|
2728
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_nav.rb",
|
2729
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/underline_nav/default/",
|
2730
|
+
"parameters": [
|
2731
|
+
{
|
2732
|
+
"name": "tag",
|
2733
|
+
"type": "Symbol",
|
2734
|
+
"default": "`:nav`",
|
2735
|
+
"description": "One of `:div` or `:nav`."
|
2736
|
+
},
|
2737
|
+
{
|
2738
|
+
"name": "label",
|
2739
|
+
"type": "String",
|
2740
|
+
"default": "N/A",
|
2741
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the links, and distinguish it from similar elements."
|
2742
|
+
},
|
2743
|
+
{
|
2744
|
+
"name": "align",
|
2745
|
+
"type": "Symbol",
|
2746
|
+
"default": "`:left`",
|
2747
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
2748
|
+
},
|
2749
|
+
{
|
2750
|
+
"name": "body_arguments",
|
2751
|
+
"type": "Hash",
|
2752
|
+
"default": "`{}`",
|
2753
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
2754
|
+
},
|
2755
|
+
{
|
2756
|
+
"name": "system_arguments",
|
2757
|
+
"type": "Hash",
|
2758
|
+
"default": "N/A",
|
2759
|
+
"description": "[System arguments](/system-arguments)"
|
2760
|
+
}
|
2761
|
+
]
|
2762
|
+
},
|
2763
|
+
{
|
2764
|
+
"component": "UnderlinePanels",
|
2765
|
+
"status": "alpha",
|
2766
|
+
"a11y_reviewed": false,
|
2767
|
+
"short_name": "UnderlinePanels",
|
2768
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_panels.rb",
|
2769
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/underline_panels/default/",
|
2770
|
+
"parameters": [
|
2771
|
+
{
|
2772
|
+
"name": "label",
|
2773
|
+
"type": "String",
|
2774
|
+
"default": "N/A",
|
2775
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs."
|
2776
|
+
},
|
2777
|
+
{
|
2778
|
+
"name": "align",
|
2779
|
+
"type": "Symbol",
|
2780
|
+
"default": "`:left`",
|
2781
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
2782
|
+
},
|
2783
|
+
{
|
2784
|
+
"name": "body_arguments",
|
2785
|
+
"type": "Hash",
|
2786
|
+
"default": "`{}`",
|
2787
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
2788
|
+
},
|
2789
|
+
{
|
2790
|
+
"name": "wrapper_arguments",
|
2791
|
+
"type": "Hash",
|
2792
|
+
"default": "`{}`",
|
2793
|
+
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
2794
|
+
},
|
2795
|
+
{
|
2796
|
+
"name": "system_arguments",
|
2797
|
+
"type": "Hash",
|
2798
|
+
"default": "N/A",
|
2799
|
+
"description": "[System arguments](/system-arguments)"
|
2800
|
+
}
|
2801
|
+
]
|
2802
|
+
},
|
2803
|
+
{
|
2804
|
+
"component": "Base",
|
2805
|
+
"status": "beta",
|
2806
|
+
"a11y_reviewed": false,
|
2807
|
+
"short_name": "Base",
|
2808
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/base_component.rb",
|
2809
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/base/default/",
|
2810
|
+
"parameters": [
|
2811
|
+
|
2812
|
+
]
|
2813
|
+
},
|
2814
|
+
{
|
2815
|
+
"component": "AutoComplete",
|
2816
|
+
"status": "beta",
|
2817
|
+
"a11y_reviewed": false,
|
2818
|
+
"short_name": "AutoComplete",
|
2819
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete.rb",
|
2820
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/auto_complete/default/",
|
2821
|
+
"parameters": [
|
2822
|
+
{
|
2823
|
+
"name": "label_text",
|
2824
|
+
"type": "String",
|
2825
|
+
"default": "N/A",
|
2826
|
+
"description": "The label of the input."
|
2827
|
+
},
|
2828
|
+
{
|
2829
|
+
"name": "src",
|
2830
|
+
"type": "String",
|
2831
|
+
"default": "N/A",
|
2832
|
+
"description": "The route to query."
|
2833
|
+
},
|
2834
|
+
{
|
2835
|
+
"name": "input_id",
|
2836
|
+
"type": "String",
|
2837
|
+
"default": "N/A",
|
2838
|
+
"description": "Id of the input element."
|
2839
|
+
},
|
2840
|
+
{
|
2841
|
+
"name": "input_name",
|
2842
|
+
"type": "String",
|
2843
|
+
"default": "`nil`",
|
2844
|
+
"description": "Optional name of the input element, defaults to `input_id` when not set."
|
2845
|
+
},
|
2846
|
+
{
|
2847
|
+
"name": "list_id",
|
2848
|
+
"type": "String",
|
2849
|
+
"default": "N/A",
|
2850
|
+
"description": "Id of the list element."
|
2851
|
+
},
|
2852
|
+
{
|
2853
|
+
"name": "visually_hide_label",
|
2854
|
+
"type": "Boolean",
|
2855
|
+
"default": "`false`",
|
2856
|
+
"description": "Controls if the label is visible. If `true`, screen reader only text will be added."
|
2857
|
+
},
|
2858
|
+
{
|
2859
|
+
"name": "show_clear_button",
|
2860
|
+
"type": "Boolean",
|
2861
|
+
"default": "`false`",
|
2862
|
+
"description": "Adds optional clear button."
|
2863
|
+
},
|
2864
|
+
{
|
2865
|
+
"name": "system_arguments",
|
2866
|
+
"type": "Hash",
|
2867
|
+
"default": "N/A",
|
2868
|
+
"description": "[System arguments](/system-arguments)"
|
2869
|
+
},
|
2870
|
+
{
|
2871
|
+
"name": "size",
|
2872
|
+
"type": "Hash",
|
2873
|
+
"default": "`:medium`",
|
2874
|
+
"description": "Input size can be small, medium (default), or large"
|
2875
|
+
},
|
2876
|
+
{
|
2877
|
+
"name": "full_width",
|
2878
|
+
"type": "Boolean",
|
2879
|
+
"default": "`false`",
|
2880
|
+
"description": "Input can be full-width or fit to content"
|
2881
|
+
},
|
2882
|
+
{
|
2883
|
+
"name": "width",
|
2884
|
+
"type": "String",
|
2885
|
+
"default": "`:auto`",
|
2886
|
+
"description": "Optional parameter to set max width of results list. One of `:auto`, `:large`, `:medium`, `:small`, `:xlarge`, or `:xxlarge`."
|
2887
|
+
},
|
2888
|
+
{
|
2889
|
+
"name": "disabled",
|
2890
|
+
"type": "Boolean",
|
2891
|
+
"default": "`false`",
|
2892
|
+
"description": "Disabled input"
|
2893
|
+
},
|
2894
|
+
{
|
2895
|
+
"name": "invalid",
|
2896
|
+
"type": "Boolean",
|
2897
|
+
"default": "`false`",
|
2898
|
+
"description": "Invalid input"
|
2899
|
+
},
|
2900
|
+
{
|
2901
|
+
"name": "placeholder",
|
2902
|
+
"type": "String",
|
2903
|
+
"default": "`nil`",
|
2904
|
+
"description": "The placeholder text displayed within the input"
|
2905
|
+
},
|
2906
|
+
{
|
2907
|
+
"name": "inset",
|
2908
|
+
"type": "Boolean",
|
2909
|
+
"default": "`false`",
|
2910
|
+
"description": "subtle input background color"
|
2911
|
+
},
|
2912
|
+
{
|
2913
|
+
"name": "monospace",
|
2914
|
+
"type": "Boolean",
|
2915
|
+
"default": "`false`",
|
2916
|
+
"description": "monospace input font family"
|
2917
|
+
}
|
2918
|
+
]
|
2919
|
+
},
|
2920
|
+
{
|
2921
|
+
"component": "AutoComplete::Item",
|
2922
|
+
"status": "beta",
|
2923
|
+
"a11y_reviewed": false,
|
2924
|
+
"short_name": "AutoCompleteItem",
|
2925
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/item.rb",
|
2926
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/auto_complete/item/default/",
|
2927
|
+
"parameters": [
|
2928
|
+
{
|
2929
|
+
"name": "value",
|
2930
|
+
"type": "String",
|
2931
|
+
"default": "N/A",
|
2932
|
+
"description": "Value of the item."
|
2933
|
+
},
|
2934
|
+
{
|
2935
|
+
"name": "selected",
|
2936
|
+
"type": "Boolean",
|
2937
|
+
"default": "`false`",
|
2938
|
+
"description": "Whether the item is selected."
|
2939
|
+
},
|
2940
|
+
{
|
2941
|
+
"name": "disabled",
|
2942
|
+
"type": "Boolean",
|
2943
|
+
"default": "`false`",
|
2944
|
+
"description": "Whether the item is disabled."
|
2945
|
+
},
|
2946
|
+
{
|
2947
|
+
"name": "description_variant",
|
2948
|
+
"type": "Hash",
|
2949
|
+
"default": "`:block`",
|
2950
|
+
"description": "Changes the description style. Allowed values are :inline, :block"
|
2951
|
+
},
|
2952
|
+
{
|
2953
|
+
"name": "description",
|
2954
|
+
"type": "String",
|
2955
|
+
"default": "N/A",
|
2956
|
+
"description": "Display description text below label"
|
2957
|
+
},
|
2958
|
+
{
|
2959
|
+
"name": "system_arguments",
|
2960
|
+
"type": "Hash",
|
2961
|
+
"default": "N/A",
|
2962
|
+
"description": "[System arguments](/system-arguments)"
|
2963
|
+
}
|
2964
|
+
]
|
2965
|
+
},
|
2966
|
+
{
|
2967
|
+
"component": "Avatar",
|
2968
|
+
"status": "beta",
|
2969
|
+
"a11y_reviewed": false,
|
2970
|
+
"short_name": "Avatar",
|
2971
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar.rb",
|
2972
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/avatar/default/",
|
2973
|
+
"parameters": [
|
2974
|
+
{
|
2975
|
+
"name": "src",
|
2976
|
+
"type": "String",
|
2977
|
+
"default": "N/A",
|
2978
|
+
"description": "The source url of the avatar image."
|
2979
|
+
},
|
2980
|
+
{
|
2981
|
+
"name": "alt",
|
2982
|
+
"type": "String",
|
2983
|
+
"default": "`nil`",
|
2984
|
+
"description": "Passed through to alt on img tag."
|
2985
|
+
},
|
2986
|
+
{
|
2987
|
+
"name": "size",
|
2988
|
+
"type": "Integer",
|
2989
|
+
"default": "`20`",
|
2990
|
+
"description": "One of `16`, `20`, `24`, `32`, `40`, `48`, or `80`."
|
2991
|
+
},
|
2992
|
+
{
|
2993
|
+
"name": "shape",
|
2994
|
+
"type": "Symbol",
|
2995
|
+
"default": "`:circle`",
|
2996
|
+
"description": "Shape of the avatar. One of `:circle` or `:square`."
|
2997
|
+
},
|
2998
|
+
{
|
2999
|
+
"name": "href",
|
3000
|
+
"type": "String",
|
3001
|
+
"default": "`nil`",
|
3002
|
+
"description": "The URL to link to. If used, component will be wrapped by an `<a>` tag."
|
3003
|
+
},
|
3004
|
+
{
|
3005
|
+
"name": "system_arguments",
|
3006
|
+
"type": "Hash",
|
3007
|
+
"default": "N/A",
|
3008
|
+
"description": "[System arguments](/system-arguments)"
|
3009
|
+
}
|
3010
|
+
]
|
3011
|
+
},
|
3012
|
+
{
|
3013
|
+
"component": "AvatarStack",
|
3014
|
+
"status": "beta",
|
3015
|
+
"a11y_reviewed": false,
|
3016
|
+
"short_name": "AvatarStack",
|
3017
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar_stack.rb",
|
3018
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/avatar_stack/default/",
|
3019
|
+
"parameters": [
|
3020
|
+
{
|
3021
|
+
"name": "tag",
|
3022
|
+
"type": "Symbol",
|
3023
|
+
"default": "`:div`",
|
3024
|
+
"description": "One of `:div` or `:span`."
|
3025
|
+
},
|
3026
|
+
{
|
3027
|
+
"name": "align",
|
3028
|
+
"type": "Symbol",
|
3029
|
+
"default": "`:left`",
|
3030
|
+
"description": "One of `:left` or `:right`."
|
3031
|
+
},
|
3032
|
+
{
|
3033
|
+
"name": "tooltipped",
|
3034
|
+
"type": "Boolean",
|
3035
|
+
"default": "`false`",
|
3036
|
+
"description": "Whether to add a tooltip to the stack or not."
|
3037
|
+
},
|
3038
|
+
{
|
3039
|
+
"name": "body_arguments",
|
3040
|
+
"type": "Hash",
|
3041
|
+
"default": "`{}`",
|
3042
|
+
"description": "Parameters to add to the Body. If `tooltipped` is set, has the same arguments as [Tooltip](/components/tooltip). The default tag is `:div` but can be changed using `tag:` to one of `:div` or `:span`."
|
3043
|
+
},
|
3044
|
+
{
|
3045
|
+
"name": "system_arguments",
|
3046
|
+
"type": "Hash",
|
3047
|
+
"default": "N/A",
|
3048
|
+
"description": "[System arguments](/system-arguments)"
|
3049
|
+
}
|
3050
|
+
]
|
3051
|
+
},
|
3052
|
+
{
|
3053
|
+
"component": "BaseButton",
|
3054
|
+
"status": "beta",
|
3055
|
+
"a11y_reviewed": false,
|
3056
|
+
"short_name": "BaseButton",
|
3057
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/base_button.rb",
|
3058
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/base_button/default/",
|
3059
|
+
"parameters": [
|
3060
|
+
{
|
3061
|
+
"name": "tag",
|
3062
|
+
"type": "Symbol",
|
3063
|
+
"default": "`:button`",
|
3064
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
3065
|
+
},
|
3066
|
+
{
|
3067
|
+
"name": "type",
|
3068
|
+
"type": "Symbol",
|
3069
|
+
"default": "`:button`",
|
3070
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
3071
|
+
},
|
3072
|
+
{
|
3073
|
+
"name": "block",
|
3074
|
+
"type": "Boolean",
|
3075
|
+
"default": "`false`",
|
3076
|
+
"description": "Whether button is full-width with `display: block`."
|
3077
|
+
},
|
3078
|
+
{
|
3079
|
+
"name": "disabled",
|
3080
|
+
"type": "Boolean",
|
3081
|
+
"default": "`false`",
|
3082
|
+
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
3083
|
+
},
|
3084
|
+
{
|
3085
|
+
"name": "system_arguments",
|
3086
|
+
"type": "Hash",
|
3087
|
+
"default": "N/A",
|
3088
|
+
"description": "[System arguments](/system-arguments)"
|
3089
|
+
}
|
3090
|
+
]
|
3091
|
+
},
|
3092
|
+
{
|
3093
|
+
"component": "Blankslate",
|
3094
|
+
"status": "beta",
|
3095
|
+
"a11y_reviewed": false,
|
3096
|
+
"short_name": "Blankslate",
|
3097
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/blankslate.rb",
|
3098
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/blankslate/default/",
|
3099
|
+
"parameters": [
|
3100
|
+
{
|
3101
|
+
"name": "narrow",
|
3102
|
+
"type": "Boolean",
|
3103
|
+
"default": "`false`",
|
3104
|
+
"description": "Adds a maximum width of `485px` to the Blankslate."
|
3105
|
+
},
|
3106
|
+
{
|
3107
|
+
"name": "spacious",
|
3108
|
+
"type": "Boolean",
|
3109
|
+
"default": "`false`",
|
3110
|
+
"description": "Increases the padding from `32px` to `80px 40px`."
|
3111
|
+
},
|
3112
|
+
{
|
3113
|
+
"name": "border",
|
3114
|
+
"type": "Boolean",
|
3115
|
+
"default": "`false`",
|
3116
|
+
"description": "Adds a border around the Blankslate."
|
3117
|
+
},
|
3118
|
+
{
|
3119
|
+
"name": "system_arguments",
|
3120
|
+
"type": "Hash",
|
3121
|
+
"default": "N/A",
|
3122
|
+
"description": "[System arguments](/system-arguments)"
|
3123
|
+
}
|
3124
|
+
]
|
3125
|
+
},
|
3126
|
+
{
|
3127
|
+
"component": "BorderBox",
|
3128
|
+
"status": "beta",
|
3129
|
+
"a11y_reviewed": false,
|
3130
|
+
"short_name": "BorderBox",
|
3131
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box.rb",
|
3132
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/border_box/default/",
|
3133
|
+
"parameters": [
|
3134
|
+
{
|
3135
|
+
"name": "padding",
|
3136
|
+
"type": "Symbol",
|
3137
|
+
"default": "`:default`",
|
3138
|
+
"description": "One of `:condensed`, `:default`, or `:spacious`."
|
3139
|
+
},
|
3140
|
+
{
|
3141
|
+
"name": "system_arguments",
|
3142
|
+
"type": "Hash",
|
3143
|
+
"default": "N/A",
|
3144
|
+
"description": "[System arguments](/system-arguments)"
|
3145
|
+
}
|
3146
|
+
]
|
3147
|
+
},
|
3148
|
+
{
|
3149
|
+
"component": "BorderBox::Header",
|
3150
|
+
"status": "beta",
|
3151
|
+
"a11y_reviewed": false,
|
3152
|
+
"short_name": "BorderBoxHeader",
|
3153
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box/header.rb",
|
3154
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/border_box/header/default/",
|
3155
|
+
"parameters": [
|
3156
|
+
{
|
3157
|
+
"name": "system_arguments",
|
3158
|
+
"type": "Hash",
|
3159
|
+
"default": "N/A",
|
3160
|
+
"description": "[System arguments](/system-arguments)"
|
3161
|
+
}
|
3162
|
+
]
|
3163
|
+
},
|
3164
|
+
{
|
3165
|
+
"component": "Breadcrumbs",
|
3166
|
+
"status": "beta",
|
3167
|
+
"a11y_reviewed": false,
|
3168
|
+
"short_name": "Breadcrumbs",
|
3169
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/breadcrumbs.rb",
|
3170
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/breadcrumbs/default/",
|
3171
|
+
"parameters": [
|
3172
|
+
{
|
3173
|
+
"name": "system_arguments",
|
3174
|
+
"type": "Hash",
|
3175
|
+
"default": "N/A",
|
3176
|
+
"description": "[System arguments](/system-arguments)"
|
3177
|
+
}
|
3178
|
+
]
|
3179
|
+
},
|
3180
|
+
{
|
3181
|
+
"component": "Breadcrumbs::Item",
|
3182
|
+
"status": "alpha",
|
3183
|
+
"a11y_reviewed": false,
|
3184
|
+
"short_name": "BreadcrumbsItem",
|
3185
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/breadcrumbs/item.rb",
|
3186
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/breadcrumbs/item/default/",
|
3187
|
+
"parameters": [
|
3188
|
+
|
3189
|
+
]
|
3190
|
+
},
|
3191
|
+
{
|
3192
|
+
"component": "Button",
|
3193
|
+
"status": "beta",
|
3194
|
+
"a11y_reviewed": false,
|
3195
|
+
"short_name": "Button",
|
3196
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb",
|
3197
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button/default/",
|
3198
|
+
"parameters": [
|
3199
|
+
{
|
3200
|
+
"name": "scheme",
|
3201
|
+
"type": "Symbol",
|
3202
|
+
"default": "`:default`",
|
3203
|
+
"description": "One of `:danger`, `:default`, `:invisible`, `:link`, `:primary`, or `:secondary`."
|
3204
|
+
},
|
3205
|
+
{
|
3206
|
+
"name": "size",
|
3207
|
+
"type": "Symbol",
|
3208
|
+
"default": "`:medium`",
|
3209
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
3210
|
+
},
|
3211
|
+
{
|
3212
|
+
"name": "block",
|
3213
|
+
"type": "Boolean",
|
3214
|
+
"default": "`false`",
|
3215
|
+
"description": "Whether button is full-width with `display: block`."
|
3216
|
+
},
|
3217
|
+
{
|
3218
|
+
"name": "align_content",
|
3219
|
+
"type": "Symbol",
|
3220
|
+
"default": "`:center`",
|
3221
|
+
"description": "One of `:center` or `:start`."
|
3222
|
+
},
|
3223
|
+
{
|
3224
|
+
"name": "tag",
|
3225
|
+
"type": "Symbol",
|
3226
|
+
"default": "`:button`",
|
3227
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
3228
|
+
},
|
3229
|
+
{
|
3230
|
+
"name": "type",
|
3231
|
+
"type": "Symbol",
|
3232
|
+
"default": "`:button`",
|
3233
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
3234
|
+
},
|
3235
|
+
{
|
3236
|
+
"name": "disabled",
|
3237
|
+
"type": "Boolean",
|
3238
|
+
"default": "`false`",
|
3239
|
+
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
3240
|
+
},
|
3241
|
+
{
|
3242
|
+
"name": "system_arguments",
|
3243
|
+
"type": "Hash",
|
3244
|
+
"default": "N/A",
|
3245
|
+
"description": "[System arguments](/system-arguments)"
|
3246
|
+
}
|
3247
|
+
]
|
3248
|
+
},
|
3249
|
+
{
|
3250
|
+
"component": "ButtonGroup",
|
3251
|
+
"status": "beta",
|
3252
|
+
"a11y_reviewed": false,
|
3253
|
+
"short_name": "ButtonGroup",
|
3254
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button_group.rb",
|
3255
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button_group/default/",
|
3256
|
+
"parameters": [
|
3257
|
+
{
|
3258
|
+
"name": "scheme",
|
3259
|
+
"type": "Symbol",
|
3260
|
+
"default": "`:default`",
|
3261
|
+
"description": "DEPRECATED. One of `:danger`, `:default`, `:invisible`, `:link`, `:primary`, or `:secondary`."
|
3262
|
+
},
|
3263
|
+
{
|
3264
|
+
"name": "size",
|
3265
|
+
"type": "Symbol",
|
3266
|
+
"default": "`:medium`",
|
3267
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
3268
|
+
},
|
3269
|
+
{
|
3270
|
+
"name": "system_arguments",
|
3271
|
+
"type": "Hash",
|
3272
|
+
"default": "N/A",
|
3273
|
+
"description": "[System arguments](/system-arguments)"
|
3274
|
+
}
|
3275
|
+
]
|
3276
|
+
},
|
3277
|
+
{
|
3278
|
+
"component": "ClipboardCopy",
|
3279
|
+
"status": "beta",
|
3280
|
+
"a11y_reviewed": false,
|
3281
|
+
"short_name": "ClipboardCopy",
|
3282
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy.rb",
|
3283
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy/default/",
|
3284
|
+
"parameters": [
|
3285
|
+
{
|
3286
|
+
"name": "aria-label",
|
3287
|
+
"type": "String",
|
3288
|
+
"default": "N/A",
|
3289
|
+
"description": "String that will be read to screenreaders when the component is focused"
|
3290
|
+
},
|
3291
|
+
{
|
3292
|
+
"name": "value",
|
3293
|
+
"type": "String",
|
3294
|
+
"default": "`nil`",
|
3295
|
+
"description": "Text to copy into the users clipboard when they click the component."
|
3296
|
+
},
|
3297
|
+
{
|
3298
|
+
"name": "for",
|
3299
|
+
"type": "String",
|
3300
|
+
"default": "N/A",
|
3301
|
+
"description": "Element id from where to get the copied value."
|
3302
|
+
},
|
3303
|
+
{
|
3304
|
+
"name": "system_arguments",
|
3305
|
+
"type": "Hash",
|
3306
|
+
"default": "N/A",
|
3307
|
+
"description": "[System arguments](/system-arguments)"
|
3308
|
+
}
|
3309
|
+
]
|
3310
|
+
},
|
3311
|
+
{
|
3312
|
+
"component": "CloseButton",
|
3313
|
+
"status": "beta",
|
3314
|
+
"a11y_reviewed": false,
|
3315
|
+
"short_name": "CloseButton",
|
3316
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/close_button.rb",
|
3317
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/close_button/default/",
|
3318
|
+
"parameters": [
|
3319
|
+
{
|
3320
|
+
"name": "type",
|
3321
|
+
"type": "Symbol",
|
3322
|
+
"default": "`:button`",
|
3323
|
+
"description": "One of `:button` or `:submit`."
|
3324
|
+
},
|
3325
|
+
{
|
3326
|
+
"name": "disabled",
|
3327
|
+
"type": "Boolean",
|
3328
|
+
"default": "`false`",
|
3329
|
+
"description": "Whether or not the button is disabled."
|
3330
|
+
},
|
3331
|
+
{
|
3332
|
+
"name": "system_arguments",
|
3333
|
+
"type": "Hash",
|
3334
|
+
"default": "N/A",
|
3335
|
+
"description": "[System arguments](/system-arguments)"
|
3336
|
+
}
|
3337
|
+
]
|
3338
|
+
},
|
3339
|
+
{
|
3340
|
+
"component": "Counter",
|
3341
|
+
"status": "beta",
|
3342
|
+
"a11y_reviewed": false,
|
3343
|
+
"short_name": "Counter",
|
3344
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/counter.rb",
|
3345
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/counter/default/",
|
3346
|
+
"parameters": [
|
3347
|
+
{
|
3348
|
+
"name": "count",
|
3349
|
+
"type": "Integer, Float::INFINITY, nil",
|
3350
|
+
"default": "`0`",
|
3351
|
+
"description": "The number to be displayed (e.x. # of issues, pull requests)"
|
3352
|
+
},
|
3353
|
+
{
|
3354
|
+
"name": "scheme",
|
3355
|
+
"type": "Symbol",
|
3356
|
+
"default": "`:default`",
|
3357
|
+
"description": "Color scheme. One of `:default`, `:primary`, or `:secondary`."
|
3358
|
+
},
|
3359
|
+
{
|
3360
|
+
"name": "limit",
|
3361
|
+
"type": "Integer, nil",
|
3362
|
+
"default": "`5_000`",
|
3363
|
+
"description": "Maximum value to display. Pass `nil` for no limit. (e.x. if `count` == 6,000 and `limit` == 5000, counter will display \"5,000+\")"
|
3364
|
+
},
|
3365
|
+
{
|
3366
|
+
"name": "hide_if_zero",
|
3367
|
+
"type": "Boolean",
|
3368
|
+
"default": "`false`",
|
3369
|
+
"description": "If true, a `hidden` attribute is added to the counter if `count` is zero."
|
3370
|
+
},
|
3371
|
+
{
|
3372
|
+
"name": "text",
|
3373
|
+
"type": "String",
|
3374
|
+
"default": "`\"\"`",
|
3375
|
+
"description": "Text to display instead of count."
|
3376
|
+
},
|
3377
|
+
{
|
3378
|
+
"name": "round",
|
3379
|
+
"type": "Boolean",
|
3380
|
+
"default": "`false`",
|
3381
|
+
"description": "Whether to apply our standard rounding logic to value."
|
3382
|
+
},
|
3383
|
+
{
|
3384
|
+
"name": "system_arguments",
|
3385
|
+
"type": "Hash",
|
3386
|
+
"default": "N/A",
|
3387
|
+
"description": "[System arguments](/system-arguments)"
|
3388
|
+
}
|
3389
|
+
]
|
3390
|
+
},
|
3391
|
+
{
|
3392
|
+
"component": "Details",
|
3393
|
+
"status": "beta",
|
3394
|
+
"a11y_reviewed": false,
|
3395
|
+
"short_name": "Details",
|
3396
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/details.rb",
|
3397
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/details/default/",
|
3398
|
+
"parameters": [
|
3399
|
+
{
|
3400
|
+
"name": "overlay",
|
3401
|
+
"type": "Symbol",
|
3402
|
+
"default": "`:none`",
|
3403
|
+
"description": "Dictates the type of overlay to render with. One of `:dark`, `:default`, or `:none`."
|
3404
|
+
},
|
3405
|
+
{
|
3406
|
+
"name": "reset",
|
3407
|
+
"type": "Boolean",
|
3408
|
+
"default": "`false`",
|
3409
|
+
"description": "Defaults to false. If set to true, it will remove the default caret and remove style from the summary element"
|
3410
|
+
},
|
3411
|
+
{
|
3412
|
+
"name": "disabled",
|
3413
|
+
"type": "Boolean",
|
3414
|
+
"default": "`false`",
|
3415
|
+
"description": "Whether or not to disable the summary button."
|
3416
|
+
},
|
3417
|
+
{
|
3418
|
+
"name": "system_arguments",
|
3419
|
+
"type": "Hash",
|
3420
|
+
"default": "N/A",
|
3421
|
+
"description": "[System arguments](/system-arguments)"
|
3422
|
+
}
|
3423
|
+
]
|
3424
|
+
},
|
3425
|
+
{
|
3426
|
+
"component": "Flash",
|
3427
|
+
"status": "beta",
|
3428
|
+
"a11y_reviewed": false,
|
3429
|
+
"short_name": "Flash",
|
3430
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/flash.rb",
|
3431
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/flash/default/",
|
3432
|
+
"parameters": [
|
3433
|
+
{
|
3434
|
+
"name": "full",
|
3435
|
+
"type": "Boolean",
|
3436
|
+
"default": "`false`",
|
3437
|
+
"description": "Whether the component should take up the full width of the screen."
|
3438
|
+
},
|
3439
|
+
{
|
3440
|
+
"name": "spacious",
|
3441
|
+
"type": "Boolean",
|
3442
|
+
"default": "`false`",
|
3443
|
+
"description": "Whether to add margin to the bottom of the component."
|
3444
|
+
},
|
3445
|
+
{
|
3446
|
+
"name": "dismissible",
|
3447
|
+
"type": "Boolean",
|
3448
|
+
"default": "`false`",
|
3449
|
+
"description": "Whether the component can be dismissed with an X button."
|
3450
|
+
},
|
3451
|
+
{
|
3452
|
+
"name": "icon",
|
3453
|
+
"type": "Symbol",
|
3454
|
+
"default": "`nil`",
|
3455
|
+
"description": "Name of Octicon icon to use."
|
3456
|
+
},
|
3457
|
+
{
|
3458
|
+
"name": "scheme",
|
3459
|
+
"type": "Symbol",
|
3460
|
+
"default": "`:default`",
|
3461
|
+
"description": "One of `:danger`, `:default`, `:success`, or `:warning`."
|
3462
|
+
},
|
3463
|
+
{
|
3464
|
+
"name": "system_arguments",
|
3465
|
+
"type": "Hash",
|
3466
|
+
"default": "N/A",
|
3467
|
+
"description": "[System arguments](/system-arguments)"
|
3468
|
+
}
|
3469
|
+
]
|
3470
|
+
},
|
3471
|
+
{
|
3472
|
+
"component": "Heading",
|
3473
|
+
"status": "beta",
|
3474
|
+
"a11y_reviewed": false,
|
3475
|
+
"short_name": "Heading",
|
3476
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/heading.rb",
|
3477
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/heading/default/",
|
3478
|
+
"parameters": [
|
3479
|
+
{
|
3480
|
+
"name": "tag",
|
3481
|
+
"type": "String",
|
3482
|
+
"default": "N/A",
|
3483
|
+
"description": "One of `:h1`, `:h2`, `:h3`, `:h4`, `:h5`, or `:h6`."
|
3484
|
+
},
|
3485
|
+
{
|
3486
|
+
"name": "system_arguments",
|
3487
|
+
"type": "Hash",
|
3488
|
+
"default": "N/A",
|
3489
|
+
"description": "[System arguments](/system-arguments)"
|
3490
|
+
}
|
3491
|
+
]
|
3492
|
+
},
|
3493
|
+
{
|
3494
|
+
"component": "IconButton",
|
3495
|
+
"status": "beta",
|
3496
|
+
"a11y_reviewed": false,
|
3497
|
+
"short_name": "IconButton",
|
3498
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/icon_button.rb",
|
3499
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/icon_button/default/",
|
3500
|
+
"parameters": [
|
3501
|
+
{
|
3502
|
+
"name": "icon",
|
3503
|
+
"type": "String",
|
3504
|
+
"default": "N/A",
|
3505
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
3506
|
+
},
|
3507
|
+
{
|
3508
|
+
"name": "tag",
|
3509
|
+
"type": "Symbol",
|
3510
|
+
"default": "N/A",
|
3511
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
3512
|
+
},
|
3513
|
+
{
|
3514
|
+
"name": "wrapper_arguments",
|
3515
|
+
"type": "Hash",
|
3516
|
+
"default": "`{}`",
|
3517
|
+
"description": "Optional keyword arguments to be passed to the wrapper `<div>` tag."
|
3518
|
+
},
|
3519
|
+
{
|
3520
|
+
"name": "scheme",
|
3521
|
+
"type": "Symbol",
|
3522
|
+
"default": "`:default`",
|
3523
|
+
"description": "One of `:danger`, `:default`, or `:invisible`."
|
3524
|
+
},
|
3525
|
+
{
|
3526
|
+
"name": "size",
|
3527
|
+
"type": "Symbol",
|
3528
|
+
"default": "`:medium`",
|
3529
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
3530
|
+
},
|
3531
|
+
{
|
3532
|
+
"name": "disabled",
|
3533
|
+
"type": "Boolean",
|
3534
|
+
"default": "`false`",
|
3535
|
+
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
3536
|
+
},
|
3537
|
+
{
|
3538
|
+
"name": "type",
|
3539
|
+
"type": "Symbol",
|
3540
|
+
"default": "N/A",
|
3541
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
3542
|
+
},
|
3543
|
+
{
|
3544
|
+
"name": "aria-label",
|
3545
|
+
"type": "String",
|
3546
|
+
"default": "N/A",
|
3547
|
+
"description": "String that can be read by assistive technology. A label should be short and concise. See the accessibility section for more information."
|
3548
|
+
},
|
3549
|
+
{
|
3550
|
+
"name": "aria-description",
|
3551
|
+
"type": "String",
|
3552
|
+
"default": "N/A",
|
3553
|
+
"description": "String that can be read by assistive technology. A description can be longer as it is intended to provide more context and information. See the accessibility section for more information."
|
3554
|
+
},
|
3555
|
+
{
|
3556
|
+
"name": "show_tooltip",
|
3557
|
+
"type": "Boolean",
|
3558
|
+
"default": "`true`",
|
3559
|
+
"description": "Whether or not to show a tooltip when this button is hovered. Tooltips should only be hidden if the aria label is redundant, i.e. if the icon has a widely understood definition."
|
3560
|
+
},
|
3561
|
+
{
|
3562
|
+
"name": "tooltip_direction",
|
3563
|
+
"type": "Symbol",
|
3564
|
+
"default": "`:s`",
|
3565
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
3566
|
+
},
|
3567
|
+
{
|
3568
|
+
"name": "system_arguments",
|
3569
|
+
"type": "Hash",
|
3570
|
+
"default": "N/A",
|
3571
|
+
"description": "[System arguments](/system-arguments)"
|
3572
|
+
}
|
3573
|
+
]
|
3574
|
+
},
|
3575
|
+
{
|
3576
|
+
"component": "Label",
|
3577
|
+
"status": "beta",
|
3578
|
+
"a11y_reviewed": false,
|
3579
|
+
"short_name": "Label",
|
3580
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/label.rb",
|
3581
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/label/default/",
|
3582
|
+
"parameters": [
|
3583
|
+
{
|
3584
|
+
"name": "tag",
|
3585
|
+
"type": "Symbol",
|
3586
|
+
"default": "`:span`",
|
3587
|
+
"description": "One of `:a`, `:div`, `:span`, or `:summary`."
|
3588
|
+
},
|
3589
|
+
{
|
3590
|
+
"name": "scheme",
|
3591
|
+
"type": "Symbol",
|
3592
|
+
"default": "`:default`",
|
3593
|
+
"description": "One of `:accent`, `:attention`, `:danger`, `:default`, `:done`, `:info`, `:orange`, `:primary`, `:purple`, `:secondary`, `:severe`, `:sponsors`, `:success`, or `:warning`."
|
3594
|
+
},
|
3595
|
+
{
|
3596
|
+
"name": "size",
|
3597
|
+
"type": "Symbol",
|
3598
|
+
"default": "`:medium`",
|
3599
|
+
"description": "One of `:large` or `:medium`."
|
3600
|
+
},
|
3601
|
+
{
|
3602
|
+
"name": "inline",
|
3603
|
+
"type": "Boolean",
|
3604
|
+
"default": "`false`",
|
3605
|
+
"description": "Whether or not to render this label inline."
|
3606
|
+
},
|
3607
|
+
{
|
3608
|
+
"name": "variant",
|
3609
|
+
"type": "Symbol",
|
3610
|
+
"default": "`:none`",
|
3611
|
+
"description": "One of `:inline`, `:large`, or `:none`."
|
3612
|
+
},
|
3613
|
+
{
|
3614
|
+
"name": "system_arguments",
|
3615
|
+
"type": "Hash",
|
3616
|
+
"default": "N/A",
|
3617
|
+
"description": "[System arguments](/system-arguments)"
|
3618
|
+
}
|
3619
|
+
]
|
3620
|
+
},
|
3621
|
+
{
|
3622
|
+
"component": "Link",
|
3623
|
+
"status": "beta",
|
3624
|
+
"a11y_reviewed": false,
|
3625
|
+
"short_name": "Link",
|
3626
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/link.rb",
|
3627
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/link/default/",
|
3628
|
+
"parameters": [
|
3629
|
+
{
|
3630
|
+
"name": "href",
|
3631
|
+
"type": "String",
|
3632
|
+
"default": "`nil`",
|
3633
|
+
"description": "URL to be used for the Link. Required. If the requirements are not met an error will be raised in non production environments. In production, an empty link element will be rendered."
|
3634
|
+
},
|
3635
|
+
{
|
3636
|
+
"name": "scheme",
|
3637
|
+
"type": "Symbol",
|
3638
|
+
"default": "`:default`",
|
3639
|
+
"description": "One of `:default`, `:primary`, or `:secondary`."
|
3640
|
+
},
|
3641
|
+
{
|
3642
|
+
"name": "muted",
|
3643
|
+
"type": "Boolean",
|
3644
|
+
"default": "`false`",
|
3645
|
+
"description": "Uses light gray for Link color, and blue on hover."
|
3646
|
+
},
|
3647
|
+
{
|
3648
|
+
"name": "underline",
|
3649
|
+
"type": "Boolean",
|
3650
|
+
"default": "`true`",
|
3651
|
+
"description": "Whether or not to underline the link."
|
3652
|
+
},
|
3653
|
+
{
|
3654
|
+
"name": "system_arguments",
|
3655
|
+
"type": "Hash",
|
3656
|
+
"default": "N/A",
|
3657
|
+
"description": "[System arguments](/system-arguments)"
|
3658
|
+
}
|
3659
|
+
]
|
3660
|
+
},
|
3661
|
+
{
|
3662
|
+
"component": "Markdown",
|
3663
|
+
"status": "beta",
|
3664
|
+
"a11y_reviewed": false,
|
3665
|
+
"short_name": "Markdown",
|
3666
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/markdown.rb",
|
3667
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/markdown/default/",
|
3668
|
+
"parameters": [
|
3669
|
+
{
|
3670
|
+
"name": "tag",
|
3671
|
+
"type": "Symbol",
|
3672
|
+
"default": "`:div`",
|
3673
|
+
"description": "One of `:article`, `:div`, or `:td`."
|
3674
|
+
},
|
3675
|
+
{
|
3676
|
+
"name": "system_arguments",
|
3677
|
+
"type": "Hash",
|
3678
|
+
"default": "N/A",
|
3679
|
+
"description": "[System arguments](/system-arguments)"
|
3680
|
+
}
|
3681
|
+
]
|
3682
|
+
},
|
3683
|
+
{
|
3684
|
+
"component": "Octicon",
|
3685
|
+
"status": "beta",
|
3686
|
+
"a11y_reviewed": false,
|
3687
|
+
"short_name": "Octicon",
|
3688
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/octicon.rb",
|
3689
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/octicon/default/",
|
3690
|
+
"parameters": [
|
3691
|
+
{
|
3692
|
+
"name": "icon_name",
|
3693
|
+
"type": "Symbol, String",
|
3694
|
+
"default": "`nil`",
|
3695
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
3696
|
+
},
|
3697
|
+
{
|
3698
|
+
"name": "icon",
|
3699
|
+
"type": "Symbol, String",
|
3700
|
+
"default": "`nil`",
|
3701
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
3702
|
+
},
|
3703
|
+
{
|
3704
|
+
"name": "size",
|
3705
|
+
"type": "Symbol",
|
3706
|
+
"default": "`:small`",
|
3707
|
+
"description": "One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`)."
|
3708
|
+
},
|
3709
|
+
{
|
3710
|
+
"name": "use_symbol",
|
3711
|
+
"type": "Boolean",
|
3712
|
+
"default": "`false`",
|
3713
|
+
"description": "EXPERIMENTAL (May change or be removed) - Set to true when using with [OcticonSymbols](/components/alpha/octiconsymbols)."
|
3714
|
+
},
|
3715
|
+
{
|
3716
|
+
"name": "system_arguments",
|
3717
|
+
"type": "Hash",
|
3718
|
+
"default": "N/A",
|
3719
|
+
"description": "[System arguments](/system-arguments)"
|
3720
|
+
}
|
3721
|
+
]
|
3722
|
+
},
|
3723
|
+
{
|
3724
|
+
"component": "Popover",
|
3725
|
+
"status": "beta",
|
3726
|
+
"a11y_reviewed": false,
|
3727
|
+
"short_name": "Popover",
|
3728
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/popover.rb",
|
3729
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/popover/default/",
|
3730
|
+
"parameters": [
|
3731
|
+
{
|
3732
|
+
"name": "system_arguments",
|
3733
|
+
"type": "Hash",
|
3734
|
+
"default": "N/A",
|
3735
|
+
"description": "[System arguments](/system-arguments)"
|
3736
|
+
}
|
3737
|
+
]
|
3738
|
+
},
|
3739
|
+
{
|
3740
|
+
"component": "ProgressBar",
|
3741
|
+
"status": "beta",
|
3742
|
+
"a11y_reviewed": false,
|
3743
|
+
"short_name": "ProgressBar",
|
3744
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/progress_bar.rb",
|
3745
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/progress_bar/default/",
|
3746
|
+
"parameters": [
|
3747
|
+
{
|
3748
|
+
"name": "size",
|
3749
|
+
"type": "Symbol",
|
3750
|
+
"default": "`:default`",
|
3751
|
+
"description": "One of `:default`, `:large`, or `:small`. Increases height."
|
3752
|
+
},
|
3753
|
+
{
|
3754
|
+
"name": "system_arguments",
|
3755
|
+
"type": "Hash",
|
3756
|
+
"default": "N/A",
|
3757
|
+
"description": "[System arguments](/system-arguments)"
|
3758
|
+
}
|
3759
|
+
]
|
3760
|
+
},
|
3761
|
+
{
|
3762
|
+
"component": "RelativeTime",
|
3763
|
+
"status": "beta",
|
3764
|
+
"a11y_reviewed": false,
|
3765
|
+
"short_name": "RelativeTime",
|
3766
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/relative_time.rb",
|
3767
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/relative_time/default/",
|
3768
|
+
"parameters": [
|
3769
|
+
{
|
3770
|
+
"name": "datetime",
|
3771
|
+
"type": "Time",
|
3772
|
+
"default": "N/A",
|
3773
|
+
"description": "The time to be formatted."
|
3774
|
+
},
|
3775
|
+
{
|
3776
|
+
"name": "tense",
|
3777
|
+
"type": "Symbol",
|
3778
|
+
"default": "`:auto`",
|
3779
|
+
"description": "Which tense to use. One of `:auto`, `:future`, or `:past`."
|
3780
|
+
},
|
3781
|
+
{
|
3782
|
+
"name": "prefix",
|
3783
|
+
"type": "sring",
|
3784
|
+
"default": "`nil`",
|
3785
|
+
"description": "What to prefix the relative ime display with."
|
3786
|
+
},
|
3787
|
+
{
|
3788
|
+
"name": "second",
|
3789
|
+
"type": "Symbol",
|
3790
|
+
"default": "`SECOND_DEFAULT`",
|
3791
|
+
"description": "What format seconds should take. One of `nil`, `:numeric`, or `:two_digit`."
|
3792
|
+
},
|
3793
|
+
{
|
3794
|
+
"name": "minute",
|
3795
|
+
"type": "Symbol",
|
3796
|
+
"default": "`MINUTE_DEFAULT`",
|
3797
|
+
"description": "What format minues should take. One of `nil`, `:numeric`, or `:two_digit`."
|
3798
|
+
},
|
3799
|
+
{
|
3800
|
+
"name": "hour",
|
3801
|
+
"type": "Symbol",
|
3802
|
+
"default": "`HOUR_DEFAULT`",
|
3803
|
+
"description": "What format hours should take. One of `nil`, `:numeric`, or `:two_digit`."
|
3804
|
+
},
|
3805
|
+
{
|
3806
|
+
"name": "weekday",
|
3807
|
+
"type": "Symbol",
|
3808
|
+
"default": "`WEEKDAY_DEFAULT`",
|
3809
|
+
"description": "What format weekdays should take. One of `nil`, `:long`, `:narrow`, or `:short`."
|
3810
|
+
},
|
3811
|
+
{
|
3812
|
+
"name": "day",
|
3813
|
+
"type": "Symbol",
|
3814
|
+
"default": "`DAY_DEFAULT`",
|
3815
|
+
"description": "What format days should take. One of `nil`, `:numeric`, or `:two_digit`."
|
3816
|
+
},
|
3817
|
+
{
|
3818
|
+
"name": "month",
|
3819
|
+
"type": "Symbol",
|
3820
|
+
"default": "`MONTH_DEFAULT`",
|
3821
|
+
"description": "What format months should take. One of `nil`, `:long`, `:narrow`, `:numeric`, `:short`, or `:two_digit`."
|
3822
|
+
},
|
3823
|
+
{
|
3824
|
+
"name": "year",
|
3825
|
+
"type": "Symbol",
|
3826
|
+
"default": "`YEAR_DEFAULT`",
|
3827
|
+
"description": "What format years should take. One of `nil`, `:numeric`, or `:two_digit`."
|
3828
|
+
},
|
3829
|
+
{
|
3830
|
+
"name": "time_zone_name",
|
3831
|
+
"type": "Symbol",
|
3832
|
+
"default": "`TIMEZONENAME_DEFAULT`",
|
3833
|
+
"description": "What format the time zone should take. One of `nil`, `:long`, `:long_generic`, `:long_offset`, `:short`, `:short_generic`, or `:short_offset`."
|
3834
|
+
},
|
3835
|
+
{
|
3836
|
+
"name": "threshold",
|
3837
|
+
"type": "string",
|
3838
|
+
"default": "`nil`",
|
3839
|
+
"description": "The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute."
|
3840
|
+
},
|
3841
|
+
{
|
3842
|
+
"name": "precision",
|
3843
|
+
"type": "Symbol",
|
3844
|
+
"default": "`PRECISION_DEFAULT`",
|
3845
|
+
"description": "The precision elapsed time should display. One of `nil`, `:day`, `:hour`, `:minute`, `:month`, `:second`, or `:year`."
|
3846
|
+
},
|
3847
|
+
{
|
3848
|
+
"name": "format",
|
3849
|
+
"type": "Symbol",
|
3850
|
+
"default": "`nil`",
|
3851
|
+
"description": "The format the display should take. One of `:auto`, `:elapsed`, or `:micro`."
|
3852
|
+
},
|
3853
|
+
{
|
3854
|
+
"name": "format_style",
|
3855
|
+
"type": "Symbol",
|
3856
|
+
"default": "`nil`",
|
3857
|
+
"description": "The format the display should take. One of `nil`, `:long`, `:narrow`, or `:short`."
|
3858
|
+
},
|
3859
|
+
{
|
3860
|
+
"name": "lang",
|
3861
|
+
"type": "string",
|
3862
|
+
"default": "`nil`",
|
3863
|
+
"description": "The language to use."
|
3864
|
+
},
|
3865
|
+
{
|
3866
|
+
"name": "title",
|
3867
|
+
"type": "string",
|
3868
|
+
"default": "`nil`",
|
3869
|
+
"description": "Provide a custom title to the element."
|
3870
|
+
},
|
3871
|
+
{
|
3872
|
+
"name": "system_arguments",
|
3873
|
+
"type": "Hash",
|
3874
|
+
"default": "N/A",
|
3875
|
+
"description": "[System arguments](/system-arguments)"
|
3876
|
+
}
|
3877
|
+
]
|
3878
|
+
},
|
3879
|
+
{
|
3880
|
+
"component": "Spinner",
|
3881
|
+
"status": "beta",
|
3882
|
+
"a11y_reviewed": false,
|
3883
|
+
"short_name": "Spinner",
|
3884
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/spinner.rb",
|
3885
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/spinner/default/",
|
3886
|
+
"parameters": [
|
3887
|
+
{
|
3888
|
+
"name": "size",
|
3889
|
+
"type": "Symbol",
|
3890
|
+
"default": "`:medium`",
|
3891
|
+
"description": "One of `[:large, 64]`, `[:medium, 32]`, or `[:small, 16]`."
|
3892
|
+
},
|
3893
|
+
{
|
3894
|
+
"name": "style",
|
3895
|
+
"type": "String",
|
3896
|
+
"default": "`box-sizing: content-box; color: var(--color-icon-primary);`",
|
3897
|
+
"description": "Custom element styles."
|
3898
|
+
},
|
3899
|
+
{
|
3900
|
+
"name": "system_arguments",
|
3901
|
+
"type": "Hash",
|
3902
|
+
"default": "N/A",
|
3903
|
+
"description": "[System arguments](/system-arguments)"
|
3904
|
+
}
|
3905
|
+
]
|
3906
|
+
},
|
3907
|
+
{
|
3908
|
+
"component": "State",
|
3909
|
+
"status": "beta",
|
3910
|
+
"a11y_reviewed": false,
|
3911
|
+
"short_name": "State",
|
3912
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/state.rb",
|
3913
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/state/default/",
|
3914
|
+
"parameters": [
|
3915
|
+
{
|
3916
|
+
"name": "title",
|
3917
|
+
"type": "String",
|
3918
|
+
"default": "N/A",
|
3919
|
+
"description": "`title` HTML attribute."
|
3920
|
+
},
|
3921
|
+
{
|
3922
|
+
"name": "scheme",
|
3923
|
+
"type": "Symbol",
|
3924
|
+
"default": "`:default`",
|
3925
|
+
"description": "Background color. One of `:closed`, `:default`, `:green`, `:merged`, `:open`, `:purple`, or `:red`."
|
3926
|
+
},
|
3927
|
+
{
|
3928
|
+
"name": "tag",
|
3929
|
+
"type": "Symbol",
|
3930
|
+
"default": "`:span`",
|
3931
|
+
"description": "HTML tag for element. One of `:div` or `:span`."
|
3932
|
+
},
|
3933
|
+
{
|
3934
|
+
"name": "size",
|
3935
|
+
"type": "Symbol",
|
3936
|
+
"default": "`:default`",
|
3937
|
+
"description": "One of `:default` or `:small`."
|
3938
|
+
},
|
3939
|
+
{
|
3940
|
+
"name": "system_arguments",
|
3941
|
+
"type": "Hash",
|
3942
|
+
"default": "N/A",
|
3943
|
+
"description": "[System arguments](/system-arguments)"
|
3944
|
+
}
|
3945
|
+
]
|
3946
|
+
},
|
3947
|
+
{
|
3948
|
+
"component": "Subhead",
|
3949
|
+
"status": "beta",
|
3950
|
+
"a11y_reviewed": false,
|
3951
|
+
"short_name": "Subhead",
|
3952
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/subhead.rb",
|
3953
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/subhead/default/",
|
3954
|
+
"parameters": [
|
3955
|
+
{
|
3956
|
+
"name": "spacious",
|
3957
|
+
"type": "Boolean",
|
3958
|
+
"default": "`false`",
|
3959
|
+
"description": "Whether to add spacing to the Subhead."
|
3960
|
+
},
|
3961
|
+
{
|
3962
|
+
"name": "hide_border",
|
3963
|
+
"type": "Boolean",
|
3964
|
+
"default": "`false`",
|
3965
|
+
"description": "Whether to hide the border under the heading."
|
3966
|
+
},
|
3967
|
+
{
|
3968
|
+
"name": "system_arguments",
|
3969
|
+
"type": "Hash",
|
3970
|
+
"default": "N/A",
|
3971
|
+
"description": "[System arguments](/system-arguments)"
|
3972
|
+
}
|
3973
|
+
]
|
3974
|
+
},
|
3975
|
+
{
|
3976
|
+
"component": "Text",
|
3977
|
+
"status": "beta",
|
3978
|
+
"a11y_reviewed": false,
|
3979
|
+
"short_name": "Text",
|
3980
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/text.rb",
|
3981
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/text/default/",
|
3982
|
+
"parameters": [
|
3983
|
+
{
|
3984
|
+
"name": "tag",
|
3985
|
+
"type": "Symbol",
|
3986
|
+
"default": "`:span`",
|
3987
|
+
"description": ""
|
3988
|
+
},
|
3989
|
+
{
|
3990
|
+
"name": "system_arguments",
|
3991
|
+
"type": "Hash",
|
3992
|
+
"default": "N/A",
|
3993
|
+
"description": "[System arguments](/system-arguments)"
|
3994
|
+
}
|
3995
|
+
]
|
3996
|
+
},
|
3997
|
+
{
|
3998
|
+
"component": "TimelineItem",
|
3999
|
+
"status": "beta",
|
4000
|
+
"a11y_reviewed": false,
|
4001
|
+
"short_name": "TimelineItem",
|
4002
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/timeline_item.rb",
|
4003
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/timeline_item/default/",
|
4004
|
+
"parameters": [
|
4005
|
+
{
|
4006
|
+
"name": "condensed",
|
4007
|
+
"type": "Boolean",
|
4008
|
+
"default": "`false`",
|
4009
|
+
"description": "Reduce the vertical padding and remove the background from the badge item. Most commonly used in commits."
|
4010
|
+
},
|
4011
|
+
{
|
4012
|
+
"name": "system_arguments",
|
4013
|
+
"type": "Hash",
|
4014
|
+
"default": "N/A",
|
4015
|
+
"description": "[System arguments](/system-arguments)"
|
4016
|
+
}
|
4017
|
+
]
|
4018
|
+
},
|
4019
|
+
{
|
4020
|
+
"component": "TimelineItem::Badge",
|
4021
|
+
"status": "beta",
|
4022
|
+
"a11y_reviewed": false,
|
4023
|
+
"short_name": "TimelineItemBadge",
|
4024
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/timeline_item/badge.rb",
|
4025
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/timeline_item/badge/default/",
|
4026
|
+
"parameters": [
|
4027
|
+
|
4028
|
+
]
|
4029
|
+
},
|
4030
|
+
{
|
4031
|
+
"component": "Truncate",
|
4032
|
+
"status": "beta",
|
4033
|
+
"a11y_reviewed": false,
|
4034
|
+
"short_name": "Truncate",
|
4035
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/truncate.rb",
|
4036
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/truncate/default/",
|
4037
|
+
"parameters": [
|
4038
|
+
{
|
4039
|
+
"name": "system_arguments",
|
4040
|
+
"type": "Hash",
|
4041
|
+
"default": "N/A",
|
4042
|
+
"description": "[System arguments](/system-arguments)"
|
4043
|
+
}
|
4044
|
+
]
|
4045
|
+
},
|
4046
|
+
{
|
4047
|
+
"component": "Truncate::TruncateText",
|
4048
|
+
"status": "alpha",
|
4049
|
+
"a11y_reviewed": false,
|
4050
|
+
"short_name": "TruncateTruncateText",
|
4051
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/truncate/truncate_text.rb",
|
4052
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/truncate/truncate_text/default/",
|
4053
|
+
"parameters": [
|
4054
|
+
|
4055
|
+
]
|
4056
|
+
},
|
4057
|
+
{
|
4058
|
+
"component": "Blankslate",
|
4059
|
+
"status": "deprecated",
|
4060
|
+
"a11y_reviewed": false,
|
4061
|
+
"short_name": "Blankslate",
|
4062
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/blankslate_component.rb",
|
4063
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/blankslate/default/",
|
4064
|
+
"parameters": [
|
4065
|
+
{
|
4066
|
+
"name": "title",
|
4067
|
+
"type": "String",
|
4068
|
+
"default": "`\"\"`",
|
4069
|
+
"description": "Text that appears in a larger bold font."
|
4070
|
+
},
|
4071
|
+
{
|
4072
|
+
"name": "title_tag",
|
4073
|
+
"type": "Symbol",
|
4074
|
+
"default": "`:h3`",
|
4075
|
+
"description": "HTML tag to use for title."
|
4076
|
+
},
|
4077
|
+
{
|
4078
|
+
"name": "icon",
|
4079
|
+
"type": "Symbol",
|
4080
|
+
"default": "`\"\"`",
|
4081
|
+
"description": "Octicon icon to use at top of component."
|
4082
|
+
},
|
4083
|
+
{
|
4084
|
+
"name": "icon_size",
|
4085
|
+
"type": "Symbol",
|
4086
|
+
"default": "`:medium`",
|
4087
|
+
"description": "One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`)."
|
4088
|
+
},
|
4089
|
+
{
|
4090
|
+
"name": "image_src",
|
4091
|
+
"type": "String",
|
4092
|
+
"default": "`\"\"`",
|
4093
|
+
"description": "Image to display."
|
4094
|
+
},
|
4095
|
+
{
|
4096
|
+
"name": "image_alt",
|
4097
|
+
"type": "String",
|
4098
|
+
"default": "`\" \"`",
|
4099
|
+
"description": "Alt text for image."
|
4100
|
+
},
|
4101
|
+
{
|
4102
|
+
"name": "description",
|
4103
|
+
"type": "String",
|
4104
|
+
"default": "`\"\"`",
|
4105
|
+
"description": "Text that appears below the title. Typically a whole sentence."
|
4106
|
+
},
|
4107
|
+
{
|
4108
|
+
"name": "button_text",
|
4109
|
+
"type": "String",
|
4110
|
+
"default": "`\"\"`",
|
4111
|
+
"description": "The text of the button."
|
4112
|
+
},
|
4113
|
+
{
|
4114
|
+
"name": "button_url",
|
4115
|
+
"type": "String",
|
4116
|
+
"default": "`\"\"`",
|
4117
|
+
"description": "The URL where the user will be taken after clicking the button."
|
4118
|
+
},
|
4119
|
+
{
|
4120
|
+
"name": "button_classes",
|
4121
|
+
"type": "String",
|
4122
|
+
"default": "`\"btn-primary my-3\"`",
|
4123
|
+
"description": "Classes to apply to action button"
|
4124
|
+
},
|
4125
|
+
{
|
4126
|
+
"name": "link_text",
|
4127
|
+
"type": "String",
|
4128
|
+
"default": "`\"\"`",
|
4129
|
+
"description": "The text of the link."
|
4130
|
+
},
|
4131
|
+
{
|
4132
|
+
"name": "link_url",
|
4133
|
+
"type": "String",
|
4134
|
+
"default": "`\"\"`",
|
4135
|
+
"description": "The URL where the user will be taken after clicking the link."
|
4136
|
+
},
|
4137
|
+
{
|
4138
|
+
"name": "narrow",
|
4139
|
+
"type": "Boolean",
|
4140
|
+
"default": "`false`",
|
4141
|
+
"description": "Adds a maximum width."
|
4142
|
+
},
|
4143
|
+
{
|
4144
|
+
"name": "large",
|
4145
|
+
"type": "Boolean",
|
4146
|
+
"default": "`false`",
|
4147
|
+
"description": "Increases the font size."
|
4148
|
+
},
|
4149
|
+
{
|
4150
|
+
"name": "spacious",
|
4151
|
+
"type": "Boolean",
|
4152
|
+
"default": "`false`",
|
4153
|
+
"description": "Adds extra padding."
|
4154
|
+
},
|
4155
|
+
{
|
4156
|
+
"name": "system_arguments",
|
4157
|
+
"type": "Hash",
|
4158
|
+
"default": "N/A",
|
4159
|
+
"description": "[System arguments](/system-arguments)"
|
4160
|
+
}
|
4161
|
+
]
|
4162
|
+
},
|
4163
|
+
{
|
4164
|
+
"component": "Box",
|
4165
|
+
"status": "stable",
|
4166
|
+
"a11y_reviewed": false,
|
4167
|
+
"short_name": "Box",
|
4168
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/box.rb",
|
4169
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/box/default/",
|
4170
|
+
"parameters": [
|
4171
|
+
{
|
4172
|
+
"name": "system_arguments",
|
4173
|
+
"type": "Hash",
|
4174
|
+
"default": "N/A",
|
4175
|
+
"description": "[System arguments](/system-arguments)"
|
4176
|
+
}
|
4177
|
+
]
|
4178
|
+
},
|
4179
|
+
{
|
4180
|
+
"component": "Button",
|
4181
|
+
"status": "deprecated",
|
4182
|
+
"a11y_reviewed": false,
|
4183
|
+
"short_name": "Button",
|
4184
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/button_component.rb",
|
4185
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/button/default/",
|
4186
|
+
"parameters": [
|
4187
|
+
{
|
4188
|
+
"name": "scheme",
|
4189
|
+
"type": "Symbol",
|
4190
|
+
"default": "`:default`",
|
4191
|
+
"description": "One of `:danger`, `:default`, `:invisible`, `:link`, `:outline`, or `:primary`."
|
4192
|
+
},
|
4193
|
+
{
|
4194
|
+
"name": "variant",
|
4195
|
+
"type": "Symbol",
|
4196
|
+
"default": "`nil`",
|
4197
|
+
"description": "DEPRECATED. One of `:medium` or `:small`."
|
4198
|
+
},
|
4199
|
+
{
|
4200
|
+
"name": "size",
|
4201
|
+
"type": "Symbol",
|
4202
|
+
"default": "`:medium`",
|
4203
|
+
"description": "One of `:medium` or `:small`."
|
4204
|
+
},
|
4205
|
+
{
|
4206
|
+
"name": "tag",
|
4207
|
+
"type": "Symbol",
|
4208
|
+
"default": "`:button`",
|
4209
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
4210
|
+
},
|
4211
|
+
{
|
4212
|
+
"name": "type",
|
4213
|
+
"type": "Symbol",
|
4214
|
+
"default": "`:button`",
|
4215
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
4216
|
+
},
|
4217
|
+
{
|
4218
|
+
"name": "group_item",
|
4219
|
+
"type": "Boolean",
|
4220
|
+
"default": "`false`",
|
4221
|
+
"description": "Whether button is part of a ButtonGroup."
|
4222
|
+
},
|
4223
|
+
{
|
4224
|
+
"name": "block",
|
4225
|
+
"type": "Boolean",
|
4226
|
+
"default": "`false`",
|
4227
|
+
"description": "Whether button is full-width with `display: block`."
|
4228
|
+
},
|
4229
|
+
{
|
4230
|
+
"name": "dropdown",
|
4231
|
+
"type": "Boolean",
|
4232
|
+
"default": "`false`",
|
4233
|
+
"description": "Whether or not to render a dropdown caret."
|
4234
|
+
},
|
4235
|
+
{
|
4236
|
+
"name": "system_arguments",
|
4237
|
+
"type": "Hash",
|
4238
|
+
"default": "N/A",
|
4239
|
+
"description": "[System arguments](/system-arguments)"
|
4240
|
+
}
|
4241
|
+
]
|
4242
|
+
},
|
4243
|
+
{
|
4244
|
+
"component": "ConditionalWrapper",
|
4245
|
+
"status": "alpha",
|
4246
|
+
"a11y_reviewed": false,
|
4247
|
+
"short_name": "ConditionalWrapper",
|
4248
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/conditional_wrapper.rb",
|
4249
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/conditional_wrapper/default/",
|
4250
|
+
"parameters": [
|
4251
|
+
|
4252
|
+
]
|
4253
|
+
},
|
4254
|
+
{
|
4255
|
+
"component": "Content",
|
4256
|
+
"status": "stable",
|
4257
|
+
"a11y_reviewed": false,
|
4258
|
+
"short_name": "Content",
|
4259
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/content.rb",
|
4260
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/content/default/",
|
4261
|
+
"parameters": [
|
4262
|
+
|
4263
|
+
]
|
4264
|
+
},
|
4265
|
+
{
|
4266
|
+
"component": "IconButton",
|
4267
|
+
"status": "deprecated",
|
4268
|
+
"a11y_reviewed": false,
|
4269
|
+
"short_name": "IconButton",
|
4270
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/icon_button.rb",
|
4271
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/icon_button/default/",
|
4272
|
+
"parameters": [
|
4273
|
+
{
|
4274
|
+
"name": "scheme",
|
4275
|
+
"type": "Symbol",
|
4276
|
+
"default": "`:default`",
|
4277
|
+
"description": "One of `:danger` or `:default`."
|
4278
|
+
},
|
4279
|
+
{
|
4280
|
+
"name": "icon",
|
4281
|
+
"type": "String",
|
4282
|
+
"default": "N/A",
|
4283
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
4284
|
+
},
|
4285
|
+
{
|
4286
|
+
"name": "tag",
|
4287
|
+
"type": "Symbol",
|
4288
|
+
"default": "N/A",
|
4289
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
4290
|
+
},
|
4291
|
+
{
|
4292
|
+
"name": "type",
|
4293
|
+
"type": "Symbol",
|
4294
|
+
"default": "N/A",
|
4295
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
4296
|
+
},
|
4297
|
+
{
|
4298
|
+
"name": "aria-label",
|
4299
|
+
"type": "String",
|
4300
|
+
"default": "N/A",
|
4301
|
+
"description": "String that can be read by assistive technology. A label should be short and concise. See the accessibility section for more information."
|
4302
|
+
},
|
4303
|
+
{
|
4304
|
+
"name": "aria-description",
|
4305
|
+
"type": "String",
|
4306
|
+
"default": "N/A",
|
4307
|
+
"description": "String that can be read by assistive technology. A description can be longer as it is intended to provide more context and information. See the accessibility section for more information."
|
4308
|
+
},
|
4309
|
+
{
|
4310
|
+
"name": "tooltip_direction",
|
4311
|
+
"type": "Symbol",
|
4312
|
+
"default": "`:s`",
|
4313
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
4314
|
+
},
|
4315
|
+
{
|
4316
|
+
"name": "box",
|
4317
|
+
"type": "Boolean",
|
4318
|
+
"default": "`false`",
|
4319
|
+
"description": "Whether the button is in a [BorderBox](/components/beta/borderbox). If `true`, the button will have the `Box-btn-octicon` class."
|
4320
|
+
},
|
4321
|
+
{
|
4322
|
+
"name": "system_arguments",
|
4323
|
+
"type": "Hash",
|
4324
|
+
"default": "N/A",
|
4325
|
+
"description": "[System arguments](/system-arguments)"
|
4326
|
+
}
|
4327
|
+
]
|
4328
|
+
},
|
4329
|
+
{
|
4330
|
+
"component": "Layout",
|
4331
|
+
"status": "deprecated",
|
4332
|
+
"a11y_reviewed": false,
|
4333
|
+
"short_name": "Layout",
|
4334
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/layout_component.rb",
|
4335
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/layout/default/",
|
4336
|
+
"parameters": [
|
4337
|
+
{
|
4338
|
+
"name": "responsive",
|
4339
|
+
"type": "Boolean",
|
4340
|
+
"default": "`false`",
|
4341
|
+
"description": "Whether to collapse layout to a single column at smaller widths."
|
4342
|
+
},
|
4343
|
+
{
|
4344
|
+
"name": "side",
|
4345
|
+
"type": "Symbol",
|
4346
|
+
"default": "`:right`",
|
4347
|
+
"description": "Which side to display the sidebar on. One of `:left` or `:right`."
|
4348
|
+
},
|
4349
|
+
{
|
4350
|
+
"name": "sidebar_col",
|
4351
|
+
"type": "Integer",
|
4352
|
+
"default": "`3`",
|
4353
|
+
"description": "Sidebar column width."
|
4354
|
+
},
|
4355
|
+
{
|
4356
|
+
"name": "system_arguments",
|
4357
|
+
"type": "Hash",
|
4358
|
+
"default": "N/A",
|
4359
|
+
"description": "[System arguments](/system-arguments)"
|
4360
|
+
}
|
4361
|
+
]
|
4362
|
+
},
|
4363
|
+
{
|
4364
|
+
"component": "Navigation::Tab",
|
4365
|
+
"status": "deprecated",
|
4366
|
+
"a11y_reviewed": false,
|
4367
|
+
"short_name": "NavigationTab",
|
4368
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/navigation/tab_component.rb",
|
4369
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/navigation/tab/default/",
|
4370
|
+
"parameters": [
|
4371
|
+
{
|
4372
|
+
"name": "list",
|
4373
|
+
"type": "Boolean",
|
4374
|
+
"default": "`false`",
|
4375
|
+
"description": "Whether the Tab is an item in a `<ul>` list."
|
4376
|
+
},
|
4377
|
+
{
|
4378
|
+
"name": "selected",
|
4379
|
+
"type": "Boolean",
|
4380
|
+
"default": "`false`",
|
4381
|
+
"description": "Whether the Tab is selected or not."
|
4382
|
+
},
|
4383
|
+
{
|
4384
|
+
"name": "with_panel",
|
4385
|
+
"type": "Boolean",
|
4386
|
+
"default": "`false`",
|
4387
|
+
"description": "Whether the Tab has an associated panel."
|
4388
|
+
},
|
4389
|
+
{
|
4390
|
+
"name": "panel_id",
|
4391
|
+
"type": "String",
|
4392
|
+
"default": "`\"\"`",
|
4393
|
+
"description": "Only applies if `with_panel` is `true`. Unique id of panel."
|
4394
|
+
},
|
4395
|
+
{
|
4396
|
+
"name": "icon_classes",
|
4397
|
+
"type": "Boolean",
|
4398
|
+
"default": "`\"\"`",
|
4399
|
+
"description": "Classes that must always be applied to icons."
|
4400
|
+
},
|
4401
|
+
{
|
4402
|
+
"name": "wrapper_arguments",
|
4403
|
+
"type": "Hash",
|
4404
|
+
"default": "`{}`",
|
4405
|
+
"description": "[System arguments](/system-arguments) to be used in the `<li>` wrapper when the tab is an item in a list."
|
4406
|
+
},
|
4407
|
+
{
|
4408
|
+
"name": "system_arguments",
|
4409
|
+
"type": "Hash",
|
4410
|
+
"default": "N/A",
|
4411
|
+
"description": "[System arguments](/system-arguments)"
|
4412
|
+
}
|
4413
|
+
]
|
4414
|
+
},
|
4415
|
+
{
|
4416
|
+
"component": "Tooltip",
|
4417
|
+
"status": "deprecated",
|
4418
|
+
"a11y_reviewed": false,
|
4419
|
+
"short_name": "Tooltip",
|
4420
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/tooltip.rb",
|
4421
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/tooltip/default/",
|
4422
|
+
"parameters": [
|
4423
|
+
{
|
4424
|
+
"name": "label",
|
4425
|
+
"type": "String",
|
4426
|
+
"default": "N/A",
|
4427
|
+
"description": "the text to appear in the tooltip"
|
4428
|
+
},
|
4429
|
+
{
|
4430
|
+
"name": "direction",
|
4431
|
+
"type": "String",
|
4432
|
+
"default": "`:n`",
|
4433
|
+
"description": "Direction of the tooltip. One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
4434
|
+
},
|
4435
|
+
{
|
4436
|
+
"name": "align",
|
4437
|
+
"type": "String",
|
4438
|
+
"default": "`:default`",
|
4439
|
+
"description": "Align tooltips to the left or right of an element, combined with a `direction` to specify north or south. One of `:default`, `:left_1`, `:left_2`, `:right_1`, or `:right_2`."
|
4440
|
+
},
|
4441
|
+
{
|
4442
|
+
"name": "multiline",
|
4443
|
+
"type": "Boolean",
|
4444
|
+
"default": "`false`",
|
4445
|
+
"description": "Use this when you have long content"
|
4446
|
+
},
|
4447
|
+
{
|
4448
|
+
"name": "no_delay",
|
4449
|
+
"type": "Boolean",
|
4450
|
+
"default": "`false`",
|
4451
|
+
"description": "By default the tooltips have a slight delay before appearing. Set true to override this"
|
4452
|
+
},
|
4453
|
+
{
|
4454
|
+
"name": "system_arguments",
|
4455
|
+
"type": "Hash",
|
4456
|
+
"default": "N/A",
|
4457
|
+
"description": "[System arguments](/system-arguments)"
|
4458
|
+
}
|
4459
|
+
]
|
4460
|
+
},
|
4461
|
+
{
|
4462
|
+
"component": "Truncate",
|
4463
|
+
"status": "deprecated",
|
4464
|
+
"a11y_reviewed": false,
|
4465
|
+
"short_name": "Truncate",
|
4466
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/truncate.rb",
|
4467
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/truncate/default/",
|
4468
|
+
"parameters": [
|
4469
|
+
{
|
4470
|
+
"name": "tag",
|
4471
|
+
"type": "Symbol",
|
4472
|
+
"default": "`:div`",
|
4473
|
+
"description": "One of `:div`, `:p`, `:span`, or `:strong`."
|
4474
|
+
},
|
4475
|
+
{
|
4476
|
+
"name": "inline",
|
4477
|
+
"type": "Boolean",
|
4478
|
+
"default": "`false`",
|
4479
|
+
"description": "Whether the element is inline (or inline-block)."
|
4480
|
+
},
|
4481
|
+
{
|
4482
|
+
"name": "expandable",
|
4483
|
+
"type": "Boolean",
|
4484
|
+
"default": "`false`",
|
4485
|
+
"description": "Whether the entire string should be revealed on hover. Can only be used in conjunction with `inline`."
|
4486
|
+
},
|
4487
|
+
{
|
4488
|
+
"name": "max_width",
|
4489
|
+
"type": "Integer",
|
4490
|
+
"default": "`nil`",
|
4491
|
+
"description": "Sets the max-width of the text."
|
4492
|
+
},
|
4493
|
+
{
|
4494
|
+
"name": "system_arguments",
|
4495
|
+
"type": "Hash",
|
4496
|
+
"default": "N/A",
|
4497
|
+
"description": "[System arguments](/system-arguments)"
|
4498
|
+
}
|
4499
|
+
]
|
4500
|
+
}
|
4501
|
+
]
|