openproject-primer_view_components 0.82.1 → 0.83.1

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -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/action_bar_element.js +68 -77
  8. data/app/components/primer/alpha/action_bar_element.ts +48 -70
  9. data/app/components/primer/alpha/action_list.js +1 -1
  10. data/app/components/primer/alpha/action_list.ts +1 -1
  11. data/app/components/primer/alpha/action_menu/action_menu_element.js +1 -1
  12. data/app/components/primer/alpha/action_menu/action_menu_element.ts +1 -1
  13. data/app/components/primer/alpha/action_menu/menu.rb +5 -1
  14. data/app/components/primer/alpha/action_menu/primary_menu.rb +4 -0
  15. data/app/components/primer/alpha/action_menu/sub_menu.rb +4 -0
  16. data/app/components/primer/alpha/banner.css +1 -1
  17. data/app/components/primer/alpha/banner.css.json +0 -1
  18. data/app/components/primer/alpha/banner.css.map +1 -1
  19. data/app/components/primer/alpha/banner.pcss +1 -5
  20. data/app/components/primer/alpha/dialog.css +1 -1
  21. data/app/components/primer/alpha/dialog.css.json +2 -1
  22. data/app/components/primer/alpha/dialog.css.map +1 -1
  23. data/app/components/primer/alpha/dialog.pcss +12 -0
  24. data/app/components/primer/alpha/layout.rb +6 -2
  25. data/app/components/primer/alpha/overlay.rb +14 -1
  26. data/app/components/primer/alpha/segmented_control.js +1 -1
  27. data/app/components/primer/alpha/segmented_control.ts +1 -1
  28. data/app/components/primer/alpha/select_panel_element.js +3 -1
  29. data/app/components/primer/alpha/select_panel_element.ts +4 -1
  30. data/app/components/primer/alpha/toggle_switch.js +1 -1
  31. data/app/components/primer/alpha/toggle_switch.rb +3 -0
  32. data/app/components/primer/alpha/toggle_switch.ts +1 -1
  33. data/app/components/primer/alpha/tool_tip.js +1 -1
  34. data/app/components/primer/alpha/tool_tip.ts +1 -1
  35. data/app/components/primer/alpha/tree_view/tree_view.js +1 -1
  36. data/app/components/primer/alpha/tree_view/tree_view.ts +1 -1
  37. data/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +1 -1
  38. data/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.ts +1 -1
  39. data/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +1 -1
  40. data/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.ts +1 -1
  41. data/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +25 -2
  42. data/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.ts +27 -1
  43. data/app/components/primer/alpha/x_banner.js +1 -1
  44. data/app/components/primer/alpha/x_banner.ts +1 -1
  45. data/app/components/primer/beta/auto_complete/no_result_item.rb +23 -13
  46. data/app/components/primer/beta/blankslate.css +1 -1
  47. data/app/components/primer/beta/blankslate.css.json +1 -0
  48. data/app/components/primer/beta/blankslate.css.map +1 -1
  49. data/app/components/primer/beta/blankslate.pcss +5 -0
  50. data/app/components/primer/beta/blankslate.rb +1 -0
  51. data/app/components/primer/beta/details_toggle_element.js +1 -1
  52. data/app/components/primer/beta/details_toggle_element.ts +1 -1
  53. data/app/components/primer/beta/nav_list.js +1 -1
  54. data/app/components/primer/beta/nav_list.ts +1 -1
  55. data/app/components/primer/beta/nav_list_group_element.js +1 -1
  56. data/app/components/primer/beta/nav_list_group_element.ts +1 -1
  57. data/app/components/primer/dialog_helper.js +24 -9
  58. data/app/components/primer/dialog_helper.ts +24 -12
  59. data/app/components/primer/scrollable_region.js +1 -1
  60. data/app/components/primer/scrollable_region.ts +1 -1
  61. data/app/lib/primer/forms/primer_multi_input.js +1 -1
  62. data/app/lib/primer/forms/primer_multi_input.ts +1 -1
  63. data/app/lib/primer/forms/primer_text_area.js +1 -1
  64. data/app/lib/primer/forms/primer_text_area.ts +1 -1
  65. data/app/lib/primer/forms/primer_text_field.js +1 -1
  66. data/app/lib/primer/forms/primer_text_field.ts +1 -1
  67. data/app/lib/primer/forms/toggle_switch_input.js +1 -1
  68. data/app/lib/primer/forms/toggle_switch_input.ts +1 -1
  69. data/lib/primer/view_components/version.rb +1 -1
  70. data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +2 -2
  71. data/previews/primer/alpha/action_menu_preview.rb +35 -1
  72. data/previews/primer/beta/button_preview/summary_as_button.html.erb +0 -1
  73. data/previews/primer/beta/truncate_preview/advanced_multiple_items.html.erb +32 -0
  74. data/previews/primer/beta/truncate_preview/max_widths.html.erb +22 -0
  75. data/previews/primer/beta/truncate_preview/multiple_items.html.erb +14 -0
  76. data/previews/primer/beta/truncate_preview.rb +3 -26
  77. data/static/arguments.json +38 -1
  78. data/static/classes.json +3 -0
  79. data/static/constants.json +17 -0
  80. data/static/info_arch.json +77 -58
  81. data/static/previews.json +13 -0
  82. metadata +5 -2
