primer_view_components 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/README.md +1 -1
  4. data/app/assets/javascripts/app/components/primer/primer.d.ts +0 -1
  5. data/app/assets/javascripts/primer_view_components.js +1 -1
  6. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  7. data/app/assets/styles/primer_view_components.css +1 -1
  8. data/app/assets/styles/primer_view_components.css.map +1 -1
  9. data/app/components/primer/alpha/action_bar.css +1 -1
  10. data/app/components/primer/alpha/action_bar.css.json +1 -4
  11. data/app/components/primer/alpha/action_bar.css.map +1 -1
  12. data/app/components/primer/alpha/action_bar.pcss +1 -17
  13. data/app/components/primer/alpha/action_bar_element.js +21 -9
  14. data/app/components/primer/alpha/action_list/item.rb +0 -2
  15. data/app/components/primer/alpha/action_list.css +1 -1
  16. data/app/components/primer/alpha/action_list.css.map +1 -1
  17. data/app/components/primer/alpha/action_list.rb +0 -1
  18. data/app/components/primer/alpha/action_menu/action_menu_element.js +52 -26
  19. data/app/components/primer/alpha/action_menu/action_menu_element.ts +9 -6
  20. data/app/components/primer/alpha/action_menu/list.rb +0 -9
  21. data/app/components/primer/alpha/action_menu.html.erb +20 -18
  22. data/app/components/primer/alpha/auto_complete.css +1 -1
  23. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  24. data/app/components/primer/alpha/button_marketing.css +1 -1
  25. data/app/components/primer/alpha/button_marketing.css.map +1 -1
  26. data/app/components/primer/alpha/dialog/header.rb +1 -1
  27. data/app/components/primer/alpha/dropdown.css +1 -1
  28. data/app/components/primer/alpha/dropdown.css.map +1 -1
  29. data/app/components/primer/alpha/layout.css +1 -1
  30. data/app/components/primer/alpha/layout.css.map +1 -1
  31. data/app/components/primer/alpha/menu.css +1 -1
  32. data/app/components/primer/alpha/menu.css.map +1 -1
  33. data/app/components/primer/alpha/nav_list/divider.rb +1 -0
  34. data/app/components/primer/alpha/nav_list/group.rb +1 -0
  35. data/app/components/primer/alpha/nav_list/heading.rb +1 -0
  36. data/app/components/primer/alpha/nav_list/item.rb +1 -0
  37. data/app/components/primer/alpha/nav_list.rb +1 -0
  38. data/app/components/primer/alpha/octicon_symbols.html.erb +1 -1
  39. data/app/components/primer/alpha/overlay.css +1 -1
  40. data/app/components/primer/alpha/overlay.css.json +0 -2
  41. data/app/components/primer/alpha/overlay.css.map +1 -1
  42. data/app/components/primer/alpha/overlay.pcss +0 -12
  43. data/app/components/primer/alpha/segmented_control.css +1 -1
  44. data/app/components/primer/alpha/segmented_control.css.json +0 -1
  45. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  46. data/app/components/primer/alpha/segmented_control.js +2 -1
  47. data/app/components/primer/alpha/segmented_control.pcss +0 -4
  48. data/app/components/primer/alpha/tab_nav.css +1 -1
  49. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  50. data/app/components/primer/alpha/text_field.css +1 -1
  51. data/app/components/primer/alpha/text_field.css.json +11 -5
  52. data/app/components/primer/alpha/text_field.css.map +1 -1
  53. data/app/components/primer/alpha/text_field.pcss +10 -1
  54. data/app/components/primer/alpha/toggle_switch.css +1 -1
  55. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  56. data/app/components/primer/alpha/underline_nav.css +1 -1
  57. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  58. data/app/components/primer/alpha/x_banner.js +2 -1
  59. data/app/components/primer/anchored_position.js +2 -1
  60. data/app/components/primer/beta/auto_complete/item.rb +1 -1
  61. data/app/components/primer/beta/avatar.rb +1 -1
  62. data/app/components/primer/beta/base_button.rb +1 -1
  63. data/app/components/primer/beta/blankslate.css +1 -1
  64. data/app/components/primer/beta/blankslate.css.json +1 -0
  65. data/app/components/primer/beta/blankslate.css.map +1 -1
  66. data/app/components/primer/beta/blankslate.html.erb +16 -14
  67. data/app/components/primer/beta/blankslate.pcss +52 -2
  68. data/app/components/primer/beta/border_box.css +1 -1
  69. data/app/components/primer/beta/border_box.css.map +1 -1
  70. data/app/components/primer/beta/button.css +1 -1
  71. data/app/components/primer/beta/button.css.json +0 -1
  72. data/app/components/primer/beta/button.css.map +1 -1
  73. data/app/components/primer/beta/button.html.erb +18 -20
  74. data/app/components/primer/beta/button.pcss +0 -5
  75. data/app/components/primer/beta/button.rb +3 -0
  76. data/app/components/primer/beta/button_group.css +1 -1
  77. data/app/components/primer/beta/button_group.css.json +2 -4
  78. data/app/components/primer/beta/button_group.css.map +1 -1
  79. data/app/components/primer/beta/button_group.html.erb +3 -1
  80. data/app/components/primer/beta/button_group.pcss +2 -4
  81. data/app/components/primer/beta/button_group.rb +41 -12
  82. data/app/components/primer/beta/clipboard_copy.rb +4 -0
  83. data/app/components/primer/beta/clipboard_copy_button.rb +25 -0
  84. data/app/components/primer/beta/counter.rb +1 -1
  85. data/app/components/primer/beta/flash.html.erb +1 -1
  86. data/app/components/primer/beta/icon_button.html.erb +4 -6
  87. data/app/components/primer/beta/icon_button.rb +1 -3
  88. data/app/components/primer/beta/label.css +1 -1
  89. data/app/components/primer/beta/label.css.map +1 -1
  90. data/app/components/primer/beta/link.css +1 -1
  91. data/app/components/primer/beta/link.css.map +1 -1
  92. data/app/components/primer/beta/nav_list.js +14 -7
  93. data/app/components/primer/beta/subhead.css +1 -1
  94. data/app/components/primer/beta/subhead.css.json +2 -0
  95. data/app/components/primer/beta/subhead.css.map +1 -1
  96. data/app/components/primer/beta/subhead.pcss +8 -1
  97. data/app/components/primer/beta/subhead.rb +9 -1
  98. data/app/components/primer/focus_group.js +2 -1
  99. data/app/components/primer/primer.d.ts +0 -1
  100. data/app/components/primer/primer.js +0 -1
  101. data/app/components/primer/primer.pcss +0 -2
  102. data/app/components/primer/primer.ts +0 -1
  103. data/app/forms/action_menu_form.rb +20 -0
  104. data/app/forms/immediate_validation_form.rb +2 -2
  105. data/app/lib/primer/fetch_or_fallback_helper.rb +0 -1
  106. data/app/lib/primer/octicon/cache.rb +1 -1
  107. data/lib/primer/classify.rb +0 -2
  108. data/lib/primer/forms/action_menu.html.erb +6 -0
  109. data/lib/primer/forms/action_menu.rb +25 -0
  110. data/lib/primer/forms/acts_as_component.rb +0 -3
  111. data/lib/primer/forms/base.rb +0 -1
  112. data/lib/primer/forms/base_component.rb +0 -2
  113. data/lib/primer/forms/dsl/action_menu_input.rb +36 -0
  114. data/lib/primer/forms/dsl/input.rb +8 -1
  115. data/lib/primer/forms/dsl/input_methods.rb +9 -0
  116. data/lib/primer/forms/dsl/text_field_input.rb +8 -0
  117. data/lib/primer/forms/primer_base_component_wrapper.rb +0 -2
  118. data/lib/primer/forms/primer_text_field.js +40 -5
  119. data/lib/primer/forms/primer_text_field.ts +39 -7
  120. data/lib/primer/forms/validation_message.html.erb +2 -1
  121. data/lib/primer/static/generate_info_arch.rb +7 -3
  122. data/lib/primer/static/generate_previews.rb +0 -2
  123. data/lib/primer/view_components/engine.rb +5 -1
  124. data/lib/primer/view_components/linters/base_linter.rb +3 -2
  125. data/lib/primer/view_components/linters/deprecated_components_counter.rb +1 -1
  126. data/lib/primer/view_components/linters/disallow_action_list.rb +1 -0
  127. data/lib/primer/view_components/linters/severity_schema.rb +1 -0
  128. data/lib/primer/view_components/version.rb +2 -3
  129. data/lib/primer/yard/lookbook_pages_backend.rb +0 -2
  130. data/lib/rubocop/cop/primer/base_cop.rb +1 -1
  131. data/lib/rubocop/cop/primer/deprecated_arguments.rb +0 -2
  132. data/lib/rubocop/cop/primer/deprecated_components.rb +1 -1
  133. data/lib/rubocop/cop/primer/deprecated_label_schemes.rb +1 -1
  134. data/lib/rubocop/cop/primer/deprecated_label_variants.rb +1 -1
  135. data/previews/primer/alpha/octicon_symbols_preview/default.html.erb +6 -0
  136. data/previews/primer/alpha/octicon_symbols_preview/playground.html.erb +13 -0
  137. data/previews/primer/alpha/octicon_symbols_preview.rb +21 -0
  138. data/previews/primer/alpha/text_field_preview.rb +5 -0
  139. data/previews/primer/beta/avatar_preview.rb +6 -0
  140. data/previews/primer/beta/button_group_preview.rb +11 -0
  141. data/previews/primer/beta/clipboard_copy_button_preview.rb +29 -0
  142. data/previews/primer/beta/subhead_preview.rb +32 -4
  143. data/previews/primer/forms_preview/action_menu_form.html.erb +3 -0
  144. data/previews/primer/forms_preview.rb +4 -0
  145. data/static/arguments.json +75 -13
  146. data/static/audited_at.json +2 -0
  147. data/static/classes.json +9 -3
  148. data/static/constants.json +16 -1
  149. data/static/info_arch.json +335 -32
  150. data/static/previews.json +146 -0
  151. data/static/statuses.json +2 -0
  152. metadata +12 -2
