openproject-primer_view_components 0.48.1 → 0.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +51 -0
- data/app/assets/javascripts/{app/components → components}/primer/open_project/zen_mode_button.d.ts +4 -0
- data/app/assets/javascripts/{app/components → components}/primer/primer.d.ts +3 -4
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_bar.css.map +1 -1
- data/app/components/primer/alpha/action_bar.pcss +7 -4
- data/app/components/primer/alpha/action_bar_element.js +0 -3
- data/app/components/primer/alpha/action_bar_element.ts +0 -4
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +25 -8
- data/app/components/primer/alpha/action_list.rb +1 -1
- data/app/components/primer/alpha/auto_complete.css +1 -1
- data/app/components/primer/alpha/auto_complete.css.map +1 -1
- data/app/components/primer/alpha/auto_complete.pcss +7 -7
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/banner.pcss +6 -2
- data/app/components/primer/alpha/button_marketing.css.map +1 -1
- data/app/components/primer/alpha/button_marketing.pcss +11 -4
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +2 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +39 -13
- data/app/components/primer/alpha/dialog.rb +5 -1
- data/app/components/primer/alpha/dropdown.css +1 -1
- data/app/components/primer/alpha/dropdown.css.map +1 -1
- data/app/components/primer/alpha/dropdown.pcss +45 -11
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/layout.pcss +3 -2
- data/app/components/primer/alpha/menu.css.map +1 -1
- data/app/components/primer/alpha/menu.pcss +7 -0
- data/app/components/primer/alpha/overlay.css.map +1 -1
- data/app/components/primer/alpha/overlay.pcss +3 -3
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.pcss +15 -8
- data/app/components/primer/alpha/select_panel.html.erb +8 -5
- data/app/components/primer/alpha/select_panel.rb +26 -1
- data/app/components/primer/alpha/select_panel_element.js +9 -3
- data/app/components/primer/alpha/select_panel_element.ts +10 -4
- data/app/components/primer/alpha/stack.css +1 -0
- data/app/components/primer/alpha/stack.css.json +90 -0
- data/app/components/primer/alpha/stack.css.map +1 -0
- data/app/components/primer/alpha/stack.html.erb +3 -0
- data/app/components/primer/alpha/stack.pcss +297 -0
- data/app/components/primer/alpha/stack.rb +185 -0
- data/app/components/primer/alpha/stack_item.css +1 -0
- data/app/components/primer/alpha/stack_item.css.json +12 -0
- data/app/components/primer/alpha/stack_item.css.map +1 -0
- data/app/components/primer/alpha/stack_item.html.erb +3 -0
- data/app/components/primer/alpha/stack_item.pcss +31 -0
- data/app/components/primer/alpha/stack_item.rb +54 -0
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/tab_nav.pcss +12 -3
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +29 -22
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.pcss +6 -3
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/alpha/underline_nav.pcss +8 -2
- data/app/components/primer/base_component.rb +1 -1
- data/app/components/primer/beta/avatar.css +1 -1
- data/app/components/primer/beta/avatar.css.map +1 -1
- data/app/components/primer/beta/avatar.pcss +4 -1
- data/app/components/primer/beta/avatar_stack.css +1 -1
- data/app/components/primer/beta/avatar_stack.css.map +1 -1
- data/app/components/primer/beta/avatar_stack.pcss +9 -2
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/blankslate.pcss +24 -3
- data/app/components/primer/beta/border_box.css +1 -1
- data/app/components/primer/beta/border_box.css.map +1 -1
- data/app/components/primer/beta/border_box.pcss +8 -4
- data/app/components/primer/beta/breadcrumbs.css.map +1 -1
- data/app/components/primer/beta/breadcrumbs.pcss +5 -1
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +31 -27
- data/app/components/primer/beta/button_group.css.map +1 -1
- data/app/components/primer/beta/button_group.pcss +1 -0
- data/app/components/primer/beta/counter.css +1 -1
- data/app/components/primer/beta/counter.css.map +1 -1
- data/app/components/primer/beta/counter.pcss +3 -1
- data/app/components/primer/beta/flash.css.map +1 -1
- data/app/components/primer/beta/flash.pcss +7 -4
- data/app/components/primer/beta/label.css.map +1 -1
- data/app/components/primer/beta/label.pcss +4 -0
- data/app/components/primer/beta/popover.css +1 -1
- data/app/components/primer/beta/popover.css.map +1 -1
- data/app/components/primer/beta/popover.pcss +15 -7
- data/app/components/primer/beta/progress_bar.css +1 -1
- data/app/components/primer/beta/progress_bar.css.map +1 -1
- data/app/components/primer/beta/progress_bar.pcss +2 -2
- data/app/components/primer/beta/state.css +1 -1
- data/app/components/primer/beta/state.css.map +1 -1
- data/app/components/primer/beta/state.pcss +6 -1
- data/app/components/primer/beta/subhead.css.map +1 -1
- data/app/components/primer/beta/subhead.pcss +3 -0
- data/app/components/primer/beta/timeline_item.css.map +1 -1
- data/app/components/primer/beta/timeline_item.pcss +11 -0
- data/app/components/primer/beta/truncate.css.map +1 -1
- data/app/components/primer/beta/truncate.pcss +1 -0
- data/app/components/primer/dialog_helper.js +0 -1
- data/app/components/primer/dialog_helper.ts +0 -1
- data/app/components/primer/open_project/zen_mode_button.d.ts +4 -0
- data/app/components/primer/open_project/zen_mode_button.js +14 -6
- data/app/components/primer/open_project/zen_mode_button.ts +18 -5
- data/app/components/primer/primer.d.ts +3 -4
- data/app/components/primer/primer.js +3 -4
- data/app/components/primer/primer.pcss +6 -4
- data/app/components/primer/primer.ts +3 -4
- data/app/components/primer/responsive_arg.rb +66 -0
- data/app/forms/caption_template_form/places_bellevue_caption.html.erb +1 -0
- data/app/forms/caption_template_form/places_lopez_caption.html.erb +1 -0
- data/app/forms/caption_template_form/places_seattle_caption.html.erb +1 -0
- data/app/forms/caption_template_form.rb +6 -0
- data/app/forms/check_box_group_form.rb +1 -1
- data/app/forms/radio_button_group_form.rb +5 -1
- data/app/lib/primer/attributes_helper.rb +1 -1
- data/{lib → app/lib}/primer/forms/base_component.rb +0 -8
- data/{lib → app/lib}/primer/forms/button.rb +5 -2
- data/{lib → app/lib}/primer/forms/check_box_group.html.erb +3 -3
- data/{lib → app/lib}/primer/forms/check_box_group.rb +1 -1
- data/{lib → app/lib}/primer/forms/dsl/check_box_input.rb +4 -8
- data/{lib → app/lib}/primer/forms/dsl/input.rb +13 -1
- data/{lib → app/lib}/primer/forms/dsl/radio_button_input.rb +4 -0
- data/{lib → app/lib}/primer/forms/group.html.erb +1 -1
- data/{lib → app/lib}/primer/forms/group.rb +5 -0
- data/{lib → app/lib}/primer/forms/radio_button_group.html.erb +3 -3
- data/{lib → app/lib}/primer/forms/radio_button_group.rb +1 -1
- data/{lib → app/lib}/primer/forms/select.html.erb +0 -1
- data/lib/primer/view_components/linters/details_menu_migration.rb +3 -2
- data/lib/primer/view_components/version.rb +2 -2
- data/lib/primer/yard/component_manifest.rb +0 -1
- data/previews/primer/alpha/action_bar_preview/inline.html.erb +1 -1
- data/previews/primer/alpha/dialog_preview/autofocus_element.html.erb +1 -1
- data/previews/primer/alpha/dialog_preview/custom_header.html.erb +3 -1
- data/previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb +4 -4
- data/previews/primer/alpha/dialog_preview/nested_dialog.html.erb +1 -1
- data/previews/primer/alpha/dialog_preview/scroll_container.html.erb +11 -2
- data/previews/primer/alpha/dialog_preview/with_footer.html.erb +2 -2
- data/previews/primer/alpha/dialog_preview/with_form.html.erb +2 -2
- data/previews/primer/alpha/dialog_preview/with_text_input.html.erb +1 -1
- data/previews/primer/alpha/dialog_preview.rb +4 -2
- data/previews/primer/alpha/overlay_preview/in_a_sticky_container.html.erb +1 -1
- data/previews/primer/alpha/overlay_preview/overlay_with_header_filter.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/_interaction_subject_js.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/custom_loading_description.html.erb +23 -0
- data/previews/primer/alpha/select_panel_preview/custom_loading_label.html.erb +21 -0
- data/previews/primer/alpha/select_panel_preview/remote_fetch_filter_failure.html.erb +4 -2
- data/previews/primer/alpha/select_panel_preview/scroll_container.html.erb +49 -0
- data/previews/primer/alpha/select_panel_preview.rb +40 -2
- data/previews/primer/alpha/stack_item_preview/default.html.erb +5 -0
- data/previews/primer/alpha/stack_item_preview/playground.html.erb +11 -0
- data/previews/primer/alpha/stack_item_preview.rb +40 -0
- data/previews/primer/alpha/stack_preview/playground.html.erb +5 -0
- data/previews/primer/alpha/stack_preview.rb +88 -0
- data/previews/primer/alpha/text_field_preview/input_group_leading_action_menu.html.erb +1 -2
- data/previews/primer/alpha/tooltip_preview/tooltip_inside_primer_overlay.html.erb +2 -2
- data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb +1 -1
- data/previews/primer/alpha/underline_nav_preview/default.html.erb +1 -1
- data/previews/primer/alpha/underline_nav_preview/playground.html.erb +1 -1
- data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +18 -18
- data/previews/primer/beta/breadcrumbs_preview/with_deprecated_truncate.html.erb +3 -1
- data/previews/primer/beta/button_preview/summary_as_button.html.erb +0 -1
- data/previews/primer/beta/subhead_preview/actions.html.erb +0 -1
- data/previews/primer/open_project/feedback_dialog_preview/additional_content.html.erb +1 -1
- data/previews/primer/open_project/feedback_dialog_preview/custom_footer.html.erb +1 -1
- data/previews/primer/open_project/feedback_dialog_preview/playground.html.erb +2 -2
- data/previews/primer/open_project/page_header_preview/actions.html.erb +1 -1
- data/previews/primer/open_project/page_header_preview/playground.html.erb +2 -2
- data/previews/primer/open_project/sub_header_preview/action_menu_buttons.html.erb +1 -1
- data/static/arguments.json +112 -30
- data/static/audited_at.json +2 -1
- data/static/classes.json +6 -0
- data/static/constants.json +172 -9
- data/static/info_arch.json +248 -98
- data/static/previews.json +107 -47
- data/static/statuses.json +2 -1
- metadata +137 -120
- data/app/assets/javascripts/app/components/primer/alpha/image_crop.d.ts +0 -1
- data/app/components/primer/alpha/image_crop.d.ts +0 -1
- data/app/components/primer/alpha/image_crop.html.erb +0 -12
- data/app/components/primer/alpha/image_crop.js +0 -1
- data/app/components/primer/alpha/image_crop.rb +0 -28
- data/app/components/primer/alpha/image_crop.ts +0 -1
- data/previews/primer/alpha/image_crop_preview.rb +0 -31
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_bar_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_list.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_menu/action_menu_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown/menu.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/modal_dialog.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/segmented_control.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/select_panel_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/tab_container.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/toggle_switch.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/tool_tip.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/alpha/x_banner.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/anchored_position.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/aria_live.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/beta/auto_complete/auto_complete.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/beta/clipboard_copy.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/beta/nav_list.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/beta/nav_list_group_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/beta/relative_time.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/dialog_helper.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/focus_group.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/open_project/page_header_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/open_project/sub_header_element.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/scrollable_region.d.ts +0 -0
- /data/app/assets/javascripts/{app/components → components}/primer/shared_events.d.ts +0 -0
- /data/{lib → app/lib}/primer/forms/action_menu.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/action_menu.rb +0 -0
- /data/{lib → app/lib}/primer/forms/acts_as_component.rb +0 -0
- /data/{lib → app/lib}/primer/forms/auto_complete.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/auto_complete.rb +0 -0
- /data/{lib → app/lib}/primer/forms/base.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/base.rb +0 -0
- /data/{lib → app/lib}/primer/forms/buffer_rewriter.rb +0 -0
- /data/{lib → app/lib}/primer/forms/builder.rb +0 -0
- /data/{lib → app/lib}/primer/forms/button.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/caption.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/caption.rb +0 -0
- /data/{lib → app/lib}/primer/forms/check_box.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/check_box.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/action_menu_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/auto_complete_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/button_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/check_box_group_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/form_object.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/form_reference_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/hidden_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/input_group.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/input_methods.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/multi_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/radio_button_group_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/select_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/submit_button_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/text_area_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/text_field_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/dsl/toggle_switch_input.rb +0 -0
- /data/{lib → app/lib}/primer/forms/form_control.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/form_control.rb +0 -0
- /data/{lib → app/lib}/primer/forms/form_list.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/form_list.rb +0 -0
- /data/{lib → app/lib}/primer/forms/form_reference.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/form_reference.rb +0 -0
- /data/{lib → app/lib}/primer/forms/hidden_field.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/hidden_field.rb +0 -0
- /data/{lib → app/lib}/primer/forms/multi.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/multi.rb +0 -0
- /data/{lib → app/lib}/primer/forms/primer_base_component_wrapper.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/primer_base_component_wrapper.rb +0 -0
- /data/{lib → app/lib}/primer/forms/primer_multi_input.d.ts +0 -0
- /data/{lib → app/lib}/primer/forms/primer_multi_input.js +0 -0
- /data/{lib → app/lib}/primer/forms/primer_multi_input.ts +0 -0
- /data/{lib → app/lib}/primer/forms/primer_text_field.d.ts +0 -0
- /data/{lib → app/lib}/primer/forms/primer_text_field.js +0 -0
- /data/{lib → app/lib}/primer/forms/primer_text_field.ts +0 -0
- /data/{lib → app/lib}/primer/forms/radio_button.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/radio_button.rb +0 -0
- /data/{lib → app/lib}/primer/forms/select.rb +0 -0
- /data/{lib → app/lib}/primer/forms/separator.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/separator.rb +0 -0
- /data/{lib → app/lib}/primer/forms/spacing_wrapper.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/spacing_wrapper.rb +0 -0
- /data/{lib → app/lib}/primer/forms/submit_button.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/submit_button.rb +0 -0
- /data/{lib → app/lib}/primer/forms/text_area.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/text_area.rb +0 -0
- /data/{lib → app/lib}/primer/forms/text_field.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/text_field.rb +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch.rb +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch_form.rb +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch_input.d.ts +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch_input.js +0 -0
- /data/{lib → app/lib}/primer/forms/toggle_switch_input.ts +0 -0
- /data/{lib → app/lib}/primer/forms/utils.rb +0 -0
- /data/{lib → app/lib}/primer/forms/validation_message.html.erb +0 -0
- /data/{lib → app/lib}/primer/forms/validation_message.rb +0 -0
- /data/{lib → app/lib}/primer/forms.rb +0 -0
@@ -3,7 +3,9 @@
|
|
3
3
|
.TimelineItem {
|
4
4
|
position: relative;
|
5
5
|
display: flex;
|
6
|
+
/* stylelint-disable-next-line primer/spacing */
|
6
7
|
padding: var(--stack-padding-normal) 0;
|
8
|
+
/* stylelint-disable-next-line primer/spacing */
|
7
9
|
margin-left: var(--stack-gap-normal);
|
8
10
|
|
9
11
|
/* The Timeline */
|
@@ -15,11 +17,13 @@
|
|
15
17
|
display: block;
|
16
18
|
width: var(--borderWidth-thick);
|
17
19
|
content: '';
|
20
|
+
/* stylelint-disable-next-line primer/colors */
|
18
21
|
background-color: var(--borderColor-muted);
|
19
22
|
}
|
20
23
|
|
21
24
|
&:target .TimelineItem-badge {
|
22
25
|
border-color: var(--borderColor-accent-emphasis);
|
26
|
+
/* stylelint-disable-next-line primer/box-shadow */
|
23
27
|
box-shadow: 0 0 0.2em var(--borderColor-accent-muted);
|
24
28
|
}
|
25
29
|
}
|
@@ -30,11 +34,14 @@
|
|
30
34
|
display: flex;
|
31
35
|
width: var(--control-medium-size);
|
32
36
|
height: var(--control-medium-size);
|
37
|
+
/* stylelint-disable-next-line primer/spacing */
|
33
38
|
margin-right: var(--controlStack-medium-gap-condensed);
|
39
|
+
/* stylelint-disable-next-line primer/spacing */
|
34
40
|
margin-left: calc(var(--control-medium-size) / -2 + 1px);
|
35
41
|
color: var(--fgColor-muted);
|
36
42
|
align-items: center;
|
37
43
|
background-color: var(--timelineBadge-bgColor);
|
44
|
+
/* stylelint-disable-next-line primer/colors */
|
38
45
|
border: var(--borderWidth-thick) solid var(--bgColor-default);
|
39
46
|
border-radius: 50%;
|
40
47
|
justify-content: center;
|
@@ -57,6 +64,7 @@
|
|
57
64
|
|
58
65
|
.TimelineItem-avatar {
|
59
66
|
position: absolute;
|
67
|
+
/* stylelint-disable-next-line primer/spacing */
|
60
68
|
left: -72px;
|
61
69
|
z-index: 1;
|
62
70
|
}
|
@@ -66,7 +74,9 @@
|
|
66
74
|
z-index: 1;
|
67
75
|
height: var(--stack-gap-spacious);
|
68
76
|
margin: 0;
|
77
|
+
/* stylelint-disable-next-line primer/spacing */
|
69
78
|
margin-bottom: calc(var(--stack-gap-normal) * -1);
|
79
|
+
/* stylelint-disable-next-line primer/spacing */
|
70
80
|
margin-left: -56px;
|
71
81
|
background-color: var(--bgColor-default);
|
72
82
|
border: 0;
|
@@ -79,6 +89,7 @@
|
|
79
89
|
|
80
90
|
/* TimelineItem--condensed is often grouped. (commits) */
|
81
91
|
&:last-child {
|
92
|
+
/* stylelint-disable-next-line primer/spacing */
|
82
93
|
padding-bottom: var(--stack-gap-normal);
|
83
94
|
}
|
84
95
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAEA,UACE,mBAAoB,CAEpB,cAAe,CADf,
|
1
|
+
{"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAEA,UACE,mBAAoB,CAEpB,cAAe,CADf,WA2BF,CAxBE,yBAEE,0BAAsB,CAAtB,qBAAsB,CADtB,aAAc,CAEd,eAAgB,CAChB,sBAAuB,CACvB,kBAkBF,CAhBE,6CAEE,oCACF,CAEA,qDACE,eACF,CAEA,2LAKE,cAAe,CADf,aAAc,CADd,wBAGF","file":"truncate.css","sourcesContent":["/* Truncate */\n\n.Truncate {\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n\n & > .Truncate-text {\n min-width: 1ch;\n max-width: fit-content;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n & + .Truncate-text {\n /* stylelint-disable-next-line primer/spacing */\n margin-left: var(--control-small-gap);\n }\n\n &.Truncate-text--primary {\n flex-basis: 200%;\n }\n\n &.Truncate-text--expandable:hover,\n &.Truncate-text--expandable:focus,\n &.Truncate-text--expandable:active {\n max-width: 100% !important;\n flex-shrink: 0;\n cursor: pointer;\n }\n }\n}\n"]}
|
@@ -115,7 +115,6 @@ export class DialogHelperElement extends HTMLElement {
|
|
115
115
|
_DialogHelperElement_abortController = new WeakMap(), _DialogHelperElement_instances = new WeakSet(), _DialogHelperElement_handleDialogOpenAttribute = function _DialogHelperElement_handleDialogOpenAttribute() {
|
116
116
|
if (!this.dialog)
|
117
117
|
return;
|
118
|
-
this.ownerDocument.body.classList.toggle('has-modal', this.dialog.matches(':modal'));
|
119
118
|
// We don't want to show the Dialog component as non-modal
|
120
119
|
if (this.dialog.matches('[open]:not(:modal)')) {
|
121
120
|
// eslint-disable-next-line no-restricted-syntax
|
@@ -96,7 +96,6 @@ export class DialogHelperElement extends HTMLElement {
|
|
96
96
|
|
97
97
|
#handleDialogOpenAttribute() {
|
98
98
|
if (!this.dialog) return
|
99
|
-
this.ownerDocument.body.classList.toggle('has-modal', this.dialog.matches(':modal'))
|
100
99
|
// We don't want to show the Dialog component as non-modal
|
101
100
|
if (this.dialog.matches('[open]:not(:modal)')) {
|
102
101
|
// eslint-disable-next-line no-restricted-syntax
|
@@ -1,9 +1,13 @@
|
|
1
1
|
declare class ZenModeButtonElement extends HTMLElement {
|
2
2
|
button: HTMLElement;
|
3
3
|
inZenMode: boolean;
|
4
|
+
constructor();
|
5
|
+
disconnectedCallback(): void;
|
6
|
+
fullscreenChangeEventHandler(): void;
|
4
7
|
dispatchZenModeStatus(): void;
|
5
8
|
private deactivateZenMode;
|
6
9
|
private activateZenMode;
|
10
|
+
changeButtonState(inZenMode: boolean): void;
|
7
11
|
performAction(): void;
|
8
12
|
}
|
9
13
|
declare global {
|
@@ -6,9 +6,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
};
|
7
7
|
import { controller, target } from '@github/catalyst';
|
8
8
|
let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
9
|
+
// eslint-disable-next-line custom-elements/no-constructor
|
9
10
|
constructor() {
|
10
|
-
super(
|
11
|
+
super();
|
11
12
|
this.inZenMode = false;
|
13
|
+
document.addEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this));
|
14
|
+
}
|
15
|
+
disconnectedCallback() {
|
16
|
+
document.removeEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this));
|
17
|
+
}
|
18
|
+
fullscreenChangeEventHandler() {
|
19
|
+
this.changeButtonState(!this.inZenMode);
|
20
|
+
this.dispatchZenModeStatus();
|
12
21
|
}
|
13
22
|
dispatchZenModeStatus() {
|
14
23
|
// Create a new custom event
|
@@ -21,19 +30,19 @@ let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
21
30
|
window.dispatchEvent(event);
|
22
31
|
}
|
23
32
|
deactivateZenMode() {
|
24
|
-
this.inZenMode = false;
|
25
|
-
this.button.setAttribute('aria-pressed', 'false');
|
26
33
|
if (document.exitFullscreen) {
|
27
34
|
void document.exitFullscreen();
|
28
35
|
}
|
29
36
|
}
|
30
37
|
activateZenMode() {
|
31
|
-
this.inZenMode = true;
|
32
|
-
this.button.setAttribute('aria-pressed', 'true');
|
33
38
|
if (document.documentElement.requestFullscreen) {
|
34
39
|
void document.documentElement.requestFullscreen();
|
35
40
|
}
|
36
41
|
}
|
42
|
+
changeButtonState(inZenMode) {
|
43
|
+
this.inZenMode = inZenMode;
|
44
|
+
this.button.setAttribute('aria-pressed', inZenMode.toString());
|
45
|
+
}
|
37
46
|
performAction() {
|
38
47
|
if (this.inZenMode) {
|
39
48
|
this.deactivateZenMode();
|
@@ -41,7 +50,6 @@ let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
41
50
|
else {
|
42
51
|
this.activateZenMode();
|
43
52
|
}
|
44
|
-
this.dispatchZenModeStatus();
|
45
53
|
}
|
46
54
|
};
|
47
55
|
__decorate([
|
@@ -5,6 +5,20 @@ class ZenModeButtonElement extends HTMLElement {
|
|
5
5
|
@target button: HTMLElement
|
6
6
|
inZenMode = false
|
7
7
|
|
8
|
+
// eslint-disable-next-line custom-elements/no-constructor
|
9
|
+
constructor() {
|
10
|
+
super()
|
11
|
+
document.addEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this))
|
12
|
+
}
|
13
|
+
|
14
|
+
disconnectedCallback() {
|
15
|
+
document.removeEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this))
|
16
|
+
}
|
17
|
+
|
18
|
+
fullscreenChangeEventHandler() {
|
19
|
+
this.changeButtonState(!this.inZenMode)
|
20
|
+
this.dispatchZenModeStatus()
|
21
|
+
}
|
8
22
|
dispatchZenModeStatus() {
|
9
23
|
// Create a new custom event
|
10
24
|
const event = new CustomEvent('zenModeToggled', {
|
@@ -17,20 +31,20 @@ class ZenModeButtonElement extends HTMLElement {
|
|
17
31
|
}
|
18
32
|
|
19
33
|
private deactivateZenMode() {
|
20
|
-
this.inZenMode = false
|
21
|
-
this.button.setAttribute('aria-pressed', 'false')
|
22
34
|
if (document.exitFullscreen) {
|
23
35
|
void document.exitFullscreen()
|
24
36
|
}
|
25
37
|
}
|
26
38
|
|
27
39
|
private activateZenMode() {
|
28
|
-
this.inZenMode = true
|
29
|
-
this.button.setAttribute('aria-pressed', 'true')
|
30
40
|
if (document.documentElement.requestFullscreen) {
|
31
41
|
void document.documentElement.requestFullscreen()
|
32
42
|
}
|
33
43
|
}
|
44
|
+
public changeButtonState(inZenMode: boolean) {
|
45
|
+
this.inZenMode = inZenMode
|
46
|
+
this.button.setAttribute('aria-pressed', inZenMode.toString())
|
47
|
+
}
|
34
48
|
|
35
49
|
public performAction() {
|
36
50
|
if (this.inZenMode) {
|
@@ -38,7 +52,6 @@ class ZenModeButtonElement extends HTMLElement {
|
|
38
52
|
} else {
|
39
53
|
this.activateZenMode()
|
40
54
|
}
|
41
|
-
this.dispatchZenModeStatus()
|
42
55
|
}
|
43
56
|
}
|
44
57
|
|
@@ -9,7 +9,6 @@ import './focus_group';
|
|
9
9
|
import './scrollable_region';
|
10
10
|
import './aria_live';
|
11
11
|
import './shared_events';
|
12
|
-
import './alpha/image_crop';
|
13
12
|
import './alpha/modal_dialog';
|
14
13
|
import './beta/nav_list';
|
15
14
|
import './beta/nav_list_group_element';
|
@@ -21,9 +20,9 @@ import './beta/auto_complete/auto_complete';
|
|
21
20
|
import './beta/clipboard_copy';
|
22
21
|
import './beta/relative_time';
|
23
22
|
import './alpha/tab_container';
|
24
|
-
import '
|
25
|
-
import '
|
26
|
-
import '
|
23
|
+
import '../../lib/primer/forms/primer_multi_input';
|
24
|
+
import '../../lib/primer/forms/primer_text_field';
|
25
|
+
import '../../lib/primer/forms/toggle_switch_input';
|
27
26
|
import './alpha/action_menu/action_menu_element';
|
28
27
|
import './alpha/select_panel_element';
|
29
28
|
import './open_project/page_header_element';
|
@@ -9,7 +9,6 @@ import './focus_group';
|
|
9
9
|
import './scrollable_region';
|
10
10
|
import './aria_live';
|
11
11
|
import './shared_events';
|
12
|
-
import './alpha/image_crop';
|
13
12
|
import './alpha/modal_dialog';
|
14
13
|
import './beta/nav_list';
|
15
14
|
import './beta/nav_list_group_element';
|
@@ -21,9 +20,9 @@ import './beta/auto_complete/auto_complete';
|
|
21
20
|
import './beta/clipboard_copy';
|
22
21
|
import './beta/relative_time';
|
23
22
|
import './alpha/tab_container';
|
24
|
-
import '
|
25
|
-
import '
|
26
|
-
import '
|
23
|
+
import '../../lib/primer/forms/primer_multi_input';
|
24
|
+
import '../../lib/primer/forms/primer_text_field';
|
25
|
+
import '../../lib/primer/forms/toggle_switch_input';
|
27
26
|
import './alpha/action_menu/action_menu_element';
|
28
27
|
import './alpha/select_panel_element';
|
29
28
|
import './open_project/page_header_element';
|
@@ -4,17 +4,19 @@
|
|
4
4
|
@import "./alpha/action_list.pcss";
|
5
5
|
@import "./alpha/auto_complete.pcss";
|
6
6
|
@import "./alpha/banner.pcss";
|
7
|
+
@import "./alpha/button_marketing.pcss";
|
7
8
|
@import "./alpha/dialog.pcss";
|
8
9
|
@import "./alpha/dropdown.pcss";
|
9
10
|
@import "./alpha/layout.pcss";
|
11
|
+
@import "./alpha/menu.pcss";
|
12
|
+
@import "./alpha/segmented_control.pcss";
|
13
|
+
@import "./alpha/select_panel.pcss";
|
14
|
+
@import "./alpha/stack.pcss";
|
15
|
+
@import "./alpha/stack_item.pcss";
|
10
16
|
@import "./alpha/tab_nav.pcss";
|
11
17
|
@import "./alpha/text_field.pcss";
|
12
|
-
@import "./alpha/button_marketing.pcss";
|
13
18
|
@import "./alpha/toggle_switch.pcss";
|
14
19
|
@import "./alpha/underline_nav.pcss";
|
15
|
-
@import "./alpha/select_panel.pcss";
|
16
|
-
@import "./alpha/segmented_control.pcss";
|
17
|
-
@import "./alpha/menu.pcss";
|
18
20
|
|
19
21
|
/* beta */
|
20
22
|
@import "./beta/avatar.pcss";
|
@@ -9,7 +9,6 @@ import './focus_group'
|
|
9
9
|
import './scrollable_region'
|
10
10
|
import './aria_live'
|
11
11
|
import './shared_events'
|
12
|
-
import './alpha/image_crop'
|
13
12
|
import './alpha/modal_dialog'
|
14
13
|
import './beta/nav_list'
|
15
14
|
import './beta/nav_list_group_element'
|
@@ -21,9 +20,9 @@ import './beta/auto_complete/auto_complete'
|
|
21
20
|
import './beta/clipboard_copy'
|
22
21
|
import './beta/relative_time'
|
23
22
|
import './alpha/tab_container'
|
24
|
-
import '
|
25
|
-
import '
|
26
|
-
import '
|
23
|
+
import '../../lib/primer/forms/primer_multi_input'
|
24
|
+
import '../../lib/primer/forms/primer_text_field'
|
25
|
+
import '../../lib/primer/forms/toggle_switch_input'
|
27
26
|
import './alpha/action_menu/action_menu_element'
|
28
27
|
import './alpha/select_panel_element'
|
29
28
|
import './open_project/page_header_element'
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Primer
|
4
|
+
# Base class for responsive Stack and StackItem arguments. Used internally.
|
5
|
+
class ResponsiveArg
|
6
|
+
BREAKPOINTS = [:narrow, :regular, :wide].freeze
|
7
|
+
|
8
|
+
include FetchOrFallbackHelper
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def for(values)
|
12
|
+
cache[[values, arg_name].hash] ||= new(values)
|
13
|
+
end
|
14
|
+
|
15
|
+
# :nocov:
|
16
|
+
def arg_name
|
17
|
+
raise NotImplementedError, "Subclasses must implement the `#{__method__}' method"
|
18
|
+
end
|
19
|
+
# :nocov:
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def cache
|
24
|
+
Thread.current[:pvc_stack_cache] ||= {}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def to_data_attributes
|
29
|
+
@data_attributes ||= data_attributes_for(self.class.arg_name, values)
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def data_attributes_for(property, values)
|
35
|
+
if values.is_a?(Hash)
|
36
|
+
values.slice(*BREAKPOINTS).each_with_object({}) do |(key, value), memo|
|
37
|
+
next unless value
|
38
|
+
property_with_breakpoint = "#{property}-#{key}"
|
39
|
+
memo[property_with_breakpoint] = value
|
40
|
+
end
|
41
|
+
else
|
42
|
+
values ? { property => values } : {}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def fetch_or_fallback_all(options, values, default)
|
47
|
+
if values.is_a?(Hash)
|
48
|
+
values.each_with_object({}) do |(key, value), memo|
|
49
|
+
memo[key] = fetch_or_fallback(options, value, default).yield_self do |value|
|
50
|
+
block_given? ? yield(value) : value
|
51
|
+
end
|
52
|
+
end
|
53
|
+
else
|
54
|
+
fetch_or_fallback(options, values, default).yield_self do |value|
|
55
|
+
block_given? ? yield(value) : value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# :nocov:
|
61
|
+
def values
|
62
|
+
raise NotImplementedError, "Subclasses must implement the `#{__method__}' method"
|
63
|
+
end
|
64
|
+
# :nocov:
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<span>Bellevue caption</span>
|
@@ -0,0 +1 @@
|
|
1
|
+
<span>Lopez caption</span>
|
@@ -0,0 +1 @@
|
|
1
|
+
<span>Seattle caption</span>
|
@@ -18,5 +18,11 @@ class CaptionTemplateForm < ApplicationForm
|
|
18
18
|
age_radios.radio_button(value: "young", label: "10-15")
|
19
19
|
age_radios.radio_button(value: "middle_aged", label: "16-21")
|
20
20
|
end
|
21
|
+
|
22
|
+
name_form.check_box_group(name: "places", label: "Cool places") do |check_group|
|
23
|
+
check_group.check_box(value: "lopez", label: "Lopez Island")
|
24
|
+
check_group.check_box(value: "bellevue", label: "Bellevue")
|
25
|
+
check_group.check_box(value: "seattle", label: "Seattle")
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# :nodoc:
|
4
4
|
class CheckBoxGroupForm < ApplicationForm
|
5
5
|
form do |check_form|
|
6
|
-
check_form.check_box_group(label: "I like to eat, eat, eat:") do |check_group|
|
6
|
+
check_form.check_box_group(label: "I like to eat, eat, eat:", caption: "Nom nom nom") do |check_group|
|
7
7
|
check_group.check_box(
|
8
8
|
name: "long_a",
|
9
9
|
label: "Ey-ples and ba-naynays",
|
@@ -3,7 +3,11 @@
|
|
3
3
|
# :nodoc:
|
4
4
|
class RadioButtonGroupForm < ApplicationForm
|
5
5
|
form do |radio_form|
|
6
|
-
radio_form.radio_button_group(
|
6
|
+
radio_form.radio_button_group(
|
7
|
+
name: "channel",
|
8
|
+
label: "How did you hear about us?",
|
9
|
+
caption: "We love our listeners"
|
10
|
+
) do |radio_group|
|
7
11
|
radio_group.radio_button(value: "online", label: "Online advertisement", caption: "Facebook maybe?")
|
8
12
|
radio_group.radio_button(value: "radio", label: "Radio advertisement", caption: "We love us some NPR")
|
9
13
|
radio_group.radio_button(value: "friend", label: "From a friend", caption: "Wow, what a good person")
|
@@ -4,7 +4,7 @@ module Primer
|
|
4
4
|
# :nodoc:
|
5
5
|
module AttributesHelper
|
6
6
|
PLURAL_ARIA_ATTRIBUTES = %i[describedby labelledby].freeze
|
7
|
-
PLURAL_DATA_ATTRIBUTES = %i[target targets].freeze
|
7
|
+
PLURAL_DATA_ATTRIBUTES = %i[target targets action].freeze
|
8
8
|
|
9
9
|
def aria(val, system_arguments)
|
10
10
|
system_arguments[:"aria-#{val}"] || system_arguments.dig(:aria, val.to_sym)
|
@@ -61,14 +61,6 @@ module Primer
|
|
61
61
|
self.class.compile! unless self.class.instance_methods(false).include?(:render_template)
|
62
62
|
render_template
|
63
63
|
end
|
64
|
-
|
65
|
-
def content_tag_if(condition, tag, **kwargs, &block)
|
66
|
-
if condition
|
67
|
-
content_tag(tag, **kwargs, &block)
|
68
|
-
else
|
69
|
-
capture(&block)
|
70
|
-
end
|
71
|
-
end
|
72
64
|
end
|
73
65
|
end
|
74
66
|
end
|
@@ -54,11 +54,14 @@ module Primer
|
|
54
54
|
private
|
55
55
|
|
56
56
|
def tag_attributes
|
57
|
+
attrs = { name: @input.name }
|
58
|
+
attrs[:value] = @input.value if @input.value
|
59
|
+
|
57
60
|
case @type
|
58
61
|
when :submit
|
59
|
-
ButtonAttributeGenerator.submit_tag_attributes(@input.label,
|
62
|
+
ButtonAttributeGenerator.submit_tag_attributes(@input.label, **attrs)
|
60
63
|
else
|
61
|
-
ButtonAttributeGenerator.button_tag_attributes(@input.label,
|
64
|
+
ButtonAttributeGenerator.button_tag_attributes(@input.label, **attrs)
|
62
65
|
end
|
63
66
|
end
|
64
67
|
end
|
@@ -5,6 +5,9 @@
|
|
5
5
|
<%= @input.label %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
8
|
+
<div class="mb-2">
|
9
|
+
<%= render(Caption.new(input: @input)) %>
|
10
|
+
</div>
|
8
11
|
<%= render(SpacingWrapper.new) do %>
|
9
12
|
<% @input.check_boxes.each do |check_box| %>
|
10
13
|
<%= render(check_box.to_component) %>
|
@@ -14,7 +17,4 @@
|
|
14
17
|
<div class="mt-2">
|
15
18
|
<%= render(ValidationMessage.new(input: @input)) %>
|
16
19
|
</div>
|
17
|
-
<div class="mt-2">
|
18
|
-
<%= render(Caption.new(input: @input)) %>
|
19
|
-
</div>
|
20
20
|
</div>
|
@@ -50,14 +50,10 @@ module Primer
|
|
50
50
|
false
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
@
|
57
|
-
:"#{name}_#{value}"
|
58
|
-
else
|
59
|
-
name.to_sym
|
60
|
-
end
|
53
|
+
def values_disambiguate_template_names?
|
54
|
+
# Check boxes submitted as an array all have the same name, so we return true here
|
55
|
+
# to ensure different caption templates can be attached to individual check box inputs.
|
56
|
+
@scheme == :array
|
61
57
|
end
|
62
58
|
end
|
63
59
|
end
|
@@ -263,6 +263,10 @@ module Primer
|
|
263
263
|
@input_arguments[:id]
|
264
264
|
end
|
265
265
|
|
266
|
+
def value
|
267
|
+
@input_arguments[:value]
|
268
|
+
end
|
269
|
+
|
266
270
|
# :nocov:
|
267
271
|
def name
|
268
272
|
raise_for_abstract_method!(__method__)
|
@@ -314,6 +318,14 @@ module Primer
|
|
314
318
|
""
|
315
319
|
end
|
316
320
|
|
321
|
+
# Whether or not the `value:` argument should be used to determine the caption template
|
322
|
+
# for a given field. This is useful in especially radio button groups where each option
|
323
|
+
# has the same name but a different value. Check box groups where the values are submitted
|
324
|
+
# as an array also use this feature, since each check box also has the same name.
|
325
|
+
def values_disambiguate_template_names?
|
326
|
+
false
|
327
|
+
end
|
328
|
+
|
317
329
|
private
|
318
330
|
|
319
331
|
def input_data
|
@@ -323,7 +335,7 @@ module Primer
|
|
323
335
|
def caption_template_name
|
324
336
|
return nil unless name
|
325
337
|
|
326
|
-
@caption_template_name ||= if respond_to?(:value)
|
338
|
+
@caption_template_name ||= if values_disambiguate_template_names? && respond_to?(:value) && value.present?
|
327
339
|
:"#{name}_#{value}"
|
328
340
|
else
|
329
341
|
name.to_sym
|
@@ -17,6 +17,11 @@ module Primer
|
|
17
17
|
@form = form
|
18
18
|
@layout = layout
|
19
19
|
@system_arguments = system_arguments
|
20
|
+
|
21
|
+
@system_arguments[:classes] = class_names(
|
22
|
+
@system_arguments.delete(:classes),
|
23
|
+
"FormControl-horizontalGroup" => horizontal?
|
24
|
+
)
|
20
25
|
end
|
21
26
|
|
22
27
|
def horizontal?
|
@@ -5,6 +5,9 @@
|
|
5
5
|
<%= @input.label %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
8
|
+
<div class="mb-2">
|
9
|
+
<%= render(Caption.new(input: @input)) %>
|
10
|
+
</div>
|
8
11
|
<%= render(SpacingWrapper.new) do %>
|
9
12
|
<% @input.radio_buttons.each do |radio_button| %>
|
10
13
|
<%= render(radio_button.to_component) %>
|
@@ -14,7 +17,4 @@
|
|
14
17
|
<div class="mt-2">
|
15
18
|
<%= render(ValidationMessage.new(input: @input)) %>
|
16
19
|
</div>
|
17
|
-
<div class="mt-2">
|
18
|
-
<%= render(Caption.new(input: @input)) %>
|
19
|
-
</div>
|
20
20
|
</div>
|
@@ -16,7 +16,7 @@ module ERBLint
|
|
16
16
|
|
17
17
|
# Allow custom pattern matching for ERB nodes
|
18
18
|
class ConfigSchema < LinterConfig
|
19
|
-
property :custom_erb_pattern, accepts: array_of?(
|
19
|
+
property :custom_erb_pattern, accepts: array_of?(String),
|
20
20
|
default: -> { [] }
|
21
21
|
end
|
22
22
|
self.config_schema = ConfigSchema
|
@@ -51,7 +51,8 @@ module ERBLint
|
|
51
51
|
if @config.custom_erb_pattern.empty?
|
52
52
|
nil
|
53
53
|
else
|
54
|
-
|
54
|
+
regexes = @config.custom_erb_pattern.map { |pattern| Regexp.new(pattern, true) }
|
55
|
+
Regexp.new(regexes.join("|"), true)
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
@@ -14,7 +14,6 @@ module Primer
|
|
14
14
|
Primer::Alpha::HellipButton => {},
|
15
15
|
Primer::Alpha::Image => {},
|
16
16
|
Primer::Alpha::OcticonSymbols => {},
|
17
|
-
Primer::Alpha::ImageCrop => { js: true },
|
18
17
|
Primer::IconButton => { js: true },
|
19
18
|
Primer::Beta::AutoComplete => { js: true },
|
20
19
|
Primer::Beta::AutoComplete::Item => {},
|