openproject-primer_view_components 0.59.2 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/app/assets/javascripts/components/primer/open_project/border_box/collapsible_header.d.ts +3 -9
  4. data/app/assets/javascripts/components/primer/open_project/collapsible.d.ts +11 -0
  5. data/app/assets/javascripts/components/primer/open_project/collapsible_section.d.ts +10 -0
  6. data/app/assets/javascripts/components/primer/primer.d.ts +2 -0
  7. data/app/assets/javascripts/primer_view_components.js +1 -1
  8. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  9. data/app/assets/styles/primer_view_components.css +1 -1
  10. data/app/assets/styles/primer_view_components.css.map +1 -1
  11. data/app/components/primer/alpha/auto_complete.css +1 -1
  12. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  13. data/app/components/primer/alpha/banner.css +1 -1
  14. data/app/components/primer/alpha/banner.css.json +2 -0
  15. data/app/components/primer/alpha/banner.css.map +1 -1
  16. data/app/components/primer/alpha/banner.pcss +11 -1
  17. data/app/components/primer/alpha/banner.rb +5 -3
  18. data/app/components/primer/alpha/button_marketing.css +1 -1
  19. data/app/components/primer/alpha/button_marketing.css.map +1 -1
  20. data/app/components/primer/alpha/select.rb +1 -0
  21. data/app/components/primer/alpha/select_panel.rb +2 -3
  22. data/app/components/primer/alpha/text_area.rb +1 -0
  23. data/app/components/primer/alpha/text_field.css +1 -1
  24. data/app/components/primer/alpha/text_field.css.json +6 -4
  25. data/app/components/primer/alpha/text_field.css.map +1 -1
  26. data/app/components/primer/alpha/text_field.pcss +5 -1
  27. data/app/components/primer/alpha/text_field.rb +1 -0
  28. data/app/components/primer/alpha/toggle_switch.css +1 -1
  29. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  30. data/app/components/primer/beta/flash.css +1 -1
  31. data/app/components/primer/beta/flash.css.map +1 -1
  32. data/app/components/primer/open_project/border_box/collapsible_header.d.ts +3 -9
  33. data/app/components/primer/open_project/border_box/collapsible_header.html.erb +6 -6
  34. data/app/components/primer/open_project/border_box/collapsible_header.js +5 -46
  35. data/app/components/primer/open_project/border_box/collapsible_header.rb +41 -9
  36. data/app/components/primer/open_project/border_box/collapsible_header.ts +5 -47
  37. data/app/components/primer/open_project/collapsible.d.ts +11 -0
  38. data/app/components/primer/open_project/collapsible.js +56 -0
  39. data/app/components/primer/open_project/collapsible.ts +49 -0
  40. data/app/components/primer/open_project/collapsible_section.css +1 -0
  41. data/app/components/primer/open_project/collapsible_section.css.json +6 -0
  42. data/app/components/primer/open_project/collapsible_section.css.map +1 -0
  43. data/app/components/primer/open_project/collapsible_section.d.ts +10 -0
  44. data/app/components/primer/open_project/collapsible_section.html.erb +26 -0
  45. data/app/components/primer/open_project/collapsible_section.js +16 -0
  46. data/app/components/primer/open_project/collapsible_section.pcss +5 -0
  47. data/app/components/primer/open_project/collapsible_section.rb +77 -0
  48. data/app/components/primer/open_project/collapsible_section.ts +15 -0
  49. data/app/components/primer/open_project/input_group.css +1 -1
  50. data/app/components/primer/open_project/input_group.css.json +1 -0
  51. data/app/components/primer/open_project/input_group.css.map +1 -1
  52. data/app/components/primer/open_project/input_group.pcss +5 -1
  53. data/app/components/primer/open_project/input_group.rb +1 -0
  54. data/app/components/primer/primer.d.ts +2 -0
  55. data/app/components/primer/primer.js +2 -0
  56. data/app/components/primer/primer.pcss +1 -0
  57. data/app/components/primer/primer.ts +2 -0
  58. data/app/lib/primer/forms/dsl/input.rb +4 -0
  59. data/lib/primer/view_components/version.rb +2 -2
  60. data/previews/primer/alpha/banner_preview.rb +9 -3
  61. data/previews/primer/alpha/select_preview.rb +1 -1
  62. data/previews/primer/alpha/text_area_preview.rb +1 -1
  63. data/previews/primer/alpha/text_field_preview.rb +3 -3
  64. data/previews/primer/forms_preview/custom_width_fields_form.html.erb +9 -0
  65. data/previews/primer/open_project/border_box/collapsible_header_preview/playground.html.erb +5 -4
  66. data/previews/primer/open_project/collapsible_section_preview/collapsed.html.erb +9 -0
  67. data/previews/primer/open_project/collapsible_section_preview/default.html.erb +10 -0
  68. data/previews/primer/open_project/collapsible_section_preview/playground.html.erb +22 -0
  69. data/previews/primer/open_project/collapsible_section_preview/with_additional_information.html.erb +16 -0
  70. data/previews/primer/open_project/collapsible_section_preview/with_caption.html.erb +14 -0
  71. data/previews/primer/open_project/collapsible_section_preview.rb +57 -0
  72. data/previews/primer/open_project/input_group_preview.rb +1 -1
  73. data/static/arguments.json +132 -2
  74. data/static/audited_at.json +1 -0
  75. data/static/classes.json +3 -0
  76. data/static/constants.json +19 -2
  77. data/static/info_arch.json +316 -3
  78. data/static/previews.json +86 -0
  79. data/static/statuses.json +1 -0
  80. metadata +22 -2