@@ -24,6 +24,7 @@ module ERBLint
24
24
  CLASSES = [].freeze
25
25
  REQUIRED_ARGUMENTS = [].freeze
26
26
 
27
+ # :nodoc:
27
28
  class ConfigSchema < LinterConfig
28
29
  property :override_ignores_if_correctable, accepts: [true, false], default: false, reader: :override_ignores_if_correctable?
29
30
  end
@@ -154,13 +155,13 @@ module ERBLint
154
155
  # Unless explicitly set, we don't want to mark correctable offenses if the counter is correct.
155
156
  if !@config.override_ignores_if_correctable? && expected_count == @total_offenses
156
157
  clear_offenses
157
- return
158
+ return false
158
159
  end
159
160
 
160
161
  if @offenses_not_corrected.zero?
161
162
  # have to adjust to get `\n` so we delete the whole line
162
163
  add_offense(processed_source.to_source_range(comment_node.loc.adjust(end_pos: 1)), "Unused erblint:count comment for #{rule_name}", "") if comment_node
163
- return
164
+ return false
164
165
  end
165
166
 
166
167
  first_offense = @offenses[0]
@@ -63,7 +63,7 @@ module ERBLint
63
63
  if offenses_count.zero?
64
64
  # have to adjust to get `\n` so we delete the whole line
