openproject-primer_view_components 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -0
  4. data/app/assets/javascripts/app/components/primer/open_project/page_header_element.d.ts +9 -0
  5. data/app/assets/javascripts/app/components/primer/primer.d.ts +1 -0
  6. data/app/assets/javascripts/primer_view_components.js +1 -1
  7. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  8. data/app/assets/styles/primer_view_components.css +1 -1
  9. data/app/assets/styles/primer_view_components.css.map +1 -1
  10. data/app/components/primer/alpha/banner.css +1 -1
  11. data/app/components/primer/alpha/banner.css.map +1 -1
  12. data/app/components/primer/alpha/banner.pcss +4 -4
  13. data/app/components/primer/alpha/dialog.css +1 -1
  14. data/app/components/primer/alpha/dialog.css.json +1 -2
  15. data/app/components/primer/alpha/dialog.css.map +1 -1
  16. data/app/components/primer/alpha/dialog.pcss +8 -7
  17. data/app/components/primer/alpha/segmented_control.css +1 -1
  18. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  19. data/app/components/primer/alpha/segmented_control.pcss +1 -0
  20. data/app/components/primer/alpha/tool_tip.js +46 -77
  21. data/app/components/primer/alpha/tool_tip.ts +46 -77
  22. data/app/components/primer/beta/flash.css +1 -1
  23. data/app/components/primer/beta/flash.css.map +1 -1
  24. data/app/components/primer/beta/flash.pcss +4 -4
  25. data/app/components/primer/open_project/page_header.css +1 -1
  26. data/app/components/primer/open_project/page_header.css.json +1 -0
  27. data/app/components/primer/open_project/page_header.css.map +1 -1
  28. data/app/components/primer/open_project/page_header.html.erb +6 -7
  29. data/app/components/primer/open_project/page_header.pcss +10 -0
  30. data/app/components/primer/open_project/page_header.rb +152 -34
  31. data/app/components/primer/open_project/page_header_element.d.ts +9 -0
  32. data/app/components/primer/open_project/page_header_element.js +23 -0
  33. data/app/components/primer/open_project/page_header_element.ts +25 -0
  34. data/app/components/primer/primer.d.ts +1 -0
  35. data/app/components/primer/primer.js +1 -0
  36. data/app/components/primer/primer.ts +1 -0
  37. data/lib/primer/view_components/version.rb +1 -1
  38. data/previews/primer/alpha/action_menu_preview.rb +1 -1
  39. data/previews/primer/alpha/tooltip_preview/tooltip_e.html.erb +6 -0
  40. data/previews/primer/alpha/tooltip_preview/tooltip_n.html.erb +6 -0
  41. data/previews/primer/alpha/tooltip_preview/tooltip_ne.html.erb +6 -0
  42. data/previews/primer/alpha/tooltip_preview/tooltip_nw.html.erb +6 -0
  43. data/previews/primer/alpha/tooltip_preview/tooltip_s.html.erb +6 -0
  44. data/previews/primer/alpha/tooltip_preview/tooltip_se.html.erb +6 -0
  45. data/previews/primer/alpha/tooltip_preview/tooltip_sw.html.erb +6 -0
  46. data/previews/primer/alpha/tooltip_preview/tooltip_w.html.erb +6 -0
  47. data/previews/primer/alpha/tooltip_preview.rb +80 -0
  48. data/previews/primer/open_project/border_grid_preview.rb +2 -2
  49. data/previews/primer/open_project/input_group_preview.rb +5 -5
  50. data/previews/primer/open_project/page_header_preview/actions.html.erb +16 -15
  51. data/previews/primer/open_project/page_header_preview/playground.html.erb +9 -24
  52. data/previews/primer/open_project/page_header_preview.rb +14 -36
  53. data/static/arguments.json +34 -1
  54. data/static/audited_at.json +1 -0
  55. data/static/classes.json +3 -0
  56. data/static/constants.json +9 -5
  57. data/static/info_arch.json +153 -48
  58. data/static/previews.json +104 -26
  59. data/static/statuses.json +1 -0
  60. metadata +14 -3
  61. data/previews/primer/open_project/page_header_preview/context_bar_actions.html.erb +0 -27
@@ -8778,6 +8778,110 @@
8778
8778
  "color-contrast"
8779
8779
  ]
8780
8780
  }
