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.
Files changed (288) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +67 -0
  3. data/app/assets/javascripts/{app/components → components}/primer/primer.d.ts +3 -4
  4. data/app/assets/javascripts/primer_view_components.js +1 -1
  5. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  6. data/app/assets/styles/primer_view_components.css +1 -1
  7. data/app/assets/styles/primer_view_components.css.map +1 -1
  8. data/app/components/primer/alpha/action_bar.css.map +1 -1
  9. data/app/components/primer/alpha/action_bar.pcss +7 -4
  10. data/app/components/primer/alpha/action_bar_element.js +0 -3
  11. data/app/components/primer/alpha/action_bar_element.ts +0 -4
  12. data/app/components/primer/alpha/action_list.css +1 -1
  13. data/app/components/primer/alpha/action_list.css.map +1 -1
  14. data/app/components/primer/alpha/action_list.pcss +25 -8
  15. data/app/components/primer/alpha/action_list.rb +1 -1
  16. data/app/components/primer/alpha/auto_complete.css +1 -1
  17. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  18. data/app/components/primer/alpha/auto_complete.pcss +7 -7
  19. data/app/components/primer/alpha/banner.css +1 -1
  20. data/app/components/primer/alpha/banner.css.map +1 -1
  21. data/app/components/primer/alpha/banner.pcss +6 -2
  22. data/app/components/primer/alpha/button_marketing.css.map +1 -1
  23. data/app/components/primer/alpha/button_marketing.pcss +11 -4
  24. data/app/components/primer/alpha/dialog.css +1 -1
  25. data/app/components/primer/alpha/dialog.css.json +2 -1
  26. data/app/components/primer/alpha/dialog.css.map +1 -1
  27. data/app/components/primer/alpha/dialog.pcss +39 -13
  28. data/app/components/primer/alpha/dialog.rb +5 -1
  29. data/app/components/primer/alpha/dropdown.css +1 -1
  30. data/app/components/primer/alpha/dropdown.css.map +1 -1
  31. data/app/components/primer/alpha/dropdown.pcss +45 -11
  32. data/app/components/primer/alpha/layout.css.map +1 -1
  33. data/app/components/primer/alpha/layout.pcss +3 -2
  34. data/app/components/primer/alpha/menu.css.map +1 -1
  35. data/app/components/primer/alpha/menu.pcss +7 -0
  36. data/app/components/primer/alpha/overlay.css.map +1 -1
  37. data/app/components/primer/alpha/overlay.pcss +3 -3
  38. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  39. data/app/components/primer/alpha/segmented_control.pcss +15 -8
  40. data/app/components/primer/alpha/select_panel.css +1 -0
  41. data/app/components/primer/alpha/select_panel.css.json +7 -0
  42. data/app/components/primer/alpha/select_panel.css.map +1 -0
  43. data/app/components/primer/alpha/select_panel.html.erb +21 -17
  44. data/app/components/primer/alpha/select_panel.pcss +7 -0
  45. data/app/components/primer/alpha/select_panel.rb +69 -5
  46. data/app/components/primer/alpha/select_panel_element.js +15 -9
  47. data/app/components/primer/alpha/select_panel_element.ts +16 -9
  48. data/app/components/primer/alpha/stack.css +1 -0
  49. data/app/components/primer/alpha/stack.css.json +90 -0
  50. data/app/components/primer/alpha/stack.css.map +1 -0
  51. data/app/components/primer/alpha/stack.html.erb +3 -0
  52. data/app/components/primer/alpha/stack.pcss +297 -0
  53. data/app/components/primer/alpha/stack.rb +185 -0
  54. data/app/components/primer/alpha/stack_item.css +1 -0
  55. data/app/components/primer/alpha/stack_item.css.json +12 -0
  56. data/app/components/primer/alpha/stack_item.css.map +1 -0
  57. data/app/components/primer/alpha/stack_item.html.erb +3 -0
  58. data/app/components/primer/alpha/stack_item.pcss +31 -0
  59. data/app/components/primer/alpha/stack_item.rb +54 -0
  60. data/app/components/primer/alpha/tab_nav.css +1 -1
  61. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  62. data/app/components/primer/alpha/tab_nav.pcss +12 -3
  63. data/app/components/primer/alpha/text_field.css +1 -1
  64. data/app/components/primer/alpha/text_field.css.map +1 -1
  65. data/app/components/primer/alpha/text_field.pcss +29 -22
  66. data/app/components/primer/alpha/toggle_switch.css +1 -1
  67. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  68. data/app/components/primer/alpha/toggle_switch.pcss +6 -3
  69. data/app/components/primer/alpha/underline_nav.css +1 -1
  70. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  71. data/app/components/primer/alpha/underline_nav.pcss +8 -2
  72. data/app/components/primer/base_component.rb +1 -1
  73. data/app/components/primer/beta/avatar.css +1 -1
  74. data/app/components/primer/beta/avatar.css.map +1 -1
  75. data/app/components/primer/beta/avatar.pcss +4 -1
  76. data/app/components/primer/beta/avatar_stack.css +1 -1
  77. data/app/components/primer/beta/avatar_stack.css.map +1 -1
  78. data/app/components/primer/beta/avatar_stack.pcss +9 -2
  79. data/app/components/primer/beta/blankslate.css +1 -1
  80. data/app/components/primer/beta/blankslate.css.map +1 -1
  81. data/app/components/primer/beta/blankslate.pcss +24 -3
  82. data/app/components/primer/beta/border_box.css +1 -1
  83. data/app/components/primer/beta/border_box.css.map +1 -1
  84. data/app/components/primer/beta/border_box.pcss +8 -4
  85. data/app/components/primer/beta/breadcrumbs.css.map +1 -1
  86. data/app/components/primer/beta/breadcrumbs.pcss +5 -1
  87. data/app/components/primer/beta/button.css +1 -1
  88. data/app/components/primer/beta/button.css.map +1 -1
  89. data/app/components/primer/beta/button.pcss +31 -27
  90. data/app/components/primer/beta/button_group.css.map +1 -1
  91. data/app/components/primer/beta/button_group.pcss +1 -0
  92. data/app/components/primer/beta/counter.css +1 -1
  93. data/app/components/primer/beta/counter.css.map +1 -1
  94. data/app/components/primer/beta/counter.pcss +3 -1
  95. data/app/components/primer/beta/flash.css.map +1 -1
  96. data/app/components/primer/beta/flash.pcss +7 -4
  97. data/app/components/primer/beta/label.css +1 -1
  98. data/app/components/primer/beta/label.css.map +1 -1
  99. data/app/components/primer/beta/label.pcss +7 -4
  100. data/app/components/primer/beta/popover.css +1 -1
  101. data/app/components/primer/beta/popover.css.map +1 -1
  102. data/app/components/primer/beta/popover.pcss +15 -7
  103. data/app/components/primer/beta/progress_bar.css +1 -1
  104. data/app/components/primer/beta/progress_bar.css.map +1 -1
  105. data/app/components/primer/beta/progress_bar.pcss +2 -2
  106. data/app/components/primer/beta/state.css +1 -1
  107. data/app/components/primer/beta/state.css.map +1 -1
  108. data/app/components/primer/beta/state.pcss +6 -1
  109. data/app/components/primer/beta/subhead.css.map +1 -1
  110. data/app/components/primer/beta/subhead.pcss +3 -0
  111. data/app/components/primer/beta/timeline_item.css.map +1 -1
  112. data/app/components/primer/beta/timeline_item.pcss +11 -0
  113. data/app/components/primer/beta/truncate.css.map +1 -1
  114. data/app/components/primer/beta/truncate.pcss +1 -0
  115. data/app/components/primer/component.rb +4 -0
  116. data/app/components/primer/dialog_helper.js +0 -1
  117. data/app/components/primer/dialog_helper.ts +0 -1
  118. data/app/components/primer/primer.d.ts +3 -4
  119. data/app/components/primer/primer.js +3 -4
  120. data/app/components/primer/primer.pcss +6 -3
  121. data/app/components/primer/primer.ts +3 -4
  122. data/app/components/primer/responsive_arg.rb +66 -0
  123. data/app/forms/caption_template_form/places_bellevue_caption.html.erb +1 -0
  124. data/app/forms/caption_template_form/places_lopez_caption.html.erb +1 -0
  125. data/app/forms/caption_template_form/places_seattle_caption.html.erb +1 -0
  126. data/app/forms/caption_template_form.rb +6 -0
  127. data/app/forms/check_box_group_form.rb +1 -1
  128. data/app/forms/radio_button_group_form.rb +5 -1
  129. data/app/lib/primer/attributes_helper.rb +1 -1
  130. data/{lib → app/lib}/primer/forms/base_component.rb +0 -8
  131. data/{lib → app/lib}/primer/forms/button.rb +5 -2
  132. data/{lib → app/lib}/primer/forms/check_box_group.html.erb +3 -3
  133. data/{lib → app/lib}/primer/forms/check_box_group.rb +1 -1
  134. data/{lib → app/lib}/primer/forms/dsl/check_box_input.rb +4 -8
  135. data/{lib → app/lib}/primer/forms/dsl/input.rb +13 -1
  136. data/{lib → app/lib}/primer/forms/dsl/radio_button_input.rb +4 -0
  137. data/{lib → app/lib}/primer/forms/group.html.erb +1 -1
  138. data/{lib → app/lib}/primer/forms/group.rb +5 -0
  139. data/{lib → app/lib}/primer/forms/primer_text_field.js +1 -0
  140. data/{lib → app/lib}/primer/forms/primer_text_field.ts +1 -0
  141. data/{lib → app/lib}/primer/forms/radio_button_group.html.erb +3 -3
  142. data/{lib → app/lib}/primer/forms/radio_button_group.rb +1 -1
  143. data/{lib → app/lib}/primer/forms/select.html.erb +0 -1
  144. data/lib/primer/view_components/linters/details_menu_migration.rb +3 -2
  145. data/lib/primer/view_components/version.rb +1 -1
  146. data/lib/primer/yard/component_manifest.rb +0 -1
  147. data/lib/rubocop/cop/primer/primer_octicon.rb +1 -1
  148. data/previews/primer/alpha/action_bar_preview/inline.html.erb +1 -1
  149. data/previews/primer/alpha/dialog_preview/autofocus_element.html.erb +1 -1
  150. data/previews/primer/alpha/dialog_preview/custom_header.html.erb +3 -1
  151. data/previews/primer/alpha/dialog_preview/dialog_inside_overlay.html.erb +4 -4
  152. data/previews/primer/alpha/dialog_preview/nested_dialog.html.erb +1 -1
  153. data/previews/primer/alpha/dialog_preview/scroll_container.html.erb +11 -2
  154. data/previews/primer/alpha/dialog_preview/with_footer.html.erb +2 -2
  155. data/previews/primer/alpha/dialog_preview/with_form.html.erb +2 -2
  156. data/previews/primer/alpha/dialog_preview/with_text_input.html.erb +1 -1
  157. data/previews/primer/alpha/dialog_preview.rb +4 -2
  158. data/previews/primer/alpha/overlay_preview/in_a_sticky_container.html.erb +1 -1
  159. data/previews/primer/alpha/overlay_preview/overlay_with_header_filter.html.erb +1 -1
  160. data/previews/primer/alpha/select_panel_preview/_interaction_subject_js.html.erb +1 -1
  161. data/previews/primer/alpha/select_panel_preview/custom_loading_description.html.erb +23 -0
  162. data/previews/primer/alpha/select_panel_preview/custom_loading_label.html.erb +21 -0
  163. data/previews/primer/alpha/select_panel_preview/list_of_links.html.erb +1 -1
  164. data/previews/primer/alpha/select_panel_preview/local_fetch.html.erb +2 -1
  165. data/previews/primer/alpha/select_panel_preview/remote_fetch_filter_failure.html.erb +4 -2
  166. data/previews/primer/alpha/select_panel_preview/scroll_container.html.erb +49 -0
  167. data/previews/primer/alpha/select_panel_preview.rb +47 -9
  168. data/previews/primer/alpha/stack_item_preview/default.html.erb +5 -0
  169. data/previews/primer/alpha/stack_item_preview/playground.html.erb +11 -0
  170. data/previews/primer/alpha/stack_item_preview.rb +40 -0
  171. data/previews/primer/alpha/stack_preview/playground.html.erb +5 -0
  172. data/previews/primer/alpha/stack_preview.rb +88 -0
  173. data/previews/primer/alpha/text_field_preview/input_group_leading_action_menu.html.erb +1 -2
  174. data/previews/primer/alpha/tooltip_preview/tooltip_inside_primer_overlay.html.erb +2 -2
  175. data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb +1 -1
  176. data/previews/primer/alpha/underline_nav_preview/default.html.erb +1 -1
  177. data/previews/primer/alpha/underline_nav_preview/playground.html.erb +1 -1
  178. data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +18 -18
  179. data/previews/primer/beta/breadcrumbs_preview/with_deprecated_truncate.html.erb +3 -1
  180. data/previews/primer/beta/button_preview/summary_as_button.html.erb +0 -1
  181. data/previews/primer/beta/subhead_preview/actions.html.erb +0 -1
  182. data/static/arguments.json +112 -30
  183. data/static/audited_at.json +2 -1
  184. data/static/classes.json +12 -0
  185. data/static/constants.json +155 -8
  186. data/static/info_arch.json +248 -98
  187. data/static/previews.json +107 -47
  188. data/static/statuses.json +2 -1
  189. metadata +138 -117
  190. data/app/assets/javascripts/app/components/primer/alpha/image_crop.d.ts +0 -1
  191. data/app/components/primer/alpha/image_crop.d.ts +0 -1
  192. data/app/components/primer/alpha/image_crop.html.erb +0 -12
  193. data/app/components/primer/alpha/image_crop.js +0 -1
  194. data/app/components/primer/alpha/image_crop.rb +0 -28
  195. data/app/components/primer/alpha/image_crop.ts +0 -1
  196. data/previews/primer/alpha/image_crop_preview.rb +0 -31
  197. /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_bar_element.d.ts +0 -0
  198. /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_list.d.ts +0 -0
  199. /data/app/assets/javascripts/{app/components → components}/primer/alpha/action_menu/action_menu_element.d.ts +0 -0
  200. /data/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown/menu.d.ts +0 -0
  201. /data/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown.d.ts +0 -0
  202. /data/app/assets/javascripts/{app/components → components}/primer/alpha/modal_dialog.d.ts +0 -0
  203. /data/app/assets/javascripts/{app/components → components}/primer/alpha/segmented_control.d.ts +0 -0
  204. /data/app/assets/javascripts/{app/components → components}/primer/alpha/select_panel_element.d.ts +0 -0
  205. /data/app/assets/javascripts/{app/components → components}/primer/alpha/tab_container.d.ts +0 -0
  206. /data/app/assets/javascripts/{app/components → components}/primer/alpha/toggle_switch.d.ts +0 -0
  207. /data/app/assets/javascripts/{app/components → components}/primer/alpha/tool_tip.d.ts +0 -0
  208. /data/app/assets/javascripts/{app/components → components}/primer/alpha/x_banner.d.ts +0 -0
  209. /data/app/assets/javascripts/{app/components → components}/primer/anchored_position.d.ts +0 -0
  210. /data/app/assets/javascripts/{app/components → components}/primer/aria_live.d.ts +0 -0
  211. /data/app/assets/javascripts/{app/components → components}/primer/beta/auto_complete/auto_complete.d.ts +0 -0
  212. /data/app/assets/javascripts/{app/components → components}/primer/beta/clipboard_copy.d.ts +0 -0
  213. /data/app/assets/javascripts/{app/components → components}/primer/beta/nav_list.d.ts +0 -0
  214. /data/app/assets/javascripts/{app/components → components}/primer/beta/nav_list_group_element.d.ts +0 -0
  215. /data/app/assets/javascripts/{app/components → components}/primer/beta/relative_time.d.ts +0 -0
  216. /data/app/assets/javascripts/{app/components → components}/primer/dialog_helper.d.ts +0 -0
  217. /data/app/assets/javascripts/{app/components → components}/primer/focus_group.d.ts +0 -0
  218. /data/app/assets/javascripts/{app/components → components}/primer/scrollable_region.d.ts +0 -0
  219. /data/app/assets/javascripts/{app/components → components}/primer/shared_events.d.ts +0 -0
  220. /data/{lib → app/lib}/primer/forms/action_menu.html.erb +0 -0
  221. /data/{lib → app/lib}/primer/forms/action_menu.rb +0 -0
  222. /data/{lib → app/lib}/primer/forms/acts_as_component.rb +0 -0
  223. /data/{lib → app/lib}/primer/forms/auto_complete.html.erb +0 -0
  224. /data/{lib → app/lib}/primer/forms/auto_complete.rb +0 -0
  225. /data/{lib → app/lib}/primer/forms/base.html.erb +0 -0
  226. /data/{lib → app/lib}/primer/forms/base.rb +0 -0
  227. /data/{lib → app/lib}/primer/forms/buffer_rewriter.rb +0 -0
  228. /data/{lib → app/lib}/primer/forms/builder.rb +0 -0
  229. /data/{lib → app/lib}/primer/forms/button.html.erb +0 -0
  230. /data/{lib → app/lib}/primer/forms/caption.html.erb +0 -0
  231. /data/{lib → app/lib}/primer/forms/caption.rb +0 -0
  232. /data/{lib → app/lib}/primer/forms/check_box.html.erb +0 -0
  233. /data/{lib → app/lib}/primer/forms/check_box.rb +0 -0
  234. /data/{lib → app/lib}/primer/forms/dsl/action_menu_input.rb +0 -0
  235. /data/{lib → app/lib}/primer/forms/dsl/auto_complete_input.rb +0 -0
  236. /data/{lib → app/lib}/primer/forms/dsl/button_input.rb +0 -0
  237. /data/{lib → app/lib}/primer/forms/dsl/check_box_group_input.rb +0 -0
  238. /data/{lib → app/lib}/primer/forms/dsl/form_object.rb +0 -0
  239. /data/{lib → app/lib}/primer/forms/dsl/form_reference_input.rb +0 -0
  240. /data/{lib → app/lib}/primer/forms/dsl/hidden_input.rb +0 -0
  241. /data/{lib → app/lib}/primer/forms/dsl/input_group.rb +0 -0
  242. /data/{lib → app/lib}/primer/forms/dsl/input_methods.rb +0 -0
  243. /data/{lib → app/lib}/primer/forms/dsl/multi_input.rb +0 -0
  244. /data/{lib → app/lib}/primer/forms/dsl/radio_button_group_input.rb +0 -0
  245. /data/{lib → app/lib}/primer/forms/dsl/select_input.rb +0 -0
  246. /data/{lib → app/lib}/primer/forms/dsl/submit_button_input.rb +0 -0
  247. /data/{lib → app/lib}/primer/forms/dsl/text_area_input.rb +0 -0
  248. /data/{lib → app/lib}/primer/forms/dsl/text_field_input.rb +0 -0
  249. /data/{lib → app/lib}/primer/forms/dsl/toggle_switch_input.rb +0 -0
  250. /data/{lib → app/lib}/primer/forms/form_control.html.erb +0 -0
  251. /data/{lib → app/lib}/primer/forms/form_control.rb +0 -0
  252. /data/{lib → app/lib}/primer/forms/form_list.html.erb +0 -0
  253. /data/{lib → app/lib}/primer/forms/form_list.rb +0 -0
  254. /data/{lib → app/lib}/primer/forms/form_reference.html.erb +0 -0
  255. /data/{lib → app/lib}/primer/forms/form_reference.rb +0 -0
  256. /data/{lib → app/lib}/primer/forms/hidden_field.html.erb +0 -0
  257. /data/{lib → app/lib}/primer/forms/hidden_field.rb +0 -0
  258. /data/{lib → app/lib}/primer/forms/multi.html.erb +0 -0
  259. /data/{lib → app/lib}/primer/forms/multi.rb +0 -0
  260. /data/{lib → app/lib}/primer/forms/primer_base_component_wrapper.html.erb +0 -0
  261. /data/{lib → app/lib}/primer/forms/primer_base_component_wrapper.rb +0 -0
  262. /data/{lib → app/lib}/primer/forms/primer_multi_input.d.ts +0 -0
  263. /data/{lib → app/lib}/primer/forms/primer_multi_input.js +0 -0
  264. /data/{lib → app/lib}/primer/forms/primer_multi_input.ts +0 -0
  265. /data/{lib → app/lib}/primer/forms/primer_text_field.d.ts +0 -0
  266. /data/{lib → app/lib}/primer/forms/radio_button.html.erb +0 -0
  267. /data/{lib → app/lib}/primer/forms/radio_button.rb +0 -0
  268. /data/{lib → app/lib}/primer/forms/select.rb +0 -0
  269. /data/{lib → app/lib}/primer/forms/separator.html.erb +0 -0
  270. /data/{lib → app/lib}/primer/forms/separator.rb +0 -0
  271. /data/{lib → app/lib}/primer/forms/spacing_wrapper.html.erb +0 -0
  272. /data/{lib → app/lib}/primer/forms/spacing_wrapper.rb +0 -0
  273. /data/{lib → app/lib}/primer/forms/submit_button.html.erb +0 -0
  274. /data/{lib → app/lib}/primer/forms/submit_button.rb +0 -0
  275. /data/{lib → app/lib}/primer/forms/text_area.html.erb +0 -0
  276. /data/{lib → app/lib}/primer/forms/text_area.rb +0 -0
  277. /data/{lib → app/lib}/primer/forms/text_field.html.erb +0 -0
  278. /data/{lib → app/lib}/primer/forms/text_field.rb +0 -0
  279. /data/{lib → app/lib}/primer/forms/toggle_switch.html.erb +0 -0
  280. /data/{lib → app/lib}/primer/forms/toggle_switch.rb +0 -0
  281. /data/{lib → app/lib}/primer/forms/toggle_switch_form.rb +0 -0
  282. /data/{lib → app/lib}/primer/forms/toggle_switch_input.d.ts +0 -0
  283. /data/{lib → app/lib}/primer/forms/toggle_switch_input.js +0 -0
  284. /data/{lib → app/lib}/primer/forms/toggle_switch_input.ts +0 -0
  285. /data/{lib → app/lib}/primer/forms/utils.rb +0 -0
  286. /data/{lib → app/lib}/primer/forms/validation_message.html.erb +0 -0
  287. /data/{lib → app/lib}/primer/forms/validation_message.rb +0 -0
  288. /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,oBA+IF,CA7IE,wCANF,QA7EE,kBAAmB,CACnB,mCA+NF,CA7NE,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,6BAyHF,CAvHE,wBACE,aACF,CAEA,wBACE,YACF,CAEA,qBACE,oBACF,CAIA,0BA1CF,QA2CI,oBAwGJ,CAvGE,CAEA,4BAEE,mBACF,CAEA,iCACE,oBACF,CAGE,0BADF,gCAEI,oBAMJ,CALE,CAEA,0BALF,gCAMI,oBAEJ,CADE,CAIF,yBAlEF,QAmEI,4BAgFJ,CA/EE,CAEA,yBAtEF,QAuEI,4BA4EJ,CA3EE,CAEA,0BA1EF,QA2EI,4BAwEJ,CAvEE,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,wCAKE,qCAAsC,CAJtC,aAAc,CACd,aAAc,CAEd,iBAAkB,CADlB,SAGF,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 /* stylelint-disable-next-line length-zero-no-unit */\n --Layout-gutter: 0px; /* Neds px in value */\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 margin-right: -1px;\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"]}
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
- /* stylelint-disable-next-line length-zero-no-unit */
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,MAGE,uCAAwC,CACxC,+DAAgE,CAChE,wCAAyC,CAHzC,eAAgB,CADhB,qCAKF,CAEA,WAKE,sEAAuE,CADvE,4BAA6B,CAF7B,aAAc,CACd,kGAAmG,CAFnG,iBA+EF,CAzEE,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,cAYF,CATE,kHAOE,uDAAwD,CAJxD,QAAS,CAGT,UAAW,CAFX,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAGN,SAGF,CAGF,oBAGE,0BAA2B,CAD3B,sCAAuC,CAEvC,iBAAkB,CAHlB,UAIF,CAEA,oBACE,WAAY,CACZ,oCACF,CAEA,yBAEE,8BAA+B,CAD/B,WAEF,CAEA,mBACE,UAAW,CACX,qCACF,CAGE,0BACE,2BACF,CAIJ,cAQE,sEAAuE,CADvE,4BAA6B,CAN7B,aAAc,CAId,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 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 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 background-color: var(--underlineNav-borderColor-active);\n }\n }\n\n & .octicon {\n width: 16px;\n margin-right: var(--control-medium-gap);\n color: var(--fgColor-muted);\n text-align: center;\n }\n\n & .Counter {\n float: right;\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 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 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"]}
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":"AAAA,2BACE,cAAe,CAGf,eAAgB,CAChB,gBAAiB,CAHjB,SAAU,CACV,iBAGF,CAEA,gCACE,eACF,CAGA,qCACE,YACF,CAEA,0DACE,2EACF,CAEA,8BACE,eACF,CAEA,8BACE,SACE,uBACF,CACF","file":"overlay.css","sourcesContent":["anchored-position[popover] {\n border-width: 0;\n padding: 0;\n position: absolute;\n min-width: 192px;\n overflow: visible;\n}\n\nanchored-position:not(.Overlay) {\n background: none;\n}\n\n/* stylelint-disable-next-line selector-pseudo-class-no-unknown */\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
+ {"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,kEAeF,CAbE,gDACE,gCAKF,CAHE,6DACE,sGACF,CAIA,2EACE,+BACF,CAKF,iDACE,iCACF,CAGE,4EACE,gCACF,CAMJ,uBAIE,0CAAiD,CACjD,wCAAyC,CAHzC,mBAAoB,CAIpB,iCAAkC,CAHlC,sBAAuB,CAIvB,4CAA6C,CAN7C,iBA6FF,CAnFI,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,gDAME,oEAAqE,CADrE,UAAW,CAHX,gBAAiB,CAEjB,gDAAiD,CADjD,6CAA8C,CAF9C,iBAMF,CAIF,+BAGE,QAAS,CAET,uFAA0F,CAD1F,0CAA2C,CAH3C,WAAY,CAMZ,0BAAsB,CAAtB,qBAAsB,CADtB,sGAAuG,CAJvG,UAWF,CAJE,kDAEE,uFAA0F,CAD1F,mFAEF,CAGF,oFACE,wCACF,CAEA,uCAEE,kBAAmB,CADnB,aAEF,CAGA,qCAEE,eAAgB,CAChB,sBAAuB,CAFvB,kBAGF,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 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 justify-content: center;\n border: var(--borderWidth-thin) solid transparent;\n border-radius: var(--borderRadius-medium);\n height: var(--control-medium-size);\n padding: var(--segmentedControl-item-padding);\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 margin-top: var(--control-medium-paddingBlock);\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 height: 100%;\n width: 100%;\n border: 0;\n font-weight: var(--base-text-weight-normal);\n border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 2);\n padding-inline: calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));\n min-width: fit-content;\n\n &:focus-visible {\n outline-offset: calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin));\n border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 1);\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 white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\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"]}
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
- border: 0;
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
- outline-offset: calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin));
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,7 @@
1
+ {
2
+ "name": "alpha/select_panel",
3
+ "selectors": [
4
+ ".SelectPanel-emptyPanel",
5
+ ".SelectPanel-loadingPanel"
6
+ ]
7
+ }
@@ -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
- <div data-target="select-panel.bannerErrorElement" hidden>
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: :center,
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: "Loading content..." }, data: { target: "select-panel.bodySpinner" }) %>
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 %>
@@ -0,0 +1,7 @@
1
+ .SelectPanel-loadingPanel {
2
+ min-height: min(var(--overlay-height) - 10rem, 100vh - 2rem);
3
+ }
4
+
5
+ .SelectPanel-emptyPanel {
6
+ min-height: min(var(--overlay-height) - 10rem, 100vh - 2rem);
7
+ }
@@ -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
- select_variant = system_arguments[:select_variant] || Primer::Alpha::ActionList::DEFAULT_SELECT_VARIANT
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
- p: 2
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.dialog.close();
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
- if (!this.isItemHidden(item) && !setZeroTabIndex) {
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?.removeAttribute('hidden');
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.dialog.close()
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
- if (!this.isItemHidden(item) && !setZeroTabIndex) {
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?.removeAttribute('hidden')
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) {