65
65
  add_offense_with_severity(processed_source.to_source_range(comment_node.loc.adjust(end_pos: 1)), "Unused erblint:counter comment for #{rule_name}", "") if comment_node
66
- return
66
+ return false
67
67
  end
68
68
 
69
69
  first_offense = @offenses[0]
@@ -10,6 +10,7 @@ module ERBLint
10
10
  include ERBLint::LinterRegistry
11
11
  include TagTreeHelpers
12
12
 
13
+ # :nodoc:
13
14
  class ConfigSchema < LinterConfig
14
15
  property :ignore_files, accepts: array_of?(String), default: -> { [] }
15
16
  end
@@ -4,6 +4,7 @@ require "erb_lint/utils/severity_levels"
4
4
 
5
5
  module ERBLint
6
6
  module Linters
7
+ # :nodoc:
7
8
  class SeveritySchema < LinterConfig
8
9
  # SEVERITY_NAMES :info, :refactor, :convention, :warning, :error, :fatal
9
10
  # see https://github.com/Shopify/erb-lint/blob/main/lib/erb_lint/utils/severity_levels.rb
@@ -5,14 +5,13 @@ module Primer
5
5
  module ViewComponents
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 13
9
- PATCH = 1
8
+ MINOR = 14
9
+ PATCH = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
12
12
  end
