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
@@ -5,7 +5,7 @@
5
5
  height: 8px;
6
6
  overflow: hidden;
7
7
  background-color: var(--bgColor-neutral-muted);
8
- border-radius: 6px;
8
+ border-radius: var(--borderRadius-medium);
9
9
  outline: 1px solid transparent; /* Support Firefox custom colors */
10
10
  }
11
11
 
@@ -22,5 +22,5 @@
22
22
  }
23
23
 
24
24
  .Progress-item + .Progress-item {
25
- margin-left: 2px;
25
+ margin-left: var(--base-size-2);
26
26
  }
@@ -1 +1 @@
1
- .State,.state{border-radius:2em;display:inline-block;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-medium);line-height:var(--control-medium-lineBoxHeight);padding:5px var(--control-medium-paddingInline-normal);text-align:center;white-space:nowrap}.State,.State--draft,.state{background-color:var(--bgColor-neutral-emphasis);border:var(--borderWidth-thin) solid #0000;box-shadow:var(--boxShadow-thin) var(--borderColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.State--open{background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-open-emphasis)}.State--merged,.State--open{color:var(--fgColor-onEmphasis)}.State--merged{background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-done-emphasis)}.State--closed{background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-closed-emphasis);color:var(--fgColor-onEmphasis)}.State--small{font-size:var(--text-body-size-small);line-height:var(--base-size-24);padding:0 10px}.State--small .octicon{width:1em}
1
+ .State,.state{border-radius:2em;display:inline-block;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-medium);line-height:var(--control-medium-lineBoxHeight);padding:var(--base-size-4) var(--control-medium-paddingInline-normal);text-align:center;white-space:nowrap}.State,.State--draft,.state{background-color:var(--bgColor-neutral-emphasis);border:var(--borderWidth-thin) solid #0000;box-shadow:var(--boxShadow-thin) var(--borderColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.State--open{background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-open-emphasis)}.State--merged,.State--open{color:var(--fgColor-onEmphasis)}.State--merged{background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-done-emphasis)}.State--closed{background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-closed-emphasis);color:var(--fgColor-onEmphasis)}.State--small{font-size:var(--text-body-size-small);line-height:var(--base-size-24);padding:0 10px}.State--small .octicon{width:1em}
@@ -1 +1 @@
1
- {"version":3,"sources":["state.pcss"],"names":[],"mappings":"AAIA,cASE,iBAAkB,CAPlB,oBAAqB,CAErB,sCAAuC,CACvC,0CAA2C,CAC3C,+CAAgD,CAHhD,sDAAuD,CAIvD,iBAAkB,CAClB,kBAEF,CAEA,4BAIE,gDAAiD,CACjD,0CAAiD,CACjD,oEAAqE,CAHrE,+BAIF,CAEA,aAEE,wEAA0E,CAC1E,iEACF,CAEA,4BALE,+BASF,CAJA,eAEE,wEAA0E,CAC1E,iEACF,CAEA,eAEE,4EAA8E,CAC9E,mEAAoE,CAFpE,+BAGF,CAIA,cAEE,qCAAsC,CACtC,+BAAgC,CAFhC,cAOF,CAHE,uBACE,SACF","file":"state.css","sourcesContent":["/* State */\n\n/* Default 32px */\n\n.state, /* TODO: Deprecate */\n.State {\n display: inline-block;\n padding: 5px var(--control-medium-paddingInline-normal);\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n line-height: var(--control-medium-lineBoxHeight);\n text-align: center;\n white-space: nowrap;\n border-radius: 2em;\n}\n\n.state, /* TODO: Deprecate */\n.State,\n.State--draft {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-neutral-emphasis);\n border: var(--borderWidth-thin) solid transparent;\n box-shadow: var(--boxShadow-thin) var(--borderColor-neutral-emphasis);\n}\n\n.State--open {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-open-emphasis, var(--color-open-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-open-emphasis);\n}\n\n.State--merged {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-done-emphasis, var(--color-done-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-done-emphasis);\n}\n\n.State--closed {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-closed-emphasis, var(--color-closed-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-closed-emphasis);\n}\n\n/* Small 24px */\n\n.State--small {\n padding: 0 10px;\n font-size: var(--text-body-size-small);\n line-height: var(--base-size-24);\n\n & .octicon {\n width: 1em; /* Ensures different icons don't change State indicator width */\n }\n}\n"]}
1
+ {"version":3,"sources":["state.pcss"],"names":[],"mappings":"AAIA,cAYE,iBAAkB,CAVlB,oBAAqB,CAGrB,sCAAuC,CACvC,0CAA2C,CAE3C,+CAAgD,CAJhD,qEAAsE,CAKtE,iBAAkB,CAClB,kBAGF,CAEA,4BAIE,gDAAiD,CACjD,0CAAiD,CACjD,oEAAqE,CAHrE,+BAIF,CAEA,aAEE,wEAA0E,CAC1E,iEACF,CAEA,4BALE,+BASF,CAJA,eAEE,wEAA0E,CAC1E,iEACF,CAEA,eAEE,4EAA8E,CAC9E,mEAAoE,CAFpE,+BAGF,CAIA,cAGE,qCAAsC,CAEtC,+BAAgC,CAHhC,cAQF,CAHE,uBACE,SACF","file":"state.css","sourcesContent":["/* State */\n\n/* Default 32px */\n\n.state, /* TODO: Deprecate */\n.State {\n display: inline-block;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--base-size-4) var(--control-medium-paddingInline-normal);\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--control-medium-lineBoxHeight);\n text-align: center;\n white-space: nowrap;\n /* stylelint-disable-next-line primer/borders */\n border-radius: 2em;\n}\n\n.state, /* TODO: Deprecate */\n.State,\n.State--draft {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-neutral-emphasis);\n border: var(--borderWidth-thin) solid transparent;\n box-shadow: var(--boxShadow-thin) var(--borderColor-neutral-emphasis);\n}\n\n.State--open {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-open-emphasis, var(--color-open-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-open-emphasis);\n}\n\n.State--merged {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-done-emphasis, var(--color-done-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-done-emphasis);\n}\n\n.State--closed {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-closed-emphasis, var(--color-closed-emphasis));\n box-shadow: var(--boxShadow-thin) var(--borderColor-closed-emphasis);\n}\n\n/* Small 24px */\n\n.State--small {\n /* stylelint-disable-next-line primer/spacing */\n padding: 0 10px;\n font-size: var(--text-body-size-small);\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--base-size-24);\n\n & .octicon {\n width: 1em; /* Ensures different icons don't change State indicator width */\n }\n}\n"]}
@@ -5,12 +5,15 @@
5
5
  .state, /* TODO: Deprecate */
6
6
  .State {
7
7
  display: inline-block;
8
- padding: 5px var(--control-medium-paddingInline-normal);
8
+ /* stylelint-disable-next-line primer/spacing */
9
+ padding: var(--base-size-4) var(--control-medium-paddingInline-normal);
9
10
  font-size: var(--text-body-size-medium);
10
11
  font-weight: var(--base-text-weight-medium);
12
+ /* stylelint-disable-next-line primer/typography */
11
13
  line-height: var(--control-medium-lineBoxHeight);
12
14
  text-align: center;
13
15
  white-space: nowrap;
16
+ /* stylelint-disable-next-line primer/borders */
14
17
  border-radius: 2em;
15
18
  }
16
19
 
@@ -44,8 +47,10 @@
44
47
  /* Small 24px */
45
48
 
46
49
  .State--small {
50
+ /* stylelint-disable-next-line primer/spacing */
47
51
  padding: 0 10px;
48
52
  font-size: var(--text-body-size-small);
53
+ /* stylelint-disable-next-line primer/typography */
49
54
  line-height: var(--base-size-24);
50
55
 
51
56
  & .octicon {
@@ -1 +1 @@
1
- {"version":3,"sources":["subhead.pcss"],"names":[],"mappings":"AAEA,SAIE,oEAAqE,CAHrE,YAAa,CAIb,kBAAmB,CACnB,wBAAyB,CAHzB,qCAAsC,CADtC,6CAKF,CAGA,mBACE,8BACF,CAGA,iBAEE,aAAc,CADd,0CAA2C,CAE3C,OACF,CAEA,wBACE,6BACF,CAEA,yBACE,uCACF,CAGA,yBAEE,2BAA4B,CAD5B,4CAEF,CAGA,qBAEE,0BAA2B,CAC3B,WAAY,CAFZ,sCAAuC,CAGvC,OACF,CAGA,iBAEE,iBAAkB,CAClB,wBAAyB,CAFzB,iEAAkE,CAGlE,OAKF,CAHE,sCACE,6BACF","file":"subhead.css","sourcesContent":["/* Subhead */\n\n.Subhead {\n display: flex;\n padding-bottom: var(--stack-padding-condensed);\n margin-bottom: var(--stack-gap-normal);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);\n flex-flow: row wrap;\n justify-content: flex-end; /* Keep actions right aligned. */\n}\n\n/* Modifier class to give a lot of breathing room between sections of content. */\n.Subhead--spacious {\n margin-top: var(--base-size-40);\n}\n\n/* <h2> sized heading with normal font weight */\n.Subhead-heading {\n font-weight: var(--base-text-weight-normal);\n flex: 1 1 auto;\n order: 0;\n}\n\n.Subhead-heading--large {\n font-size: var(--base-size-24);\n}\n\n.Subhead-heading--medium {\n font-size: var(--text-title-size-medium);\n}\n\n/* Make the text bold and red for dangerous content */\n.Subhead-heading--danger {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-danger);\n}\n\n/* One-liner of supporting text */\n.Subhead-description {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: 1 100%;\n order: 2;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.Subhead-actions {\n margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);\n align-self: center;\n justify-content: flex-end;\n order: 1;\n\n & + .Subhead-description {\n margin-top: var(--base-size-4);\n }\n}\n"]}
1
+ {"version":3,"sources":["subhead.pcss"],"names":[],"mappings":"AAEA,SAME,oEAAqE,CALrE,YAAa,CAMb,kBAAmB,CACnB,wBAAyB,CAHzB,qCAAsC,CAFtC,6CAMF,CAGA,mBACE,8BACF,CAGA,iBAEE,aAAc,CADd,0CAA2C,CAE3C,OACF,CAEA,wBAEE,6BACF,CAEA,yBACE,uCACF,CAGA,yBAEE,2BAA4B,CAD5B,4CAEF,CAGA,qBAEE,0BAA2B,CAC3B,WAAY,CAFZ,sCAAuC,CAGvC,OACF,CAGA,iBAEE,iBAAkB,CAClB,wBAAyB,CAFzB,iEAAkE,CAGlE,OAKF,CAHE,sCACE,6BACF","file":"subhead.css","sourcesContent":["/* Subhead */\n\n.Subhead {\n display: flex;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: var(--stack-padding-condensed);\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: var(--stack-gap-normal);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);\n flex-flow: row wrap;\n justify-content: flex-end; /* Keep actions right aligned. */\n}\n\n/* Modifier class to give a lot of breathing room between sections of content. */\n.Subhead--spacious {\n margin-top: var(--base-size-40);\n}\n\n/* <h2> sized heading with normal font weight */\n.Subhead-heading {\n font-weight: var(--base-text-weight-normal);\n flex: 1 1 auto;\n order: 0;\n}\n\n.Subhead-heading--large {\n /* stylelint-disable-next-line primer/typography */\n font-size: var(--base-size-24);\n}\n\n.Subhead-heading--medium {\n font-size: var(--text-title-size-medium);\n}\n\n/* Make the text bold and red for dangerous content */\n.Subhead-heading--danger {\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-danger);\n}\n\n/* One-liner of supporting text */\n.Subhead-description {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: 1 100%;\n order: 2;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.Subhead-actions {\n margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);\n align-self: center;\n justify-content: flex-end;\n order: 1;\n\n & + .Subhead-description {\n margin-top: var(--base-size-4);\n }\n}\n"]}
@@ -2,7 +2,9 @@
2
2
 
3
3
  .Subhead {
4
4
  display: flex;
5
+ /* stylelint-disable-next-line primer/spacing */
5
6
  padding-bottom: var(--stack-padding-condensed);
7
+ /* stylelint-disable-next-line primer/spacing */
6
8
  margin-bottom: var(--stack-gap-normal);
7
9
  border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);
8
10
  flex-flow: row wrap;
@@ -22,6 +24,7 @@
22
24
  }
23
25
 
24
26
  .Subhead-heading--large {
27
+ /* stylelint-disable-next-line primer/typography */
25
28
  font-size: var(--base-size-24);
26
29
  }
27
30
 
@@ -1 +1 @@
1
- {"version":3,"sources":["timeline_item.pcss"],"names":[],"mappings":"AAEA,cAEE,YAAa,CAEb,mCAAoC,CADpC,qCAAsC,CAFtC,iBAqBF,CAfE,qBAQE,yCAA0C,CAL1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,8BAGF,CAEA,yCACE,+CAAgD,CAChD,mDACF,CAGF,oBASE,kBAAmB,CACnB,6CAA8C,CAC9C,4DAA6D,CAC7D,iBAAkB,CAJlB,0BAA2B,CAL3B,YAAa,CAWb,aAAc,CATd,iCAAkC,CAQlC,sBAAuB,CANvB,qDAAwD,CADxD,qDAAsD,CALtD,iBAAkB,CAGlB,gCAAiC,CAFjC,SAaF,CAEA,6BAEE,gDAAiD,CACjD,0CAAiD,CAFjD,+BAGF,CAEA,mBAIE,0BAA2B,CAC3B,SAAU,CAFV,6BAA8B,CAD9B,cAAe,CADf,WAKF,CAEA,qBAEE,UAAW,CADX,iBAAkB,CAElB,SACF,CAEA,oBAOE,uCAAwC,CACxC,QAAS,CACT,sEAAuE,CANvE,gCAAiC,CACjC,QAAS,CACT,8CAAiD,CACjD,iBAAkB,CALlB,iBAAkB,CAClB,SAQF,CAEA,yBAEE,gBAAiB,CADjB,8BAgBF,CAZE,oCACE,sCACF,CAEA,6CAKE,uCAAwC,CACxC,QAAS,CAFT,0BAA2B,CAH3B,0BAA2B,CAE3B,gCAAiC,CADjC,6BAKF","file":"timeline_item.css","sourcesContent":["/* TimelineItem */\n\n.TimelineItem {\n position: relative;\n display: flex;\n padding: var(--stack-padding-normal) 0;\n margin-left: var(--stack-gap-normal);\n\n /* The Timeline */\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: var(--borderWidth-thick);\n content: '';\n background-color: var(--borderColor-muted);\n }\n\n &:target .TimelineItem-badge {\n border-color: var(--borderColor-accent-emphasis);\n box-shadow: 0 0 0.2em var(--borderColor-accent-muted);\n }\n}\n\n.TimelineItem-badge {\n position: relative;\n z-index: 1;\n display: flex;\n width: var(--control-medium-size);\n height: var(--control-medium-size);\n margin-right: var(--controlStack-medium-gap-condensed);\n margin-left: calc(var(--control-medium-size) / -2 + 1px);\n color: var(--fgColor-muted);\n align-items: center;\n background-color: var(--timelineBadge-bgColor);\n border: var(--borderWidth-thick) solid var(--bgColor-default);\n border-radius: 50%;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.TimelineItem-badge--success {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-success-emphasis);\n border: var(--borderWidth-thin) solid transparent;\n}\n\n.TimelineItem-body {\n min-width: 0;\n max-width: 100%;\n margin-top: var(--base-size-4);\n color: var(--fgColor-muted);\n flex: auto;\n}\n\n.TimelineItem-avatar {\n position: absolute;\n left: -72px;\n z-index: 1;\n}\n\n.TimelineItem-break {\n position: relative;\n z-index: 1;\n height: var(--stack-gap-spacious);\n margin: 0;\n margin-bottom: calc(var(--stack-gap-normal) * -1);\n margin-left: -56px;\n background-color: var(--bgColor-default);\n border: 0;\n border-top: var(--borderWidth-thicker) solid var(--borderColor-default);\n}\n\n.TimelineItem--condensed {\n padding-top: var(--base-size-4);\n padding-bottom: 0;\n\n /* TimelineItem--condensed is often grouped. (commits) */\n &:last-child {\n padding-bottom: var(--stack-gap-normal);\n }\n\n & .TimelineItem-badge {\n height: var(--base-size-16);\n margin-top: var(--base-size-8);\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-default);\n border: 0;\n }\n}\n"]}
1
+ {"version":3,"sources":["timeline_item.pcss"],"names":[],"mappings":"AAEA,cAEE,YAAa,CAIb,mCAAoC,CAFpC,qCAAsC,CAHtC,iBAyBF,CAjBE,qBASE,yCAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,8BAIF,CAEA,yCACE,+CAAgD,CAEhD,mDACF,CAGF,oBAWE,kBAAmB,CACnB,6CAA8C,CAE9C,4DAA6D,CAC7D,iBAAkB,CALlB,0BAA2B,CAP3B,YAAa,CAcb,aAAc,CAZd,iCAAkC,CAWlC,sBAAuB,CAPvB,qDAAwD,CAFxD,qDAAsD,CANtD,iBAAkB,CAGlB,gCAAiC,CAFjC,SAgBF,CAEA,6BAEE,gDAAiD,CACjD,0CAAiD,CAFjD,+BAGF,CAEA,mBAIE,0BAA2B,CAC3B,SAAU,CAFV,6BAA8B,CAD9B,cAAe,CADf,WAKF,CAEA,qBAGE,UAAW,CAFX,iBAAkB,CAGlB,SACF,CAEA,oBASE,uCAAwC,CACxC,QAAS,CACT,sEAAuE,CARvE,gCAAiC,CACjC,QAAS,CAET,8CAAiD,CAEjD,iBAAkB,CAPlB,iBAAkB,CAClB,SAUF,CAEA,yBAEE,gBAAiB,CADjB,8BAiBF,CAbE,oCAEE,sCACF,CAEA,6CAKE,uCAAwC,CACxC,QAAS,CAFT,0BAA2B,CAH3B,0BAA2B,CAE3B,gCAAiC,CADjC,6BAKF","file":"timeline_item.css","sourcesContent":["/* TimelineItem */\n\n.TimelineItem {\n position: relative;\n display: flex;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-normal) 0;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: var(--stack-gap-normal);\n\n /* The Timeline */\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: var(--borderWidth-thick);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-muted);\n }\n\n &:target .TimelineItem-badge {\n border-color: var(--borderColor-accent-emphasis);\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: 0 0 0.2em var(--borderColor-accent-muted);\n }\n}\n\n.TimelineItem-badge {\n position: relative;\n z-index: 1;\n display: flex;\n width: var(--control-medium-size);\n height: var(--control-medium-size);\n /* stylelint-disable-next-line primer/spacing */\n margin-right: var(--controlStack-medium-gap-condensed);\n /* stylelint-disable-next-line primer/spacing */\n margin-left: calc(var(--control-medium-size) / -2 + 1px);\n color: var(--fgColor-muted);\n align-items: center;\n background-color: var(--timelineBadge-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border: var(--borderWidth-thick) solid var(--bgColor-default);\n border-radius: 50%;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.TimelineItem-badge--success {\n color: var(--fgColor-onEmphasis);\n background-color: var(--bgColor-success-emphasis);\n border: var(--borderWidth-thin) solid transparent;\n}\n\n.TimelineItem-body {\n min-width: 0;\n max-width: 100%;\n margin-top: var(--base-size-4);\n color: var(--fgColor-muted);\n flex: auto;\n}\n\n.TimelineItem-avatar {\n position: absolute;\n /* stylelint-disable-next-line primer/spacing */\n left: -72px;\n z-index: 1;\n}\n\n.TimelineItem-break {\n position: relative;\n z-index: 1;\n height: var(--stack-gap-spacious);\n margin: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: calc(var(--stack-gap-normal) * -1);\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -56px;\n background-color: var(--bgColor-default);\n border: 0;\n border-top: var(--borderWidth-thicker) solid var(--borderColor-default);\n}\n\n.TimelineItem--condensed {\n padding-top: var(--base-size-4);\n padding-bottom: 0;\n\n /* TimelineItem--condensed is often grouped. (commits) */\n &:last-child {\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: var(--stack-gap-normal);\n }\n\n & .TimelineItem-badge {\n height: var(--base-size-16);\n margin-top: var(--base-size-8);\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-default);\n border: 0;\n }\n}\n"]}
@@ -3,7 +3,9 @@
3
3
  .TimelineItem {
4
4
  position: relative;
5
5
  display: flex;
6
+ /* stylelint-disable-next-line primer/spacing */
6
7
  padding: var(--stack-padding-normal) 0;
8
+ /* stylelint-disable-next-line primer/spacing */
7
9
  margin-left: var(--stack-gap-normal);
8
10
 
9
11
  /* The Timeline */
@@ -15,11 +17,13 @@
15
17
  display: block;
16
18
  width: var(--borderWidth-thick);
17
19
  content: '';
20
+ /* stylelint-disable-next-line primer/colors */
18
21
  background-color: var(--borderColor-muted);
19
22
  }
20
23
 
21
24
  &:target .TimelineItem-badge {
22
25
  border-color: var(--borderColor-accent-emphasis);
26
+ /* stylelint-disable-next-line primer/box-shadow */
23
27
  box-shadow: 0 0 0.2em var(--borderColor-accent-muted);
24
28
  }
25
29
  }
@@ -30,11 +34,14 @@
30
34
  display: flex;
31
35
  width: var(--control-medium-size);
32
36
  height: var(--control-medium-size);
37
+ /* stylelint-disable-next-line primer/spacing */
33
38
  margin-right: var(--controlStack-medium-gap-condensed);
39
+ /* stylelint-disable-next-line primer/spacing */
34
40
  margin-left: calc(var(--control-medium-size) / -2 + 1px);
35
41
  color: var(--fgColor-muted);
36
42
  align-items: center;
37
43
  background-color: var(--timelineBadge-bgColor);
44
+ /* stylelint-disable-next-line primer/colors */
38
45
  border: var(--borderWidth-thick) solid var(--bgColor-default);
39
46
  border-radius: 50%;
40
47
  justify-content: center;
@@ -57,6 +64,7 @@
57
64
 
58
65
  .TimelineItem-avatar {
59
66
  position: absolute;
67
+ /* stylelint-disable-next-line primer/spacing */
60
68
  left: -72px;
61
69
  z-index: 1;
62
70
  }
@@ -66,7 +74,9 @@
66
74
  z-index: 1;
67
75
  height: var(--stack-gap-spacious);
68
76
  margin: 0;
77
+ /* stylelint-disable-next-line primer/spacing */
69
78
  margin-bottom: calc(var(--stack-gap-normal) * -1);
79
+ /* stylelint-disable-next-line primer/spacing */
70
80
  margin-left: -56px;
71
81
  background-color: var(--bgColor-default);
72
82
  border: 0;
@@ -79,6 +89,7 @@
79
89
 
80
90
  /* TimelineItem--condensed is often grouped. (commits) */
81
91
  &:last-child {
92
+ /* stylelint-disable-next-line primer/spacing */
82
93
  padding-bottom: var(--stack-gap-normal);
83
94
  }
84
95
 
@@ -1 +1 @@
1
- {"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAEA,UACE,mBAAoB,CAEpB,cAAe,CADf,WA0BF,CAvBE,yBAEE,0BAAsB,CAAtB,qBAAsB,CADtB,aAAc,CAEd,eAAgB,CAChB,sBAAuB,CACvB,kBAiBF,CAfE,6CACE,oCACF,CAEA,qDACE,eACF,CAEA,2LAKE,cAAe,CADf,aAAc,CADd,wBAGF","file":"truncate.css","sourcesContent":["/* Truncate */\n\n.Truncate {\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n\n & > .Truncate-text {\n min-width: 1ch;\n max-width: fit-content;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n & + .Truncate-text {\n margin-left: var(--control-small-gap);\n }\n\n &.Truncate-text--primary {\n flex-basis: 200%;\n }\n\n &.Truncate-text--expandable:hover,\n &.Truncate-text--expandable:focus,\n &.Truncate-text--expandable:active {\n max-width: 100% !important;\n flex-shrink: 0;\n cursor: pointer;\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAEA,UACE,mBAAoB,CAEpB,cAAe,CADf,WA2BF,CAxBE,yBAEE,0BAAsB,CAAtB,qBAAsB,CADtB,aAAc,CAEd,eAAgB,CAChB,sBAAuB,CACvB,kBAkBF,CAhBE,6CAEE,oCACF,CAEA,qDACE,eACF,CAEA,2LAKE,cAAe,CADf,aAAc,CADd,wBAGF","file":"truncate.css","sourcesContent":["/* Truncate */\n\n.Truncate {\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n\n & > .Truncate-text {\n min-width: 1ch;\n max-width: fit-content;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n & + .Truncate-text {\n /* stylelint-disable-next-line primer/spacing */\n margin-left: var(--control-small-gap);\n }\n\n &.Truncate-text--primary {\n flex-basis: 200%;\n }\n\n &.Truncate-text--expandable:hover,\n &.Truncate-text--expandable:focus,\n &.Truncate-text--expandable:active {\n max-width: 100% !important;\n flex-shrink: 0;\n cursor: pointer;\n }\n }\n}\n"]}
@@ -13,6 +13,7 @@
13
13
  white-space: nowrap;
14
14
 
15
15
  & + .Truncate-text {
16
+ /* stylelint-disable-next-line primer/spacing */
16
17
  margin-left: var(--control-small-gap);
17
18
  }
18
19
 
@@ -141,6 +141,10 @@ module Primer
141
141
  !Rails.env.production? && raise_on_invalid_options? && !ENV["PRIMER_WARNINGS_DISABLED"]
142
142
  end
143
143
 
144
+ def shouldnt_raise_error?
145
+ !should_raise_error?
146
+ end
147
+
144
148
  def should_raise_aria_error?
145
149
  !Rails.env.production? && raise_on_invalid_aria? && !ENV["PRIMER_WARNINGS_DISABLED"]
146
150
  end
@@ -115,7 +115,6 @@ export class DialogHelperElement extends HTMLElement {
115
115
  _DialogHelperElement_abortController = new WeakMap(), _DialogHelperElement_instances = new WeakSet(), _DialogHelperElement_handleDialogOpenAttribute = function _DialogHelperElement_handleDialogOpenAttribute() {
116
116
  if (!this.dialog)
117
117
  return;
118
- this.ownerDocument.body.classList.toggle('has-modal', this.dialog.matches(':modal'));
119
118
  // We don't want to show the Dialog component as non-modal
120
119
  if (this.dialog.matches('[open]:not(:modal)')) {
121
120
  // eslint-disable-next-line no-restricted-syntax
@@ -96,7 +96,6 @@ export class DialogHelperElement extends HTMLElement {
96
96
 
97
97
  #handleDialogOpenAttribute() {
98
98
  if (!this.dialog) return
99
- this.ownerDocument.body.classList.toggle('has-modal', this.dialog.matches(':modal'))
100
99
  // We don't want to show the Dialog component as non-modal
101
100
  if (this.dialog.matches('[open]:not(:modal)')) {
102
101
  // eslint-disable-next-line no-restricted-syntax
@@ -9,7 +9,6 @@ import './focus_group';
9
9
  import './scrollable_region';
10
10
  import './aria_live';
11
11
  import './shared_events';
12
- import './alpha/image_crop';
13
12
  import './alpha/modal_dialog';
14
13
  import './beta/nav_list';
15
14
  import './beta/nav_list_group_element';
@@ -21,8 +20,8 @@ import './beta/auto_complete/auto_complete';
21
20
  import './beta/clipboard_copy';
22
21
  import './beta/relative_time';
23
22
  import './alpha/tab_container';
24
- import '../../../lib/primer/forms/primer_multi_input';
25
- import '../../../lib/primer/forms/primer_text_field';
26
- import '../../../lib/primer/forms/toggle_switch_input';
23
+ import '../../lib/primer/forms/primer_multi_input';
24
+ import '../../lib/primer/forms/primer_text_field';
25
+ import '../../lib/primer/forms/toggle_switch_input';
27
26
  import './alpha/action_menu/action_menu_element';
28
27
  import './alpha/select_panel_element';
@@ -9,7 +9,6 @@ import './focus_group';
9
9
  import './scrollable_region';
10
10
  import './aria_live';
11
11
  import './shared_events';
12
- import './alpha/image_crop';
13
12
  import './alpha/modal_dialog';
14
13
  import './beta/nav_list';
15
14
  import './beta/nav_list_group_element';
@@ -21,8 +20,8 @@ import './beta/auto_complete/auto_complete';
21
20
  import './beta/clipboard_copy';
22
21
  import './beta/relative_time';
23
22
  import './alpha/tab_container';
24
- import '../../../lib/primer/forms/primer_multi_input';
25
- import '../../../lib/primer/forms/primer_text_field';
26
- import '../../../lib/primer/forms/toggle_switch_input';
23
+ import '../../lib/primer/forms/primer_multi_input';
24
+ import '../../lib/primer/forms/primer_text_field';
25
+ import '../../lib/primer/forms/toggle_switch_input';
27
26
  import './alpha/action_menu/action_menu_element';
28
27
  import './alpha/select_panel_element';
@@ -4,16 +4,19 @@
4
4
  @import "./alpha/action_list.pcss";
5
5
  @import "./alpha/auto_complete.pcss";
6
6
  @import "./alpha/banner.pcss";
7
+ @import "./alpha/button_marketing.pcss";
7
8
  @import "./alpha/dialog.pcss";
8
9
  @import "./alpha/dropdown.pcss";
9
10
  @import "./alpha/layout.pcss";
11
+ @import "./alpha/menu.pcss";
12
+ @import "./alpha/segmented_control.pcss";
13
+ @import "./alpha/select_panel.pcss";
14
+ @import "./alpha/stack.pcss";
15
+ @import "./alpha/stack_item.pcss";
10
16
  @import "./alpha/tab_nav.pcss";
11
17
  @import "./alpha/text_field.pcss";
12
- @import "./alpha/button_marketing.pcss";
13
18
  @import "./alpha/toggle_switch.pcss";
14
19
  @import "./alpha/underline_nav.pcss";
15
- @import "./alpha/segmented_control.pcss";
16
- @import "./alpha/menu.pcss";
17
20
 
18
21
  /* beta */
19
22
  @import "./beta/avatar.pcss";
@@ -9,7 +9,6 @@ import './focus_group'
9
9
  import './scrollable_region'
10
10
  import './aria_live'
11
11
  import './shared_events'
12
- import './alpha/image_crop'
13
12
  import './alpha/modal_dialog'
14
13
  import './beta/nav_list'
15
14
  import './beta/nav_list_group_element'
@@ -21,8 +20,8 @@ import './beta/auto_complete/auto_complete'
21
20
  import './beta/clipboard_copy'
22
21
  import './beta/relative_time'
23
22
  import './alpha/tab_container'
24
- import '../../../lib/primer/forms/primer_multi_input'
25
- import '../../../lib/primer/forms/primer_text_field'
26
- import '../../../lib/primer/forms/toggle_switch_input'
23
+ import '../../lib/primer/forms/primer_multi_input'
24
+ import '../../lib/primer/forms/primer_text_field'
25
+ import '../../lib/primer/forms/toggle_switch_input'
27
26
  import './alpha/action_menu/action_menu_element'
28
27
  import './alpha/select_panel_element'
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ # Base class for responsive Stack and StackItem arguments. Used internally.
5
+ class ResponsiveArg
6
+ BREAKPOINTS = [:narrow, :regular, :wide].freeze
7
+
8
+ include FetchOrFallbackHelper
9
+
10
+ class << self
11
+ def for(values)
12
+ cache[[values, arg_name].hash] ||= new(values)
13
+ end
14
+
15
+ # :nocov:
16
+ def arg_name
17
+ raise NotImplementedError, "Subclasses must implement the `#{__method__}' method"
18
+ end
19
+ # :nocov:
20
+
21
+ private
22
+
23
+ def cache
24
+ Thread.current[:pvc_stack_cache] ||= {}
25
+ end
26
+ end
27
+
28
+ def to_data_attributes
29
+ @data_attributes ||= data_attributes_for(self.class.arg_name, values)
30
+ end
31
+
32
+ private
33
+
34
+ def data_attributes_for(property, values)
35
+ if values.is_a?(Hash)
36
+ values.slice(*BREAKPOINTS).each_with_object({}) do |(key, value), memo|
37
+ next unless value
38
+ property_with_breakpoint = "#{property}-#{key}"
39
+ memo[property_with_breakpoint] = value
40
+ end
41
+ else
42
+ values ? { property => values } : {}
43
+ end
44
+ end
45
+
46
+ def fetch_or_fallback_all(options, values, default)
47
+ if values.is_a?(Hash)
48
+ values.each_with_object({}) do |(key, value), memo|
49
+ memo[key] = fetch_or_fallback(options, value, default).yield_self do |value|
50
+ block_given? ? yield(value) : value
51
+ end
52
+ end
53
+ else
54
+ fetch_or_fallback(options, values, default).yield_self do |value|
55
+ block_given? ? yield(value) : value
56
+ end
57
+ end
58
+ end
59
+
60
+ # :nocov:
61
+ def values
62
+ raise NotImplementedError, "Subclasses must implement the `#{__method__}' method"
63
+ end
64
+ # :nocov:
65
+ end
66
+ end
@@ -0,0 +1 @@
1
+ <span>Bellevue caption</span>
@@ -0,0 +1 @@
1
+ <span>Lopez caption</span>
@@ -0,0 +1 @@
1
+ <span>Seattle caption</span>
@@ -18,5 +18,11 @@ class CaptionTemplateForm < ApplicationForm
18
18
  age_radios.radio_button(value: "young", label: "10-15")
19
19
  age_radios.radio_button(value: "middle_aged", label: "16-21")
20
20
  end
21
+
22
+ name_form.check_box_group(name: "places", label: "Cool places") do |check_group|
23
+ check_group.check_box(value: "lopez", label: "Lopez Island")
24
+ check_group.check_box(value: "bellevue", label: "Bellevue")
25
+ check_group.check_box(value: "seattle", label: "Seattle")
26
+ end
21
27
  end
22
28
  end
@@ -3,7 +3,7 @@
3
3
  # :nodoc:
4
4
  class CheckBoxGroupForm < ApplicationForm
5
5
  form do |check_form|
6
- check_form.check_box_group(label: "I like to eat, eat, eat:") do |check_group|
6
+ check_form.check_box_group(label: "I like to eat, eat, eat:", caption: "Nom nom nom") do |check_group|
7
7
  check_group.check_box(
8
8
  name: "long_a",
9
9
  label: "Ey-ples and ba-naynays",
@@ -3,7 +3,11 @@
3
3
  # :nodoc:
4
4
  class RadioButtonGroupForm < ApplicationForm
5
5
  form do |radio_form|
6
- radio_form.radio_button_group(name: "channel", label: "How did you hear about us?") do |radio_group|
6
+ radio_form.radio_button_group(
7
+ name: "channel",
8
+ label: "How did you hear about us?",
9
+ caption: "We love our listeners"
10
+ ) do |radio_group|
7
11
  radio_group.radio_button(value: "online", label: "Online advertisement", caption: "Facebook maybe?")
8
12
  radio_group.radio_button(value: "radio", label: "Radio advertisement", caption: "We love us some NPR")
9
13
  radio_group.radio_button(value: "friend", label: "From a friend", caption: "Wow, what a good person")
@@ -4,7 +4,7 @@ module Primer
4
4
  # :nodoc:
5
5
  module AttributesHelper
6
6
  PLURAL_ARIA_ATTRIBUTES = %i[describedby labelledby].freeze
7
- PLURAL_DATA_ATTRIBUTES = %i[target targets].freeze
7
+ PLURAL_DATA_ATTRIBUTES = %i[target targets action].freeze
8
8
 
9
9
  def aria(val, system_arguments)
10
10
  system_arguments[:"aria-#{val}"] || system_arguments.dig(:aria, val.to_sym)
@@ -61,14 +61,6 @@ module Primer
61
61
  self.class.compile! unless self.class.instance_methods(false).include?(:render_template)
62
62
  render_template
63
63
  end
64
-
65
- def content_tag_if(condition, tag, **kwargs, &block)
66
- if condition
67
- content_tag(tag, **kwargs, &block)
68
- else
69
- capture(&block)
70
- end
71
- end
72
64
  end
73
65
  end
74
66
  end
@@ -54,11 +54,14 @@ module Primer
54
54
  private
55
55
 
56
56
  def tag_attributes
57
+ attrs = { name: @input.name }
58
+ attrs[:value] = @input.value if @input.value
59
+
57
60
  case @type
58
61
  when :submit
59
- ButtonAttributeGenerator.submit_tag_attributes(@input.label, name: @input.name)
62
+ ButtonAttributeGenerator.submit_tag_attributes(@input.label, **attrs)
60
63
  else
61
- ButtonAttributeGenerator.button_tag_attributes(@input.label, name: @input.name)
64
+ ButtonAttributeGenerator.button_tag_attributes(@input.label, **attrs)
62
65
  end
63
66
  end
64
67
  end
@@ -5,6 +5,9 @@
5
5
  <%= @input.label %>
6
6
  <% end %>
7
7
  <% end %>
8
+ <div class="mb-2">
9
+ <%= render(Caption.new(input: @input)) %>
10
+ </div>
8
11
  <%= render(SpacingWrapper.new) do %>
9
12
  <% @input.check_boxes.each do |check_box| %>
10
13
  <%= render(check_box.to_component) %>
@@ -14,7 +17,4 @@
14
17
  <div class="mt-2">
15
18
  <%= render(ValidationMessage.new(input: @input)) %>
16
19
  </div>
17
- <div class="mt-2">
18
- <%= render(Caption.new(input: @input)) %>
19
- </div>
20
20
  </div>
@@ -8,7 +8,7 @@ module Primer
8
8
 
9
9
  def initialize(input:)
10
10
  @input = input
11
- @input.add_label_classes("FormControl-label", "mb-2")
11
+ @input.add_label_classes("FormControl-label")
12
12
  Primer::Forms::Utils.classify(@input.input_arguments)
13
13
  end
14
14
  end
@@ -50,14 +50,10 @@ module Primer
50
50
  false
51
51
  end
52
52
 
53
- private
54
-
55
- def caption_template_name
56
- @caption_template_name ||= if @scheme == :array
57
- :"#{name}_#{value}"
58
- else
59
- name.to_sym
60
- end
53
+ def values_disambiguate_template_names?
54
+ # Check boxes submitted as an array all have the same name, so we return true here
55
+ # to ensure different caption templates can be attached to individual check box inputs.
56
+ @scheme == :array
61
57
  end
62
58
  end
63
59
  end
@@ -246,6 +246,10 @@ module Primer
246
246
  @input_arguments[:id]
247
247
  end
248
248
 
249
+ def value
250
+ @input_arguments[:value]
251
+ end
252
+
249
253
  # :nocov:
250
254
  def name
251
255
  raise_for_abstract_method!(__method__)
@@ -296,6 +300,14 @@ module Primer
296
300
  ""
297
301
  end
298
302
 
303
+ # Whether or not the `value:` argument should be used to determine the caption template
304
+ # for a given field. This is useful in especially radio button groups where each option
305
+ # has the same name but a different value. Check box groups where the values are submitted
306
+ # as an array also use this feature, since each check box also has the same name.
307
+ def values_disambiguate_template_names?
308
+ false
309
+ end
310
+
299
311
  private
300
312
 
301
313
  def input_data
@@ -305,7 +317,7 @@ module Primer
305
317
  def caption_template_name
306
318
  return nil unless name
307
319
 
308
- @caption_template_name ||= if respond_to?(:value)
320
+ @caption_template_name ||= if values_disambiguate_template_names? && respond_to?(:value) && value.present?
309
321
  :"#{name}_#{value}"
310
322
  else
311
323
  name.to_sym
@@ -42,6 +42,10 @@ module Primer
42
42
  def supports_validation?
43
43
  false
44
44
  end
45
+
46
+ def values_disambiguate_template_names?
47
+ true
48
+ end
45
49
  end
46
50
  end
47
51
  end
@@ -1,4 +1,4 @@
1
- <%= content_tag_if(horizontal?, :div, class: "FormControl-horizontalGroup") do %>
1
+ <%= render(Primer::Box.new(**@system_arguments)) do %>
2
2
  <% @inputs.each do |input| %>
3
3
  <%= render(input.to_component) %>
4
4
  <% end %>
@@ -17,6 +17,11 @@ module Primer
17
17
  @form = form
18
18
  @layout = layout
19
19
  @system_arguments = system_arguments
20
+
21
+ @system_arguments[:classes] = class_names(
22
+ @system_arguments.delete(:classes),
23
+ "FormControl-horizontalGroup" => horizontal?
24
+ )
20
25
  end
21
26
 
22
27
  def horizontal?
@@ -47,6 +47,7 @@ let PrimerTextFieldElement = class PrimerTextFieldElement extends HTMLElement {
47
47
  clearContents() {
48
48
  this.inputElement.value = '';
49
49
  this.inputElement.focus();
50
+ this.inputElement.dispatchEvent(new Event('input', { bubbles: true, cancelable: false }));
50
51
  }
51
52
  clearError() {
52
53
  this.inputElement.removeAttribute('invalid');
@@ -57,6 +57,7 @@ export class PrimerTextFieldElement extends HTMLElement {
57
57
  clearContents() {
58
58
  this.inputElement.value = ''
59
59
  this.inputElement.focus()
60
+ this.inputElement.dispatchEvent(new Event('input', { bubbles: true, cancelable: false }))
60
61
  }
61
62
 
62
63
  clearError(): void {
@@ -5,6 +5,9 @@
5
5
  <%= @input.label %>
6
6
  <% end %>
7
7
  <% end %>
8
+ <div class="mb-2">
9
+ <%= render(Caption.new(input: @input)) %>
10
+ </div>
8
11
  <%= render(SpacingWrapper.new) do %>
9
12
  <% @input.radio_buttons.each do |radio_button| %>
10
13
  <%= render(radio_button.to_component) %>
@@ -14,7 +17,4 @@
14
17
  <div class="mt-2">
15
18
  <%= render(ValidationMessage.new(input: @input)) %>
16
19
  </div>
17
- <div class="mt-2">
18
- <%= render(Caption.new(input: @input)) %>
19
- </div>
20
20
  </div>
@@ -8,7 +8,7 @@ module Primer
8
8
 
9
9
  def initialize(input:)
10
10
  @input = input
11
- @input.add_label_classes("FormControl-label", "mb-2")
11
+ @input.add_label_classes("FormControl-label")
12
12
  Primer::Forms::Utils.classify(@input.input_arguments)
13
13
  end
14
14
  end