8781
+ },
8782
+ {
8783
+ "preview_path": "primer/alpha/tooltip/tooltip_n",
8784
+ "name": "tooltip_n",
8785
+ "snapshot": "interactive",
8786
+ "skip_rules": {
8787
+ "wont_fix": [
8788
+ "region"
8789
+ ],
8790
+ "will_fix": [
8791
+ "color-contrast"
8792
+ ]
8793
+ }
8794
+ },
8795
+ {
8796
+ "preview_path": "primer/alpha/tooltip/tooltip_s",
8797
+ "name": "tooltip_s",
8798
+ "snapshot": "interactive",
8799
+ "skip_rules": {
8800
+ "wont_fix": [
8801
+ "region"
8802
+ ],
8803
+ "will_fix": [
8804
+ "color-contrast"
8805
+ ]
8806
+ }
8807
+ },
8808
+ {
8809
+ "preview_path": "primer/alpha/tooltip/tooltip_e",
8810
+ "name": "tooltip_e",
8811
+ "snapshot": "interactive",
8812
+ "skip_rules": {
8813
+ "wont_fix": [
8814
+ "region"
8815
+ ],
8816
+ "will_fix": [
8817
+ "color-contrast"
8818
+ ]
8819
+ }
8820
+ },
8821
+ {
8822
+ "preview_path": "primer/alpha/tooltip/tooltip_w",
8823
+ "name": "tooltip_w",
8824
+ "snapshot": "interactive",
8825
+ "skip_rules": {
8826
+ "wont_fix": [
8827
+ "region"
8828
+ ],
8829
+ "will_fix": [
8830
+ "color-contrast"
8831
+ ]
8832
+ }
8833
+ },
8834
+ {
8835
+ "preview_path": "primer/alpha/tooltip/tooltip_se",
8836
+ "name": "tooltip_se",
8837
+ "snapshot": "interactive",
8838
+ "skip_rules": {
8839
+ "wont_fix": [
8840
+ "region"
8841
+ ],
8842
+ "will_fix": [
8843
+ "color-contrast"
8844
+ ]
8845
+ }
8846
+ },
8847
+ {
8848
+ "preview_path": "primer/alpha/tooltip/tooltip_sw",
8849
+ "name": "tooltip_sw",
8850
+ "snapshot": "interactive",
8851
+ "skip_rules": {
8852
+ "wont_fix": [
8853
+ "region"
8854
+ ],
8855
+ "will_fix": [
8856
+ "color-contrast"
8857
+ ]
8858
+ }
8859
+ },
8860
+ {
8861
+ "preview_path": "primer/alpha/tooltip/tooltip_ne",
8862
+ "name": "tooltip_ne",
8863
+ "snapshot": "interactive",
8864
+ "skip_rules": {
8865
+ "wont_fix": [
8866
+ "region"
8867
+ ],
8868
+ "will_fix": [
8869
+ "color-contrast"
8870
+ ]
8871
+ }
8872
+ },
8873
+ {
8874
+ "preview_path": "primer/alpha/tooltip/tooltip_nw",
8875
+ "name": "tooltip_nw",
8876
+ "snapshot": "interactive",
8877
+ "skip_rules": {
8878
+ "wont_fix": [
8879
+ "region"
8880
+ ],
8881
+ "will_fix": [
8882
+ "color-contrast"
8883
+ ]
8884
+ }
8781
8885
  }
8782
8886
  ],
8783
8887
  "subcomponents": [
@@ -16268,7 +16372,18 @@
16268
16372
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header.rb",
16269
16373
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/default/",
16270
16374
  "parameters": [
16271
-
16375
+ {
16376
+ "name": "mobile_menu_label",
16377
+ "type": "String",
16378
+ "default": "`I18n.t(\"label_more\")`",
16379
+ "description": "The tooltip label of the mobile menu"
16380
+ },
16381
+ {
16382
+ "name": "system_arguments",
16383
+ "type": "Hash",
16384
+ "default": "N/A",
16385
+ "description": "{{link_to_system_arguments_docs}}"
16386
+ }
16272
16387
  ],
16273
16388
  "slots": [
16274
16389
  {
@@ -16308,18 +16423,6 @@
16308
16423
  }
16309
16424
  ]
16310
16425
  },