13
13
  end
14
14
  end
15
15
 
16
- # rubocop:disable Rails/Output
17
16
  puts Primer::ViewComponents::VERSION::STRING if __FILE__ == $PROGRAM_NAME
18
17
  # rubocop:enable Rails/Output
@@ -42,14 +42,12 @@ module Primer
42
42
  ), __dir__
43
43
  )
44
44
 
45
- # rubocop:disable Lint/UselessAssignment
46
45
  documented_methods = docs.non_slot_methods.select do |mtd|
47
46
  [component.name, "Primer::Forms::Dsl::InputMethods"].include?(mtd.parent.title)
48
47
  end
49
48
 
50
49
  preview_methods = PREVIEW_MAP[component]
51
50
  preview_erbs = preview_methods.map do |preview_method|
52
- # rubocop:disable Style/IfUnlessModifier
53
51
  if Primer::FormsPreview.instance_methods.exclude?(preview_method)
54
52
  raise "Preview '#{preview_method}' does not exist in Primer::FormsPreview"
55
53
  end
@@ -12,7 +12,7 @@ module RuboCop
12
12
  # We only verify SystemArguments if it's a `.new` call on a component or
13
13
  # a ViewHeleper call.
14
14
  def valid_node?(node)
15
- return if node.nil?
15
+ return false if node.nil?
16
16
 
17
17
  view_helpers.include?(node.method_name) || (node.method_name == :new && !node.receiver.nil? && ::Primer::ViewComponents::STATUSES.key?(node.receiver.const_name))
18
18
  end
@@ -298,7 +298,6 @@ module RuboCop
298
298
  def extract_kv_from(pair)
299
299
  key = pair.key.value
300
300
 
301
- # rubocop:disable Lint/BooleanSymbol
302
301
  value = case pair.value.type
303
302
  when :sym, :str
304
303
  pair.value.value.to_sym
@@ -307,7 +306,6 @@ module RuboCop
307
306
  else
308
307
  return []
309
308
  end
310
- # rubocop:enable Lint/BooleanSymbol
311
309
 
312
310
  [key, value]
313
311
  end
@@ -3,7 +3,7 @@
3
3
  require "rubocop"
4
4
  require "json"
5
5
  require "parser/current"
6
- require_relative "./../../../primer/view_components/linters/helpers/deprecated_components_helpers"
6
+ require_relative "../../../primer/view_components/linters/helpers/deprecated_components_helpers"
7
7
 
8
8
  module RuboCop
9
9
  module Cop
@@ -58,7 +58,7 @@ module RuboCop
58
58
  private
59
59
 
60
60
  def label_node?(node)
61
- return if node.nil?
61
+ return false if node.nil?
62
62
 
63
63
  node.method_name == :new && !node.receiver.nil? && node.receiver.const_name == "Primer::Beta::Label"
64
64
  end
@@ -61,7 +61,7 @@ module RuboCop
61
61
  private
62
62
 
63
63
  def label_node?(node)
64
- return if node.nil?
64
+ return false if node.nil?
65
65
 
66
66
  node.method_name == :new && !node.receiver.nil? && node.receiver.const_name == "Primer::Beta::Label"
67
67
  end