@@ -1633,6 +1633,19 @@
1633
1633
  ]
1634
1634
  }
1635
1635
  },
1636
+ {
1637
+ "preview_path": "primer/alpha/action_menu/fullscreen_when_narrow",
1638
+ "name": "fullscreen_when_narrow",
1639
+ "snapshot": "false",
1640
+ "skip_rules": {
1641
+ "wont_fix": [
1642
+ "region"
1643
+ ],
1644
+ "will_fix": [
1645
+ "color-contrast"
1646
+ ]
1647
+ }
1648
+ },
1636
1649
  {
1637
1650
  "preview_path": "primer/alpha/action_menu/sub_menus",
1638
1651
  "name": "sub_menus",
@@ -1674,6 +1687,12 @@
1674
1687
  "default": "N/A",
1675
1688
  "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
1676
1689
  },
1690
+ {
1691
+ "name": "anchor_when_narrow",
1692
+ "type": "Symbol",
1693
+ "default": "N/A",
1694
+ "description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`."
1695
+ },
1677
1696
  {
1678
1697
  "name": "menu_id",
1679
1698
  "type": "String",
@@ -1749,6 +1768,12 @@
1749
1768
  "parameters": [],
1750
1769
  "return_types": []
1751
1770
  },
1771
+ {
1772
+ "name": "anchor_when_narrow",
1773
+ "description": "Returns the value of attribute anchor_when_narrow.",
1774
+ "parameters": [],
1775
+ "return_types": []
1776
+ },
1752
1777
  {
1753
1778
  "name": "list",
1754
1779
  "description": "Returns the value of attribute list.",
@@ -1927,6 +1952,12 @@
1927
1952
  "default": "`:outside_right`",
1928
1953
  "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
1929
1954
  },
1955
+ {
1956
+ "name": "anchor_when_narrow",
1957
+ "type": "Symbol",
1958
+ "default": "`:inherit`",
1959
+ "description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`.."
1960
+ },
1930
1961
  {
1931
1962
  "name": "overlay_arguments",
1932
1963
  "type": "Hash",
@@ -2045,6 +2076,12 @@
2045
2076
  "default": "`:outside_bottom`",
2046
2077
  "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
2047
2078
  },