16311
- {
16312
- "name": "context_bar_actions",
16313
- "description": "Context Bar Actions\nBy default shown on narrow screens. Can be overridden with system_argument: display",
16314
- "parameters": [
16315
- {
16316
- "name": "system_arguments",
16317
- "type": "Hash",
16318
- "default": "N/A",
16319
- "description": "{{link_to_system_arguments_docs}}"
16320
- }
16321
- ]
16322
- },
16323
16426
  {
16324
16427
  "name": "leading_action",
16325
16428
  "description": "Optional leading action prepend the title\nBy default shown on wider screens. Can be overridden with system_argument: display",
@@ -16338,18 +16441,6 @@
16338
16441
  }
16339
16442
  ]
16340
16443
  },
16341
- {
16342
- "name": "parent_link",
16343
- "description": "Optional parent link in the context area\nBy default shown on narrow screens. Can be overridden with system_argument: display",
16344
- "parameters": [
16345
- {
16346
- "name": "system_arguments",
16347
- "type": "Hash",
16348
- "default": "N/A",
16349
- "description": "{{link_to_system_arguments_docs}}"
16350
- }
16351
- ]
16352
- },
16353
16444
  {
16354
16445
  "name": "breadcrumbs",
16355
16446
  "description": "Optional breadcrumbs above the title row\nBy default shown on wider screens. Can be overridden with system_argument: display",
@@ -16463,33 +16554,47 @@
16463
16554
  "color-contrast"
16464
16555
  ]
16465
16556
  }
16466
- },
16557
+ }
16558
+ ],
16559
+ "subcomponents": [
16560
+
16561
+ ]
16562
+ },
16563
+ {
16564
+ "fully_qualified_name": "Primer::OpenProject::PageHeader::PageHeaderActionMenu",
16565
+ "description": "A Helper class to create ActionMenus inside the PageHeader action slot",
16566
+ "accessibility_docs": null,
16567
+ "is_form_component": false,
16568
+ "is_published": true,
16569
+ "requires_js": false,
16570
+ "component": "OpenProject::PageHeader::PageHeaderActionMenu",
16571
+ "status": "open_project",
16572
+ "a11y_reviewed": false,
16573
+ "short_name": "OpenProjectPageHeaderPageHeaderActionMenu",
16574
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/page_header/page_header_action_menu.rb",
16575
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/page_header/page_header_action_menu/default/",
16576
+ "parameters": [
16467
16577
  {
16468
- "preview_path": "primer/open_project/page_header/parent_link",
16469
- "name": "parent_link",
16470
- "snapshot": "false",
16471
- "skip_rules": {
16472
- "wont_fix": [
16473
- "region"
16474
- ],
16475
- "will_fix": [
16476
- "color-contrast"
16477
- ]
16478
- }
16578
+ "name": "menu_arguments",
16579
+ "type": "Hash",
16580
+ "default": "`{}`",
16581
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}}."
16479
16582
  },
16480
16583
  {
16481
- "preview_path": "primer/open_project/page_header/context_bar_actions",
16482
- "name": "context_bar_actions",
16483
- "snapshot": "false",
16484
- "skip_rules": {
16485
- "wont_fix": [
16486
- "region"
16487
- ],
16488
- "will_fix": [
16489
- "color-contrast"
16490
- ]
16491
- }
16584
+ "name": "button_arguments",
16585
+ "type": "Hash",
16586
+ "default": "`{}`",
16587
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}} or {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}, depending on the value of the `icon:` argument."
16492
16588
  }
16589
+ ],
16590
+ "slots": [
16591
+
16592
+ ],
16593
+ "methods": [
16594
+
16595
+ ],
16596
+ "previews": [
16597
+
16493
16598
  ],
16494
16599
  "subcomponents": [
16495
16600
 
data/static/previews.json CHANGED
@@ -5182,32 +5182,6 @@
5182
5182
  "color-contrast"
5183
5183
  ]
5184
5184
  }
5185
- },
5186
- {
5187
- "preview_path": "primer/open_project/page_header/parent_link",
5188
- "name": "parent_link",
5189
- "snapshot": "false",
5190
- "skip_rules": {
5191
- "wont_fix": [
5192
- "region"
5193
- ],
5194
- "will_fix": [
5195
- "color-contrast"
5196
- ]
5197
- }
5198
- },
5199
- {
5200
- "preview_path": "primer/open_project/page_header/context_bar_actions",
5201
- "name": "context_bar_actions",
5202
- "snapshot": "false",
5203
- "skip_rules": {
5204
- "wont_fix": [
5205
- "region"
5206
- ],
5207
- "will_fix": [
5208
- "color-contrast"
5209
- ]
5210
- }
5211
5185
  }