@@ -0,0 +1,6 @@
1
+ <%= render(Primer::Alpha::OcticonSymbols.new(icons: [{ symbol: :container, size: :medium }])) %>
2
+
3
+ <svg xmlns="http://www.w3.org/2000/svg" height="40" width="40" aria-label="Circled container icon" tabindex="0">
4
+ <circle cx="20" cy="20" r="18" stroke="green" stroke-width="3px" fill="white" />
5
+ <use href="#octicon_container_24" x="8" y="8" />
6
+ </svg>
@@ -0,0 +1,13 @@
1
+ <p style="max-width: 500px">
2
+ Below is an SVG image containing the chosen octicon surrounded by a green circle. The octicon has been emitted
3
+ onto the page as an SVG &lt;symbol&gt; element and included into the SVG you see below with the &lt;use&gt; element.
4
+ See the <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol" target="_blank">MDN docs</a> for
5
+ more information.
6
+ </p>
7
+
8
+ <%= render(Primer::Alpha::OcticonSymbols.new(icons: [{ symbol: octicon, size: :medium }])) %>
9
+
10
+ <svg xmlns="http://www.w3.org/2000/svg" height="40" width="40" aria-label="Circled <%= octicon %> icon" tabindex="0">
11
+ <circle cx="20" cy="20" r="18" stroke="green" stroke-width="3px" fill="white" />
12
+ <use href="#octicon_<%= octicon %>_24" x="8" y="8" />
13
+ </svg>
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module Alpha
5
+ # @label OcticonSymbols
6
+ class OcticonSymbolsPreview < ViewComponent::Preview
7
+ # @label Playground
8
+ #
9
+ # @param octicon [Symbol] medium_octicon
10
+ def playground(octicon: :container)
11
+ render_with_template(locals: { octicon: octicon })
12
+ end
13
+
14
+ # @label Default
15
+ #
16
+ # @snapshot
17
+ def default
18
+ end
19
+ end
20
+ end
21
+ end
@@ -176,6 +176,11 @@ module Primer
176
176
  render(Primer::Alpha::TextField.new(auto_check_src: UrlHelpers.example_check_ok_path, name: "my-text-field", label: "My text field"))
177
177
  end
178
178
 
179
+ # @label Auto check request accepted
180
+ def with_auto_check_accepted
181
+ render(Primer::Alpha::TextField.new(auto_check_src: UrlHelpers.example_check_accepted_path, name: "my-text-field", label: "My text field"))
182
+ end
183
+
179
184
  # @label Auto check request error
180
185
  def with_auto_check_error
181
186
  render(Primer::Alpha::TextField.new(auto_check_src: UrlHelpers.example_check_error_path, name: "my-text-field", label: "My text field"))
@@ -64,6 +64,12 @@ module Primer
64
64
  render(Primer::Beta::Avatar.new(size: 48, src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser"))
65
65
  end
66
66
 
67
+ # @label 64px
68
+ # @snapshot
69
+ def size_64
70
+ render(Primer::Beta::Avatar.new(size: 64, src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser"))
71
+ end
72
+
67
73
  # @label 80px
68
74
  # @snapshot
69
75
  def size_80
@@ -69,6 +69,17 @@ module Primer
69
69
  end
70
70
  end
71
71
  end
72
+
73
+ # @label With clipboard copy button
74
+ # @snapshot
75
+ def with_clipboard_copy_button(size: :medium, scheme: :default)
76
+ render(Primer::Beta::ButtonGroup.new(size: size, scheme: scheme)) do |component|
77
+ component.with_button { "Button 1" }
78
+ component.with_clipboard_copy_button(id: "button-2", value: "Copyable value", aria: { label: "Copy some text" }) do |button|
79
+ button.with_tooltip(text: "Copy some text")
80
+ end
81
+ end
82
+ end
72
83
  end
73
84
  end
74
85
  end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module Beta
5
+ # @label ClipboardCopyButton
6
+ class ClipboardCopyButtonPreview < ViewComponent::Preview
7
+ # @label Playground
8
+ #
9
+ # @param text [String]
10
+ def playground(text: "Text to copy")
11
+ render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: text))
12
+ end
13
+
14
+ # @label Playground
15
+ # @snapshot
16
+ def default
17
+ render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: "Text to copy"))
18
+ end
19
+
20
+ # @label With tooltip
21
+ # @snapshot
22
+ def with_tooltip
23
+ render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: "Text to copy")) do |button|
24
+ button.with_tooltip(text: "Copy some text")
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -9,10 +9,11 @@ module Primer
9
9
  # @param spacious [Boolean]