2079
+ {
2080
+ "name": "anchor_when_narrow",
2081
+ "type": "Symbol",
2082
+ "default": "`:inherit`",
2083
+ "description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`.."
2084
+ },
2048
2085
  {
2049
2086
  "name": "dynamic_label",
2050
2087
  "type": "Boolean",
@@ -5119,7 +5156,7 @@
5119
5156
  {
5120
5157
  "fully_qualified_name": "Primer::Alpha::Layout",
5121
5158
  "description": "`Layout` provides foundational patterns for responsive pages.\n`Layout` can be used for simple two-column pages, or it can be nested to provide flexible 3-column experiences.\n On smaller screens, `Layout` uses vertically stacked rows to display content.\n\n`Layout` flows as both column, when there's enough horizontal space to render both `Main` and `Sidebar`side-by-side (on a desktop of tablet device, per instance);\nor it flows as a row, when `Main` and `Sidebar` are stacked vertically (e.g. on a mobile device).\n`Layout` should always work in any screen size.",
5122
- "accessibility_docs": "Keyboard navigation follows the markup order. Decide carefully how the focus order should be be by deciding whether\n`main` or `sidebar` comes first in code. The code order wont affect the visual position.",
5159
+ "accessibility_docs": "Keyboard navigation follows the markup order. Decide carefully how the focus order should be be by deciding whether\n`main` or `sidebar` comes first in code. The code order won't affect the visual position.\n\nWhen using `row_placement: :none` on the sidebar, the sidebar content will be hidden at narrow viewports.\nThis may cause WCAG 1.4.10 Reflow failures if the sidebar contains essential content. Only use `:none`\nwhen the sidebar content is non-essential or available elsewhere on the page.",
5123
5160
  "is_form_component": false,
5124
5161
  "is_published": true,
5125
5162
  "requires_js": false,
@@ -5194,7 +5231,7 @@
5194
5231
  "name": "row_placement",
5195
5232
  "type": "Symbol",
5196
5233
  "default": "N/A",
5197
- "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`."
5234
+ "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`. **Note:** Using `:none` hides the sidebar at narrow viewports, which may cause WCAG 1.4.10 Reflow issues if the sidebar contains essential content."
5198
5235
  },
5199
5236
  {
5200
5237
  "name": "system_arguments",
@@ -6405,6 +6442,12 @@
6405
6442
  "default": "`:normal`",
6406
6443
  "description": "The anchor offset to give the Overlay. One of `:normal` or `:spacious`."
6407
6444
  },
6445
+ {
6446
+ "name": "anchor_when_narrow",
6447
+ "type": "Symbol",
6448
+ "default": "`:inherit`",
6449
+ "description": "The position of the Overlay when in a narrow viewport. One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`."
6450
+ },
6408
6451
  {
6409
6452
  "name": "allow_out_of_bounds",
6410
6453
  "type": "Boolean",
@@ -10060,6 +10103,12 @@
10060
10103
  "type": "String",
10061
10104
  "default": "`nil`",
10062
10105
  "description": "Custom label to show when the switch is OFF. Defaults to (\"Off\"). Only customize this label if it makes the toggle’s state more meaningful in its specific context. For example, for a \"Show images\" setting, you might use \"Show\" when the switch is OFF."
10106
+ },
10107
+ {
10108
+ "name": "button_type",
10109
+ "type": "Symbol",
10110
+ "default": "`nil`",
10111
+ "description": "The type attribute for the underlying button element. If `nil`, the button will not have a type attribute, which means it will default to \"submit\" if it's inside a form and \"button\" otherwise."
10063
10112
  }
10064
10113
  ],
10065
10114
  "slots": [],
@@ -12382,6 +12431,32 @@
12382
12431
  }
12383
12432
  ],
