primer_view_components 0.33.0 → 0.35.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 +67 -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.css +1 -0
- data/app/components/primer/alpha/select_panel.css.json +7 -0
- data/app/components/primer/alpha/select_panel.css.map +1 -0
- data/app/components/primer/alpha/select_panel.html.erb +21 -17
- data/app/components/primer/alpha/select_panel.pcss +7 -0
- data/app/components/primer/alpha/select_panel.rb +69 -5
- data/app/components/primer/alpha/select_panel_element.js +15 -9
- data/app/components/primer/alpha/select_panel_element.ts +16 -9
- 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 +1 -1
- data/app/components/primer/beta/label.css.map +1 -1
- data/app/components/primer/beta/label.pcss +7 -4
- 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/component.rb +4 -0
- data/app/components/primer/dialog_helper.js +0 -1
- data/app/components/primer/dialog_helper.ts +0 -1
- data/app/components/primer/primer.d.ts +3 -4
- data/app/components/primer/primer.js +3 -4
- data/app/components/primer/primer.pcss +6 -3
- 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/primer_text_field.js +1 -0
- data/{lib → app/lib}/primer/forms/primer_text_field.ts +1 -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 +1 -1
- data/lib/primer/yard/component_manifest.rb +0 -1
- data/lib/rubocop/cop/primer/primer_octicon.rb +1 -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/list_of_links.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/local_fetch.html.erb +2 -1
- 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 +47 -9
- 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/static/arguments.json +112 -30
- data/static/audited_at.json +2 -1
- data/static/classes.json +12 -0
- data/static/constants.json +155 -8
- data/static/info_arch.json +248 -98
- data/static/previews.json +107 -47
- data/static/statuses.json +2 -1
- metadata +138 -117
- 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/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/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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["layout.pcss"],"names":[],"mappings":"AAgFA,QACE,YAAa,CAEb,4BAA6B,CAC7B,
|
1
|
+
{"version":3,"sources":["layout.pcss"],"names":[],"mappings":"AAgFA,QACE,YAAa,CAEb,4BAA6B,CAC7B,oBAgJF,CA9IE,wCANF,QA7EE,kBAAmB,CACnB,mCAgOF,CA9NE,qEAIE,uBAAyB,CADzB,oBAEF,CAGE,8DACE,UACF,CAQA,uHACE,iBACF,CAEA,yDACE,UACF,CAIA,6DACE,YACF,CAGF,wBAoBA,iBAJA,CAMA,wCAEE,UAAW,CADX,UAeF,CAZE,4EACE,YACF,CAEA,6EAGE,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCAAuC,CALvC,UAAW,CACX,cAKF,CA7BE,iHACE,iBACF,CAEA,yEACE,UACF,CAmCJ,CAGE,wCADF,iCAvFA,kBAAmB,CACnB,mCA0FA,CAxFA,gJAIE,uBAAyB,CADzB,oBAEF,CAGE,uFACE,UACF,CAQA,yKACE,iBACF,CAEA,kFACE,UACF,CAIA,sFACE,YACF,CAGF,iDAoBA,iBAJA,CAMA,iEAEE,UAAW,CADX,UAeF,CAZE,qGACE,YACF,CAEA,sGAGE,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCAAuC,CALvC,UAAW,CACX,cAKF,CA7BE,mKACE,iBACF,CAEA,kGACE,UACF,CAwCF,CAIA,yCADF,iCA7FA,kBAAmB,CACnB,mCAgGA,CA9FA,gJAIE,uBAAyB,CADzB,oBAEF,CAGE,uFACE,UACF,CAQA,yKACE,iBACF,CAEA,kFACE,UACF,CAIA,sFACE,YACF,CAGF,iDAoBA,iBAJA,CAMA,iEAEE,UAAW,CADX,UAeF,CAZE,qGACE,YACF,CAEA,sGAGE,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCAAuC,CALvC,UAAW,CACX,cAKF,CA7BE,mKACE,iBACF,CAEA,kGACE,UACF,CA8CF,CAnBJ,QAwBE,qBAAsB,CACtB,sGAAwG,CACxG,6BA0HF,CAxHE,wBACE,aACF,CAEA,wBACE,YACF,CAEA,qBACE,oBACF,CAIA,0BA1CF,QA2CI,oBAyGJ,CAxGE,CAEA,4BACE,mBACF,CAEA,iCACE,oBACF,CAGE,0BADF,gCAEI,oBAMJ,CALE,CAEA,0BALF,gCAMI,oBAEJ,CADE,CAIF,yBAjEF,QAkEI,4BAkFJ,CAjFE,CAEA,yBArEF,QAsEI,4BA8EJ,CA7EE,CAEA,0BAzEF,QA0EI,4BA0EJ,CAzEE,CAGE,yBADF,+BAEI,4BAMJ,CALE,CAEA,0BALF,+BAMI,4BAEJ,CAEA,6BAEI,4BAMJ,CAXE,CAQA,0BALF,6BAMI,4BAEJ,CADE,CAMA,sDACE,aACF,CAEA,mDACE,oBACF,CAGF,oCACE,sGASF,CAPE,iDACE,aACF,CAEA,oDACE,oBACF,CAMA,wCAOE,qCAAsC,CANtC,aAAc,CACd,aAAc,CAGd,iBAAkB,CAFlB,SAKF,CAOE,yGACE,oBACF,CAEA,iEACE,aACF,CAKN,gBACE,YAAa,CACb,SACF,CAEA,gBACE,iCACF,CAEA,aACE,WA4BF,CAxBE,kHAIE,gBAAiB,CADjB,iBAQF,CALE,+YAGE,aACF,CAGF,sCACE,6FACF,CAEA,sCACE,4FACF,CAEA,sCACE,6FACF","file":"layout.css","sourcesContent":["/* Layout */\n\n@define-mixin flow-as-row {\n grid-auto-flow: row;\n grid-template-columns: 1fr !important;\n\n & .Layout-sidebar,\n & .Layout-divider,\n & .Layout-main {\n width: 100% !important;\n grid-column: 1 !important;\n }\n\n &.Layout--sidebarPosition-flowRow-start {\n & .Layout-sidebar {\n grid-row: 1;\n }\n\n & .Layout-main {\n grid-row: 2 / span 2;\n }\n }\n\n &.Layout--sidebarPosition-flowRow-end {\n & .Layout-sidebar {\n grid-row: 2 / span 2;\n }\n\n & .Layout-main {\n grid-row: 1;\n }\n }\n\n &.Layout--sidebarPosition-flowRow-none {\n & .Layout-sidebar {\n display: none;\n }\n }\n\n &.Layout--divided {\n @mixin flow-as-row-divider;\n\n & .Layout-main {\n grid-row: 3 / span 1;\n }\n\n &.Layout--sidebarPosition-flowRow-end {\n & .Layout-sidebar {\n grid-row: 3 / span 1;\n }\n\n & .Layout-main {\n grid-row: 1;\n }\n }\n }\n}\n\n@define-mixin flow-as-row-divider {\n --Layout-gutter: 0;\n\n & .Layout-divider {\n height: 1px;\n grid-row: 2;\n\n &.Layout-divider--flowRow-hidden {\n display: none;\n }\n\n &.Layout-divider--flowRow-shallow {\n height: 8px;\n margin-right: 0;\n background: var(--bgColor-inset);\n border-color: var(--borderColor-default);\n border-style: solid;\n border-width: var(--borderWidth-thin) 0;\n }\n }\n}\n\n.Layout {\n display: grid;\n\n --Layout-sidebar-width: 220px;\n --Layout-gutter: 16px;\n\n @media (max-width: calc(544px - 0.02px)) {\n @mixin flow-as-row;\n }\n\n &.Layout--flowRow-until-md {\n @media (max-width: calc(768px - 0.02px)) {\n @mixin flow-as-row;\n }\n }\n\n &.Layout--flowRow-until-lg {\n @media (max-width: calc(1012px - 0.02px)) {\n @mixin flow-as-row;\n }\n }\n\n /* Flow as column */\n\n grid-auto-flow: column;\n grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); /* sidebar column, separator, main column */\n grid-gap: var(--Layout-gutter);\n\n & .Layout-sidebar {\n grid-column: 1;\n }\n\n & .Layout-divider {\n display: none;\n }\n\n & .Layout-main {\n grid-column: 2 / span 2;\n }\n\n /* Gutter spacing */\n\n @media (min-width: 1012px) {\n --Layout-gutter: 24px;\n }\n\n &.Layout--gutter-none {\n --Layout-gutter: 0px;\n }\n\n &.Layout--gutter-condensed {\n --Layout-gutter: 16px;\n }\n\n &.Layout--gutter-spacious {\n @media (min-width: 1012px) {\n --Layout-gutter: 32px;\n }\n\n @media (min-width: 1280px) {\n --Layout-gutter: 40px;\n }\n }\n\n /* Sidebar width */\n @media (min-width: 544px) {\n --Layout-sidebar-width: 220px;\n }\n\n @media (min-width: 768px) {\n --Layout-sidebar-width: 256px;\n }\n\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 296px;\n }\n\n &.Layout--sidebar-narrow {\n @media (min-width: 768px) {\n --Layout-sidebar-width: 240px;\n }\n\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 256px;\n }\n }\n\n &.Layout--sidebar-wide {\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 320px;\n }\n\n @media (min-width: 1280px) {\n --Layout-sidebar-width: 336px;\n }\n }\n\n /* Sidebar position */\n\n &.Layout--sidebarPosition-start {\n & .Layout-sidebar {\n grid-column: 1;\n }\n\n & .Layout-main {\n grid-column: 2 / span 2;\n }\n }\n\n &.Layout--sidebarPosition-end {\n grid-template-columns: minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto;\n\n & .Layout-main {\n grid-column: 1;\n }\n\n & .Layout-sidebar {\n grid-column: 2 / span 2;\n }\n }\n\n /* Sidebar divider */\n\n &.Layout--divided {\n & .Layout-divider {\n display: block;\n grid-column: 2;\n width: 1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: -1px;\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-default);\n }\n\n & .Layout-main {\n grid-column: 3 / span 1;\n }\n\n &.Layout--sidebarPosition-end {\n & .Layout-sidebar {\n grid-column: 3 / span 1;\n }\n\n & .Layout-main {\n grid-column: 1;\n }\n }\n }\n}\n\n.Layout-divider {\n display: none;\n width: 1px;\n}\n\n.Layout-sidebar {\n width: var(--Layout-sidebar-width);\n}\n\n.Layout-main {\n min-width: 0;\n\n /* Centered main column\n ** FIXME: right-aligned sidebar */\n & .Layout-main-centered-md,\n & .Layout-main-centered-lg,\n & .Layout-main-centered-xl {\n margin-right: auto;\n margin-left: auto;\n\n & > .container-md,\n & > .container-lg,\n & > .container-xl {\n margin-left: 0;\n }\n }\n\n & .Layout-main-centered-md {\n max-width: calc(var(--breakpoint-medium) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n\n & .Layout-main-centered-lg {\n max-width: calc(var(--breakpoint-large) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n\n & .Layout-main-centered-xl {\n max-width: calc(var(--breakpoint-xlarge) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n}\n"]}
|
@@ -125,8 +125,7 @@
|
|
125
125
|
}
|
126
126
|
|
127
127
|
&.Layout--gutter-none {
|
128
|
-
|
129
|
-
--Layout-gutter: 0px; /* Neds px in value */
|
128
|
+
--Layout-gutter: 0px;
|
130
129
|
}
|
131
130
|
|
132
131
|
&.Layout--gutter-condensed {
|
@@ -207,7 +206,9 @@
|
|
207
206
|
display: block;
|
208
207
|
grid-column: 2;
|
209
208
|
width: 1px;
|
209
|
+
/* stylelint-disable-next-line primer/spacing */
|
210
210
|
margin-right: -1px;
|
211
|
+
/* stylelint-disable-next-line primer/colors */
|
211
212
|
background: var(--borderColor-default);
|
212
213
|
}
|
213
214
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["menu.pcss"],"names":[],"mappings":"AAIA,
|
1
|
+
{"version":3,"sources":["menu.pcss"],"names":[],"mappings":"AAIA,MAIE,uCAAwC,CACxC,+DAAgE,CAChE,wCAAyC,CAHzC,eAAgB,CADhB,qCAKF,CAEA,WAME,sEAAuE,CADvE,4BAA6B,CAH7B,aAAc,CAEd,kGAAmG,CAHnG,iBAoFF,CA7EE,uBACE,YAAa,CAEb,kDAKF,CAHE,qDAHA,iDAKA,CAGF,sBACE,eAAgB,CAChB,qDAMF,CAHE,mDAFA,oDAIA,CAGF,iBAEE,6CAA8C,CAD9C,4BAAqB,CAArB,oBAEF,CAEA,kBACE,qCACF,CAEA,sGAIE,2CAA4C,CAD5C,cAaF,CAVE,kHAQE,uDAAwD,CALxD,QAAS,CAGT,UAAW,CAFX,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAGN,SAIF,CAGF,oBAIE,0BAA2B,CAD3B,sCAAuC,CAEvC,iBAAkB,CAJlB,UAKF,CAEA,oBACE,WAAY,CAEZ,oCACF,CAEA,yBAEE,8BAA+B,CAD/B,WAEF,CAEA,mBACE,UAAW,CAEX,qCACF,CAGE,0BACE,2BACF,CAIJ,cASE,sEAAuE,CADvE,4BAA6B,CAP7B,aAAc,CAKd,iBAAkB,CAClB,4CAA6C,CAF7C,eAAgB,CADhB,YAAa,CADb,kGAsBF,CAdE,oBACE,4BAAqB,CAArB,oBACF,CAEA,0BACE,iDAAkD,CAClD,kDACF,CAEA,yBACE,eAAgB,CAEhB,oDAAqD,CADrD,qDAEF","file":"menu.css","sourcesContent":["/* menu */\n\n/* A menu on the side of a page, defaults to left side. e.g. github.com/about */\n\n.menu {\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: var(--stack-gap-normal);\n list-style: none;\n background-color: var(--bgColor-default);\n border: var(--borderWidth-thin) solid var(--borderColor-default);\n border-radius: var(--borderRadius-medium);\n}\n\n.menu-item {\n position: relative;\n display: block;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);\n color: var(--fgColor-default);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);\n\n &:first-child {\n border-top: 0;\n border-top-left-radius: var(--borderRadius-medium);\n border-top-right-radius: var(--borderRadius-medium);\n\n &::before {\n border-top-left-radius: var(--borderRadius-medium);\n }\n }\n\n &:last-child {\n border-bottom: 0;\n border-bottom-right-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n\n &::before {\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n }\n\n &:hover {\n text-decoration: none;\n background-color: var(--bgColor-neutral-muted);\n }\n\n &:active {\n background-color: var(--bgColor-muted);\n }\n\n &.selected,\n &[aria-selected='true'],\n &[aria-current]:not([aria-current='false']) {\n cursor: default;\n background-color: var(--menu-bgColor-active);\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 2px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active);\n }\n }\n\n & .octicon {\n width: 16px;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: var(--control-medium-gap);\n color: var(--fgColor-muted);\n text-align: center;\n }\n\n & .Counter {\n float: right;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: var(--control-small-gap);\n }\n\n & .menu-warning {\n float: right;\n color: var(--fgColor-attention);\n }\n\n & .avatar {\n float: left;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: var(--control-small-gap);\n }\n\n &.alert {\n & .Counter {\n color: var(--fgColor-danger);\n }\n }\n}\n\n.menu-heading {\n display: block;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);\n margin-top: 0;\n margin-bottom: 0;\n font-size: inherit;\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);\n\n &:hover {\n text-decoration: none;\n }\n\n &:first-child {\n border-top-left-radius: var(--borderRadius-medium);\n border-top-right-radius: var(--borderRadius-medium);\n }\n\n &:last-child {\n border-bottom: 0;\n border-bottom-right-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n}\n"]}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
/* A menu on the side of a page, defaults to left side. e.g. github.com/about */
|
4
4
|
|
5
5
|
.menu {
|
6
|
+
/* stylelint-disable-next-line primer/spacing */
|
6
7
|
margin-bottom: var(--stack-gap-normal);
|
7
8
|
list-style: none;
|
8
9
|
background-color: var(--bgColor-default);
|
@@ -13,6 +14,7 @@
|
|
13
14
|
.menu-item {
|
14
15
|
position: relative;
|
15
16
|
display: block;
|
17
|
+
/* stylelint-disable-next-line primer/spacing */
|
16
18
|
padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);
|
17
19
|
color: var(--fgColor-default);
|
18
20
|
border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);
|
@@ -59,12 +61,14 @@
|
|
59
61
|
left: 0;
|
60
62
|
width: 2px;
|
61
63
|
content: '';
|
64
|
+
/* stylelint-disable-next-line primer/colors */
|
62
65
|
background-color: var(--underlineNav-borderColor-active);
|
63
66
|
}
|
64
67
|
}
|
65
68
|
|
66
69
|
& .octicon {
|
67
70
|
width: 16px;
|
71
|
+
/* stylelint-disable-next-line primer/spacing */
|
68
72
|
margin-right: var(--control-medium-gap);
|
69
73
|
color: var(--fgColor-muted);
|
70
74
|
text-align: center;
|
@@ -72,6 +76,7 @@
|
|
72
76
|
|
73
77
|
& .Counter {
|
74
78
|
float: right;
|
79
|
+
/* stylelint-disable-next-line primer/spacing */
|
75
80
|
margin-left: var(--control-small-gap);
|
76
81
|
}
|
77
82
|
|
@@ -82,6 +87,7 @@
|
|
82
87
|
|
83
88
|
& .avatar {
|
84
89
|
float: left;
|
90
|
+
/* stylelint-disable-next-line primer/spacing */
|
85
91
|
margin-right: var(--control-small-gap);
|
86
92
|
}
|
87
93
|
|
@@ -94,6 +100,7 @@
|
|
94
100
|
|
95
101
|
.menu-heading {
|
96
102
|
display: block;
|
103
|
+
/* stylelint-disable-next-line primer/spacing */
|
97
104
|
padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);
|
98
105
|
margin-top: 0;
|
99
106
|
margin-bottom: 0;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["overlay.pcss"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["overlay.pcss"],"names":[],"mappings":"AACA,2BAKE,cAAe,CAHf,eAAgB,CAEhB,gBAAiB,CADjB,SAAU,CAFV,iBAKF,CAEA,gCACE,eACF,CAEA,qCACE,YACF,CAEA,0DACE,2EACF,CAEA,8BACE,eACF,CAEA,8BACE,SACE,uBACF,CACF","file":"overlay.css","sourcesContent":["/* stylelint-disable selector-max-type, selector-no-qualifying-type */\nanchored-position[popover] {\n position: absolute;\n min-width: 192px;\n padding: 0;\n overflow: visible;\n border-width: 0;\n}\n\nanchored-position:not(.Overlay) {\n background: none;\n}\n\n.Overlay[popover]:not(:popover-open) {\n display: none\n}\n\nanchored-position.not-anchored::backdrop, dialog::backdrop {\n background-color: var(--overlay-backdrop-bgColor, var(--color-neutral-muted));\n}\n\nselect-panel dialog::backdrop {\n background: none;\n}\n\n@media (forced-colors: active) {\n .Overlay {\n outline: solid 1px transparent;\n }\n}\n"]}
|
@@ -1,16 +1,16 @@
|
|
1
|
+
/* stylelint-disable selector-max-type, selector-no-qualifying-type */
|
1
2
|
anchored-position[popover] {
|
2
|
-
border-width: 0;
|
3
|
-
padding: 0;
|
4
3
|
position: absolute;
|
5
4
|
min-width: 192px;
|
5
|
+
padding: 0;
|
6
6
|
overflow: visible;
|
7
|
+
border-width: 0;
|
7
8
|
}
|
8
9
|
|
9
10
|
anchored-position:not(.Overlay) {
|
10
11
|
background: none;
|
11
12
|
}
|
12
13
|
|
13
|
-
/* stylelint-disable-next-line selector-pseudo-class-no-unknown */
|
14
14
|
.Overlay[popover]:not(:popover-open) {
|
15
15
|
display: none
|
16
16
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["segmented_control.pcss"],"names":[],"mappings":"AAEA,kBACE,iEAAkE,CAClE,uBAAwB,CAIxB,mFAAqF,CACrF,uDAA+D,CAC/D,wCAAyC,CAJzC,mBAAoB,CACpB,eAIF,CAGE,yHAGE,0BAA4B,CAD5B,UAEF,CAKF,yBACE,
|
1
|
+
{"version":3,"sources":["segmented_control.pcss"],"names":[],"mappings":"AAEA,kBACE,iEAAkE,CAClE,uBAAwB,CAIxB,mFAAqF,CACrF,uDAA+D,CAC/D,wCAAyC,CAJzC,mBAAoB,CACpB,eAIF,CAGE,yHAGE,0BAA4B,CAD5B,UAEF,CAKF,yBACE,kEAgBF,CAdE,gDACE,gCAMF,CAJE,6DAEE,sGACF,CAIA,2EACE,+BACF,CAKF,iDACE,iCACF,CAGE,4EACE,gCACF,CAMJ,uBAME,0CAAiD,CACjD,wCAAyC,CALzC,mBAAoB,CACpB,iCAAkC,CAKlC,sBAAuB,CAHvB,4CAA6C,CAJ7C,iBAmGF,CAxFI,oEACE,iGACF,CAEA,qEACE,mGACF,CAIF,uDACE,yFAA2F,CAC3F,sGAiBF,CAfE,+DACE,4CAKF,CAHE,0EACE,wBACF,CAGF,8DACE,4BACF,CAEA,qFACE,kBACF,CAIF,0DAKE,0BAA2B,CAJ3B,aAAc,CAEd,4CAA6C,CAD7C,QAAS,CAET,iBAEF,CAIE,gDAQE,oEAAqE,CADrE,UAAW,CALX,gBAAiB,CAIjB,gDAAiD,CAFjD,6CAA8C,CAH9C,iBAQF,CAIF,+BAKE,QAAS,CAET,uFAA0F,CAH1F,0CAA2C,CAD3C,WAAY,CADZ,0BAAsB,CAAtB,qBAAsB,CAOtB,sGAAuG,CARvG,UAeF,CALE,kDAEE,uFAA0F,CAC1F,mFACF,CAGF,oFACE,wCACF,CAEA,uCAEE,kBAAmB,CADnB,aAEF,CAGA,qCACE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAIF,6BACE,YAMF,CAJE,oDACE,MAAO,CACP,sBACF","file":"segmented_control.css","sourcesContent":["/* SegmentedControl */\n\n.SegmentedControl {\n --segmentedControl-item-padding: var(--control-small-paddingBlock);\n --overlay-offset: 0.5rem;\n\n display: inline-flex;\n list-style: none;\n background-color: var(--controlTrack-bgColor-rest, var(--color-segmented-control-bg));\n border-color: var(--controlTrack-borderColor-rest, transparent);\n border-radius: var(--borderRadius-medium);\n}\n\n.SegmentedControl--iconOnly {\n & .Button--iconOnly.Button--small,\n & .Button--iconOnly.Button--medium {\n width: 100%;\n padding-inline: 0 !important;\n }\n}\n\n/* sizes */\n\n.SegmentedControl--small {\n --segmentedControl-item-padding: var(--control-xsmall-paddingBlock);\n\n & .SegmentedControl-item {\n height: var(--control-small-size);\n\n & .Button {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: calc(var(--control-xsmall-paddingInline-normal) - var(--segmentedControl-item-padding));\n }\n }\n\n &.SegmentedControl--iconOnly {\n & .SegmentedControl-item {\n width: var(--control-small-size);\n }\n }\n}\n\n.SegmentedControl--medium {\n & .SegmentedControl-item {\n height: var(--control-medium-size);\n }\n\n &.SegmentedControl--iconOnly {\n & .SegmentedControl-item {\n width: var(--control-medium-size);\n }\n }\n}\n\n/* item */\n\n.SegmentedControl-item {\n position: relative;\n display: inline-flex;\n height: var(--control-medium-size);\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--segmentedControl-item-padding);\n border: var(--borderWidth-thin) solid transparent;\n border-radius: var(--borderRadius-medium);\n justify-content: center;\n\n /* button color overrides */\n & .Button--invisible {\n &:hover:not(:disabled) {\n background-color: var(--controlTrack-bgColor-hover, var(--color-action-list-item-default-hover-bg));\n }\n\n &:active:not(:disabled) {\n background-color: var(--controlTrack-bgColor-active, var(--color-action-list-item-default-active-bg));\n }\n }\n\n /* Selected ---------------------------------------- */\n &.SegmentedControl-item--selected {\n background-color: var(--controlKnob-bgColor-rest, var(--color-segmented-control-button-bg));\n border-color: var(--controlKnob-borderColor-rest, var(--color-segmented-control-button-selected-border));\n\n & .Button {\n font-weight: var(--base-text-weight-semibold);\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &::before {\n border-color: transparent !important;\n }\n\n & + .SegmentedControl-item::before {\n border-color: transparent;\n }\n }\n\n /* renders a visibly hidden \"copy\" of the text in bold, reserving box space for when text becomes bold on selected */\n & .Button-label[data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold);\n visibility: hidden;\n content: attr(data-content);\n }\n\n /* Separator lines */\n &:not(:first-child) {\n &::before {\n position: absolute;\n inset: 0 0 0 -1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: var(--control-medium-paddingBlock);\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: var(--control-medium-paddingBlock);\n content: '';\n border-left: var(--borderWidth-thin) solid var(--borderColor-default);\n }\n }\n\n /* Button ----------------------------------------- */\n & .Button {\n width: 100%;\n min-width: fit-content;\n height: 100%;\n font-weight: var(--base-text-weight-normal);\n border: 0;\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));\n\n &:focus-visible {\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 1);\n outline-offset: calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin));\n }\n }\n\n & .Button--invisible.Button--invisible-noVisuals .Button-label {\n color: var(--button-default-fgColor-rest);\n }\n\n & .Button-content {\n flex: 1 1 auto;\n align-self: stretch;\n }\n\n /* use ellipsis with the assumption that icon only variant will be used when not enough space is available */\n & .Button-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n\n/* fullWidth */\n.SegmentedControl--fullWidth {\n display: flex;\n\n & .SegmentedControl-item {\n flex: 1;\n justify-content: center;\n }\n}\n"]}
|
@@ -28,6 +28,7 @@
|
|
28
28
|
height: var(--control-small-size);
|
29
29
|
|
30
30
|
& .Button {
|
31
|
+
/* stylelint-disable-next-line primer/spacing */
|
31
32
|
padding-inline: calc(var(--control-xsmall-paddingInline-normal) - var(--segmentedControl-item-padding));
|
32
33
|
}
|
33
34
|
}
|
@@ -56,11 +57,12 @@
|
|
56
57
|
.SegmentedControl-item {
|
57
58
|
position: relative;
|
58
59
|
display: inline-flex;
|
59
|
-
justify-content: center;
|
60
|
-
border: var(--borderWidth-thin) solid transparent;
|
61
|
-
border-radius: var(--borderRadius-medium);
|
62
60
|
height: var(--control-medium-size);
|
61
|
+
/* stylelint-disable-next-line primer/spacing */
|
63
62
|
padding: var(--segmentedControl-item-padding);
|
63
|
+
border: var(--borderWidth-thin) solid transparent;
|
64
|
+
border-radius: var(--borderRadius-medium);
|
65
|
+
justify-content: center;
|
64
66
|
|
65
67
|
/* button color overrides */
|
66
68
|
& .Button--invisible {
|
@@ -109,7 +111,9 @@
|
|
109
111
|
&::before {
|
110
112
|
position: absolute;
|
111
113
|
inset: 0 0 0 -1px;
|
114
|
+
/* stylelint-disable-next-line primer/spacing */
|
112
115
|
margin-top: var(--control-medium-paddingBlock);
|
116
|
+
/* stylelint-disable-next-line primer/spacing */
|
113
117
|
margin-bottom: var(--control-medium-paddingBlock);
|
114
118
|
content: '';
|
115
119
|
border-left: var(--borderWidth-thin) solid var(--borderColor-default);
|
@@ -118,17 +122,20 @@
|
|
118
122
|
|
119
123
|
/* Button ----------------------------------------- */
|
120
124
|
& .Button {
|
121
|
-
height: 100%;
|
122
125
|
width: 100%;
|
123
|
-
|
126
|
+
min-width: fit-content;
|
127
|
+
height: 100%;
|
124
128
|
font-weight: var(--base-text-weight-normal);
|
129
|
+
border: 0;
|
130
|
+
/* stylelint-disable-next-line primer/borders */
|
125
131
|
border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 2);
|
132
|
+
/* stylelint-disable-next-line primer/spacing */
|
126
133
|
padding-inline: calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));
|
127
|
-
min-width: fit-content;
|
128
134
|
|
129
135
|
&:focus-visible {
|
130
|
-
|
136
|
+
/* stylelint-disable-next-line primer/borders */
|
131
137
|
border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 1);
|
138
|
+
outline-offset: calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin));
|
132
139
|
}
|
133
140
|
}
|
134
141
|
|
@@ -143,9 +150,9 @@
|
|
143
150
|
|
144
151
|
/* use ellipsis with the assumption that icon only variant will be used when not enough space is available */
|
145
152
|
& .Button-label {
|
146
|
-
white-space: nowrap;
|
147
153
|
overflow: hidden;
|
148
154
|
text-overflow: ellipsis;
|
155
|
+
white-space: nowrap;
|
149
156
|
}
|
150
157
|
}
|
151
158
|
|
@@ -0,0 +1 @@
|
|
1
|
+
.SelectPanel-emptyPanel,.SelectPanel-loadingPanel{min-height:min(var(--overlay-height) - 10rem,100vh - 2rem)}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["select_panel.pcss"],"names":[],"mappings":"AAIA,kDACE,0DACF","file":"select_panel.css","sourcesContent":[".SelectPanel-loadingPanel {\n min-height: min(var(--overlay-height) - 10rem, 100vh - 2rem);\n}\n\n.SelectPanel-emptyPanel {\n min-height: min(var(--overlay-height) - 10rem, 100vh - 2rem);\n}\n"]}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<dialog-helper>
|
3
3
|
<%= show_button %>
|
4
4
|
<%= render(@dialog) do %>
|
5
|
-
<%= render Primer::Alpha::Dialog::Header.new(id: "#{@panel_id}-dialog", title: @title) do |header| %>
|
5
|
+
<%= render Primer::Alpha::Dialog::Header.new(id: "#{@panel_id}-dialog", title: @title, show_divider: show_filter?) do |header| %>
|
6
6
|
<% if subtitle? %>
|
7
7
|
<% header.with_subtitle do %>
|
8
8
|
<%= subtitle %>
|
@@ -10,6 +10,15 @@
|
|
10
10
|
<% end %>
|
11
11
|
<% if show_filter? %>
|
12
12
|
<% header.with_filter do %>
|
13
|
+
<div data-target="select-panel.bannerErrorElement" hidden>
|
14
|
+
<%= render Primer::Alpha::Banner.new(scheme: @banner_scheme, mb: 2) do %>
|
15
|
+
<% if error_content? %>
|
16
|
+
<%= error_content %>
|
17
|
+
<% else %>
|
18
|
+
<h2 class="f6 text-normal">Sorry, something went wrong.</h2>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
13
22
|
<%= render(Primer::BaseComponent.new(
|
14
23
|
tag: :"remote-input",
|
15
24
|
aria: { owns: @body_id },
|
@@ -36,16 +45,7 @@
|
|
36
45
|
<% end %>
|
37
46
|
<% end %>
|
38
47
|
<% end %>
|
39
|
-
|
40
|
-
<%= render Primer::Alpha::Banner.new(scheme: :danger, full: true, mt: 2) do %>
|
41
|
-
<% if error_content? %>
|
42
|
-
<%= error_content %>
|
43
|
-
<% else %>
|
44
|
-
<h2 class="f5">Sorry, something went wrong.</h2>
|
45
|
-
<% end %>
|
46
|
-
<% end %>
|
47
|
-
</div>
|
48
|
-
<%= render Primer::Alpha::Dialog::Body.new(mt: 2, p: 0) do %>
|
48
|
+
<%= render Primer::Alpha::Dialog::Body.new(mt: show_filter? ? 0 : 2, p: 0) do %>
|
49
49
|
<focus-group direction="vertical" mnemonics retain>
|
50
50
|
<div class="sr-only" aria-live="polite" aria-atomic="true" data-target="select-panel.ariaLiveContainer"></div>
|
51
51
|
<%= render(Primer::BaseComponent.new(
|
@@ -65,12 +65,16 @@
|
|
65
65
|
mb: 2,
|
66
66
|
aria: { disabled: true, busy: true },
|
67
67
|
display: :flex,
|
68
|
-
align_items: :
|
68
|
+
align_items: :flex_start,
|
69
69
|
justify_content: :center,
|
70
|
-
text_align: :center
|
70
|
+
text_align: :center,
|
71
|
+
classes: "SelectPanel-loadingPanel"
|
71
72
|
)) do %>
|
72
|
-
<div data-hide-on-error>
|
73
|
-
<%= render Primer::Beta::Spinner.new(aria: { label:
|
73
|
+
<div data-hide-on-error class="pt-2">
|
74
|
+
<%= render Primer::Beta::Spinner.new(aria: { label: @loading_label, describedby: @loading_description_id }, data: { target: "select-panel.bodySpinner" }) %>
|
75
|
+
<% if @loading_description.present? %>
|
76
|
+
<div id="<%= @loading_description_id %>" aria-hidden="true"><%= @loading_description %></div>
|
77
|
+
<% end %>
|
74
78
|
</div>
|
75
79
|
<div data-show-on-error hidden data-target="select-panel.fragmentErrorElement">
|
76
80
|
<% if preload_error_content? %>
|
@@ -78,7 +82,7 @@
|
|
78
82
|
<% else %>
|
79
83
|
<div class="pt-2 pb-2">
|
80
84
|
<%= render Primer::Beta::Octicon.new(icon: :alert, color: :danger) %>
|
81
|
-
<h2 class="f5">Sorry, something went wrong.</h2>
|
85
|
+
<h2 class="f5 mt-2">Sorry, something went wrong.</h2>
|
82
86
|
</div>
|
83
87
|
<% end %>
|
84
88
|
</div>
|
@@ -88,7 +92,7 @@
|
|
88
92
|
<%= render(@list) %>
|
89
93
|
<% end %>
|
90
94
|
</div>
|
91
|
-
<div data-target="select-panel.noResults" class="color-border-muted text-center" hidden>
|
95
|
+
<div data-target="select-panel.noResults" class="pt-2 color-border-muted text-center d-flex flex-items-start flex-justify-center SelectPanel-emptyPanel" hidden>
|
92
96
|
<h2 class="v-align-middle m-3 f5"><%= @no_results_label %></h2>
|
93
97
|
</div>
|
94
98
|
<% end %>
|
@@ -250,19 +250,48 @@ module Primer
|
|
250
250
|
# )
|
251
251
|
# ```
|
252
252
|
class SelectPanel < Primer::Component
|
253
|
+
# @private
|
254
|
+
module Utils
|
255
|
+
def raise_if_role_given!(**system_arguments)
|
256
|
+
return if shouldnt_raise_error?
|
257
|
+
return unless system_arguments.include?(:role)
|
258
|
+
|
259
|
+
raise(
|
260
|
+
"Please avoid passing the `role:` argument to `SelectPanel` and its subcomponents. "\
|
261
|
+
"The component will automatically apply the correct roles where necessary."
|
262
|
+
)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
include Utils
|
267
|
+
|
253
268
|
# The component that should be used to render the list of items in the body of a SelectPanel.
|
254
269
|
class ItemList < Primer::Alpha::ActionList
|
270
|
+
include Utils
|
271
|
+
|
255
272
|
# @param system_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::ActionList) %>.
|
256
273
|
def initialize(**system_arguments)
|
257
|
-
|
274
|
+
raise_if_role_given!(**system_arguments)
|
275
|
+
select_variant = system_arguments.delete(:select_variant) || Primer::Alpha::ActionList::DEFAULT_SELECT_VARIANT
|
258
276
|
|
259
277
|
super(
|
260
278
|
p: 2,
|
261
279
|
role: "listbox",
|
262
280
|
aria_selection_variant: select_variant == :single ? :selected : :checked,
|
281
|
+
select_variant: select_variant == :multiple ? :multiple_checkbox : :single,
|
263
282
|
**system_arguments
|
264
283
|
)
|
265
284
|
end
|
285
|
+
|
286
|
+
def with_item(**system_arguments)
|
287
|
+
raise_if_role_given!(**system_arguments)
|
288
|
+
super
|
289
|
+
end
|
290
|
+
|
291
|
+
def with_avatar_item(**system_arguments)
|
292
|
+
raise_if_role_given!(**system_arguments)
|
293
|
+
super
|
294
|
+
end
|
266
295
|
end
|
267
296
|
|
268
297
|
status :alpha
|
@@ -283,6 +312,12 @@ module Primer
|
|
283
312
|
:none,
|
284
313
|
].freeze
|
285
314
|
|
315
|
+
DEFAULT_BANNER_SCHEME = :danger
|
316
|
+
BANNER_SCHEME_OPTIONS = [
|
317
|
+
DEFAULT_BANNER_SCHEME,
|
318
|
+
:warning
|
319
|
+
].freeze
|
320
|
+
|
286
321
|
# The URL to fetch search results from.
|
287
322
|
#
|
288
323
|
# @return [String]
|
@@ -303,6 +338,11 @@ module Primer
|
|
303
338
|
# @return [Symbol]
|
304
339
|
attr_reader :select_variant
|
305
340
|
|
341
|
+
# <%= one_of(Primer::Alpha::SelectPanel::BANNER_SCHEME_OPTIONS) %>
|
342
|
+
#
|
343
|
+
# @return [Symbol]
|
344
|
+
attr_reader :banner_scheme
|
345
|
+
|
306
346
|
# <%= one_of(Primer::Alpha::SelectPanel::FETCH_STRATEGIES) %>
|
307
347
|
#
|
308
348
|
# @return [Symbol]
|
@@ -340,6 +380,9 @@ module Primer
|
|
340
380
|
# @param open_on_load [Boolean] Open the panel when the page loads.
|
341
381
|
# @param anchor_align [Symbol] The anchor alignment of the Overlay. <%= one_of(Primer::Alpha::Overlay::ANCHOR_ALIGN_OPTIONS) %>
|
342
382
|
# @param anchor_side [Symbol] The side to anchor the Overlay to. <%= one_of(Primer::Alpha::Overlay::ANCHOR_SIDE_OPTIONS) %>
|
383
|
+
# @param loading_label [String] The aria-label to use when the panel is loading, defaults to 'Loading content...'.
|
384
|
+
# @param loading_description [String] The description to use when the panel is loading. If not provided, no description will be used.
|
385
|
+
# @param banner_scheme [Symbol] The scheme for the error banner <%= one_of(Primer::Alpha::SelectPanel::BANNER_SCHEME_OPTIONS) %>
|
343
386
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
344
387
|
def initialize(
|
345
388
|
src: nil,
|
@@ -360,8 +403,13 @@ module Primer
|
|
360
403
|
open_on_load: false,
|
361
404
|
anchor_align: Primer::Alpha::Overlay::DEFAULT_ANCHOR_ALIGN,
|
362
405
|
anchor_side: Primer::Alpha::Overlay::DEFAULT_ANCHOR_SIDE,
|
406
|
+
loading_label: "Loading content...",
|
407
|
+
loading_description: nil,
|
408
|
+
banner_scheme: DEFAULT_BANNER_SCHEME,
|
363
409
|
**system_arguments
|
364
410
|
)
|
411
|
+
raise_if_role_given!(**system_arguments)
|
412
|
+
|
365
413
|
if src.present?
|
366
414
|
url = URI(src)
|
367
415
|
query = url.query || ""
|
@@ -379,6 +427,13 @@ module Primer
|
|
379
427
|
@dynamic_label = dynamic_label
|
380
428
|
@dynamic_label_prefix = dynamic_label_prefix
|
381
429
|
@dynamic_aria_label_prefix = dynamic_aria_label_prefix
|
430
|
+
@loading_label = loading_label
|
431
|
+
@loading_description_id = nil
|
432
|
+
if loading_description.present?
|
433
|
+
@loading_description_id = "#{@panel_id}-loading-description"
|
434
|
+
end
|
435
|
+
@loading_description = loading_description
|
436
|
+
@banner_scheme = fetch_or_fallback(BANNER_SCHEME_OPTIONS, banner_scheme, DEFAULT_BANNER_SCHEME)
|
382
437
|
|
383
438
|
@system_arguments = deny_tag_argument(**system_arguments)
|
384
439
|
@system_arguments[:id] = @panel_id
|
@@ -419,12 +474,21 @@ module Primer
|
|
419
474
|
form_arguments: form_arguments,
|
420
475
|
id: "#{@panel_id}-list",
|
421
476
|
select_variant: @select_variant,
|
422
|
-
role: "listbox",
|
423
|
-
aria_selection_variant: @select_variant == :multiple ? :checked : :selected,
|
424
477
|
aria: {
|
425
478
|
label: "#{title} options"
|
426
|
-
}
|
427
|
-
|
479
|
+
}
|
480
|
+
)
|
481
|
+
|
482
|
+
return if @show_filter || @fetch_strategy != :remote
|
483
|
+
return if shouldnt_raise_error?
|
484
|
+
|
485
|
+
raise(
|
486
|
+
"Hiding the filter input with a remote fetch strategy is not permitted, "\
|
487
|
+
"since such a combinaton of options will cause the component to only "\
|
488
|
+
"fetch items from the server once when the panel opens for the first time; "\
|
489
|
+
"this is what the `:eventually_local` fetch strategy is designed to do. "\
|
490
|
+
"Consider passing `show_filter: true` or use the `:eventually_local` fetch "\
|
491
|
+
"strategy instead."
|
428
492
|
)
|
429
493
|
end
|
430
494
|
|
@@ -145,7 +145,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
|
|
145
145
|
updateAnchorPosition() {
|
146
146
|
// If the selectPanel is removed from the screen on resize close the dialog
|
147
147
|
if (this && this.offsetParent === null) {
|
148
|
-
this.
|
148
|
+
this.hide();
|
149
149
|
}
|
150
150
|
if (this.invokerElement) {
|
151
151
|
const { top, left } = getAnchoredPosition(this.dialog, this.invokerElement, {
|
@@ -254,6 +254,12 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
|
|
254
254
|
// Remove data-ready so it can be set the next time the panel is opened
|
255
255
|
this.dialog.removeAttribute('data-ready');
|
256
256
|
this.invokerElement?.setAttribute('aria-expanded', 'false');
|
257
|
+
// When we close the dialog, clear the filter input
|
258
|
+
const fireSearchEvent = this.filterInputTextField.value.length > 0;
|
259
|
+
this.filterInputTextField.value = '';
|
260
|
+
if (fireSearchEvent) {
|
261
|
+
this.filterInputTextField.dispatchEvent(new Event('input'));
|
262
|
+
}
|
257
263
|
this.dispatchEvent(new CustomEvent('panelClosed', {
|
258
264
|
detail: { panel: this },
|
259
265
|
bubbles: true,
|
@@ -435,12 +441,7 @@ _SelectPanelElement_updateTabIndices = function _SelectPanelElement_updateTabInd
|
|
435
441
|
const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
|
436
442
|
if (!itemContent)
|
437
443
|
continue;
|
438
|
-
|
439
|
-
setZeroTabIndex = true;
|
440
|
-
}
|
441
|
-
else {
|
442
|
-
itemContent.setAttribute('tabindex', '-1');
|
443
|
-
}
|
444
|
+
itemContent.setAttribute('tabindex', '-1');
|
444
445
|
// <li> elements should not themselves be tabbable
|
445
446
|
item.removeAttribute('tabindex');
|
446
447
|
}
|
@@ -718,12 +719,14 @@ _SelectPanelElement_inErrorState = function _SelectPanelElement_inErrorState() {
|
|
718
719
|
if (this.fragmentErrorElement && !this.fragmentErrorElement.hasAttribute('hidden')) {
|
719
720
|
return true;
|
720
721
|
}
|
722
|
+
if (!this.bannerErrorElement)
|
723
|
+
return false;
|
721
724
|
return !this.bannerErrorElement.hasAttribute('hidden');
|
722
725
|
};
|
723
726
|
_SelectPanelElement_setErrorState = function _SelectPanelElement_setErrorState(type) {
|
724
727
|
let errorElement = this.fragmentErrorElement;
|
725
|
-
if (type === ErrorStateType.BODY) {
|
726
|
-
this.fragmentErrorElement
|
728
|
+
if (type === ErrorStateType.BODY && this.fragmentErrorElement) {
|
729
|
+
this.fragmentErrorElement.removeAttribute('hidden');
|
727
730
|
this.bannerErrorElement.setAttribute('hidden', '');
|
728
731
|
}
|
729
732
|
else {
|
@@ -841,6 +844,9 @@ _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleIte
|
|
841
844
|
return;
|
842
845
|
const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
|
843
846
|
if (this.selectVariant === 'single') {
|
847
|
+
// Don't check anything if we have an href
|
848
|
+
if (itemContent?.getAttribute('href'))
|
849
|
+
return;
|
844
850
|
// disallow unchecking checked item in single-select mode
|
845
851
|
if (!currentlyChecked) {
|
846
852
|
for (const el of this.items) {
|
@@ -2,7 +2,7 @@ import {getAnchoredPosition} from '@primer/behaviors'
|
|
2
2
|
import {controller, target} from '@github/catalyst'
|
3
3
|
import {announceFromElement, announce} from '../aria_live'
|
4
4
|
import {IncludeFragmentElement} from '@github/include-fragment-element'
|
5
|
-
import type {PrimerTextFieldElement} from 'lib/primer/forms/primer_text_field'
|
5
|
+
import type {PrimerTextFieldElement} from 'app/lib/primer/forms/primer_text_field'
|
6
6
|
import type {AnchorAlignment, AnchorSide} from '@primer/behaviors'
|
7
7
|
import '@oddbird/popover-polyfill'
|
8
8
|
|
@@ -165,7 +165,7 @@ export class SelectPanelElement extends HTMLElement {
|
|
165
165
|
updateAnchorPosition() {
|
166
166
|
// If the selectPanel is removed from the screen on resize close the dialog
|
167
167
|
if (this && this.offsetParent === null) {
|
168
|
-
this.
|
168
|
+
this.hide()
|
169
169
|
}
|
170
170
|
|
171
171
|
if (this.invokerElement) {
|
@@ -314,11 +314,7 @@ export class SelectPanelElement extends HTMLElement {
|
|
314
314
|
const itemContent = this.#getItemContent(item)
|
315
315
|
if (!itemContent) continue
|
316
316
|
|
317
|
-
|
318
|
-
setZeroTabIndex = true
|
319
|
-
} else {
|
320
|
-
itemContent.setAttribute('tabindex', '-1')
|
321
|
-
}
|
317
|
+
itemContent.setAttribute('tabindex', '-1')
|
322
318
|
|
323
319
|
// <li> elements should not themselves be tabbable
|
324
320
|
item.removeAttribute('tabindex')
|
@@ -468,6 +464,12 @@ export class SelectPanelElement extends HTMLElement {
|
|
468
464
|
// Remove data-ready so it can be set the next time the panel is opened
|
469
465
|
this.dialog.removeAttribute('data-ready')
|
470
466
|
this.invokerElement?.setAttribute('aria-expanded', 'false')
|
467
|
+
// When we close the dialog, clear the filter input
|
468
|
+
const fireSearchEvent = this.filterInputTextField.value.length > 0
|
469
|
+
this.filterInputTextField.value = ''
|
470
|
+
if (fireSearchEvent) {
|
471
|
+
this.filterInputTextField.dispatchEvent(new Event('input'))
|
472
|
+
}
|
471
473
|
|
472
474
|
this.dispatchEvent(
|
473
475
|
new CustomEvent('panelClosed', {
|
@@ -742,14 +744,16 @@ export class SelectPanelElement extends HTMLElement {
|
|
742
744
|
return true
|
743
745
|
}
|
744
746
|
|
747
|
+
if (!this.bannerErrorElement) return false
|
748
|
+
|
745
749
|
return !this.bannerErrorElement.hasAttribute('hidden')
|
746
750
|
}
|
747
751
|
|
748
752
|
#setErrorState(type: ErrorStateType) {
|
749
753
|
let errorElement = this.fragmentErrorElement
|
750
754
|
|
751
|
-
if (type === ErrorStateType.BODY) {
|
752
|
-
this.fragmentErrorElement
|
755
|
+
if (type === ErrorStateType.BODY && this.fragmentErrorElement) {
|
756
|
+
this.fragmentErrorElement.removeAttribute('hidden')
|
753
757
|
this.bannerErrorElement.setAttribute('hidden', '')
|
754
758
|
} else {
|
755
759
|
errorElement = this.bannerErrorElement
|
@@ -882,6 +886,9 @@ export class SelectPanelElement extends HTMLElement {
|
|
882
886
|
const itemContent = this.#getItemContent(item)
|
883
887
|
|
884
888
|
if (this.selectVariant === 'single') {
|
889
|
+
// Don't check anything if we have an href
|
890
|
+
if (itemContent?.getAttribute('href')) return
|
891
|
+
|
885
892
|
// disallow unchecking checked item in single-select mode
|
886
893
|
if (!currentlyChecked) {
|
887
894
|
for (const el of this.items) {
|