10
10
  # @param hide_border [Boolean]
11
11
  # @param heading_danger [Boolean]
12
+ # @param heading_size [Symbol] select [medium, large]
12
13
  # @param heading_tag [Symbol] select [div, h1, h2, h3, h4, h5, h6]
13
- def playground(spacious: false, hide_border: false, heading_tag: :div, heading_danger: false)
14
+ def playground(spacious: false, hide_border: false, heading_tag: :div, heading_size: Primer::Beta::Subhead::DEFAULT_HEADING_SIZE, heading_danger: false)
14
15
  render(Primer::Beta::Subhead.new(spacious: spacious, hide_border: hide_border)) do |component|
15
- component.with_heading(tag: heading_tag, danger: heading_danger) do
16
+ component.with_heading(tag: heading_tag, size: heading_size, danger: heading_danger) do
16
17
  "My Heading"
17
18
  end
18
19
  component.with_description do
@@ -26,11 +27,12 @@ module Primer
26
27
  # @param spacious [Boolean]
27
28
  # @param hide_border [Boolean]
28
29
  # @param heading_danger [Boolean]
30
+ # @param heading_size [Symbol] select [medium, large]
29
31
  # @param heading_tag [Symbol] select [div, h1, h2, h3, h4, h5, h6]
30
32
  # @snapshot
31
- def default(spacious: false, hide_border: false, heading_tag: :div, heading_danger: false)
33
+ def default(spacious: false, hide_border: false, heading_tag: :div, heading_size: Primer::Beta::Subhead::DEFAULT_HEADING_SIZE, heading_danger: false)
32
34
  render(Primer::Beta::Subhead.new(spacious: spacious, hide_border: hide_border)) do |component|
33
- component.with_heading(tag: heading_tag, danger: heading_danger) do
35
+ component.with_heading(tag: heading_tag, size: heading_size, danger: heading_danger) do
34
36
  "My Heading"
35
37
  end
36
38
  component.with_description do
@@ -98,6 +100,32 @@ module Primer
98
100
  end
99
101
  #
100
102
  # @!endgroup
103
+
104
+ # @!group Header size
105
+ #
106
+ # @label Large
107
+ def large_header
108
+ render(Primer::Beta::Subhead.new) do |component|
109
+ component.with_heading(size: :large) do
110
+ "Large Header"
111
+ end
112
+ component.with_description do
113
+ "Description"
114
+ end
115
+ end
116
+ end
117
+
118
+ # @label Medium
119
+ def medium_header
120
+ render(Primer::Beta::Subhead.new) do |component|
121
+ component.with_heading(size: :medium) do
122
+ "Medium Header"
123
+ end
124
+ component.with_description do
125
+ "Description"
126
+ end
127
+ end
128
+ end
101
129
  end
102
130
  end
103
131
  end
@@ -0,0 +1,3 @@
1
+ <%= primer_form_with(url: action_menu_form_action_path(format: route_format)) do |f| %>
2
+ <%= render(ActionMenuForm.new(f)) %>
3
+ <% end %>
@@ -23,6 +23,10 @@ module Primer
23
23
 
24
24
  def select_form; end
25
25
 
26
+ def action_menu_form(route_format: :html)
27
+ render_with_template(locals: { route_format: route_format })
28
+ end
29
+
26
30
  def radio_button_with_nested_form; end
27
31
 
28
32
  def check_box_with_nested_form; end
@@ -923,7 +923,7 @@
923
923
  "name": "subtitle",
924
924
  "type": "String",
925
925
  "default": "`nil`",
926
- "description": "Provides dditional context for the dialog, also setting the `aria-describedby` attribute."
926
+ "description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
927
927
  },
928
928
  {
929
929
  "name": "show_divider",
@@ -3034,7 +3034,7 @@
3034
3034
  "name": "size",
3035
3035
  "type": "Integer",
3036
3036
  "default": "`20`",
3037
- "description": "One of `16`, `20`, `24`, `32`, `40`, `48`, or `80`."
3037
+ "description": "One of `16`, `20`, `24`, `32`, `40`, `48`, `64`, or `80`."
3038
3038
  },