12384
12433
  "subcomponents": [
12434
+ {
12435
+ "fully_qualified_name": "Primer::Beta::AutoComplete::NoResultItem",
12436
+ "description": "Use `NoResultItem` to display a message when no autocomplete results are found.\nRenders as a simple div inside the overlay, not as a list item.",
12437
+ "accessibility_docs": null,
12438
+ "is_form_component": false,
12439
+ "is_published": true,
12440
+ "requires_js": false,
12441
+ "component": "AutoComplete::NoResultItem",
12442
+ "status": "beta",
12443
+ "a11y_reviewed": false,
12444
+ "short_name": "AutoCompleteNoResultItem",
12445
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/no_result_item.rb",
12446
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/auto_complete/no_result_item/default/",
12447
+ "parameters": [
12448
+ {
12449
+ "name": "system_arguments",
12450
+ "type": "Hash",
12451
+ "default": "N/A",
12452
+ "description": "{{link_to_system_arguments_docs}}"
12453
+ }
12454
+ ],
12455
+ "slots": [],
12456
+ "methods": [],
12457
+ "previews": [],
12458
+ "subcomponents": []
12459
+ },
12385
12460
  {
12386
12461
  "fully_qualified_name": "Primer::Beta::AutoComplete::Item",
12387
12462
  "description": "Use `AutoCompleteItem` to list results of an auto-completed search.",
@@ -12474,62 +12549,6 @@
12474
12549
  "methods": [],
12475
12550
  "previews": [],
12476
12551
  "subcomponents": []
12477
- },
12478
- {
12479
- "fully_qualified_name": "Primer::Beta::AutoComplete::NoResultItem",
12480
- "description": "",
12481
- "accessibility_docs": null,
12482
- "is_form_component": false,
12483
- "is_published": true,
12484
- "requires_js": false,
12485
- "component": "AutoComplete::NoResultItem",
12486
- "status": "beta",
12487
- "a11y_reviewed": false,
12488
- "short_name": "AutoCompleteNoResultItem",
12489
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/no_result_item.rb",
12490
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/auto_complete/no_result_item/default/",
12491
- "parameters": [],
12492
- "slots": [
12493
- {
12494
- "name": "leading_visual",
12495
- "description": "The leading visual rendered before the link.",
12496
- "parameters": [
12497
- {
12498
- "name": "kwargs",
12499
- "type": "Hash",
12500
- "default": "N/A",
12501
- "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}} or {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}"
12502
- }
12503
- ]
12504
- },
12505
- {
12506
- "name": "trailing_visual",
12507
- "description": "The trailing visual rendered after the link.",
12508
- "parameters": [
12509
- {
12510
- "name": "kwargs",
12511
- "type": "Hash",
12512
- "default": "N/A",
12513
- "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}, {{#link_to_component}}Primer::Beta::Label{{/link_to_component}}, or {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}"
12514
- }
12515
- ]
12516
- },
12517
- {
12518
- "name": "description",
12519
- "description": "Optional description",
12520
- "parameters": [
12521
- {
12522
- "name": "system_arguments",
12523
- "type": "Hash",
12524
- "default": "N/A",
12525
- "description": "{{link_to_system_arguments_docs}}"
12526
- }
12527
- ]
12528
- }
12529
- ],
12530
- "methods": [],
12531
- "previews": [],
12532
- "subcomponents": []
12533
12552
  }
12534
12553
  ]
12535
12554
  },
data/static/previews.json CHANGED
@@ -827,6 +827,19 @@
827
827
  ]
828
828
  }
829
829
  },
830
+ {
831
+ "preview_path": "primer/alpha/action_menu/fullscreen_when_narrow",
832
+ "name": "fullscreen_when_narrow",
833
+ "snapshot": "false",
834
+ "skip_rules": {
835
+ "wont_fix": [
836
+ "region"
837
+ ],
838
+ "will_fix": [
839
+ "color-contrast"
840
+ ]
841
+ }
842
+ },
830
843
  {
831
844
  "preview_path": "primer/alpha/action_menu/sub_menus",
832
845
  "name": "sub_menus",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openproject-primer_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.82.1
4
+ version: 0.83.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-03-11 00:00:00.000000000 Z
12
+ date: 2026-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -1203,6 +1203,9 @@ files:
1203
1203
  - previews/primer/beta/text_preview.rb
1204
1204
  - previews/primer/beta/timeline_item_preview.rb
1205
1205
  - previews/primer/beta/truncate_preview.rb
1206
+ - previews/primer/beta/truncate_preview/advanced_multiple_items.html.erb
1207
+ - previews/primer/beta/truncate_preview/max_widths.html.erb
1208
+ - previews/primer/beta/truncate_preview/multiple_items.html.erb
1206
1209
  - previews/primer/box_preview.rb
1207
1210
  - previews/primer/forms_preview.rb
1208
1211
  - previews/primer/forms_preview/action_menu_form.html.erb