@@ -9,6 +9,7 @@ module Primer
9
9
  DEFAULT_INPUT_WIDTH = :auto
10
10
  INPUT_WIDTH_MAPPINGS = {
11
11
  DEFAULT_INPUT_WIDTH => "InputGroup-input-width--auto",
12
+ :xsmall => "InputGroup-input-width--xsmall",
12
13
  :small => "InputGroup-input-width--small",
13
14
  :medium => "InputGroup-input-width--medium",
14
15
  :large => "InputGroup-input-width--large",
@@ -30,4 +30,6 @@ import './open_project/page_header_element';
30
30
  import './open_project/zen_mode_button';
31
31
  import './open_project/sub_header_element';
32
32
  import './open_project/danger_dialog_form_helper';
33
+ import './open_project/collapsible';
33
34
  import './open_project/border_box/collapsible_header';
35
+ import './open_project/collapsible_section';
@@ -30,4 +30,6 @@ import './open_project/page_header_element';
30
30
  import './open_project/zen_mode_button';
31
31
  import './open_project/sub_header_element';
32
32
  import './open_project/danger_dialog_form_helper';
33
+ import './open_project/collapsible';
33
34
  import './open_project/border_box/collapsible_header';
35
+ import './open_project/collapsible_section';
@@ -50,3 +50,4 @@
50
50
  @import "./open_project/sub_header.pcss";
51
51
  @import "./open_project/side_panel/section.pcss";
52
52
  @import "./open_project/border_box/collapsible_header.pcss";
53
+ @import "./open_project/collapsible_section.pcss";
@@ -30,4 +30,6 @@ import './open_project/page_header_element'
30
30
  import './open_project/zen_mode_button'
31
31
  import './open_project/sub_header_element'
32
32
  import './open_project/danger_dialog_form_helper'
33
+ import './open_project/collapsible'
33
34
  import './open_project/border_box/collapsible_header'
35
+ import './open_project/collapsible_section'
@@ -33,6 +33,9 @@ module Primer
33
33
  # @!macro [new] form_full_width_arguments
34
34
  # @param full_width [Boolean] When set to `true`, the field will take up all the horizontal space allowed by its container. Defaults to `true`.
35
35
 
36
+ # @!macro [new] form_input_width_arguments
37
+ # @param input_width [Symbol] The width of the field. <%= one_of(Primer::Forms::Dsl::Input::INPUT_WIDTH_OPTIONS) %>
38
+
36
39
  # @!macro [new] form_system_arguments
37
40
  # @param system_arguments [Hash] A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details.
38
41
 
@@ -48,6 +51,7 @@ module Primer
48
51
  DEFAULT_INPUT_WIDTH = :auto
49
52
  INPUT_WIDTH_MAPPINGS = {
50
53
  DEFAULT_INPUT_WIDTH => "FormControl-input-width--auto",
54
+ :xsmall => "FormControl-input-width--xsmall",
51
55
  :small => "FormControl-input-width--small",
52
56
  :medium => "FormControl-input-width--medium",
53
57
  :large => "FormControl-input-width--large",
@@ -5,8 +5,8 @@ module Primer
5
5
  module ViewComponents
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 59
9
- PATCH = 2
8
+ MINOR = 61
9
+ PATCH = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
12
12
  end
@@ -11,7 +11,7 @@ module Primer
11
11
  # @param dismiss_scheme [Symbol] select [none, remove, hide]
12
12
  # @param dismiss_label text
13
13
  # @param icon [Symbol] octicon
14
- # @param scheme [Symbol] select [default, warning, danger, success]
14
+ # @param scheme [Symbol] select [default, warning, danger, success, upsell]
15
15
  # @param content text
16
16
  # @param description text
17
17
  def playground(full: false, full_when_narrow: false, dismiss_scheme: Primer::Alpha::Banner::DEFAULT_DISMISS_SCHEME, dismiss_label: Primer::Alpha::Banner::DEFAULT_DISMISS_LABEL, icon: :people, scheme: Primer::Alpha::Banner::DEFAULT_SCHEME, content: "This is a banner!", description: nil)
@@ -49,6 +49,12 @@ module Primer
49
49
  def scheme_warning
50
50
  render(Primer::Alpha::Banner.new(scheme: :warning)) { "This is a warning banner!" }
51
51
  end
52
+
53
+ # @label Upsell
54
+ # @snapshot
55
+ def scheme_upsell
56
+ render(Primer::Alpha::Banner.new(scheme: :upsell)) { "This is a upsell banner!" }
57
+ end
52
58
  #
53
59
  # @!endgroup
54
60
 
@@ -78,7 +84,7 @@ module Primer
78
84
  # @param full toggle
79
85
  # @param dismiss_scheme [Symbol] select [none, remove, hide]
80
86
  # @param icon [Symbol] octicon
81
- # @param scheme [Symbol] select [default, warning, danger, success]
87
+ # @param scheme [Symbol] select [default, warning, danger, success, upsell]
82
88
  # @param content text
83
89
  # @snapshot
84
90
  def with_action_button(full: false, dismiss_scheme: Primer::Alpha::Banner::DEFAULT_DISMISS_SCHEME, icon: :people, scheme: Primer::Alpha::Banner::DEFAULT_SCHEME, content: "This is a banner with an action!")
@@ -91,7 +97,7 @@ module Primer
91
97
  # @param full toggle
92
98
  # @param dismiss_scheme [Symbol] select [none, remove, hide]
93
99
  # @param icon [Symbol] octicon
94
- # @param scheme [Symbol] select [default, warning, danger, success]
100
+ # @param scheme [Symbol] select [default, warning, danger, success, upsell]
95
101
  # @param content text
96
102
  # @snapshot
97
103
  def with_action_content(full: false, dismiss_scheme: Primer::Alpha::Banner::DEFAULT_DISMISS_SCHEME, icon: :people, scheme: Primer::Alpha::Banner::DEFAULT_SCHEME, content: "Did you know? Comments can be edited.")
@@ -18,7 +18,7 @@ module Primer
18
18
  # @param disabled toggle
19
19
  # @param invalid toggle
20
20
  # @param validation_message text
21
- # @param input_width [Symbol] select [auto, small, medium, large, xlarge, xxlarge]
21
+ # @param input_width [Symbol] select [auto, xsmall, small, medium, large, xlarge, xxlarge]
22
22
  def playground(
23
23
  name: "my-select-list",
24
24
  id: "my-select-list",
@@ -16,7 +16,7 @@ module Primer
16
16
  # @param disabled toggle
17
17
  # @param invalid toggle
18
18
  # @param validation_message text
19
- # @param input_width [Symbol] select [auto, small, medium, large, xlarge, xxlarge]
19
+ # @param input_width [Symbol] select [auto, xsmall, small, medium, large, xlarge, xxlarge]
20
20
  def playground(
21
21
  name: "my-text-area",
22
22
  id: "my-text-area",
@@ -24,7 +24,7 @@ module Primer
24
24
  # @param monospace toggle
25
25
  # @param leading_visual_icon octicon
26
26
  # @param leading_spinner toggle
27
- # @param input_width [Symbol] select [auto, small, medium, large, xlarge, xxlarge]
27
+ # @param input_width [Symbol] select [auto, xsmall, small, medium, large, xlarge, xxlarge]
28
28
  def playground(
29
29
  name: "my-text-field",
30
30
  id: "my-text-field",
@@ -200,7 +200,7 @@ module Primer
200
200
  end
201
201
 
202
202
  # @label With trailing label
203
- # @snapshot
203
+ # @snapshot
204
204
  def with_trailing_label
205
205
  render(Primer::Alpha::TextField.new(trailing_visual: { label: { text: "Hello" } }, name: "my-text-field-15", label: "My text field"))
206
206
  end
@@ -219,7 +219,7 @@ module Primer
219
219
  #
220
220
  # @!endgroup
221
221
 
222
- # @!group Auto check
222
+ # @!group Auto check
223
223
  #
224
224
  # @label Auto check request ok
225
225
  def with_auto_check_ok
@@ -28,6 +28,15 @@
28
28
  caption: "What else do you need?",
29
29
  input_width: :small
30
30
  )
31
+
32
+ f.text_field(
33
+ name: :hours,
34
+ label: "hours",
35
+ type: :number,
36
+ required: true,
37
+ trailing_visual: { text: { text: "min" } },
38
+ input_width: :xsmall
39
+ )
31
40
  end
32
41
  end
33
42
  %>
@@ -1,10 +1,11 @@
1
1
  <%= render(Primer::Beta::BorderBox.new) do |component| %>
2
2
  <% component.with_header do %>
3
3
  <%= render(Primer::OpenProject::BorderBox::CollapsibleHeader.new(box: component,
4
- title: title,
5
- description: description,
6
- count: count,
7
- collapsed: collapsed)) %>
4
+ collapsed: collapsed)) do |header| %>
5
+ <% header.with_title { title } %>
6
+ <% header.with_count(count: count) %>
7
+ <% header.with_description { description } %>
8
+ <% end %>
8
9
  <% end %>
9
10
  <% component.with_body { "Body" } %>
10
11
  <% component.with_row { "Row 1" } %>
@@ -0,0 +1,9 @@
1
+ <%= render(Primer::OpenProject::CollapsibleSection.new(collapsed: true)) do |section| %>
2
+ <% section.with_title { "Final question" } %>
3
+ <% section.with_collapsible_content do %>
4
+ <%= render(Primer::Alpha::Banner.new(mb: 3)) { "Please take one minute time to answer this question" } %>
5
+ <%= primer_form_with(url: "/foo") do |f| %>
6
+ <%= render(RadioButtonGroupForm.new(f)) %>
7
+ <% end %>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <%= render(Primer::OpenProject::CollapsibleSection.new) do |section| %>
2
+ <% section.with_title { "Feedback" } %>
3
+ <% section.with_collapsible_content do %>
4
+ <%= render(Primer::Alpha::Banner.new(mb: 3)) { "Please take one minute time to answer this question" } %>
5
+ <%= primer_form_with(url: "/foo") do |f| %>
6
+ <%= render(RadioButtonGroupForm.new(f)) %>
7
+ <% end %>
8
+
9
+ <% end %>
10
+ <% end %>
@@ -0,0 +1,22 @@
1
+ <%= render(Primer::OpenProject::CollapsibleSection.new) do |section| %>
2
+ <% section.with_title { "Advanced settings" } %>
3
+
4
+ <% if caption.present? %>
5
+ <% section.with_caption { caption } %>
6
+ <% end %>
7
+
8
+ <% if show_additional_information %>
9
+ <% section.with_additional_information do %>
10
+ <%= render(Primer::Beta::Link.new(href: "/")) do |component|
11
+ component.with_trailing_visual_icon(icon: :"link-external")
12
+ "More information"
13
+ end %>
14
+ <% end %>
15
+ <% end %>
16
+
17
+ <% section.with_collapsible_content do %>
18
+ <%= primer_form_with(url: "/foo") do |f| %>
19
+ <%= render(ArrayCheckBoxGroupForm.new(f)) %>
20
+ <% end %>
21
+ <% end %>
22
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <%= render(Primer::OpenProject::CollapsibleSection.new) do |section| %>
2
+ <% section.with_title { "Wednesday 11" } %>
3
+
4
+ <% section.with_additional_information do %>
5
+ <%= render(Primer::Beta::Text.new) { "6h 30min" } %>
6
+ <% end %>
7
+
8
+ <% section.with_collapsible_content do %>
9
+ <%= render(Primer::Beta::BorderBox.new) do |component|
10
+ component.with_header { "Header" }
11
+ component.with_body { "Body" }
12
+ component.with_row { "Row one" }
13
+ component.with_row { "Row two" }
14
+ end %>
15
+ <% end %>
16
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= render(Primer::OpenProject::CollapsibleSection.new) do |section| %>
2
+ <% section.with_title { "Wednesday 11" } %>
3
+
4
+ <% section.with_caption { "Today" } %>
5
+
6
+ <% section.with_collapsible_content do %>
7
+ <%= render(Primer::Beta::BorderBox.new) do |component|
8
+ component.with_header { "Header" }
9
+ component.with_body { "Body" }
10
+ component.with_row { "Row one" }
11
+ component.with_row { "Row two" }
12
+ end %>
13
+ <% end %>
14
+ <% end %>
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Primer
7
+ module OpenProject
8
+ # @label CollapsibleSection
9
+ class CollapsibleSectionPreview < ViewComponent::Preview
10
+ # @label Playground
11
+ # @param caption [String] text
12
+ # @param show_additional_information [Boolean] toggle
13
+ def playground(caption: "(optional)", show_additional_information: false)
14
+ render_with_template(
15
+ template: "primer/open_project/collapsible_section_preview/playground",
16
+ locals: { caption: caption, show_additional_information: show_additional_information}
17
+ )
18
+ end
19
+
20
+ # @label Default
21
+ # @snapshot
22
+ def default
23
+ render_with_template(
24
+ template: "primer/open_project/collapsible_section_preview/default",
25
+ locals: { }
26
+ )
27
+ end
28
+
29
+ # @label With additional information
30
+ # @snapshot
31
+ def with_additional_information
32
+ render_with_template(
33
+ template: "primer/open_project/collapsible_section_preview/with_additional_information",
34
+ locals: { }
35
+ )
36
+ end
37
+
38
+ # @label With caption
39
+ # @snapshot
40
+ def with_caption
41
+ render_with_template(
42
+ template: "primer/open_project/collapsible_section_preview/with_caption",
43
+ locals: { }
44
+ )
45
+ end
46
+
47
+ # @label Collapsed
48
+ # @snapshot
49
+ def collapsed
50
+ render_with_template(
51
+ template: "primer/open_project/collapsible_section_preview/collapsed",
52
+ locals: { }
53
+ )
54
+ end
55
+ end
56
+ end
57
+ end
@@ -21,7 +21,7 @@ module Primer
21
21
  # @param value [String]
22
22
  # @param visually_hide_label toggle
23
23
  # @param readonly toggle
24
- # @param input_width [Symbol] select [auto, small, medium, large, xlarge, xxlarge]
24
+ # @param input_width [Symbol] select [auto, xsmall, small, medium, large, xlarge, xxlarge]
25
25
  # @param caption [String]
26
26
  def playground(
27
27
  trailing_action: :clipboardCopy,
@@ -674,7 +674,7 @@
674
674
  "name": "scheme",
675
675
  "type": "Symbol",
676
676
  "default": "`:default`",
677
- "description": "One of `:danger`, `:default`, `:success`, or `:warning`."
677
+ "description": "One of `:danger`, `:default`, `:success`, `:upsell`, or `:warning`."
678
678
  },
679
679
  {
680
680
  "name": "system_arguments",
@@ -2316,6 +2316,12 @@
2316
2316
  "default": "N/A",
2317
2317
  "description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
2318
2318
  },
2319
+ {
2320
+ "name": "input_width",
2321
+ "type": "Symbol",
2322
+ "default": "N/A",
2323
+ "description": "The width of the field. One of `:auto`, `:large`, `:medium`, `:small`, `:xlarge`, `:xsmall`, or `:xxlarge`."
2324
+ },
2319
2325
  {
2320
2326
  "name": "multiple",
2321
2327
  "type": "Boolean",
@@ -2344,11 +2350,95 @@
2344
2350
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/select_panel.rb",
2345
2351
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/select_panel/default/",
2346
2352
  "parameters": [
2353
+ {
2354
+ "name": "src",
2355
+ "type": "String",
2356
+ "default": "`nil`",
2357
+ "description": "The URL to fetch search results from."
2358
+ },
2359
+ {
2360
+ "name": "title",
2361
+ "type": "String",
2362
+ "default": "`\"Menu\"`",
2363
+ "description": "The title that appears at the top of the panel."
2364
+ },
2365
+ {
2366
+ "name": "id",
2367
+ "type": "String",
2368
+ "default": "`self.class.generate_id`",
2369
+ "description": "The unique ID of the panel."
2370
+ },
2371
+ {
2372
+ "name": "size",
2373
+ "type": "Symbol",
2374
+ "default": "`:small`",
2375
+ "description": "The size of the panel. One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
2376
+ },
2377
+ {
2378
+ "name": "select_variant",
2379
+ "type": "Symbol",
2380
+ "default": "`:single`",
2381
+ "description": "One of `:multiple`, `:none`, or `:single`."
2382
+ },
2383
+ {
2384
+ "name": "fetch_strategy",
2385
+ "type": "Symbol",
2386
+ "default": "`:remote`",
2387
+ "description": "One of `:eventually_local`, `:local`, or `:remote`."
2388
+ },
2389
+ {
2390
+ "name": "no_results_label",
2391
+ "type": "String",
2392
+ "default": "`\"No results found\"`",
2393
+ "description": "The label to display when no results are found."
2394
+ },
2395
+ {
2396
+ "name": "preload",
2397
+ "type": "Boolean",
2398
+ "default": "`false`",
2399
+ "description": "Whether to preload search results when the page loads. If this option is false, results are loaded when the panel is opened."
2400
+ },
2401
+ {
2402
+ "name": "dynamic_label",
2403
+ "type": "Boolean",
2404
+ "default": "`false`",
2405
+ "description": "Whether or not to display the text of the currently selected item in the show button."
2406
+ },
2407
+ {
2408
+ "name": "dynamic_label_prefix",
2409
+ "type": "String",
2410
+ "default": "`nil`",
2411
+ "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
2412
+ },
2413
+ {
2414
+ "name": "dynamic_aria_label_prefix",
2415
+ "type": "String",
2416
+ "default": "`nil`",
2417
+ "description": "If provided, the prefix is prepended to the dynamic label and set as the value of the `aria-label` attribute on the show button."
2418
+ },
2419
+ {
2420
+ "name": "body_id",
2421
+ "type": "String",
2422
+ "default": "`nil`",
2423
+ "description": "The unique ID of the panel body. If not provided, the body ID will be set to the panel ID with a \"-body\" suffix."
2424
+ },
2425
+ {
2426
+ "name": "list_arguments",
2427
+ "type": "Hash",
2428
+ "default": "`{}`",
2429
+ "description": "Arguments to pass to the underlying [ActionList](/components/alpha/actionlist) component. Only has an effect for the local fetch strategy."
2430
+ },
2431
+ {
2432
+ "name": "form_arguments",
2433
+ "type": "Hash",
2434
+ "default": "`{}`",
2435
+ "description": "Form arguments. Supported for `local`, and experimentally supported for `remote` and `eventually_local` strategies by enabling the `use_experimental_non_local_form` flag."
2436
+ },
2347
2437
  {
2348
2438
  "name": "use_experimental_non_local_form",
2349
2439
  "type": "Boolean",
2350
2440
  "default": "`false`",
2351
- "description": "A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values."
2441
+ "description": "A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values. At this time, support is only available for the :single select variant. See: https://github.com/github/primer/issues/4923."
2352
2442
  },
2353
2443
  {
2354
2444
  "name": "show_filter",
@@ -2771,6 +2861,12 @@
2771
2861
  "type": "Hash",
2772
2862
  "default": "N/A",
2773
2863
  "description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
2864
+ },
2865
+ {
2866
+ "name": "input_width",
2867
+ "type": "Symbol",
2868
+ "default": "N/A",
2869
+ "description": "The width of the field. One of `:auto`, `:large`, `:medium`, `:small`, `:xlarge`, `:xsmall`, or `:xxlarge`."
2774
2870
  }
2775
2871
  ]
2776
2872
  },
@@ -2902,6 +2998,12 @@
2902
2998
  "default": "N/A",
2903
2999
  "description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
2904
3000
  },
3001
+ {
3002
+ "name": "input_width",
3003
+ "type": "Symbol",
3004
+ "default": "N/A",
3005
+ "description": "The width of the field. One of `:auto`, `:large`, `:medium`, `:small`, `:xlarge`, `:xsmall`, or `:xxlarge`."
3006
+ },
2905
3007
  {
2906
3008
  "name": "placeholder",
2907
3009
  "type": "String",
@@ -5026,6 +5128,12 @@
5026
5128
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/border_box/collapsible_header.rb",
5027
5129
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/border_box/collapsible_header/default/",
5028
5130
  "parameters": [
5131
+ {
5132
+ "name": "collapsed",
5133
+ "type": "Boolean",
5134
+ "default": "`false`",
5135
+ "description": "Whether the header is collapsed on initial render."
5136
+ },
5029
5137
  {
5030
5138
  "name": "system_arguments",
5031
5139
  "type": "Hash",
@@ -5072,6 +5180,28 @@
5072
5180
  }
5073
5181
  ]
5074
5182
  },
5183
+ {
5184
+ "component": "OpenProject::CollapsibleSection",
5185
+ "status": "open_project",
5186
+ "a11y_reviewed": false,
5187
+ "short_name": "OpenProjectCollapsibleSection",
5188
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/collapsible_section.rb",
5189
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/collapsible_section/default/",
5190
+ "parameters": [
5191
+ {
5192
+ "name": "collapsed",
5193
+ "type": "Boolean",
5194
+ "default": "`false`",
5195
+ "description": "Whether the section is collapsed on initial render."
5196
+ },
5197
+ {
5198
+ "name": "system_arguments",
5199
+ "type": "Hash",
5200
+ "default": "N/A",
5201
+ "description": "[System arguments](/system-arguments)"
5202
+ }
5203
+ ]
5204
+ },
5075
5205
  {
5076
5206
  "component": "OpenProject::DangerDialog",
5077
5207
  "status": "open_project",
@@ -120,6 +120,7 @@
120
120
  "Primer::OpenProject::BorderBox::CollapsibleHeader": "",
121
121
  "Primer::OpenProject::BorderGrid": "",
122
122
  "Primer::OpenProject::BorderGrid::Cell": "",
123
+ "Primer::OpenProject::CollapsibleSection": "",
123
124
  "Primer::OpenProject::DangerDialog": "",
124
125
  "Primer::OpenProject::DangerDialog::ConfirmationCheckBox": "",
125
126
  "Primer::OpenProject::DangerDialog::FormWrapper": "",
data/static/classes.json CHANGED
@@ -243,6 +243,9 @@
243
243
  "CollapsibleHeader": [
244
244
  "Primer::OpenProject::BorderBox::CollapsibleHeader"
245
245
  ],
246
+ "CollapsibleSection--triggerArea": [
247
+ "Primer::OpenProject::CollapsibleSection"
248
+ ],
246
249
  "Counter": [
247
250
  "Primer::Beta::Counter"
248
251
  ],
@@ -197,7 +197,8 @@
197
197
  "default": "bell",
198
198
  "warning": "alert",
199
199
  "danger": "stop",
200
- "success": "check-circle"
200
+ "success": "check-circle",
201
+ "upsell": "info"
201
202
  },
202
203
  "DEFAULT_SCHEME": "default",
203
204
  "DEFAULT_TAG": "div",
@@ -217,7 +218,8 @@
217
218
  "default": "",
218
219
  "warning": "Banner--warning",
219
220
  "danger": "Banner--error",
220
- "success": "Banner--success"
221
+ "success": "Banner--success",
222
+ "upsell": "Banner--upsell"
221
223
  },
