primer_view_components 0.0.102 → 0.0.103

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/assets/styles/primer_view_components.css +1 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/modal_dialog.d.ts +1 -1
  8. data/app/components/primer/alpha/modal_dialog.js +48 -40
  9. data/app/components/primer/alpha/modal_dialog.ts +55 -47
  10. data/app/components/primer/alpha/nav_list.js +3 -3
  11. data/app/components/primer/alpha/nav_list.ts +3 -3
  12. data/app/components/primer/beta/button.html.erb +1 -1
  13. data/app/forms/after_content_form/after_content.html.erb +1 -0
  14. data/app/forms/after_content_form.rb +13 -0
  15. data/app/forms/application_form.rb +5 -0
  16. data/app/forms/array_check_box_group_form/places_lopez_caption.html.erb +1 -0
  17. data/app/forms/array_check_box_group_form.rb +15 -0
  18. data/app/forms/both_types_of_caption_form/first_name_caption.html.erb +1 -0
  19. data/app/forms/both_types_of_caption_form.rb +13 -0
  20. data/app/forms/caption_template_form/age_middle_aged_caption.html.erb +1 -0
  21. data/app/forms/caption_template_form/age_young_caption.html.erb +1 -0
  22. data/app/forms/caption_template_form/cool_caption.html.erb +1 -0
  23. data/app/forms/caption_template_form/first_name_caption.html.erb +1 -0
  24. data/app/forms/caption_template_form.rb +22 -0
  25. data/app/forms/check_box_group_form.rb +28 -0
  26. data/app/forms/composed_form.rb +14 -0
  27. data/app/forms/first_name_form.rb +13 -0
  28. data/app/forms/horizontal_form.rb +34 -0
  29. data/app/forms/invalid_form.rb +21 -0
  30. data/app/forms/last_name_form.rb +13 -0
  31. data/app/forms/multi_input_form.rb +25 -0
  32. data/app/forms/multi_text_field_form.rb +27 -0
  33. data/app/forms/radio_button_group_form.rb +12 -0
  34. data/app/forms/radio_button_with_nested_form.rb +39 -0
  35. data/app/forms/select_list_form.rb +12 -0
  36. data/app/forms/single_text_field_form.rb +13 -0
  37. data/app/forms/submit_button_form.rb +20 -0
  38. data/app/forms/text_field_and_checkbox_form.rb +19 -0
  39. data/lib/primer/deprecations.rb +0 -4
  40. data/lib/primer/view_components/engine.rb +1 -0
  41. data/lib/primer/view_components/linters/close_button_component_migration_counter.rb +1 -1
  42. data/lib/primer/view_components/version.rb +1 -1
  43. data/lib/tasks/docs.rake +1 -1
  44. data/lib/tasks/test.rake +14 -12
  45. data/previews/primer/alpha/dialog_preview/nested_dialog.html.erb +14 -0
  46. data/previews/primer/alpha/dialog_preview.rb +15 -0
  47. data/static/audited_at.json +0 -4
  48. data/static/constants.json +0 -8
  49. data/static/statuses.json +0 -4
  50. metadata +34 -15
  51. data/app/components/primer/alpha/tool-tip-element.d.ts +0 -23
  52. data/app/components/primer/alpha/tool-tip-element.js +0 -352
  53. data/app/components/primer/clipboard_copy_component.d.ts +0 -1
  54. data/app/components/primer/clipboard_copy_component.js +0 -43
  55. data/app/components/primer/close_button.rb +0 -7
  56. data/app/components/primer/details_component.rb +0 -7
  57. data/app/components/primer/heading_component.rb +0 -7
  58. data/app/components/primer/hidden_text_expander.rb +0 -7
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class ArrayCheckBoxGroupForm < ApplicationForm
5
+ form do |check_form|
6
+ # Passing a name: here causes the form to emit all the check boxes with the same name.
7
+ # In the case below, the name of each will be "places[]". If a box is checked, the
8
+ # resulting array will contain the corresponding value.
9
+ check_form.check_box_group(name: "places", label: "Cool places") do |check_group|
10
+ check_group.check_box(value: "lopez", label: "Lopez Island")
11
+ check_group.check_box(value: "bellevue", label: "Bellevue", caption: "Beautiful view")
12
+ check_group.check_box(value: "seattle", label: "Seattle", caption: "The emerald city")
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class BothTypesOfCaptionForm < ApplicationForm
5
+ form do |caption_form|
6
+ caption_form.text_field(
7
+ name: :first_name,
8
+ label: "First name",
9
+ required: true,
10
+ caption: "What you go by."
11
+ )
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ <span class="color-fg-danger">No longer a spring chicken.</span>
@@ -0,0 +1 @@
1
+ <span class="color-fg-danger">A young thing.</span>
@@ -0,0 +1 @@
1
+ <span class="color-fg-danger">Check only if you are cool.</span>
@@ -0,0 +1 @@
1
+ <span class="color-fg-danger">Be honest!</span>
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class CaptionTemplateForm < ApplicationForm
5
+ form do |name_form|
6
+ name_form.text_field(
7
+ name: :first_name,
8
+ label: "First name",
9
+ required: true
10
+ )
11
+
12
+ name_form.check_box(
13
+ name: :cool,
14
+ label: "Are you cool?"
15
+ )
16
+
17
+ name_form.radio_button_group(name: :age) do |age_radios|
18
+ age_radios.radio_button(value: "young", label: "10-15")
19
+ age_radios.radio_button(value: "middle_aged", label: "16-21")
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class CheckBoxGroupForm < ApplicationForm
5
+ form do |check_form|
6
+ check_form.check_box_group(label: "I like to eat, eat, eat:") do |check_group|
7
+ check_group.check_box(
8
+ name: "long_a",
9
+ label: "Ey-ples and ba-naynays",
10
+ caption: 'Long "A" sound'
11
+ )
12
+
13
+ check_group.check_box(
14
+ name: "long_i",
15
+ label: "Eye-ples and ba-nainais",
16
+ caption: 'Long "I" sound'
17
+ )
18
+
19
+ check_group.check_box(
20
+ name: "long_o",
21
+ value: "long_o",
22
+ unchecked_value: "not_long_o",
23
+ label: "Oh-ples and ba-nonos",
24
+ caption: 'Long "O" sound'
25
+ )
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class ComposedForm < ApplicationForm
5
+ form do |composed_form|
6
+ composed_form.fields_for(:first_name) do |builder|
7
+ FirstNameForm.new(builder)
8
+ end
9
+
10
+ composed_form.fields_for(:last_name) do |builder|
11
+ LastNameForm.new(builder)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class FirstNameForm < ApplicationForm
5
+ form do |first_name_form|
6
+ first_name_form.text_field(
7
+ name: :first_name,
8
+ label: "First name",
9
+ required: true,
10
+ caption: "That which we call a rose by any other name would smell as sweet."
11
+ )
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class HorizontalForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.group(layout: :horizontal) do |name_group|
7
+ name_group.text_field(
8
+ name: :first_name,
9
+ label: "First name",
10
+ required: true,
11
+ caption: "What your friends call you."
12
+ )
13
+
14
+ name_group.text_field(
15
+ name: :last_name,
16
+ label: "Last name",
17
+ required: true,
18
+ caption: "What the principal calls you."
19
+ )
20
+ end
21
+
22
+ my_form.text_field(
23
+ name: :dietary_restrictions,
24
+ label: "Dietary restrictions",
25
+ caption: "Any allergies?"
26
+ )
27
+
28
+ my_form.check_box(
29
+ name: :email_notifications,
30
+ label: "Send me gobs of email!",
31
+ caption: "Check this if you enjoy getting spam."
32
+ )
33
+ end
34
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class InvalidForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.text_field(
7
+ name: :first_name,
8
+ label: "First name",
9
+ required: true,
10
+ caption: "That which we call a rose by any other name would smell as sweet."
11
+ )
12
+
13
+ my_form.text_field(
14
+ name: :last_name,
15
+ label: "Last name",
16
+ required: true,
17
+ caption: "Bueller. Bueller. Bueller.",
18
+ validation_message: "That doesn't look right"
19
+ )
20
+ end
21
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class LastNameForm < ApplicationForm
5
+ form do |last_name_form|
6
+ last_name_form.text_field(
7
+ name: :last_name,
8
+ label: "Last name",
9
+ required: true,
10
+ caption: "Bueller. Bueller. Bueller."
11
+ )
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class MultiInputForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.radio_button_group(name: :country, label: "Country") do |radio_group|
7
+ radio_group.radio_button(label: "USA", value: "US")
8
+ radio_group.radio_button(label: "Canada", value: "CA")
9
+ end
10
+
11
+ my_form.multi(name: :region, label: "Region") do |region|
12
+ region.select_list(label: "State") do |state_list|
13
+ state_list.option(label: "California", value: "CA")
14
+ state_list.option(label: "Washington", value: "WA")
15
+ state_list.option(label: "Oregon", value: "OR")
16
+ end
17
+
18
+ region.select_list(label: "Province", hidden: true) do |province_list|
19
+ province_list.option(label: "British Columbia", value: "BC")
20
+ province_list.option(label: "Alberta", value: "AB")
21
+ province_list.option(label: "Saskatchewan", value: "SK")
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class MultiTextFieldForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.text_field(
7
+ name: :first_name,
8
+ label: "First name",
9
+ required: true,
10
+ caption: "That which we call a rose by any other name would smell as sweet."
11
+ )
12
+
13
+ my_form.separator
14
+
15
+ my_form.text_field(
16
+ name: :last_name,
17
+ label: "Last name",
18
+ required: true,
19
+ caption: "Bueller. Bueller. Bueller."
20
+ )
21
+
22
+ my_form.hidden(
23
+ name: :csrf_token,
24
+ value: "abc123"
25
+ )
26
+ end
27
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class RadioButtonGroupForm < ApplicationForm
5
+ form do |radio_form|
6
+ radio_form.radio_button_group(name: "channel", label: "How did you hear about us?") do |radio_group|
7
+ radio_group.radio_button(value: "online", label: "Online advertisement", caption: "Facebook maybe?")
8
+ radio_group.radio_button(value: "radio", label: "Radio advertisement", caption: "We love us some NPR")
9
+ radio_group.radio_button(value: "friend", label: "From a friend", caption: "Wow, what a good person")
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class FriendForm < ApplicationForm
5
+ form do |friend_form|
6
+ friend_form.group(layout: :horizontal) do |name_group|
7
+ name_group.text_field(name: "first_name", label: "First Name")
8
+ name_group.text_field(name: "last_name", label: "Last Name")
9
+ end
10
+ end
11
+ end
12
+
13
+ # :nodoc:
14
+ class FriendTextAreaForm < ApplicationForm
15
+ form do |friend_text_area_form|
16
+ friend_text_area_form.text_area(
17
+ name: "description",
18
+ label: "Describe this wonderful person in loving detail"
19
+ )
20
+ end
21
+ end
22
+
23
+ # :nodoc:
24
+ class RadioButtonWithNestedForm < ApplicationForm
25
+ form do |radio_form|
26
+ radio_form.radio_button_group(name: "channel") do |radio_group|
27
+ radio_group.radio_button(value: "online", label: "Online advertisement", caption: "Facebook maybe?")
28
+ radio_group.radio_button(value: "radio", label: "Radio advertisement", caption: "We love us some NPR")
29
+ radio_group.radio_button(value: "friend", label: "From a friend", caption: "Wow, what a good person") do |friend_button|
30
+ friend_button.nested_form do |builder|
31
+ Primer::Forms::FormList.new(
32
+ FriendForm.new(builder),
33
+ FriendTextAreaForm.new(builder)
34
+ )
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class SelectListForm < ApplicationForm
5
+ form do |check_form|
6
+ check_form.select_list(name: "cities", label: "Cool cities", caption: "Select your favorite!") do |city_list|
7
+ city_list.option(label: "Lopez Island", value: "lopez_island")
8
+ city_list.option(label: "Bellevue", value: "bellevue")
9
+ city_list.option(label: "Seattle", value: "seattle")
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class SingleTextFieldForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.text_field(
7
+ name: :ultimate_answer,
8
+ label: "Ultimate answer",
9
+ required: true,
10
+ caption: "The answer to life, the universe, and everything"
11
+ )
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class SubmitButtonForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.fields_for(:name_form) do |builder|
7
+ MultiTextFieldForm.new(builder)
8
+ end
9
+
10
+ my_form.text_field(
11
+ name: :green,
12
+ label: "I'm green",
13
+ color: :success
14
+ )
15
+
16
+ my_form.submit(name: :submit, label: "Submit", scheme: :primary, mr: 3) do |c|
17
+ c.with_leading_visual_icon(icon: :"check-circle")
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class TextFieldAndCheckboxForm < ApplicationForm
5
+ form do |my_form|
6
+ my_form.text_field(
7
+ name: :ultimate_answer,
8
+ label: "Ultimate answer",
9
+ required: true,
10
+ caption: "The answer to life, the universe, and everything"
11
+ )
12
+
13
+ my_form.check_box(
14
+ name: :enable_ipd,
15
+ label: "Enable the Infinite Improbability Drive",
16
+ caption: "Cross interstellar distances in a mere nothingth of a second."
17
+ )
18
+ end
19
+ end
@@ -9,12 +9,8 @@ module Primer
9
9
  "Primer::Alpha::AutoComplete::Item" => "Primer::Beta::AutoComplete::Item",