5212
5186
  ]
5213
5187
  },
@@ -7157,6 +7131,110 @@
7157
7131
  "color-contrast"
7158
7132
  ]
7159
7133
  }
7134
+ },
7135
+ {
7136
+ "preview_path": "primer/alpha/tooltip/tooltip_n",
7137
+ "name": "tooltip_n",
7138
+ "snapshot": "interactive",
7139
+ "skip_rules": {
7140
+ "wont_fix": [
7141
+ "region"
7142
+ ],
7143
+ "will_fix": [
7144
+ "color-contrast"
7145
+ ]
7146
+ }
7147
+ },
7148
+ {
7149
+ "preview_path": "primer/alpha/tooltip/tooltip_s",
7150
+ "name": "tooltip_s",
7151
+ "snapshot": "interactive",
7152
+ "skip_rules": {
7153
+ "wont_fix": [
7154
+ "region"
7155
+ ],
7156
+ "will_fix": [
7157
+ "color-contrast"
7158
+ ]
7159
+ }
7160
+ },
7161
+ {
7162
+ "preview_path": "primer/alpha/tooltip/tooltip_e",
7163
+ "name": "tooltip_e",
7164
+ "snapshot": "interactive",
7165
+ "skip_rules": {
7166
+ "wont_fix": [
7167
+ "region"
7168
+ ],
7169
+ "will_fix": [
7170
+ "color-contrast"
7171
+ ]
7172
+ }
7173
+ },
7174
+ {
7175
+ "preview_path": "primer/alpha/tooltip/tooltip_w",
7176
+ "name": "tooltip_w",
7177
+ "snapshot": "interactive",
7178
+ "skip_rules": {
7179
+ "wont_fix": [
7180
+ "region"
7181
+ ],
7182
+ "will_fix": [
7183
+ "color-contrast"
7184
+ ]
7185
+ }
7186
+ },
7187
+ {
7188
+ "preview_path": "primer/alpha/tooltip/tooltip_se",
7189
+ "name": "tooltip_se",
7190
+ "snapshot": "interactive",
7191
+ "skip_rules": {
7192
+ "wont_fix": [
7193
+ "region"
7194
+ ],
7195
+ "will_fix": [
7196
+ "color-contrast"
7197
+ ]
7198
+ }
7199
+ },
7200
+ {
7201
+ "preview_path": "primer/alpha/tooltip/tooltip_sw",
7202
+ "name": "tooltip_sw",
7203
+ "snapshot": "interactive",
7204
+ "skip_rules": {
7205
+ "wont_fix": [
7206
+ "region"
7207
+ ],
7208
+ "will_fix": [
7209
+ "color-contrast"
7210
+ ]
7211
+ }
7212
+ },
7213
+ {
7214
+ "preview_path": "primer/alpha/tooltip/tooltip_ne",
7215
+ "name": "tooltip_ne",
7216
+ "snapshot": "interactive",
7217
+ "skip_rules": {
7218
+ "wont_fix": [
7219
+ "region"
7220
+ ],
7221
+ "will_fix": [
7222
+ "color-contrast"
7223
+ ]
7224
+ }
7225
+ },
7226
+ {
7227
+ "preview_path": "primer/alpha/tooltip/tooltip_nw",
7228
+ "name": "tooltip_nw",
7229
+ "snapshot": "interactive",
7230
+ "skip_rules": {
7231
+ "wont_fix": [
7232
+ "region"
7233
+ ],
7234
+ "will_fix": [
7235
+ "color-contrast"
7236
+ ]
7237
+ }
7160
7238
  }
7161
7239
  ]
7162
7240
  },
data/static/statuses.json CHANGED
@@ -121,6 +121,7 @@
121
121
  "Primer::OpenProject::GridLayout::Area": "open_project",
122
122
  "Primer::OpenProject::InputGroup": "open_project",
123
123
  "Primer::OpenProject::PageHeader": "open_project",
124
+ "Primer::OpenProject::PageHeader::PageHeaderActionMenu": "open_project",
124
125
  "Primer::Tooltip": "deprecated",