3039
3039
  {
3040
3040
  "name": "shape",
@@ -3108,7 +3108,7 @@
3108
3108
  "name": "tag",
3109
3109
  "type": "Symbol",
3110
3110
  "default": "`:button`",
3111
- "description": "One of `:a`, `:button`, or `:summary`."
3111
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3112
3112
  },
3113
3113
  {
3114
3114
  "name": "type",
@@ -3249,6 +3249,12 @@
3249
3249
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb",
3250
3250
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button/default/",
3251
3251
  "parameters": [
3252
+ {
3253
+ "name": "base_button_class",
3254
+ "type": "Class",
3255
+ "default": "`Primer::Beta::BaseButton`",
3256
+ "description": "The button class to render."
3257
+ },
3252
3258
  {
3253
3259
  "name": "scheme",
3254
3260
  "type": "Symbol",
@@ -3277,7 +3283,7 @@
3277
3283
  "name": "tag",
3278
3284
  "type": "Symbol",
3279
3285
  "default": "`:button`",
3280
- "description": "One of `:a`, `:button`, or `:summary`."
3286
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3281
3287
  },
3282
3288
  {
3283
3289
  "name": "type",
@@ -3361,6 +3367,68 @@
3361
3367
  }
3362
3368
  ]
3363
3369
  },
3370
+ {
3371
+ "component": "ClipboardCopyBaseButton",
3372
+ "status": "beta",
3373
+ "a11y_reviewed": false,
3374
+ "short_name": "ClipboardCopyBaseButton",
3375
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_base_button.rb",
3376
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_base_button/default/",
3377
+ "parameters": [
3378
+ {
3379
+ "name": "tag",
3380
+ "type": "Symbol",
3381
+ "default": "`:button`",
3382
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3383
+ },
3384
+ {
3385
+ "name": "type",
3386
+ "type": "Symbol",
3387
+ "default": "`:button`",
3388
+ "description": "One of `:button`, `:reset`, or `:submit`."
3389
+ },
3390
+ {
3391
+ "name": "block",
3392
+ "type": "Boolean",
3393
+ "default": "`false`",
3394
+ "description": "Whether button is full-width with `display: block`."
3395
+ },
3396
+ {
3397
+ "name": "disabled",
3398
+ "type": "Boolean",
3399
+ "default": "`false`",
3400
+ "description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
3401
+ },
3402
+ {
3403
+ "name": "inactive",
3404
+ "type": "Boolean",
3405
+ "default": "`false`",
3406
+ "description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
3407
+ },
3408
+ {
3409
+ "name": "system_arguments",
3410
+ "type": "Hash",
3411
+ "default": "N/A",
3412
+ "description": "[System arguments](/system-arguments)"
3413
+ }
3414
+ ]
3415
+ },
3416
+ {
3417
+ "component": "ClipboardCopyButton",
3418
+ "status": "beta",
3419
+ "a11y_reviewed": false,
3420
+ "short_name": "ClipboardCopyButton",
3421
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_button.rb",
3422
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_button/default/",
3423
+ "parameters": [
3424
+ {
3425
+ "name": "system_arguments",
3426
+ "type": "Hash",
3427
+ "default": "N/A",
3428
+ "description": "The arguments accepted by [Button](/components/beta/button) and [ClipboardCopy](/components/beta/clipboardcopy)."
3429
+ }
3430
+ ]
3431
+ },
3364
3432
  {
3365
3433
  "component": "CloseButton",
3366
3434
  "status": "beta",
@@ -3561,13 +3629,7 @@
3561
3629
  "name": "tag",
3562
3630
  "type": "Symbol",
3563
3631
  "default": "N/A",
3564
- "description": "One of `:a`, `:button`, or `:summary`."
3565
- },
3566
- {
3567
- "name": "wrapper_arguments",
3568
- "type": "Hash",
3569
- "default": "`{}`",
3570
- "description": "Optional keyword arguments to be passed to the wrapper `<div>` tag."
3632
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3571
3633
  },