10
10
  "Primer::BlankslateComponent" => "Primer::Beta::Blankslate",
11
11
  "Primer::BoxComponent" => "Primer::Box",
12
- "Primer::CloseButton" => "Primer::Beta::CloseButton",
13
12
  "Primer::CounterComponent" => "Primer::Beta::Counter",
14
- "Primer::DetailsComponent" => "Primer::Beta::Details",
15
13
  "Primer::DropdownMenuComponent" => nil,
16
- "Primer::HeadingComponent" => "Primer::Beta::Heading",
17
- "Primer::HiddenTextExpander" => "Primer::Alpha::HiddenTextExpander",
18
14
  "Primer::IconButton" => "Primer::Beta::IconButton",
19
15
  "Primer::Tooltip" => "Primer::Alpha::Tooltip"
20
16
  }.freeze
@@ -15,6 +15,7 @@ module Primer
15
15
 
16
16
  config.eager_load_paths = %W[
17
17
  #{root}/app/components
18
+ #{root}/app/forms
18
19
  #{root}/app/helpers
19
20
  #{root}/app/lib
20
21
  ]
@@ -14,7 +14,7 @@ module ERBLint
14
14
 
15
15
  TAGS = %w[button].freeze
16
16
  CLASSES = %w[close-button].freeze