125
126
  "Primer::Truncate": "deprecated"
126
127
  }
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.24.0
4
+ version: 0.25.0
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: 2024-03-19 00:00:00.000000000 Z
12
+ date: 2024-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -102,6 +102,7 @@ files:
102
102
  - app/assets/javascripts/app/components/primer/beta/relative_time.d.ts
103
103
  - app/assets/javascripts/app/components/primer/dialog_helper.d.ts
104
104
  - app/assets/javascripts/app/components/primer/focus_group.d.ts
105
+ - app/assets/javascripts/app/components/primer/open_project/page_header_element.d.ts
105
106
  - app/assets/javascripts/app/components/primer/primer.d.ts
106
107
  - app/assets/javascripts/app/components/primer/scrollable_region.d.ts
107
108
  - app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts
@@ -492,6 +493,9 @@ files:
492
493
  - app/components/primer/open_project/page_header.html.erb
493
494
  - app/components/primer/open_project/page_header.pcss
494
495
  - app/components/primer/open_project/page_header.rb
496
+ - app/components/primer/open_project/page_header_element.d.ts
497
+ - app/components/primer/open_project/page_header_element.js
498
+ - app/components/primer/open_project/page_header_element.ts
495
499
  - app/components/primer/primer.d.ts
496
500
  - app/components/primer/primer.js
497
501
  - app/components/primer/primer.pcss
@@ -813,7 +817,15 @@ files:
813
817
  - previews/primer/alpha/text_field_preview/input_group_trailing_button.html.erb
814
818
  - previews/primer/alpha/toggle_switch_preview.rb
815
819
  - previews/primer/alpha/tooltip_preview.rb
820
+ - previews/primer/alpha/tooltip_preview/tooltip_e.html.erb
816
821
  - previews/primer/alpha/tooltip_preview/tooltip_inside_primer_overlay.html.erb
822
+ - previews/primer/alpha/tooltip_preview/tooltip_n.html.erb
823
+ - previews/primer/alpha/tooltip_preview/tooltip_ne.html.erb
824
+ - previews/primer/alpha/tooltip_preview/tooltip_nw.html.erb
825
+ - previews/primer/alpha/tooltip_preview/tooltip_s.html.erb
826
+ - previews/primer/alpha/tooltip_preview/tooltip_se.html.erb
827
+ - previews/primer/alpha/tooltip_preview/tooltip_sw.html.erb
828
+ - previews/primer/alpha/tooltip_preview/tooltip_w.html.erb
817
829
  - previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb
818
830
  - previews/primer/alpha/tooltip_preview/with_multiple_on_a_page.html.erb
819
831
  - previews/primer/alpha/tooltip_preview/with_right_most_position.html.erb
@@ -901,7 +913,6 @@ files:
901
913
  - previews/primer/open_project/input_group_preview.rb
902
914
  - previews/primer/open_project/page_header_preview.rb
903
915
  - previews/primer/open_project/page_header_preview/actions.html.erb
904
- - previews/primer/open_project/page_header_preview/context_bar_actions.html.erb
905
916
  - previews/primer/open_project/page_header_preview/playground.html.erb
906
917
  - previews/primer/url_helpers.rb
907
918
  - static/arguments.json
@@ -1,27 +0,0 @@
1
- <%= render(Primer::OpenProject::PageHeader.new) do |component| %>
2
- <% component.with_title(tag: :h1) do %>
3
- A title
4
- <% end %>
5
- <% component.with_description do %>
6
- A description with actions
7
- <% end %>
8
- <% component.with_parent_link(href: "#") do %>
9
- Parent link
10
- <% end %>
11
- <% component.with_context_bar_action do %>
12
- <%= render(Primer::Beta::IconButton.new(icon: 'star', 'aria-label': 'Star')) %>
13
- <% end %>
14
- <% component.with_context_bar_action do %>
15
- <%= render(Primer::Alpha::ActionMenu.new) do |menu| %>
16
- <% menu.with_show_button { "Menu" } %>
17
- <% menu.with_item(label: "Item", tag: :button, value: "") %>
18
- <% menu.with_item(
19
- label: "Show dialog",
20
- tag: :button,
21
- content_arguments: { "data-show-dialog-id": "my-dialog" },
22
- value: "",
23
- scheme: :danger
24
- ) %>
25
- <% end %>
26
- <% end %>
27
- <% end %>