222
224
  "TAG_OPTIONS": [
223
225
  "div",
@@ -1572,6 +1574,19 @@
1572
1574
  "Primer::OpenProject::BorderGrid::Cell": {
1573
1575
  "GeneratedSlotMethods": "Primer::OpenProject::BorderGrid::Cell::GeneratedSlotMethods"
1574
1576
  },
1577
+ "Primer::OpenProject::CollapsibleSection": {
1578
+ "GeneratedSlotMethods": "Primer::OpenProject::CollapsibleSection::GeneratedSlotMethods",
1579
+ "TITLE_TAG_FALLBACK": "h2",
1580
+ "TITLE_TAG_OPTIONS": [
1581
+ "h1",
1582
+ "h2",
1583
+ "h3",
1584
+ "h4",
1585
+ "h5",
1586
+ "h6",
1587
+ "span"
1588
+ ]
1589
+ },
1575
1590
  "Primer::OpenProject::DangerDialog": {
1576
1591
  "ConfirmationCheckBox": "Primer::OpenProject::DangerDialog::ConfirmationCheckBox",
1577
1592
  "FormWrapper": "Primer::OpenProject::DangerDialog::FormWrapper",
@@ -1621,6 +1636,7 @@
1621
1636
  "GeneratedSlotMethods": "Primer::OpenProject::InputGroup::GeneratedSlotMethods",
1622
1637
  "INPUT_WIDTH_MAPPINGS": {
1623
1638
  "auto": "InputGroup-input-width--auto",
1639
+ "xsmall": "InputGroup-input-width--xsmall",
1624
1640
  "small": "InputGroup-input-width--small",
1625
1641
  "medium": "InputGroup-input-width--medium",
1626
1642
  "large": "InputGroup-input-width--large",
@@ -1629,6 +1645,7 @@
1629
1645
  },
1630
1646
  "INPUT_WIDTH_OPTIONS": [
1631
1647
  "auto",
1648
+ "xsmall",
1632
1649
  "small",
1633
1650
  "medium",
1634
1651
  "large",