17
- MESSAGE = "We are migrating close-button to use [Primer::Beta::CloseButton](https://primer.style/view-components/components/closebutton), please try to use that instead of raw HTML."
17
+ MESSAGE = "We are migrating close-button to use [Primer::Beta::CloseButton](https://primer.style/view-components/components/beta/closebutton), please try to use that instead of raw HTML."
18
18
  ARGUMENT_MAPPER = ArgumentMappers::CloseButton
19
19
  COMPONENT = "Primer::Beta::CloseButton"
20
20
 
@@ -5,7 +5,7 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 102
8
+ PATCH = 103
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
data/lib/tasks/docs.rake CHANGED
@@ -342,7 +342,7 @@ namespace :docs do
342
342
  FileUtils.rm_rf(File.join(adr_content_dir))
343
343
  FileUtils.mkdir(adr_content_dir)
344
344
 
345
- nav_entries = Dir[File.join(*%w[adr *.md])].sort.map do |orig_path|
345
+ nav_entries = Dir[File.join(*%w[docs adr *.md])].sort.map do |orig_path|
346
346
  orig_file_name = File.basename(orig_path)
347
347
  url_name = orig_file_name.chomp(".md")
348
348
 
data/lib/tasks/test.rake CHANGED
@@ -4,7 +4,7 @@ require "rake/testtask"
4
4
 
