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
@@ -0,0 +1 @@
1
+ .Stack{align-content:flex-start;align-items:stretch;display:flex;flex-flow:column;gap:var(--stack-gap,var(--stack-gap-normal,1rem))}.Stack[data-padding-narrow=none],.Stack[data-padding=none]{padding:0}.Stack[data-padding-narrow=condensed],.Stack[data-padding=condensed]{padding:var(--stack-padding-condensed,8px)}.Stack[data-padding-narrow=normal],.Stack[data-padding=normal]{padding:var(--stack-padding-normal,16px)}.Stack[data-padding-narrow=spacious],.Stack[data-padding=spacious]{padding:var(--stack-padding-spacious,24px)}.Stack[data-direction-narrow=horizontal],.Stack[data-direction=horizontal]{flex-flow:row}.Stack[data-direction-narrow=vertical],.Stack[data-direction=vertical]{flex-flow:column}.Stack[data-gap-narrow=none],.Stack[data-gap=none]{--stack-gap:var(--stack-gap-none,0)}.Stack[data-gap-narrow=condensed],.Stack[data-gap=condensed]{--stack-gap:var(--stack-gap-condensed,0.5rem)}.Stack[data-gap-narrow=normal],.Stack[data-gap=normal]{--stack-gap:var(--stack-gap-normal,1rem)}.Stack[data-gap-narrow=spacious],.Stack[data-gap=spacious]{--stack-gap:var(--stack-gap-spacious,1.5rem)}.Stack[data-align-narrow=start],.Stack[data-align=start]{align-items:flex-start}.Stack[data-align-narrow=center],.Stack[data-align=center]{align-items:center}.Stack[data-align-narrow=end],.Stack[data-align=end]{align-items:flex-end}.Stack[data-align-narrow=baseline],.Stack[data-align=baseline]{align-items:baseline}.Stack[data-justify-narrow=start],.Stack[data-justify=start]{justify-content:flex-start}.Stack[data-justify-narrow=center],.Stack[data-justify=center]{justify-content:center}.Stack[data-justify-narrow=end],.Stack[data-justify=end]{justify-content:flex-end}.Stack[data-justify-narrow=space-between],.Stack[data-justify=space-between]{justify-content:space-between}.Stack[data-justify-narrow=space-evenly],.Stack[data-justify=space-evenly]{justify-content:space-evenly}.Stack[data-wrap-narrow=wrap],.Stack[data-wrap=wrap]{flex-wrap:wrap}.Stack[data-wrap-narrow=nowrap],.Stack[data-wrap=nowrap]{flex-wrap:nowrap}@media (min-width:48rem){.Stack[data-padding-regular=none]{padding:0}.Stack[data-padding-regular=condensed]{padding:var(--stack-padding-condensed,8px)}.Stack[data-padding-regular=normal]{padding:var(--stack-padding-normal,16px)}.Stack[data-padding-regular=spacious]{padding:var(--stack-padding-spacious,24px)}.Stack[data-direction-regular=horizontal]{flex-flow:row}.Stack[data-direction-regular=vertical]{flex-flow:column}.Stack[data-gap-regular=none]{--stack-gap:var(--stack-gap-none,0)}.Stack[data-gap-regular=condensed]{--stack-gap:var(--stack-gap-condensed,0.5rem)}.Stack[data-gap-regular=normal]{--stack-gap:var(--stack-gap-normal,1rem)}.Stack[data-gap-regular=spacious]{--stack-gap:var(--stack-gap-spacious,1.5rem)}.Stack[data-align-regular=start]{align-items:flex-start}.Stack[data-align-regular=center]{align-items:center}.Stack[data-align-regular=end]{align-items:flex-end}.Stack[data-align-regular=baseline]{align-items:baseline}.Stack[data-justify-regular=start]{justify-content:flex-start}.Stack[data-justify-regular=center]{justify-content:center}.Stack[data-justify-regular=end]{justify-content:flex-end}.Stack[data-justify-regular=space-between]{justify-content:space-between}.Stack[data-justify-regular=space-evenly]{justify-content:space-evenly}.Stack[data-wrap-regular=wrap]{flex-wrap:wrap}.Stack[data-wrap-regular=nowrap]{flex-wrap:nowrap}}@media (min-width:87.5rem){.Stack[data-padding-wide=none]{padding:0}.Stack[data-padding-wide=condensed]{padding:var(--stack-padding-condensed,8px)}.Stack[data-padding-wide=normal]{padding:var(--stack-padding-normal,16px)}.Stack[data-padding-wide=spacious]{padding:var(--stack-padding-spacious,24px)}.Stack[data-direction-wide=horizontal]{flex-flow:row}.Stack[data-direction-wide=vertical]{flex-flow:column}.Stack[data-gap-wide=none]{--stack-gap:var(--stack-gap-none,0)}.Stack[data-gap-wide=condensed]{--stack-gap:var(--stack-gap-condensed,0.5rem)}.Stack[data-gap-wide=normal]{--stack-gap:var(--stack-gap-normal,1rem)}.Stack[data-gap-wide=spacious]{--stack-gap:var(--stack-gap-spacious,1.5rem)}.Stack[data-align-wide=start]{align-items:flex-start}.Stack[data-align-wide=center]{align-items:center}.Stack[data-align-wide=end]{align-items:flex-end}.Stack[data-align-wide=baseline]{align-items:baseline}.Stack[data-justify-wide=start]{justify-content:flex-start}.Stack[data-justify-wide=center]{justify-content:center}.Stack[data-justify-wide=end]{justify-content:flex-end}.Stack[data-justify-wide=space-between]{justify-content:space-between}.Stack[data-justify-wide=space-evenly]{justify-content:space-evenly}.Stack[data-wrap-wide=wrap]{flex-wrap:wrap}.Stack[data-wrap-wide=nowrap]{flex-wrap:nowrap}}
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "alpha/stack",
3
+ "selectors": [
4
+ ".Stack",
5
+ ".Stack[data-padding-narrow=none]",
6
+ ".Stack[data-padding=none]",
7
+ ".Stack[data-padding-narrow=condensed]",
8
+ ".Stack[data-padding=condensed]",
9
+ ".Stack[data-padding-narrow=normal]",
10
+ ".Stack[data-padding=normal]",
11
+ ".Stack[data-padding-narrow=spacious]",
12
+ ".Stack[data-padding=spacious]",
13
+ ".Stack[data-direction-narrow=horizontal]",
14
+ ".Stack[data-direction=horizontal]",
15
+ ".Stack[data-direction-narrow=vertical]",
16
+ ".Stack[data-direction=vertical]",
17
+ ".Stack[data-gap-narrow=none]",
18
+ ".Stack[data-gap=none]",
19
+ ".Stack[data-gap-narrow=condensed]",
20
+ ".Stack[data-gap=condensed]",
21
+ ".Stack[data-gap-narrow=normal]",
22
+ ".Stack[data-gap=normal]",
23
+ ".Stack[data-gap-narrow=spacious]",
24
+ ".Stack[data-gap=spacious]",
25
+ ".Stack[data-align-narrow=start]",
26
+ ".Stack[data-align=start]",
27
+ ".Stack[data-align-narrow=center]",
28
+ ".Stack[data-align=center]",
29
+ ".Stack[data-align-narrow=end]",
30
+ ".Stack[data-align=end]",
31
+ ".Stack[data-align-narrow=baseline]",
32
+ ".Stack[data-align=baseline]",
33
+ ".Stack[data-justify-narrow=start]",
34
+ ".Stack[data-justify=start]",
35
+ ".Stack[data-justify-narrow=center]",
36
+ ".Stack[data-justify=center]",
37
+ ".Stack[data-justify-narrow=end]",
38
+ ".Stack[data-justify=end]",
39
+ ".Stack[data-justify-narrow=space-between]",
40
+ ".Stack[data-justify=space-between]",
41
+ ".Stack[data-justify-narrow=space-evenly]",
42
+ ".Stack[data-justify=space-evenly]",
43
+ ".Stack[data-wrap-narrow=wrap]",
44
+ ".Stack[data-wrap=wrap]",
45
+ ".Stack[data-wrap-narrow=nowrap]",
46
+ ".Stack[data-wrap=nowrap]",
47
+ ".Stack[data-padding-regular=none]",
48
+ ".Stack[data-padding-regular=condensed]",
49
+ ".Stack[data-padding-regular=normal]",
50
+ ".Stack[data-padding-regular=spacious]",
51
+ ".Stack[data-direction-regular=horizontal]",
52
+ ".Stack[data-direction-regular=vertical]",
53
+ ".Stack[data-gap-regular=none]",
54
+ ".Stack[data-gap-regular=condensed]",
55
+ ".Stack[data-gap-regular=normal]",
56
+ ".Stack[data-gap-regular=spacious]",
57
+ ".Stack[data-align-regular=start]",
58
+ ".Stack[data-align-regular=center]",
59
+ ".Stack[data-align-regular=end]",
60
+ ".Stack[data-align-regular=baseline]",
61
+ ".Stack[data-justify-regular=start]",
62
+ ".Stack[data-justify-regular=center]",
63
+ ".Stack[data-justify-regular=end]",
64
+ ".Stack[data-justify-regular=space-between]",
65
+ ".Stack[data-justify-regular=space-evenly]",
66
+ ".Stack[data-wrap-regular=wrap]",
67
+ ".Stack[data-wrap-regular=nowrap]",
68
+ ".Stack[data-padding-wide=none]",
69
+ ".Stack[data-padding-wide=condensed]",
70
+ ".Stack[data-padding-wide=normal]",
71
+ ".Stack[data-padding-wide=spacious]",
72
+ ".Stack[data-direction-wide=horizontal]",
73
+ ".Stack[data-direction-wide=vertical]",
74
+ ".Stack[data-gap-wide=none]",
75
+ ".Stack[data-gap-wide=condensed]",
76
+ ".Stack[data-gap-wide=normal]",
77
+ ".Stack[data-gap-wide=spacious]",
78
+ ".Stack[data-align-wide=start]",
79
+ ".Stack[data-align-wide=center]",
80
+ ".Stack[data-align-wide=end]",
81
+ ".Stack[data-align-wide=baseline]",
82
+ ".Stack[data-justify-wide=start]",
83
+ ".Stack[data-justify-wide=center]",
84
+ ".Stack[data-justify-wide=end]",
85
+ ".Stack[data-justify-wide=space-between]",
86
+ ".Stack[data-justify-wide=space-evenly]",
87
+ ".Stack[data-wrap-wide=wrap]",
88
+ ".Stack[data-wrap-wide=nowrap]"
89
+ ]
90
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["stack.pcss"],"names":[],"mappings":"AAAA,OAIE,wBAAyB,CADzB,mBAAoB,CAFpB,YAAa,CACb,gBAAiB,CAGjB,iDAmSF,CA/RE,2DAEE,SACF,CAEA,qEAGE,0CACF,CAEA,+DAGE,wCACF,CAEA,mEAGE,0CACF,CAEA,2EAEE,aACF,CAEA,uEAEE,gBACF,CAEA,mDAEE,mCACF,CAEA,6DAEE,6CACF,CAEA,uDAEE,wCACF,CAEA,2DAEE,4CACF,CAEA,yDAEE,sBACF,CAEA,2DAEE,kBACF,CAEA,qDAEE,oBACF,CAEA,+DAEE,oBACF,CAEA,6DAEE,0BACF,CAEA,+DAEE,sBACF,CAEA,yDAEE,wBACF,CAEA,6EAEE,6BACF,CAEA,2EAEE,4BACF,CAEA,qDAEE,cACF,CAEA,yDAEE,gBACF,CAGA,yBACE,kCACE,SACF,CAEA,uCAEE,0CACF,CAEA,oCAEE,wCACF,CAEA,sCAEE,0CACF,CAEA,0CACE,aACF,CAEA,wCACE,gBACF,CAEA,8BACE,mCACF,CAEA,mCACE,6CACF,CAEA,gCACE,wCACF,CAEA,kCACE,4CACF,CAEA,iCACE,sBACF,CAEA,kCACE,kBACF,CAEA,+BACE,oBACF,CAEA,oCACE,oBACF,CAEA,mCACE,0BACF,CAEA,oCACE,sBACF,CAEA,iCACE,wBACF,CAEA,2CACE,6BACF,CAEA,0CACE,4BACF,CAEA,+BACE,cACF,CAEA,iCACE,gBACF,CACF,CAGA,2BACE,+BACE,SACF,CAEA,oCAEE,0CACF,CAEA,iCAEE,wCACF,CAEA,mCAEE,0CACF,CAEA,uCACE,aACF,CAEA,qCACE,gBACF,CAEA,2BACE,mCACF,CAEA,gCACE,6CACF,CAEA,6BACE,wCACF,CAEA,+BACE,4CACF,CAEA,8BACE,sBACF,CAEA,+BACE,kBACF,CAEA,4BACE,oBACF,CAEA,iCACE,oBACF,CAEA,gCACE,0BACF,CAEA,iCACE,sBACF,CAEA,8BACE,wBACF,CAEA,wCACE,6BACF,CAEA,uCACE,4BACF,CAEA,4BACE,cACF,CAEA,8BACE,gBACF,CACF","file":"stack.css","sourcesContent":[".Stack {\n display: flex;\n flex-flow: column;\n align-items: stretch;\n align-content: flex-start;\n gap: var(--stack-gap, var(--stack-gap-normal, 1rem));\n\n /* non-responsive values */\n\n &[data-padding='none'],\n &[data-padding-narrow='none'] {\n padding: 0;\n }\n\n &[data-padding='condensed'],\n &[data-padding-narrow='condensed'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-condensed, 8px);\n }\n\n &[data-padding='normal'],\n &[data-padding-narrow='normal'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-normal, 16px);\n }\n\n &[data-padding='spacious'],\n &[data-padding-narrow='spacious'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-spacious, 24px);\n }\n\n &[data-direction='horizontal'],\n &[data-direction-narrow='horizontal'] {\n flex-flow: row;\n }\n\n &[data-direction='vertical'],\n &[data-direction-narrow='vertical'] {\n flex-flow: column;\n }\n\n &[data-gap='none'],\n &[data-gap-narrow='none'] {\n --stack-gap: var(--stack-gap-none, 0);\n }\n\n &[data-gap='condensed'],\n &[data-gap-narrow='condensed'] {\n --stack-gap: var(--stack-gap-condensed, 0.5rem);\n }\n\n &[data-gap='normal'],\n &[data-gap-narrow='normal'] {\n --stack-gap: var(--stack-gap-normal, 1rem);\n }\n\n &[data-gap='spacious'],\n &[data-gap-narrow='spacious'] {\n --stack-gap: var(--stack-gap-spacious, 1.5rem);\n }\n\n &[data-align='start'],\n &[data-align-narrow='start'] {\n align-items: flex-start;\n }\n\n &[data-align='center'],\n &[data-align-narrow='center'] {\n align-items: center;\n }\n\n &[data-align='end'],\n &[data-align-narrow='end'] {\n align-items: flex-end;\n }\n\n &[data-align='baseline'],\n &[data-align-narrow='baseline'] {\n align-items: baseline;\n }\n\n &[data-justify='start'],\n &[data-justify-narrow='start'] {\n justify-content: flex-start;\n }\n\n &[data-justify='center'],\n &[data-justify-narrow='center'] {\n justify-content: center;\n }\n\n &[data-justify='end'],\n &[data-justify-narrow='end'] {\n justify-content: flex-end;\n }\n\n &[data-justify='space-between'],\n &[data-justify-narrow='space-between'] {\n justify-content: space-between;\n }\n\n &[data-justify='space-evenly'],\n &[data-justify-narrow='space-evenly'] {\n justify-content: space-evenly;\n }\n\n &[data-wrap='wrap'],\n &[data-wrap-narrow='wrap'] {\n flex-wrap: wrap;\n }\n\n &[data-wrap='nowrap'],\n &[data-wrap-narrow='nowrap'] {\n flex-wrap: nowrap;\n }\n\n /* @custom-media --veiwportRange-regular */\n @media (min-width: 48rem) {\n &[data-padding-regular='none'] {\n padding: 0;\n }\n\n &[data-padding-regular='condensed'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-condensed, 8px);\n }\n\n &[data-padding-regular='normal'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-normal, 16px);\n }\n\n &[data-padding-regular='spacious'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-spacious, 24px);\n }\n\n &[data-direction-regular='horizontal'] {\n flex-flow: row;\n }\n\n &[data-direction-regular='vertical'] {\n flex-flow: column;\n }\n\n &[data-gap-regular='none'] {\n --stack-gap: var(--stack-gap-none, 0);\n }\n\n &[data-gap-regular='condensed'] {\n --stack-gap: var(--stack-gap-condensed, 0.5rem);\n }\n\n &[data-gap-regular='normal'] {\n --stack-gap: var(--stack-gap-normal, 1rem);\n }\n\n &[data-gap-regular='spacious'] {\n --stack-gap: var(--stack-gap-spacious, 1.5rem);\n }\n\n &[data-align-regular='start'] {\n align-items: flex-start;\n }\n\n &[data-align-regular='center'] {\n align-items: center;\n }\n\n &[data-align-regular='end'] {\n align-items: flex-end;\n }\n\n &[data-align-regular='baseline'] {\n align-items: baseline;\n }\n\n &[data-justify-regular='start'] {\n justify-content: flex-start;\n }\n\n &[data-justify-regular='center'] {\n justify-content: center;\n }\n\n &[data-justify-regular='end'] {\n justify-content: flex-end;\n }\n\n &[data-justify-regular='space-between'] {\n justify-content: space-between;\n }\n\n &[data-justify-regular='space-evenly'] {\n justify-content: space-evenly;\n }\n\n &[data-wrap-regular='wrap'] {\n flex-wrap: wrap;\n }\n\n &[data-wrap-regular='nowrap'] {\n flex-wrap: nowrap;\n }\n }\n\n /* @custom-media --viewportRange-wide */\n @media (min-width: 87.5rem) {\n &[data-padding-wide='none'] {\n padding: 0;\n }\n\n &[data-padding-wide='condensed'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-condensed, 8px);\n }\n\n &[data-padding-wide='normal'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-normal, 16px);\n }\n\n &[data-padding-wide='spacious'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-spacious, 24px);\n }\n\n &[data-direction-wide='horizontal'] {\n flex-flow: row;\n }\n\n &[data-direction-wide='vertical'] {\n flex-flow: column;\n }\n\n &[data-gap-wide='none'] {\n --stack-gap: var(--stack-gap-none, 0);\n }\n\n &[data-gap-wide='condensed'] {\n --stack-gap: var(--stack-gap-condensed, 0.5rem);\n }\n\n &[data-gap-wide='normal'] {\n --stack-gap: var(--stack-gap-normal, 1rem);\n }\n\n &[data-gap-wide='spacious'] {\n --stack-gap: var(--stack-gap-spacious, 1.5rem);\n }\n\n &[data-align-wide='start'] {\n align-items: flex-start;\n }\n\n &[data-align-wide='center'] {\n align-items: center;\n }\n\n &[data-align-wide='end'] {\n align-items: flex-end;\n }\n\n &[data-align-wide='baseline'] {\n align-items: baseline;\n }\n\n &[data-justify-wide='start'] {\n justify-content: flex-start;\n }\n\n &[data-justify-wide='center'] {\n justify-content: center;\n }\n\n &[data-justify-wide='end'] {\n justify-content: flex-end;\n }\n\n &[data-justify-wide='space-between'] {\n justify-content: space-between;\n }\n\n &[data-justify-wide='space-evenly'] {\n justify-content: space-evenly;\n }\n\n &[data-wrap-wide='wrap'] {\n flex-wrap: wrap;\n }\n\n &[data-wrap-wide='nowrap'] {\n flex-wrap: nowrap;\n }\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ <%= render(Primer::BaseComponent.new(**@system_arguments)) do %>
2
+ <%= content %>
3
+ <% end %>
@@ -0,0 +1,297 @@
1
+ .Stack {
2
+ display: flex;
3
+ flex-flow: column;
4
+ align-items: stretch;
5
+ align-content: flex-start;
6
+ gap: var(--stack-gap, var(--stack-gap-normal, 1rem));
7
+
8
+ /* non-responsive values */
9
+
10
+ &[data-padding='none'],
11
+ &[data-padding-narrow='none'] {
12
+ padding: 0;
13
+ }
14
+
15
+ &[data-padding='condensed'],
16
+ &[data-padding-narrow='condensed'] {
17
+ /* stylelint-disable-next-line primer/spacing */
18
+ padding: var(--stack-padding-condensed, 8px);
19
+ }
20
+
21
+ &[data-padding='normal'],
22
+ &[data-padding-narrow='normal'] {
23
+ /* stylelint-disable-next-line primer/spacing */
24
+ padding: var(--stack-padding-normal, 16px);
25
+ }
26
+
27
+ &[data-padding='spacious'],
28
+ &[data-padding-narrow='spacious'] {
29
+ /* stylelint-disable-next-line primer/spacing */
30
+ padding: var(--stack-padding-spacious, 24px);
31
+ }
32
+
33
+ &[data-direction='horizontal'],
34
+ &[data-direction-narrow='horizontal'] {
35
+ flex-flow: row;
36
+ }
37
+
38
+ &[data-direction='vertical'],
39
+ &[data-direction-narrow='vertical'] {
40
+ flex-flow: column;
41
+ }
42
+
43
+ &[data-gap='none'],
44
+ &[data-gap-narrow='none'] {
45
+ --stack-gap: var(--stack-gap-none, 0);
46
+ }
47
+
48
+ &[data-gap='condensed'],
49
+ &[data-gap-narrow='condensed'] {
50
+ --stack-gap: var(--stack-gap-condensed, 0.5rem);
51
+ }
52
+
53
+ &[data-gap='normal'],
54
+ &[data-gap-narrow='normal'] {
55
+ --stack-gap: var(--stack-gap-normal, 1rem);
56
+ }
57
+
58
+ &[data-gap='spacious'],
59
+ &[data-gap-narrow='spacious'] {
60
+ --stack-gap: var(--stack-gap-spacious, 1.5rem);
61
+ }
62
+
63
+ &[data-align='start'],
64
+ &[data-align-narrow='start'] {
65
+ align-items: flex-start;
66
+ }
67
+
68
+ &[data-align='center'],
69
+ &[data-align-narrow='center'] {
70
+ align-items: center;
71
+ }
72
+
73
+ &[data-align='end'],
74
+ &[data-align-narrow='end'] {
75
+ align-items: flex-end;
76
+ }
77
+
78
+ &[data-align='baseline'],
79
+ &[data-align-narrow='baseline'] {
80
+ align-items: baseline;
81
+ }
82
+
83
+ &[data-justify='start'],
84
+ &[data-justify-narrow='start'] {
85
+ justify-content: flex-start;
86
+ }
87
+
88
+ &[data-justify='center'],
89
+ &[data-justify-narrow='center'] {
90
+ justify-content: center;
91
+ }
92
+
93
+ &[data-justify='end'],
94
+ &[data-justify-narrow='end'] {
95
+ justify-content: flex-end;
96
+ }
97
+
98
+ &[data-justify='space-between'],
99
+ &[data-justify-narrow='space-between'] {
100
+ justify-content: space-between;
101
+ }
102
+
103
+ &[data-justify='space-evenly'],
104
+ &[data-justify-narrow='space-evenly'] {
105
+ justify-content: space-evenly;
106
+ }
107
+
108
+ &[data-wrap='wrap'],
109
+ &[data-wrap-narrow='wrap'] {
110
+ flex-wrap: wrap;
111
+ }
112
+
113
+ &[data-wrap='nowrap'],
114
+ &[data-wrap-narrow='nowrap'] {
115
+ flex-wrap: nowrap;
116
+ }
117
+
118
+ /* @custom-media --veiwportRange-regular */
119
+ @media (min-width: 48rem) {
120
+ &[data-padding-regular='none'] {
121
+ padding: 0;
122
+ }
123
+
124
+ &[data-padding-regular='condensed'] {
125
+ /* stylelint-disable-next-line primer/spacing */
126
+ padding: var(--stack-padding-condensed, 8px);
127
+ }
128
+
129
+ &[data-padding-regular='normal'] {
130
+ /* stylelint-disable-next-line primer/spacing */
131
+ padding: var(--stack-padding-normal, 16px);
132
+ }
133
+
134
+ &[data-padding-regular='spacious'] {
135
+ /* stylelint-disable-next-line primer/spacing */
136
+ padding: var(--stack-padding-spacious, 24px);
137
+ }
138
+
139
+ &[data-direction-regular='horizontal'] {
140
+ flex-flow: row;
141
+ }
142
+
143
+ &[data-direction-regular='vertical'] {
144
+ flex-flow: column;
145
+ }
146
+
147
+ &[data-gap-regular='none'] {
148
+ --stack-gap: var(--stack-gap-none, 0);
149
+ }
150
+
151
+ &[data-gap-regular='condensed'] {
152
+ --stack-gap: var(--stack-gap-condensed, 0.5rem);
153
+ }
154
+
155
+ &[data-gap-regular='normal'] {
156
+ --stack-gap: var(--stack-gap-normal, 1rem);
157
+ }
158
+
159
+ &[data-gap-regular='spacious'] {
160
+ --stack-gap: var(--stack-gap-spacious, 1.5rem);
161
+ }
162
+
163
+ &[data-align-regular='start'] {
164
+ align-items: flex-start;
165
+ }
166
+
167
+ &[data-align-regular='center'] {
168
+ align-items: center;
169
+ }
170
+
171
+ &[data-align-regular='end'] {
172
+ align-items: flex-end;
173
+ }
174
+
175
+ &[data-align-regular='baseline'] {
176
+ align-items: baseline;
177
+ }
178
+
179
+ &[data-justify-regular='start'] {
180
+ justify-content: flex-start;
181
+ }
182
+
183
+ &[data-justify-regular='center'] {
184
+ justify-content: center;
185
+ }
186
+
187
+ &[data-justify-regular='end'] {
188
+ justify-content: flex-end;
189
+ }
190
+
191
+ &[data-justify-regular='space-between'] {
192
+ justify-content: space-between;
193
+ }
194
+
195
+ &[data-justify-regular='space-evenly'] {
196
+ justify-content: space-evenly;
197
+ }
198
+
199
+ &[data-wrap-regular='wrap'] {
200
+ flex-wrap: wrap;
201
+ }
202
+
203
+ &[data-wrap-regular='nowrap'] {
204
+ flex-wrap: nowrap;
205
+ }
206
+ }
207
+
208
+ /* @custom-media --viewportRange-wide */
209
+ @media (min-width: 87.5rem) {
210
+ &[data-padding-wide='none'] {
211
+ padding: 0;
212
+ }
213
+
214
+ &[data-padding-wide='condensed'] {
215
+ /* stylelint-disable-next-line primer/spacing */
216
+ padding: var(--stack-padding-condensed, 8px);
217
+ }
218
+
219
+ &[data-padding-wide='normal'] {
220
+ /* stylelint-disable-next-line primer/spacing */
221
+ padding: var(--stack-padding-normal, 16px);
222
+ }
223
+
224
+ &[data-padding-wide='spacious'] {
225
+ /* stylelint-disable-next-line primer/spacing */
226
+ padding: var(--stack-padding-spacious, 24px);
227
+ }
228
+
229
+ &[data-direction-wide='horizontal'] {
230
+ flex-flow: row;
231
+ }
232
+
233
+ &[data-direction-wide='vertical'] {
234
+ flex-flow: column;
235
+ }
236
+
237
+ &[data-gap-wide='none'] {
238
+ --stack-gap: var(--stack-gap-none, 0);
239
+ }
240
+
241
+ &[data-gap-wide='condensed'] {
242
+ --stack-gap: var(--stack-gap-condensed, 0.5rem);
243
+ }
244
+
245
+ &[data-gap-wide='normal'] {
246
+ --stack-gap: var(--stack-gap-normal, 1rem);
247
+ }
248
+
249
+ &[data-gap-wide='spacious'] {
250
+ --stack-gap: var(--stack-gap-spacious, 1.5rem);
251
+ }
252
+
253
+ &[data-align-wide='start'] {
254
+ align-items: flex-start;
255
+ }
256
+
257
+ &[data-align-wide='center'] {
258
+ align-items: center;
259
+ }
260
+
261
+ &[data-align-wide='end'] {
262
+ align-items: flex-end;
263
+ }
264
+
265
+ &[data-align-wide='baseline'] {
266
+ align-items: baseline;
267
+ }
268
+
269
+ &[data-justify-wide='start'] {
270
+ justify-content: flex-start;
271
+ }
272
+
273
+ &[data-justify-wide='center'] {
274
+ justify-content: center;
275
+ }
276
+
277
+ &[data-justify-wide='end'] {
278
+ justify-content: flex-end;
279
+ }
280
+
281
+ &[data-justify-wide='space-between'] {
282
+ justify-content: space-between;
283
+ }
284
+
285
+ &[data-justify-wide='space-evenly'] {
286
+ justify-content: space-evenly;
287
+ }
288
+
289
+ &[data-wrap-wide='wrap'] {
290
+ flex-wrap: wrap;
291
+ }
292
+
293
+ &[data-wrap-wide='nowrap'] {
294
+ flex-wrap: nowrap;
295
+ }
296
+ }
297
+ }
@@ -0,0 +1,185 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module Alpha
5
+ # Stack is a layout component that creates responsive horizontal and vertical flows.
6
+ class Stack < Primer::Component
7
+ DEFAULT_TAG = :div
8
+
9
+ # Stack's justify argument. Used internally.
10
+ class JustifyArg < Primer::ResponsiveArg
11
+ attr_reader :values
12
+ DEFAULT = :start
13
+ MAPPING = {
14
+ DEFAULT => "start",
15
+ :center => "center",
16
+ :end => "end",
17
+ :space_between => "space-between",
18
+ :space_evenly => "space-evenly"
19
+ }.freeze
20
+ OPTIONS = [nil, *MAPPING.keys.freeze]
21
+
22
+ def initialize(values)
23
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT) do |value|
24
+ MAPPING[value]
25
+ end
26
+ end
27
+
28
+ def self.arg_name
29
+ :justify
30
+ end
31
+ end
32
+
33
+ # Stack's direction argument. Used internally.
34
+ class DirectionArg < Primer::ResponsiveArg
35
+ attr_reader :values
36
+ DEFAULT = :vertical
37
+ OPTIONS = [
38
+ nil,
39
+ DEFAULT,
40
+ :horizontal
41
+ ].freeze
42
+
43
+ def initialize(values)
44
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT)
45
+ end
46
+
47
+ def self.arg_name
48
+ :direction
49
+ end
50
+ end
51
+
52
+ # Stack's align argument. Used internally.
53
+ class AlignArg < Primer::ResponsiveArg
54
+ attr_reader :values
55
+ DEFAULT = :stretch
56
+ OPTIONS = [
57
+ nil,
58
+ DEFAULT,
59
+ :start,
60
+ :center,
61
+ :end,
62
+ :baseline
63
+ ].freeze
64
+
65
+ def initialize(values)
66
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT)
67
+ end
68
+
69
+ def self.arg_name
70
+ :align
71
+ end
72
+ end
73
+
74
+ # Stack's wrap argument. Used internally.
75
+ class WrapArg < Primer::ResponsiveArg
76
+ attr_reader :values
77
+ DEFAULT = :nowrap
78
+ OPTIONS = [
79
+ nil,
80
+ DEFAULT,
81
+ :wrap
82
+ ].freeze
83
+
84
+ def initialize(values)
85
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT)
86
+ end
87
+
88
+ def self.arg_name
89
+ :wrap
90
+ end
91
+ end
92
+
93
+ # Stack's padding argument. Used internally.
94
+ class PaddingArg < Primer::ResponsiveArg
95
+ attr_reader :values
96
+ DEFAULT = :none
97
+ OPTIONS = [
98
+ nil,
99
+ DEFAULT,
100
+ :condensed,
101
+ :normal,
102
+ :spacious
103
+ ].freeze
104
+
105
+ def initialize(values)
106
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT)
107
+ end
108
+
109
+ def self.arg_name
110
+ :padding
111
+ end
112
+ end
113
+
114
+ # Stack's gap argument. Used internally.
115
+ class GapArg < Primer::ResponsiveArg
116
+ attr_reader :values
117
+ DEFAULT = nil
118
+ OPTIONS = [
119
+ DEFAULT,
120
+ :condensed,
121
+ :normal,
122
+ :spacious
123
+ ].freeze
124
+
125
+ def initialize(values)
126
+ @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT)
127
+ end
128
+
129
+ def self.arg_name
130
+ :gap
131
+ end
132
+ end
133
+
134
+ ARG_CLASSES = [
135
+ JustifyArg,
136
+ DirectionArg,
137
+ AlignArg,
138
+ WrapArg,
139
+ PaddingArg,
140
+ GapArg
141
+ ].freeze
142
+
143
+
144
+ # @param tag [Symbol] Customize the element type of the rendered container.
145
+ # @param gap [Symbol] Specify the gap between children elements in the stack. <%= one_of(Primer::Alpha::Stack::GapArg::OPTIONS) %>
146
+ # @param direction [Symbol] Specify the direction for the stack container. <%= one_of(Primer::Alpha::Stack::DirectionArg::OPTIONS) %>
147
+ # @param align [Symbol] Specify the alignment between items in the cross-axis of the direction. <%= one_of(Primer::Alpha::Stack::AlignArg::OPTIONS) %>
148
+ # @param wrap [Symbol] Specify whether items are forced onto one line or can wrap onto multiple lines. <%= one_of(Primer::Alpha::Stack::WrapArg::OPTIONS) %>
149
+ # @param justify [Symbol] Specify how items will be distributed in the stacking direction. <%= one_of(Primer::Alpha::Stack::JustifyArg::OPTIONS) %>
150
+ # @param padding [Symbol] Specify the padding of the stack container. <%= one_of(Primer::Alpha::Stack::PaddingArg::OPTIONS) %>
151
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
152
+ def initialize(
153
+ tag: DEFAULT_TAG,
154
+ justify: JustifyArg::DEFAULT,
155
+ gap: GapArg::DEFAULT,
156
+ direction: DirectionArg::DEFAULT,
157
+ align: AlignArg::DEFAULT,
158
+ wrap: WrapArg::DEFAULT,
159
+ padding: PaddingArg::DEFAULT,
160
+ **system_arguments
161
+ )
162
+ @system_arguments = system_arguments
163
+
164
+ @system_arguments[:tag] = tag
165
+ @system_arguments[:classes] = class_names(
166
+ @system_arguments.delete(:classes),
167
+ "Stack"
168
+ )
169
+
170
+ @system_arguments[:data] = merge_data(
171
+ @system_arguments, {
172
+ data: {
173
+ **JustifyArg.for(justify).to_data_attributes,
174
+ **GapArg.for(gap).to_data_attributes,
175
+ **DirectionArg.for(direction).to_data_attributes,
176
+ **AlignArg.for(align).to_data_attributes,
177
+ **WrapArg.for(wrap).to_data_attributes,
178
+ **PaddingArg.for(padding).to_data_attributes,
179
+ }
180
+ }
181
+ )
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1 @@
1
+ .StackItem{flex:0 1 auto;min-inline-size:0}.StackItem[data-grow-narrow=true],.StackItem[data-grow=true]{flex-grow:1}@media (min-width:48rem){.StackItem[data-grow-regular=true]{flex-grow:1}.StackItem[data-grow-regular=false]{flex-grow:0}}@media (min-width:87.5rem){.StackItem[data-grow-wide=true]{flex-grow:1}.StackItem[data-grow-wide=false]{flex-grow:0}}
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "alpha/stack_item",
3
+ "selectors": [
4
+ ".StackItem",
5
+ ".StackItem[data-grow-narrow=true]",
6
+ ".StackItem[data-grow=true]",
7
+ ".StackItem[data-grow-regular=true]",
8
+ ".StackItem[data-grow-regular=false]",
9
+ ".StackItem[data-grow-wide=true]",
10
+ ".StackItem[data-grow-wide=false]"
11
+ ]
12
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["stack_item.pcss"],"names":[],"mappings":"AAAA,WACE,aAAc,CACd,iBA4BF,CA1BE,6DAEE,WACF,CAGA,yBACE,mCACE,WACF,CAEA,oCACE,WACF,CACF,CAGA,2BACE,gCACE,WACF,CAEA,iCACE,WACF,CACF","file":"stack_item.css","sourcesContent":[".StackItem {\n flex: 0 1 auto;\n min-inline-size: 0;\n\n &[data-grow='true'],\n &[data-grow-narrow='true'] {\n flex-grow: 1;\n }\n\n /* @custom-media --veiwportRange-regular */\n @media (min-width: 48rem) {\n &[data-grow-regular='true'] {\n flex-grow: 1;\n }\n\n &[data-grow-regular='false'] {\n flex-grow: 0;\n }\n }\n\n /* @custom-media --viewportRange-wide */\n @media (min-width: 87.5rem) {\n &[data-grow-wide='true'] {\n flex-grow: 1;\n }\n\n &[data-grow-wide='false'] {\n flex-grow: 0;\n }\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ <%= render(Primer::BaseComponent.new(**@system_arguments)) do %>
2
+ <%= content %>
3
+ <% end %>
@@ -0,0 +1,31 @@
1
+ .StackItem {
2
+ flex: 0 1 auto;
3
+ min-inline-size: 0;
4
+
5
+ &[data-grow='true'],
6
+ &[data-grow-narrow='true'] {
7
+ flex-grow: 1;
8
+ }
9
+
10
+ /* @custom-media --veiwportRange-regular */
11
+ @media (min-width: 48rem) {
12
+ &[data-grow-regular='true'] {
13
+ flex-grow: 1;
14
+ }
15
+
16
+ &[data-grow-regular='false'] {
17
+ flex-grow: 0;
18
+ }
19
+ }
20
+
21
+ /* @custom-media --viewportRange-wide */
22
+ @media (min-width: 87.5rem) {
23
+ &[data-grow-wide='true'] {
24
+ flex-grow: 1;
25
+ }
26
+
27
+ &[data-grow-wide='false'] {
28
+ flex-grow: 0;
29
+ }
30
+ }
31
+ }