openproject-primer_view_components 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/app/assets/javascripts/app/components/primer/dialog_helper.d.ts +15 -0
- data/app/assets/javascripts/app/components/primer/primer.d.ts +1 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.js +8 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +8 -0
- data/app/components/primer/alpha/action_menu.rb +3 -1
- data/app/components/primer/alpha/banner.rb +7 -3
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +12 -27
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.html.erb +2 -2
- data/app/components/primer/alpha/dialog.pcss +78 -143
- data/app/components/primer/alpha/dialog.rb +10 -13
- data/app/components/primer/alpha/overlay.css +1 -1
- data/app/components/primer/alpha/overlay.css.json +1 -0
- data/app/components/primer/alpha/overlay.css.map +1 -1
- data/app/components/primer/alpha/overlay.pcss +1 -1
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/base_component.rb +1 -1
- data/app/components/primer/dialog_helper.d.ts +15 -0
- data/app/components/primer/dialog_helper.js +85 -0
- data/app/components/primer/dialog_helper.ts +88 -0
- data/app/components/primer/open_project/page_header.rb +3 -3
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/lib/primer/classify/utilities.rb +1 -1
- data/lib/primer/deprecations.yml +3 -3
- data/lib/primer/forms/dsl/button_input.rb +4 -0
- data/lib/primer/forms/dsl/check_box_input.rb +6 -0
- data/lib/primer/forms/dsl/hidden_input.rb +4 -0
- data/lib/primer/forms/dsl/input.rb +7 -3
- data/lib/primer/forms/dsl/radio_button_input.rb +6 -0
- data/lib/primer/forms/dsl/select_input.rb +3 -1
- data/lib/primer/forms/dsl/submit_button_input.rb +4 -0
- data/lib/primer/forms/form_control.html.erb +3 -1
- data/lib/primer/view_components/linters/tooltipped_migration.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/primer/yard/docs_helper.rb +1 -1
- data/previews/primer/alpha/dialog_preview/nested_dialog.html.erb +1 -1
- data/previews/primer/alpha/dialog_preview/scroll_container.html.erb +35 -0
- data/previews/primer/alpha/dialog_preview.rb +61 -1
- data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb +2 -3
- data/previews/primer/alpha/tooltip_preview.rb +1 -1
- data/previews/primer/beta/button_preview/trailing_visual.html.erb +2 -1
- data/previews/primer/beta/button_preview.rb +4 -2
- data/previews/primer/open_project/page_header_preview.rb +4 -4
- data/static/arguments.json +12 -0
- data/static/classes.json +5 -20
- data/static/constants.json +17 -11
- data/static/info_arch.json +67 -3
- data/static/previews.json +54 -2
- metadata +8 -3
@@ -121,7 +121,7 @@ module Primer
|
|
121
121
|
@base_id = SecureRandom.uuid
|
122
122
|
|
123
123
|
@ids = {}.tap do |id_map|
|
124
|
-
id_map[:validation] = "validation-#{@base_id}"
|
124
|
+
id_map[:validation] = "validation-#{@base_id}" if supports_validation?
|
125
125
|
id_map[:caption] = "caption-#{@base_id}" if caption? || caption_template?
|
126
126
|
end
|
127
127
|
|
@@ -208,11 +208,11 @@ module Primer
|
|
208
208
|
end
|
209
209
|
|
210
210
|
def valid?
|
211
|
-
validation_messages.empty? && !@invalid
|
211
|
+
supports_validation? && validation_messages.empty? && !@invalid
|
212
212
|
end
|
213
213
|
|
214
214
|
def invalid?
|
215
|
-
!valid?
|
215
|
+
supports_validation? && !valid?
|
216
216
|
end
|
217
217
|
|
218
218
|
def hidden?
|
@@ -284,6 +284,10 @@ module Primer
|
|
284
284
|
true
|
285
285
|
end
|
286
286
|
|
287
|
+
def supports_validation?
|
288
|
+
true
|
289
|
+
end
|
290
|
+
|
287
291
|
def validation_arguments
|
288
292
|
{
|
289
293
|
class: "FormControl-inlineValidation",
|
@@ -18,9 +18,11 @@ module Primer
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# radio buttons cannot be invalid, as both selected and unselected are valid states
|
21
|
+
# :nocov:
|
21
22
|
def valid?
|
22
23
|
true
|
23
24
|
end
|
25
|
+
# :nocov:
|
24
26
|
|
25
27
|
def to_component
|
26
28
|
RadioButton.new(input: self)
|
@@ -36,6 +38,10 @@ module Primer
|
|
36
38
|
:radio_button
|
37
39
|
end
|
38
40
|
# :nocov:
|
41
|
+
|
42
|
+
def supports_validation?
|
43
|
+
false
|
44
|
+
end
|
39
45
|
end
|
40
46
|
end
|
41
47
|
end
|
@@ -9,12 +9,14 @@ module Primer
|
|
9
9
|
|
10
10
|
# :nodoc:
|
11
11
|
class Option
|
12
|
+
include Primer::TestSelectorHelper
|
13
|
+
|
12
14
|
attr_reader :label, :value, :system_arguments
|
13
15
|
|
14
16
|
def initialize(label:, value:, **system_arguments)
|
15
17
|
@label = label
|
16
18
|
@value = value
|
17
|
-
@system_arguments = system_arguments
|
19
|
+
@system_arguments = add_test_selector(system_arguments)
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
@@ -9,7 +9,9 @@
|
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
11
|
<%= content %>
|
12
|
-
|
12
|
+
<% if @input.supports_validation? %>
|
13
|
+
<%= render(ValidationMessage.new(input: @input)) %>
|
14
|
+
<% end %>
|
13
15
|
<%= render(Caption.new(input: @input)) %>
|
14
16
|
<% end %>
|
15
17
|
<% else %>
|
@@ -10,7 +10,7 @@ module ERBLint
|
|
10
10
|
include LinterRegistry
|
11
11
|
include Helpers::RuleHelpers
|
12
12
|
|
13
|
-
MIGRATE_TO_NEWER_TOOLTIP = ".tooltipped has been deprecated. There are major accessibility concerns with using this tooltip so please take action. See https://primer.style/
|
13
|
+
MIGRATE_TO_NEWER_TOOLTIP = ".tooltipped has been deprecated. There are major accessibility concerns with using this tooltip so please take action. See https://primer.style/guides/rails/migration-guides/primer-css-tooltipped."
|
14
14
|
TOOLTIPPED_RUBY_PATTERN = /classes:.*tooltipped|class:.*tooltipped/.freeze
|
15
15
|
|
16
16
|
def run(processed_source)
|
@@ -8,7 +8,7 @@ module Primer
|
|
8
8
|
module DocsHelper
|
9
9
|
def one_of(enumerable, lower: false, sort: true)
|
10
10
|
# Sort the array if requested
|
11
|
-
if sort
|
11
|
+
if sort && !enumerable.nil?
|
12
12
|
enumerable = enumerable.sort do |a, b|
|
13
13
|
a.instance_of?(b.class) ? a <=> b : a.class.to_s <=> b.class.to_s
|
14
14
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render(Primer::Alpha::Dialog.new(id: "dialog-one", title: title, subtitle: subtitle, visually_hide_title: false)) do |d| %>
|
1
|
+
<%= render(Primer::Alpha::Dialog.new(id: "dialog-one", title: title, position: position, subtitle: subtitle, visually_hide_title: false)) do |d| %>
|
2
2
|
<% d.with_show_button { button_text } %>
|
3
3
|
<% d.with_body do %>
|
4
4
|
<p>Dialog One!</p>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= render(Primer::Alpha::Dialog.new(id: "dialog-one", title: title, position: position, subtitle: subtitle, visually_hide_title: false)) do |d| %>
|
2
|
+
<% d.with_show_button { button_text } %>
|
3
|
+
<% d.with_body { body_text} %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<!-- just some lorem ipsum -->
|
7
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut etiam sit amet nisl purus in. Amet risus nullam eget felis. Consectetur adipiscing elit ut aliquam purus sit amet luctus. Non quam lacus suspendisse faucibus interdum. Tempus iaculis urna id volutpat lacus laoreet non curabitur. Ipsum nunc aliquet bibendum enim facilisis gravida. Egestas pretium aenean pharetra magna. Amet mattis vulputate enim nulla aliquet. Diam vel quam elementum pulvinar etiam non. Tempor orci eu lobortis elementum. Arcu non odio euismod lacinia at quis risus sed.</p>
|
8
|
+
|
9
|
+
<p>Aenean pharetra magna ac placerat vestibulum lectus mauris. Aenean euismod elementum nisi quis eleifend quam. Duis at tellus at urna condimentum. Tortor dignissim convallis aenean et tortor. Eget nullam non nisi est sit amet facilisis magna. Fermentum et sollicitudin ac orci phasellus egestas tellus. Ac turpis egestas maecenas pharetra convallis posuere morbi leo urna. In nisl nisi scelerisque eu. A erat nam at lectus. Dolor magna eget est lorem. Volutpat diam ut venenatis tellus in metus vulputate eu scelerisque. Eros donec ac odio tempor orci dapibus ultrices in iaculis. Aenean et tortor at risus. Suspendisse sed nisi lacus sed viverra tellus in. Arcu felis bibendum ut tristique et.</p>
|
10
|
+
|
11
|
+
<p>At ultrices mi tempus imperdiet nulla malesuada pellentesque elit. Nisl suscipit adipiscing bibendum est ultricies integer quis. Nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur. Malesuada fames ac turpis egestas maecenas. Fames ac turpis egestas sed tempus urna et pharetra. Vitae elementum curabitur vitae nunc sed velit dignissim sodales ut. Nisi lacus sed viverra tellus in hac habitasse platea. Arcu non odio euismod lacinia at quis risus sed vulputate. Ac placerat vestibulum lectus mauris ultrices eros. Magna sit amet purus gravida quis blandit turpis. Arcu felis bibendum ut tristique. Egestas congue quisque egestas diam in arcu cursus. Pretium aenean pharetra magna ac placerat. Diam maecenas sed enim ut sem viverra. Egestas sed sed risus pretium quam vulputate dignissim suspendisse. Tincidunt id aliquet risus feugiat in. A cras semper auctor neque vitae tempus. Eu lobortis elementum nibh tellus molestie. Neque ornare aenean euismod elementum nisi quis eleifend.</p>
|
12
|
+
|
13
|
+
<p>Sed nisi lacus sed viverra tellus in. Nisl condimentum id venenatis a condimentum vitae. Integer malesuada nunc vel risus commodo viverra maecenas accumsan. Magnis dis parturient montes nascetur ridiculus mus mauris vitae ultricies. Nulla facilisi cras fermentum odio eu. Adipiscing elit pellentesque habitant morbi tristique senectus. Urna condimentum mattis pellentesque id. Arcu cursus euismod quis viverra nibh cras pulvinar. Elementum integer enim neque volutpat ac. Euismod nisi porta lorem mollis aliquam ut porttitor. Mauris nunc congue nisi vitae suscipit tellus mauris a. Volutpat blandit aliquam etiam erat velit. Risus sed vulputate odio ut. Ut sem nulla pharetra diam. Turpis massa sed elementum tempus egestas sed sed risus pretium. Cras sed felis eget velit aliquet sagittis. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Rhoncus est pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat.</p>
|
14
|
+
|
15
|
+
<p>Eget felis eget nunc lobortis mattis aliquam faucibus. Enim nunc faucibus a pellentesque sit amet. Luctus accumsan tortor posuere ac ut consequat. Sed euismod nisi porta lorem mollis aliquam ut porttitor leo. Tincidunt tortor aliquam nulla facilisi cras fermentum odio. Lobortis elementum nibh tellus molestie nunc non blandit. Luctus accumsan tortor posuere ac ut consequat semper. Etiam tempor orci eu lobortis elementum. Posuere ac ut consequat semper. Feugiat nisl pretium fusce id velit ut tortor pretium viverra. Aliquam id diam maecenas ultricies mi eget mauris pharetra. Maecenas ultricies mi eget mauris pharetra et. Sodales ut eu sem integer vitae justo eget magna fermentum. Ac placerat vestibulum lectus mauris ultrices eros in cursus. Eu non diam phasellus vestibulum lorem sed risus. Facilisi nullam vehicula ipsum a arcu cursus vitae congue mauris. Mauris pharetra et ultrices neque ornare. Aliquam ultrices sagittis orci a. Diam maecenas ultricies mi eget mauris pharetra. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed.</p>
|
16
|
+
|
17
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut etiam sit amet nisl purus in. Amet risus nullam eget felis. Consectetur adipiscing elit ut aliquam purus sit amet luctus. Non quam lacus suspendisse faucibus interdum. Tempus iaculis urna id volutpat lacus laoreet non curabitur. Ipsum nunc aliquet bibendum enim facilisis gravida. Egestas pretium aenean pharetra magna. Amet mattis vulputate enim nulla aliquet. Diam vel quam elementum pulvinar etiam non. Tempor orci eu lobortis elementum. Arcu non odio euismod lacinia at quis risus sed.</p>
|
18
|
+
|
19
|
+
<p>Aenean pharetra magna ac placerat vestibulum lectus mauris. Aenean euismod elementum nisi quis eleifend quam. Duis at tellus at urna condimentum. Tortor dignissim convallis aenean et tortor. Eget nullam non nisi est sit amet facilisis magna. Fermentum et sollicitudin ac orci phasellus egestas tellus. Ac turpis egestas maecenas pharetra convallis posuere morbi leo urna. In nisl nisi scelerisque eu. A erat nam at lectus. Dolor magna eget est lorem. Volutpat diam ut venenatis tellus in metus vulputate eu scelerisque. Eros donec ac odio tempor orci dapibus ultrices in iaculis. Aenean et tortor at risus. Suspendisse sed nisi lacus sed viverra tellus in. Arcu felis bibendum ut tristique et.</p>
|
20
|
+
|
21
|
+
<p>At ultrices mi tempus imperdiet nulla malesuada pellentesque elit. Nisl suscipit adipiscing bibendum est ultricies integer quis. Nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur. Malesuada fames ac turpis egestas maecenas. Fames ac turpis egestas sed tempus urna et pharetra. Vitae elementum curabitur vitae nunc sed velit dignissim sodales ut. Nisi lacus sed viverra tellus in hac habitasse platea. Arcu non odio euismod lacinia at quis risus sed vulputate. Ac placerat vestibulum lectus mauris ultrices eros. Magna sit amet purus gravida quis blandit turpis. Arcu felis bibendum ut tristique. Egestas congue quisque egestas diam in arcu cursus. Pretium aenean pharetra magna ac placerat. Diam maecenas sed enim ut sem viverra. Egestas sed sed risus pretium quam vulputate dignissim suspendisse. Tincidunt id aliquet risus feugiat in. A cras semper auctor neque vitae tempus. Eu lobortis elementum nibh tellus molestie. Neque ornare aenean euismod elementum nisi quis eleifend.</p>
|
22
|
+
|
23
|
+
<p>Sed nisi lacus sed viverra tellus in. Nisl condimentum id venenatis a condimentum vitae. Integer malesuada nunc vel risus commodo viverra maecenas accumsan. Magnis dis parturient montes nascetur ridiculus mus mauris vitae ultricies. Nulla facilisi cras fermentum odio eu. Adipiscing elit pellentesque habitant morbi tristique senectus. Urna condimentum mattis pellentesque id. Arcu cursus euismod quis viverra nibh cras pulvinar. Elementum integer enim neque volutpat ac. Euismod nisi porta lorem mollis aliquam ut porttitor. Mauris nunc congue nisi vitae suscipit tellus mauris a. Volutpat blandit aliquam etiam erat velit. Risus sed vulputate odio ut. Ut sem nulla pharetra diam. Turpis massa sed elementum tempus egestas sed sed risus pretium. Cras sed felis eget velit aliquet sagittis. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Rhoncus est pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat.</p>
|
24
|
+
|
25
|
+
<p>Eget felis eget nunc lobortis mattis aliquam faucibus. Enim nunc faucibus a pellentesque sit amet. Luctus accumsan tortor posuere ac ut consequat. Sed euismod nisi porta lorem mollis aliquam ut porttitor leo. Tincidunt tortor aliquam nulla facilisi cras fermentum odio. Lobortis elementum nibh tellus molestie nunc non blandit. Luctus accumsan tortor posuere ac ut consequat semper. Etiam tempor orci eu lobortis elementum. Posuere ac ut consequat semper. Feugiat nisl pretium fusce id velit ut tortor pretium viverra. Aliquam id diam maecenas ultricies mi eget mauris pharetra. Maecenas ultricies mi eget mauris pharetra et. Sodales ut eu sem integer vitae justo eget magna fermentum. Ac placerat vestibulum lectus mauris ultrices eros in cursus. Eu non diam phasellus vestibulum lorem sed risus. Facilisi nullam vehicula ipsum a arcu cursus vitae congue mauris. Mauris pharetra et ultrices neque ornare. Aliquam ultrices sagittis orci a. Diam maecenas ultricies mi eget mauris pharetra. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed.</p>
|
26
|
+
|
27
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut etiam sit amet nisl purus in. Amet risus nullam eget felis. Consectetur adipiscing elit ut aliquam purus sit amet luctus. Non quam lacus suspendisse faucibus interdum. Tempus iaculis urna id volutpat lacus laoreet non curabitur. Ipsum nunc aliquet bibendum enim facilisis gravida. Egestas pretium aenean pharetra magna. Amet mattis vulputate enim nulla aliquet. Diam vel quam elementum pulvinar etiam non. Tempor orci eu lobortis elementum. Arcu non odio euismod lacinia at quis risus sed.</p>
|
28
|
+
|
29
|
+
<p>Aenean pharetra magna ac placerat vestibulum lectus mauris. Aenean euismod elementum nisi quis eleifend quam. Duis at tellus at urna condimentum. Tortor dignissim convallis aenean et tortor. Eget nullam non nisi est sit amet facilisis magna. Fermentum et sollicitudin ac orci phasellus egestas tellus. Ac turpis egestas maecenas pharetra convallis posuere morbi leo urna. In nisl nisi scelerisque eu. A erat nam at lectus. Dolor magna eget est lorem. Volutpat diam ut venenatis tellus in metus vulputate eu scelerisque. Eros donec ac odio tempor orci dapibus ultrices in iaculis. Aenean et tortor at risus. Suspendisse sed nisi lacus sed viverra tellus in. Arcu felis bibendum ut tristique et.</p>
|
30
|
+
|
31
|
+
<p>At ultrices mi tempus imperdiet nulla malesuada pellentesque elit. Nisl suscipit adipiscing bibendum est ultricies integer quis. Nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur. Malesuada fames ac turpis egestas maecenas. Fames ac turpis egestas sed tempus urna et pharetra. Vitae elementum curabitur vitae nunc sed velit dignissim sodales ut. Nisi lacus sed viverra tellus in hac habitasse platea. Arcu non odio euismod lacinia at quis risus sed vulputate. Ac placerat vestibulum lectus mauris ultrices eros. Magna sit amet purus gravida quis blandit turpis. Arcu felis bibendum ut tristique. Egestas congue quisque egestas diam in arcu cursus. Pretium aenean pharetra magna ac placerat. Diam maecenas sed enim ut sem viverra. Egestas sed sed risus pretium quam vulputate dignissim suspendisse. Tincidunt id aliquet risus feugiat in. A cras semper auctor neque vitae tempus. Eu lobortis elementum nibh tellus molestie. Neque ornare aenean euismod elementum nisi quis eleifend.</p>
|
32
|
+
|
33
|
+
<p>Sed nisi lacus sed viverra tellus in. Nisl condimentum id venenatis a condimentum vitae. Integer malesuada nunc vel risus commodo viverra maecenas accumsan. Magnis dis parturient montes nascetur ridiculus mus mauris vitae ultricies. Nulla facilisi cras fermentum odio eu. Adipiscing elit pellentesque habitant morbi tristique senectus. Urna condimentum mattis pellentesque id. Arcu cursus euismod quis viverra nibh cras pulvinar. Elementum integer enim neque volutpat ac. Euismod nisi porta lorem mollis aliquam ut porttitor. Mauris nunc congue nisi vitae suscipit tellus mauris a. Volutpat blandit aliquam etiam erat velit. Risus sed vulputate odio ut. Ut sem nulla pharetra diam. Turpis massa sed elementum tempus egestas sed sed risus pretium. Cras sed felis eget velit aliquet sagittis. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Rhoncus est pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat.</p>
|
34
|
+
|
35
|
+
<p>Eget felis eget nunc lobortis mattis aliquam faucibus. Enim nunc faucibus a pellentesque sit amet. Luctus accumsan tortor posuere ac ut consequat. Sed euismod nisi porta lorem mollis aliquam ut porttitor leo. Tincidunt tortor aliquam nulla facilisi cras fermentum odio. Lobortis elementum nibh tellus molestie nunc non blandit. Luctus accumsan tortor posuere ac ut consequat semper. Etiam tempor orci eu lobortis elementum. Posuere ac ut consequat semper. Feugiat nisl pretium fusce id velit ut tortor pretium viverra. Aliquam id diam maecenas ultricies mi eget mauris pharetra. Maecenas ultricies mi eget mauris pharetra et. Sodales ut eu sem integer vitae justo eget magna fermentum. Ac placerat vestibulum lectus mauris ultrices eros in cursus. Eu non diam phasellus vestibulum lorem sed risus. Facilisi nullam vehicula ipsum a arcu cursus vitae congue mauris. Mauris pharetra et ultrices neque ornare. Aliquam ultrices sagittis orci a. Diam maecenas ultricies mi eget mauris pharetra. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed.</p>
|
@@ -128,10 +128,12 @@ module Primer
|
|
128
128
|
# @param subtitle [String] text
|
129
129
|
# @param button_text [String] text
|
130
130
|
# @param show_divider [Boolean] toggle
|
131
|
-
|
131
|
+
# @param position [Symbol] select [center, left, right]
|
132
|
+
def nested_dialog(title: "Test Dialog", subtitle: nil, position: :center, button_text: "Show Dialog", show_divider: true)
|
132
133
|
render_with_template(locals: {
|
133
134
|
title: title,
|
134
135
|
subtitle: subtitle,
|
136
|
+
position: position,
|
135
137
|
button_text: button_text,
|
136
138
|
show_divider: show_divider
|
137
139
|
})
|
@@ -188,6 +190,64 @@ module Primer
|
|
188
190
|
def autofocus_element
|
189
191
|
render_with_template(locals: {})
|
190
192
|
end
|
193
|
+
|
194
|
+
# @label Left Side
|
195
|
+
#
|
196
|
+
# @param title [String] text
|
197
|
+
# @param subtitle [String] text
|
198
|
+
# @param size [Symbol] select [small, medium, medium_portrait, large, xlarge]
|
199
|
+
# @param position_narrow [Symbol] select [inherit, bottom, fullscreen, left, right]
|
200
|
+
# @param visually_hide_title [Boolean] toggle
|
201
|
+
# @param button_text [String] text
|
202
|
+
# @param body_text [String] text
|
203
|
+
# @snapshot interactive
|
204
|
+
def left_side(title: "Test Dialog", subtitle: nil, size: :medium, button_text: "Show Dialog", body_text: "Content", position: :center, position_narrow: :fullscreen, visually_hide_title: false)
|
205
|
+
render(Primer::Alpha::Dialog.new(title: title, subtitle: subtitle, size: size, position: :left, position_narrow: position_narrow, visually_hide_title: visually_hide_title)) do |d|
|
206
|
+
d.with_show_button { button_text }
|
207
|
+
d.with_body { body_text }
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# @label Right Side
|
212
|
+
#
|
213
|
+
# @param title [String] text
|
214
|
+
# @param subtitle [String] text
|
215
|
+
# @param size [Symbol] select [small, medium, medium_portrait, large, xlarge]
|
216
|
+
# @param position_narrow [Symbol] select [inherit, bottom, fullscreen, left, right]
|
217
|
+
# @param visually_hide_title [Boolean] toggle
|
218
|
+
# @param button_text [String] text
|
219
|
+
# @param body_text [String] text
|
220
|
+
# @snapshot interactive
|
221
|
+
def right_side(title: "Test Dialog", subtitle: nil, size: :medium, button_text: "Show Dialog", body_text: "Content", position: :center, position_narrow: :fullscreen, visually_hide_title: false)
|
222
|
+
render(Primer::Alpha::Dialog.new(title: title, subtitle: subtitle, size: size, position: :right, position_narrow: position_narrow, visually_hide_title: visually_hide_title)) do |d|
|
223
|
+
d.with_show_button { button_text }
|
224
|
+
d.with_body { body_text }
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# @label Scroll container
|
229
|
+
#
|
230
|
+
# @param title [String] text
|
231
|
+
# @param subtitle [String] text
|
232
|
+
# @param size [Symbol] select [small, medium, medium_portrait, large, xlarge]
|
233
|
+
# @param position [Symbol] select [center, right, left]
|
234
|
+
# @param position_narrow [Symbol] select [inherit, bottom, fullscreen, left, right]
|
235
|
+
# @param visually_hide_title [Boolean] toggle
|
236
|
+
# @param button_text [String] text
|
237
|
+
# @param body_text [String] text
|
238
|
+
# @snapshot interactive
|
239
|
+
def scroll_container(title: "Test Dialog", subtitle: nil, position: :center, size: :medium, button_text: "Show Dialog", body_text: "Content", position_narrow: :fullscreen, visually_hide_title: false)
|
240
|
+
render_with_template(locals: {
|
241
|
+
title: title,
|
242
|
+
subtitle: subtitle,
|
243
|
+
position: position,
|
244
|
+
size: size,
|
245
|
+
button_text: button_text,
|
246
|
+
body_text: body_text,
|
247
|
+
position_narrow: position_narrow,
|
248
|
+
visually_hide_title: visually_hide_title
|
249
|
+
})
|
250
|
+
end
|
191
251
|
end
|
192
252
|
end
|
193
253
|
end
|
data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb
CHANGED
@@ -16,8 +16,7 @@
|
|
16
16
|
<input type="text" id="input">
|
17
17
|
</label>
|
18
18
|
<script>
|
19
|
-
document.querySelector('#my-dialog').addEventListener('
|
20
|
-
|
21
|
-
setTimeout(() => document.querySelector('#input').focus(), 0);
|
19
|
+
document.querySelector('#my-dialog').addEventListener('close', function () {
|
20
|
+
document.querySelector('#input').focus();
|
22
21
|
});
|
23
22
|
</script>
|
@@ -72,7 +72,7 @@ module Primer
|
|
72
72
|
end
|
73
73
|
|
74
74
|
# @label Tooltip with Primer::IconButton
|
75
|
-
def tooltip_with_icon_button(direction: :s, tooltip_text: "
|
75
|
+
def tooltip_with_icon_button(direction: :s, tooltip_text: "Search")
|
76
76
|
render(Primer::Beta::IconButton.new(icon: :search, "aria-label": tooltip_text, tooltip_direction: direction))
|
77
77
|
end
|
78
78
|
# @!endgroup
|
@@ -206,7 +206,8 @@ module Primer
|
|
206
206
|
block: false,
|
207
207
|
id: "button-preview",
|
208
208
|
align_content: :center,
|
209
|
-
tag: :a
|
209
|
+
tag: :a,
|
210
|
+
href: "#"
|
210
211
|
)
|
211
212
|
render(Primer::Beta::Button.new(
|
212
213
|
scheme: scheme,
|
@@ -214,7 +215,8 @@ module Primer
|
|
214
215
|
block: block,
|
215
216
|
id: id,
|
216
217
|
align_content: align_content,
|
217
|
-
tag: tag
|
218
|
+
tag: tag,
|
219
|
+
href: href
|
218
220
|
)) do |_c|
|
219
221
|
"Button"
|
220
222
|
end
|
@@ -25,7 +25,7 @@ module Primer
|
|
25
25
|
# @param with_context_bar_actions [Boolean]
|
26
26
|
# @param with_parent_link [Boolean]
|
27
27
|
def playground(
|
28
|
-
variant: :
|
28
|
+
variant: :large,
|
29
29
|
title: "Hello",
|
30
30
|
description: "Last updated 5 minutes ago by XYZ.",
|
31
31
|
with_back_button: false,
|
@@ -49,10 +49,10 @@ module Primer
|
|
49
49
|
breadcrumb_items: breadcrumb_items })
|
50
50
|
end
|
51
51
|
|
52
|
-
# @label
|
53
|
-
def
|
52
|
+
# @label Medium title
|
53
|
+
def medium_title
|
54
54
|
render(Primer::OpenProject::PageHeader.new) do |header|
|
55
|
-
header.with_title(variant: :
|
55
|
+
header.with_title(variant: :medium) { "Hello" }
|
56
56
|
header.with_description { "Last updated 5 minutes ago by XYZ." }
|
57
57
|
end
|
58
58
|
end
|
data/static/arguments.json
CHANGED
@@ -610,6 +610,12 @@
|
|
610
610
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/banner.rb",
|
611
611
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/banner/default/",
|
612
612
|
"parameters": [
|
613
|
+
{
|
614
|
+
"name": "tag",
|
615
|
+
"type": "Symbol",
|
616
|
+
"default": "`:div`",
|
617
|
+
"description": "One of `:div` or `:section`."
|
618
|
+
},
|
613
619
|
{
|
614
620
|
"name": "full",
|
615
621
|
"type": "Boolean",
|
@@ -628,6 +634,12 @@
|
|
628
634
|
"default": "`:none`",
|
629
635
|
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
|
630
636
|
},
|
637
|
+
{
|
638
|
+
"name": "dismiss_label",
|
639
|
+
"type": "String",
|
640
|
+
"default": "`Dismiss`",
|
641
|
+
"description": "The aria-label text of the dismiss \"x\" button"
|
642
|
+
},
|
631
643
|
{
|
632
644
|
"name": "description",
|
633
645
|
"type": "String",
|
data/static/classes.json
CHANGED
@@ -390,34 +390,19 @@
|
|
390
390
|
"Primer::Alpha::Dialog",
|
391
391
|
"Primer::Alpha::Overlay"
|
392
392
|
],
|
393
|
-
"Overlay--
|
394
|
-
"Primer::Alpha::Dialog"
|
395
|
-
],
|
396
|
-
"Overlay--visibilityHidden": [
|
397
|
-
"Primer::Alpha::Dialog"
|
398
|
-
],
|
399
|
-
"Overlay-backdrop--anchor": [
|
400
|
-
"Primer::Alpha::Dialog"
|
401
|
-
],
|
402
|
-
"Overlay-backdrop--anchor-whenNarrow": [
|
403
|
-
"Primer::Alpha::Dialog"
|
404
|
-
],
|
405
|
-
"Overlay-backdrop--center": [
|
393
|
+
"Overlay--full": [
|
406
394
|
"Primer::Alpha::Dialog"
|
407
395
|
],
|
408
|
-
"Overlay
|
396
|
+
"Overlay--full-whenNarrow": [
|
409
397
|
"Primer::Alpha::Dialog"
|
410
398
|
],
|
411
|
-
"Overlay
|
412
|
-
"Primer::Alpha::Dialog"
|
413
|
-
],
|
414
|
-
"Overlay-backdrop--full-whenNarrow": [
|
399
|
+
"Overlay--hidden": [
|
415
400
|
"Primer::Alpha::Dialog"
|
416
401
|
],
|
417
|
-
"Overlay-
|
402
|
+
"Overlay--placement-right-whenNarrow": [
|
418
403
|
"Primer::Alpha::Dialog"
|
419
404
|
],
|
420
|
-
"Overlay
|
405
|
+
"Overlay--visibilityHidden": [
|
421
406
|
"Primer::Alpha::Dialog"
|
422
407
|
],
|
423
408
|
"Overlay-body": [
|
data/static/constants.json
CHANGED
@@ -155,6 +155,7 @@
|
|
155
155
|
"Primer::Alpha::AutoComplete::Item": {
|
156
156
|
},
|
157
157
|
"Primer::Alpha::Banner": {
|
158
|
+
"DEFAULT_DISMISS_LABEL": "Dismiss",
|
158
159
|
"DEFAULT_DISMISS_SCHEME": "none",
|
159
160
|
"DEFAULT_ICONS": {
|
160
161
|
"default": "bell",
|
@@ -163,6 +164,7 @@
|
|
163
164
|
"success": "check-circle"
|
164
165
|
},
|
165
166
|
"DEFAULT_SCHEME": "default",
|
167
|
+
"DEFAULT_TAG": "div",
|
166
168
|
"DISMISS_SCHEMES": [
|
167
169
|
"none",
|
168
170
|
"remove",
|
@@ -179,7 +181,11 @@
|
|
179
181
|
"warning": "Banner--warning",
|
180
182
|
"danger": "Banner--error",
|
181
183
|
"success": "Banner--success"
|
182
|
-
}
|
184
|
+
},
|
185
|
+
"TAG_OPTIONS": [
|
186
|
+
"div",
|
187
|
+
"section"
|
188
|
+
]
|
183
189
|
},
|
184
190
|
"Primer::Alpha::ButtonMarketing": {
|
185
191
|
"DEFAULT_SCHEME": "default",
|
@@ -227,16 +233,16 @@
|
|
227
233
|
"Footer": "Primer::Alpha::Dialog::Footer",
|
228
234
|
"Header": "Primer::Alpha::Dialog::Header",
|
229
235
|
"POSITION_MAPPINGS": {
|
230
|
-
"center": "
|
231
|
-
"left": "Overlay
|
232
|
-
"right": "Overlay
|
236
|
+
"center": "",
|
237
|
+
"left": "Overlay--placement-left",
|
238
|
+
"right": "Overlay--placement-right"
|
233
239
|
},
|
234
240
|
"POSITION_NARROW_MAPPINGS": {
|
235
241
|
"inherit": "",
|
236
|
-
"bottom": "Overlay
|
237
|
-
"fullscreen": "Overlay
|
238
|
-
"left": "Overlay
|
239
|
-
"right": "Overlay
|
242
|
+
"bottom": "Overlay--placement-bottom-whenNarrow",
|
243
|
+
"fullscreen": "Overlay--full-whenNarrow",
|
244
|
+
"left": "Overlay--placement-left-whenNarrow",
|
245
|
+
"right": "Overlay--placement-right-whenNarrow"
|
240
246
|
},
|
241
247
|
"POSITION_NARROW_OPTIONS": [
|
242
248
|
"inherit",
|
@@ -1427,14 +1433,14 @@
|
|
1427
1433
|
"block",
|
1428
1434
|
"none"
|
1429
1435
|
],
|
1430
|
-
"DEFAULT_HEADER_VARIANT": "
|
1436
|
+
"DEFAULT_HEADER_VARIANT": "large",
|
1431
1437
|
"DEFAULT_PARENT_LINK_DISPLAY": [
|
1432
1438
|
"block",
|
1433
1439
|
"none"
|
1434
1440
|
],
|
1435
1441
|
"HEADER_VARIANT_OPTIONS": [
|
1436
|
-
"
|
1437
|
-
"
|
1442
|
+
"medium",
|
1443
|
+
"large"
|
1438
1444
|
],
|
1439
1445
|
"HEADING_TAG_FALLBACK": "h2",
|
1440
1446
|
"HEADING_TAG_OPTIONS": [
|
data/static/info_arch.json
CHANGED
@@ -1627,6 +1627,19 @@
|
|
1627
1627
|
]
|
1628
1628
|
}
|
1629
1629
|
},
|
1630
|
+
{
|
1631
|
+
"preview_path": "primer/alpha/action_menu/in_scroll_container",
|
1632
|
+
"name": "in_scroll_container",
|
1633
|
+
"snapshot": "false",
|
1634
|
+
"skip_rules": {
|
1635
|
+
"wont_fix": [
|
1636
|
+
"region"
|
1637
|
+
],
|
1638
|
+
"will_fix": [
|
1639
|
+
"color-contrast"
|
1640
|
+
]
|
1641
|
+
}
|
1642
|
+
},
|
1630
1643
|
{
|
1631
1644
|
"preview_path": "primer/alpha/action_menu/align_end",
|
1632
1645
|
"name": "align_end",
|
@@ -2230,6 +2243,12 @@
|
|
2230
2243
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/banner.rb",
|
2231
2244
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/banner/default/",
|
2232
2245
|
"parameters": [
|
2246
|
+
{
|
2247
|
+
"name": "tag",
|
2248
|
+
"type": "Symbol",
|
2249
|
+
"default": "`:div`",
|
2250
|
+
"description": "One of `:div` or `:section`."
|
2251
|
+
},
|
2233
2252
|
{
|
2234
2253
|
"name": "full",
|
2235
2254
|
"type": "Boolean",
|
@@ -2248,6 +2267,12 @@
|
|
2248
2267
|
"default": "`:none`",
|
2249
2268
|
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
|
2250
2269
|
},
|
2270
|
+
{
|
2271
|
+
"name": "dismiss_label",
|
2272
|
+
"type": "String",
|
2273
|
+
"default": "`Dismiss`",
|
2274
|
+
"description": "The aria-label text of the dismiss \"x\" button"
|
2275
|
+
},
|
2251
2276
|
{
|
2252
2277
|
"name": "description",
|
2253
2278
|
"type": "String",
|
@@ -3311,6 +3336,45 @@
|
|
3311
3336
|
"color-contrast"
|
3312
3337
|
]
|
3313
3338
|
}
|
3339
|
+
},
|
3340
|
+
{
|
3341
|
+
"preview_path": "primer/alpha/dialog/left_side",
|
3342
|
+
"name": "left_side",
|
3343
|
+
"snapshot": "interactive",
|
3344
|
+
"skip_rules": {
|
3345
|
+
"wont_fix": [
|
3346
|
+
"region"
|
3347
|
+
],
|
3348
|
+
"will_fix": [
|
3349
|
+
"color-contrast"
|
3350
|
+
]
|
3351
|
+
}
|
3352
|
+
},
|
3353
|
+
{
|
3354
|
+
"preview_path": "primer/alpha/dialog/right_side",
|
3355
|
+
"name": "right_side",
|
3356
|
+
"snapshot": "interactive",
|
3357
|
+
"skip_rules": {
|
3358
|
+
"wont_fix": [
|
3359
|
+
"region"
|
3360
|
+
],
|
3361
|
+
"will_fix": [
|
3362
|
+
"color-contrast"
|
3363
|
+
]
|
3364
|
+
}
|
3365
|
+
},
|
3366
|
+
{
|
3367
|
+
"preview_path": "primer/alpha/dialog/scroll_container",
|
3368
|
+
"name": "scroll_container",
|
3369
|
+
"snapshot": "interactive",
|
3370
|
+
"skip_rules": {
|
3371
|
+
"wont_fix": [
|
3372
|
+
"region"
|
3373
|
+
],
|
3374
|
+
"will_fix": [
|
3375
|
+
"color-contrast"
|
3376
|
+
]
|
3377
|
+
}
|
3314
3378
|
}
|
3315
3379
|
],
|
3316
3380
|
"subcomponents": [
|
@@ -16200,8 +16264,8 @@
|
|
16200
16264
|
}
|
16201
16265
|
},
|
16202
16266
|
{
|
16203
|
-
"preview_path": "primer/open_project/page_header/
|
16204
|
-
"name": "
|
16267
|
+
"preview_path": "primer/open_project/page_header/medium_title",
|
16268
|
+
"name": "medium_title",
|
16205
16269
|
"snapshot": "false",
|
16206
16270
|
"skip_rules": {
|
16207
16271
|
"wont_fix": [
|
@@ -16408,6 +16472,6 @@
|
|
16408
16472
|
"component": "BaseComponent",
|
16409
16473
|
"fully_qualified_name": "Primer::BaseComponent",
|
16410
16474
|
"description_md": "All Primer ViewComponents accept a standard set of options called system arguments, mimicking the [styled-system API](https://styled-system.com/table) used by [Primer React](https://primer.style/components/system-props).\n\nUnder the hood, system arguments are [mapped](https://github.com/primer/view_components/blob/main/lib/primer/classify.rb) to Primer CSS classes, with any remaining options passed to Rails' [`content_tag`](https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag).\n\n## Responsive values\n\nTo apply different values across responsive breakpoints, pass an array with up to five values in the order `[default, small, medium, large, xlarge]`. To skip a breakpoint, pass `nil`.\n\nFor example:\n\n```erb\n<%= render Primer::Beta::Heading.new(mt: [0, nil, nil, 4, 2]) do %>\n Hello world\n<% end %>\n```\n\nRenders:\n\n```html\n<h1 class=\"mt-0 mt-lg-4 mt-xl-2\">Hello world</h1>\n```",
|
16411
|
-
"args_md": "## HTML attributes\n\
|
16475
|
+
"args_md": "## HTML attributes\n\nUse system arguments to add HTML attributes to elements. For the most part, system arguments map 1:1 to\nHTML attributes. For example, `render(Component.new(title: \"Foo\"))` will result in eg. `<div title=\"foo\">`.\nHowever, ViewComponents applies special handling to certain system arguments. See the table below for details.\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `aria` | `Hash` | Aria attributes: `aria: { label: \"foo\" }` renders `aria-label='foo'`. |\n| `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |\n\n## Utility classes\n\nViewComponents provides a convenient way to add Primer CSS utility classes to HTML elements. Use the shorthand\ndocumented in the tables below instead of adding CSS classes directly.\n\n### Animation\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `animation` | Symbol | One of `:fade_down`, `:fade_in`, `:fade_out`, `:fade_up`, `:grow_x`, `:hover_grow`, `:pulse`, `:pulse_in`, `:rotate`, `:scale_in`, or `:shrink_x`. |\n\n### Border\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `border_bottom` | Integer | Set to `0` to remove the bottom border. |\n| `border_left` | Integer | Set to `0` to remove the left border. |\n| `border_radius` | Integer | One of `0`, `1`, `2`, or `3`. |\n| `border_right` | Integer | Set to `0` to remove the right border. |\n| `border_top` | Integer | Set to `0` to remove the top border. |\n| `border` | Symbol | One of `:bottom`, `:left`, `:right`, `:top`, `:x`, `:y`, or `true`. |\n| `box_shadow` | Boolean, Symbol | Box shadow. One of `:extra_large`, `:large`, `:medium`, `:none`, or `true`. |\n\n### Color\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bg` | Symbol | Background color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:emphasis`, `:inset`, `:open`, `:open_emphasis`, `:overlay`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, `:success_emphasis`, or `:transparent`. |\n| `border_color` | Symbol | Border color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:muted`, `:open`, `:open_emphasis`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, or `:success_emphasis`. |\n| `color` | Symbol | Text color. One of `:accent`, `:attention`, `:closed`, `:danger`, `:default`, `:done`, `:inherit`, `:muted`, `:on_emphasis`, `:open`, `:severe`, `:sponsors`, `:subtle`, or `:success`. |\n\n### Flex\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `align_items` | Symbol | One of `:baseline`, `:center`, `:flex_end`, `:flex_start`, or `:stretch`. |\n| `align_self` | Symbol | One of `:auto`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`. |\n| `direction` | Symbol | One of `:column`, `:column_reverse`, `:row`, or `:row_reverse`. |\n| `flex` | Integer, Symbol | One of `1` or `:auto`. |\n| `flex_grow` | Integer | To enable, set to `0`. |\n| `flex_shrink` | Integer | To enable, set to `0`. |\n| `flex_wrap` | Symbol | One of `:nowrap`, `:reverse`, or `:wrap`. |\n| `justify_content` | Symbol | One of `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`. |\n\n### Grid\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `clearfix` | Boolean | Whether to assign the `clearfix` class. |\n| `col` | Integer | Number of columns. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `container` | Symbol | Size of the container. One of `:lg`, `:md`, `:sm`, or `:xl`. |\n\n### Layout\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `display` | Symbol | One of `:block`, `:flex`, `:inline`, `:inline_block`, `:inline_flex`, `:none`, `:table`, or `:table_cell`. |\n| `w` | Symbol | Sets the element's width. One of `:auto`, `:fit`, or `:full`. |\n| `h` | Symbol | Sets the element's height. One of `:fit` or `:full`. |\n| `hide` | Symbol | Hide the element at a specific breakpoint. One of `:lg`, `:md`, `:sm`, `:whenNarrow`, `:whenRegular`, `:whenWide`, or `:xl`. |\n| `visibility` | Symbol | Visibility. One of `:hidden` or `:visible`. |\n| `vertical_align` | Symbol | One of `:baseline`, `:bottom`, `:middle`, `:text_bottom`, `:text_top`, or `:top`. |\n\n### Position\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bottom` | Boolean | If `false`, sets `bottom: 0`. |\n| `float` | Symbol | One of `:left`, `:none`, or `:right`. |\n| `left` | Boolean | If `false`, sets `left: 0`. |\n| `position` | Symbol | One of `:absolute`, `:fixed`, `:relative`, `:static`, or `:sticky`. |\n| `right` | Boolean | If `false`, sets `right: 0`. |\n| `top` | Boolean | If `false`, sets `top: 0`. |\n\n### Spacing\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `m` | Integer | Margin. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mb` | Integer | Margin bottom. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `ml` | Integer | Margin left. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mr` | Integer | Margin right. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mt` | Integer | Margin top. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `mx` | Integer | Horizontal margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `my` | Integer | Vertical margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `p` | Integer | Padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:responsive`. |\n| `pb` | Integer | Padding bottom. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pl` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pr` | Integer | Padding right. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pt` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `px` | Integer | Horizontal padding. One of `0`, `1`, `2`, `3`, `4`, `5`, or `6`. |\n| `py` | Integer | Vertical padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n\n### Typography\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `font_family` | Symbol | Font family. One of `:mono`. |\n| `font_size` | String, Integer, Symbol | One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `00`, `:normal`, or `:small`. |\n| `font_style` | Symbol | Font style. One of `:italic`. |\n| `font_weight` | Symbol | Font weight. One of `:bold`, `:emphasized`, `:light`, or `:normal`. |\n| `text_align` | Symbol | Text alignment. One of `:center`, `:left`, or `:right`. |\n| `text_transform` | Symbol | Text transformation. One of `:capitalize` or `:uppercase`. |\n| `underline` | Boolean | Whether text should be underlined. |\n| `word_break` | Symbol | Whether to break words on line breaks. One of `:break_all` or `:break_word`. |\n\n### Other\n\n| Name | Type | Description |\n| :- | :- | :- |\n| classes | String | CSS class name value to be concatenated with generated Primer CSS classes. |\n| test_selector | String | Adds `data-test-selector='given value'` in non-Production environments for testing purposes. |"
|
16412
16476
|
}
|
16413
16477
|
]
|