5
5
  namespace :test do
6
6
  desc "Run all tests"
7
- task all: [:fast, :system, :accessibility, :bench]
7
+ task all: [:fast, :system, :accessibility, :performance]
8
8
 
9
9
  Rake::TestTask.new(:single) do |t|
10
10
  ENV["TZ"] = "Asia/Taipei"
@@ -22,7 +22,6 @@ namespace :test do
22
22
  t.test_files = FileList[
23
23
  "test/components/**/*_test.rb",
24
24
  "test/lib/**/*_test.rb",
25
- "test/forms/**/*_test.rb",
26
25
  "test/primer/**/*_test.rb",
27
26
  "test/linters/**/*_test.rb",
28
27
  "test/rubocop/**/*_test.rb"
@@ -37,6 +36,14 @@ namespace :test do
37
36
  t.test_files = FileList["test/system/**/*_test.rb"]
38
37
  end
39
38
 
39
+ Rake::TestTask.new(:performance) do |t|
40
+ ENV["TZ"] = "Asia/Taipei"
41
+
42
+ t.libs << "test"
43
+ t.test_files = FileList["test/performance/**/*_test.rb", "test/performance/**/bench_*.rb"]
44
+ t.verbose = true
45
+ end
46
+
40
47
  Rake::TestTask.new(:accessibility) do |t|
41
48
  ENV["TZ"] = "Asia/Taipei"
42
49
 
@@ -46,21 +53,12 @@ namespace :test do
46
53
  end
47
54
 
48
55
  Rake::TestTask.new(:snapshots) do |t|
49
- # Clear folder
50
- FileUtils.rm_rf("test/snapshots")
51
-
52
56
  ENV["TZ"] = "Asia/Taipei"
53
57
 
54
58
  t.libs << "test"
55
59
  t.libs << "lib"
56
60
  t.test_files = FileList["test/snapshots_test.rb"]
57
61
  end
58
-
59
- Rake::TestTask.new(:bench) do |t|
60
- t.libs << "test"
61
- t.test_files = FileList["test/benchmarks/**/bench_*.rb"]
62
- t.verbose = true
63
- end
64
62
  end
65
63
 
66
64
  task :test do
@@ -71,4 +69,8 @@ task :test do
71
69
  end
72
70
  end
73
71
 
74
- task bench: "test:bench"
72
+ task "test:snapshots" => :clean_snapshots
73
+ task :clean_snapshots do
74
+ # Clear folder
75
+ FileUtils.rm_rf("test/snapshots")
76
+ end
@@ -0,0 +1,14 @@
1
+ <%= render(Primer::Alpha::Dialog.new(id: "dialog-one", title: title, subtitle: subtitle, visually_hide_title: false)) do |d| %>
2
+ <% d.show_button { button_text } %>
3
+ <% d.body do %>
4
+ <p>Dialog One!</p>
5
+
6
+ <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
7
+ <%= render(Primer::Alpha::Dialog.new(id: "dialog-two", title: title, subtitle: subtitle, visually_hide_title: false)) do |d| %>
8
+ <% d.show_button { button_text } %>
9
+ <% d.body do %>
10
+ Dialog Two!
11
+ <% end %>
12
+ <% end %>
13
+ <% end %>
14
+ <% end %>
@@ -80,6 +80,21 @@ module Primer
80
80
  show_divider: show_divider
81
81
  })