3572
3634
  {
3573
3635
  "name": "scheme",
@@ -4399,7 +4461,7 @@
4399
4461
  "name": "tag",
4400
4462
  "type": "Symbol",
4401
4463
  "default": "`:button`",
4402
- "description": "One of `:a`, `:button`, or `:summary`."
4464
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
4403
4465
  },
4404
4466
  {
4405
4467
  "name": "type",
@@ -4490,7 +4552,7 @@
4490
4552
  "name": "tag",
4491
4553
  "type": "Symbol",
4492
4554
  "default": "N/A",
4493
- "description": "One of `:a`, `:button`, or `:summary`."
4555
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
4494
4556
  },
4495
4557
  {
4496
4558
  "name": "type",
@@ -73,6 +73,8 @@
73
73
  "Primer::Beta::Button": "",
74
74
  "Primer::Beta::ButtonGroup": "",
75
75
  "Primer::Beta::ClipboardCopy": "",
76
+ "Primer::Beta::ClipboardCopyBaseButton": "",
77
+ "Primer::Beta::ClipboardCopyButton": "",
76
78
  "Primer::Beta::CloseButton": "",
77
79
  "Primer::Beta::Counter": "",
78
80
  "Primer::Beta::Details": "",
data/static/classes.json CHANGED
@@ -218,9 +218,6 @@
218
218
  "Button-visual": [
219
219
  "Primer::Beta::Button"
220
220
  ],
221
- "Button-withTooltip": [
222
- "Primer::Beta::Button"
223
- ],
224
221
  "ButtonGroup": [
225
222
  "Primer::Beta::ButtonGroup"
226
223
  ],
@@ -254,6 +251,9 @@
254
251
  "FormControl-inlineValidation": [
255
252
  "Primer::Alpha::TextField"
256
253
  ],
254
+ "FormControl-inlineValidation--success": [
255
+ "Primer::Alpha::TextField"
256
+ ],
257
257
  "FormControl-inlineValidation--visual": [
258
258
  "Primer::Alpha::TextField"
259
259
  ],
@@ -528,6 +528,12 @@
528
528
  "Subhead-heading--danger": [
529
529
  "Primer::Beta::Subhead"
530
530
  ],
531
+ "Subhead-heading--large": [
532
+ "Primer::Beta::Subhead"
533
+ ],
534
+ "Subhead-heading--medium": [
535
+ "Primer::Beta::Subhead"
536
+ ],
531
537
  "TimelineItem": [
532
538
  "Primer::Beta::TimelineItem"
533
539
  ],
@@ -709,6 +709,7 @@
709
709
  32,
710
710
  40,
711
711
  48,
712
+ 64,
712
713
  80
713
714
  ],
714
715
  "SMALL_THRESHOLD": 24
@@ -736,7 +737,8 @@
736
737
  "TAG_OPTIONS": [
737
738
  "button",
738
739
  "a",
739
- "summary"
740
+ "summary",
741
+ "clipboard-copy"
740
742
  ],
741
743
  "TYPE_OPTIONS": [
742
744
  "button",
@@ -836,6 +838,10 @@
836
838
  },
837
839
  "Primer::Beta::ClipboardCopy": {
838
840
  },
841
+ "Primer::Beta::ClipboardCopyBaseButton": {
842
+ },
843
+ "Primer::Beta::ClipboardCopyButton": {
844
+ },
839
845
  "Primer::Beta::CloseButton": {
840
846
  "DEFAULT_TYPE": "button",
841
847
  "TYPE_OPTIONS": [
@@ -1238,7 +1244,16 @@
1238
1244
  ]
1239
1245
  },
1240
1246
  "Primer::Beta::Subhead": {
1247
+ "DEFAULT_HEADING_SIZE": "large",
1241
1248
  "DEFAULT_HEADING_TAG": "div",
1249
+ "HEADING_SIZE_MAP": {
1250
+ "large": "Subhead-heading--large",
1251
+ "medium": "Subhead-heading--medium"
1252
+ },
1253
+ "HEADING_SIZE_OPTIONS": [
1254
+ "large",
1255
+ "medium"
1256
+ ],
1242
1257
  "HEADING_TAG_OPTIONS": [
1243
1258
  "div",
1244
1259
  "h1",