82
82
  end
83
+
84
+ # @label Nested dialog
85
+ #
86
+ # @param title [String] text
87
+ # @param subtitle [String] text
88
+ # @param button_text [String] text
89
+ # @param show_divider [Boolean] toggle
90
+ def nested_dialog(title: "Test Dialog", subtitle: nil, button_text: "Show Dialog", show_divider: true)
91
+ render_with_template(locals: {
92
+ title: title,
93
+ subtitle: subtitle,
94
+ button_text: button_text,
95
+ show_divider: show_divider
96
+ })
97
+ end
83
98
  end
84
99
  end
85
100
  end
@@ -51,18 +51,14 @@
51
51
  "Primer::BoxComponent": "",
52
52
  "Primer::ButtonComponent": "",
53
53
  "Primer::ClipboardCopy": "",
54
- "Primer::CloseButton": "",
55
54
  "Primer::ConditionalWrapper": "",
56
55
  "Primer::Content": "",
57
56
  "Primer::CounterComponent": "",
58
- "Primer::DetailsComponent": "",
59
57
  "Primer::Dropdown": "",
60
58
  "Primer::Dropdown::Menu": "",
61
59
  "Primer::Dropdown::Menu::Item": "",
62
60
  "Primer::DropdownMenuComponent": "",
63
- "Primer::HeadingComponent": "",
64
61
  "Primer::HellipButton": "",
65
- "Primer::HiddenTextExpander": "",
66
62
  "Primer::IconButton": "",
67
63
  "Primer::Image": "",
68
64
  "Primer::ImageCrop": "",
@@ -608,16 +608,12 @@
608
608
  },
609
609
  "Primer::ClipboardCopy": {
610
610
  },
611
- "Primer::CloseButton": {
612
- },
613
611
  "Primer::ConditionalWrapper": {
614
612
  },
615
613
  "Primer::Content": {
616
614
  },
617
615
  "Primer::CounterComponent": {
618
616
  },
619
- "Primer::DetailsComponent": {
620
- },
621
617
  "Primer::Dropdown": {
622
618
  "Menu": "Primer::Dropdown::Menu"
623
619
  },
@@ -671,12 +667,8 @@
671
667
  "dark": "dropdown-menu-dark"
672
668
  }
673
669
  },
674
- "Primer::HeadingComponent": {
675
- },
676
670
  "Primer::HellipButton": {
677
671
  },
678
- "Primer::HiddenTextExpander": {
679
- },
680
672
  "Primer::IconButton": {
681
673
  "DEFAULT_SCHEME": "default",
682
674
  "SCHEME_MAPPINGS": {
data/static/statuses.json CHANGED
@@ -51,18 +51,14 @@
51
51
  "Primer::BoxComponent": "deprecated",
52
52
  "Primer::ButtonComponent": "beta",
53
53
  "Primer::ClipboardCopy": "beta",
54
- "Primer::CloseButton": "deprecated",
55
54
  "Primer::ConditionalWrapper": "alpha",
56
55
  "Primer::Content": "stable",
57
56
  "Primer::CounterComponent": "deprecated",
58
- "Primer::DetailsComponent": "deprecated",
59
57
  "Primer::Dropdown": "alpha",
60
58
  "Primer::Dropdown::Menu": "alpha",
61
59
  "Primer::Dropdown::Menu::Item": "alpha",
62
60
  "Primer::DropdownMenuComponent": "deprecated",
63
- "Primer::HeadingComponent": "deprecated",
64
61
  "Primer::HellipButton": "alpha",
65
- "Primer::HiddenTextExpander": "deprecated",
66
62
  "Primer::IconButton": "deprecated",
67
63
  "Primer::Image": "alpha",
68
64
  "Primer::ImageCrop": "alpha",