openproject-primer_view_components 0.68.0 → 0.69.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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +5 -0
  4. data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
  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/components/primer/alpha/action_menu/action_menu_element.d.ts +5 -0
  8. data/app/components/primer/alpha/action_menu/action_menu_element.js +111 -16
  9. data/app/components/primer/alpha/action_menu/action_menu_element.ts +136 -23
  10. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
  11. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +62 -0
  12. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.ts +67 -0
  13. data/app/components/primer/alpha/action_menu/list.rb +3 -1
  14. data/app/components/primer/alpha/action_menu/list_wrapper.rb +31 -0
  15. data/app/components/primer/alpha/action_menu/menu.html.erb +24 -0
  16. data/app/components/primer/alpha/action_menu/menu.rb +136 -0
  17. data/app/components/primer/alpha/action_menu/primary_menu.rb +86 -0
  18. data/app/components/primer/alpha/action_menu/sub_menu.rb +74 -0
  19. data/app/components/primer/alpha/action_menu/sub_menu_item.html.erb +5 -0
  20. data/app/components/primer/alpha/action_menu/sub_menu_item.rb +53 -0
  21. data/app/components/primer/alpha/action_menu.html.erb +1 -26
  22. data/app/components/primer/alpha/action_menu.rb +44 -118
  23. data/app/components/primer/alpha/select_panel.rb +3 -3
  24. data/lib/primer/view_components/version.rb +2 -2
  25. data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +13 -4
  26. data/previews/primer/alpha/action_menu_preview/opens_dialog.html.erb +20 -11
  27. data/previews/primer/alpha/action_menu_preview/single_select_form_items.html.erb +13 -2
  28. data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +19 -0
  29. data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +20 -11
  30. data/previews/primer/alpha/action_menu_preview/with_deferred_content.html.erb +24 -0
  31. data/previews/primer/alpha/action_menu_preview.rb +93 -29
  32. data/static/arguments.json +169 -68
  33. data/static/audited_at.json +4 -0
  34. data/static/constants.json +27 -7
  35. data/static/info_arch.json +797 -199
  36. data/static/previews.json +13 -0
  37. data/static/statuses.json +4 -0
  38. metadata +14 -2
@@ -329,77 +329,11 @@
329
329
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
330
330
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
331
331
  "parameters": [
332
- {
333
- "name": "menu_id",
334
- "type": "String",
335
- "default": "`self.class.generate_id`",
336
- "description": "Id of the menu."
337
- },
338
- {
339
- "name": "anchor_align",
340
- "type": "Symbol",
341
- "default": "`:start`",
342
- "description": "One of `:center`, `:end`, or `:start`.."
343
- },
344
- {
345
- "name": "anchor_side",
346
- "type": "Symbol",
347
- "default": "`:outside_bottom`",
348
- "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
349
- },
350
- {
351
- "name": "size",
352
- "type": "Symbol",
353
- "default": "`:auto`",
354
- "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
355
- },
356
- {
357
- "name": "src",
358
- "type": "String",
359
- "default": "`nil`",
360
- "description": "Used with an `include-fragment` element to load menu content from the given source URL."
361
- },
362
- {
363
- "name": "preload",
364
- "type": "Boolean",
365
- "default": "`false`",
366
- "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
367
- },
368
- {
369
- "name": "dynamic_label",
370
- "type": "Boolean",
371
- "default": "`false`",
372
- "description": "Whether or not to display the text of the currently selected item in the show button."
373
- },
374
- {
375
- "name": "dynamic_label_prefix",
376
- "type": "String",
377
- "default": "`nil`",
378
- "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
379
- },
380
- {
381
- "name": "select_variant",
382
- "type": "Symbol",
383
- "default": "`:none`",
384
- "description": "One of `:multiple`, `:none`, or `:single`."
385
- },
386
- {
387
- "name": "form_arguments",
388
- "type": "Hash",
389
- "default": "`{}`",
390
- "description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
391
- },
392
- {
393
- "name": "overlay_arguments",
394
- "type": "Hash",
395
- "default": "`{}`",
396
- "description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
397
- },
398
332
  {
399
333
  "name": "system_arguments",
400
334
  "type": "Hash",
401
335
  "default": "N/A",
402
- "description": "[System arguments](/system-arguments)."
336
+ "description": "The arguments accepted by [ActionMenu::PrimaryMenu](/components/alpha/actionmenuprimarymenu)."
403
337
  }
404
338
  ]
405
339
  },
@@ -490,7 +424,7 @@
490
424
  "name": "system_arguments",
491
425
  "type": "Hash",
492
426
  "default": "N/A",
493
- "description": "The arguments accepted by [ActionList](/components/alpha/actionlist)"
427
+ "description": "The arguments accepted by [ActionMenu::ListWrapper](/components/alpha/actionmenulistwrapper)"
494
428
  }
495
429
  ]
496
430
  },
@@ -516,6 +450,173 @@
516
450
  }
517
451
  ]
518
452
  },
453
+ {
454
+ "component": "ActionMenu::Menu",
455
+ "status": "alpha",
456
+ "a11y_reviewed": false,
457
+ "short_name": "ActionMenuMenu",
458
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/menu.rb",
459
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/menu/default/",
460
+ "parameters": [
461
+ {
462
+ "name": "anchor_align",
463
+ "type": "Symbol",
464
+ "default": "N/A",
465
+ "description": "One of `:center`, `:end`, or `:start`."
466
+ },
467
+ {
468
+ "name": "anchor_side",
469
+ "type": "Symbol",
470
+ "default": "N/A",
471
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
472
+ },
473
+ {
474
+ "name": "menu_id",
475
+ "type": "String",
476
+ "default": "`self.class.generate_id`",
477
+ "description": "Id of the menu."
478
+ },
479
+ {
480
+ "name": "size",
481
+ "type": "Symbol",
482
+ "default": "`:auto`",
483
+ "description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
484
+ },
485
+ {
486
+ "name": "src",
487
+ "type": "String",
488
+ "default": "`nil`",
489
+ "description": "Used with an `include-fragment` element to load menu content from the given source URL."
490
+ },
491
+ {
492
+ "name": "preload",
493
+ "type": "Boolean",
494
+ "default": "`false`",
495
+ "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
496
+ },
497
+ {
498
+ "name": "select_variant",
499
+ "type": "Symbol",
500
+ "default": "`:none`",
501
+ "description": "One of `:multiple`, `:none`, or `:single`."
502
+ },
503
+ {
504
+ "name": "form_arguments",
505
+ "type": "Hash",
506
+ "default": "`{}`",
507
+ "description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
508
+ },
509
+ {
510
+ "name": "overlay_arguments",
511
+ "type": "Hash",
512
+ "default": "`{}`",
513
+ "description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
514
+ },
515
+ {
516
+ "name": "list_arguments",
517
+ "type": "Hash",
518
+ "default": "`{}`",
519
+ "description": "Arguments to pass to the underlying [ActionMenu::List](/components/alpha/actionmenulist)"
520
+ },
521
+ {
522
+ "name": "system_arguments",
523
+ "type": "Hash",
524
+ "default": "N/A",
525
+ "description": "[System arguments](/system-arguments)."
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "component": "ActionMenu::PrimaryMenu",
531
+ "status": "alpha",
532
+ "a11y_reviewed": false,
533
+ "short_name": "ActionMenuPrimaryMenu",
534
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/primary_menu.rb",
535
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/primary_menu/default/",
536
+ "parameters": [
537
+ {
538
+ "name": "anchor_align",
539
+ "type": "Symbol",
540
+ "default": "`:start`",
541
+ "description": "One of `:center`, `:end`, or `:start`."
542
+ },
543
+ {
544
+ "name": "anchor_side",
545
+ "type": "Symbol",
546
+ "default": "`:outside_bottom`",
547
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
548
+ },
549
+ {
550
+ "name": "dynamic_label",
551
+ "type": "Boolean",
552
+ "default": "`false`",
553
+ "description": "Whether or not to display the text of the currently selected item in the show button."
554
+ },
555
+ {
556
+ "name": "dynamic_label_prefix",
557
+ "type": "String",
558
+ "default": "`nil`",
559
+ "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
560
+ },
561
+ {
562
+ "name": "system_arguments",
563
+ "type": "Hash",
564
+ "default": "N/A",
565
+ "description": "[System arguments](/system-arguments)."
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ "component": "ActionMenu::SubMenu",
571
+ "status": "alpha",
572
+ "a11y_reviewed": false,
573
+ "short_name": "ActionMenuSubMenu",
574
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu.rb",
575
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu/default/",
576
+ "parameters": [
577
+ {
578
+ "name": "menu_id",
579
+ "type": "String",
580
+ "default": "`self.class.generate_id`",
581
+ "description": "Id of the menu."
582
+ },
583
+ {
584
+ "name": "anchor_align",
585
+ "type": "Symbol",
586
+ "default": "`:start`",
587
+ "description": "One of `:center`, `:end`, or `:start`."
588
+ },
589
+ {
590
+ "name": "anchor_side",
591
+ "type": "Symbol",
592
+ "default": "`:outside_right`",
593
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
594
+ },
595
+ {
596
+ "name": "overlay_arguments",
597
+ "type": "Hash",
598
+ "default": "`{}`",
599
+ "description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
600
+ },
601
+ {
602
+ "name": "system_arguments",
603
+ "type": "Hash",
604
+ "default": "N/A",
605
+ "description": "[System arguments](/system-arguments)."
606
+ }
607
+ ]
608
+ },
609
+ {
610
+ "component": "ActionMenu::SubMenuItem",
611
+ "status": "alpha",
612
+ "a11y_reviewed": false,
613
+ "short_name": "ActionMenuSubMenuItem",
614
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu_item.rb",
615
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu_item/default/",
616
+ "parameters": [
617
+
618
+ ]
619
+ },
519
620
  {
520
621
  "component": "AutoComplete",
521
622
  "status": "deprecated",
@@ -12,6 +12,10 @@
12
12
  "Primer::Alpha::ActionMenu::Heading": "",
13
13
  "Primer::Alpha::ActionMenu::List": "",
14
14
  "Primer::Alpha::ActionMenu::ListWrapper": "2023-07-10",
15
+ "Primer::Alpha::ActionMenu::Menu": "",
16
+ "Primer::Alpha::ActionMenu::PrimaryMenu": "",
17
+ "Primer::Alpha::ActionMenu::SubMenu": "",
18
+ "Primer::Alpha::ActionMenu::SubMenuItem": "",
15
19
  "Primer::Alpha::AutoComplete": "",
16
20
  "Primer::Alpha::AutoComplete::Item": "",
17
21
  "Primer::Alpha::Banner": "",
@@ -152,18 +152,15 @@
152
152
  ]
153
153
  },
154
154
  "Primer::Alpha::ActionMenu": {
155
- "DEFAULT_PRELOAD": false,
156
- "DEFAULT_SELECT_VARIANT": "none",
157
155
  "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::GeneratedSlotMethods",
158
156
  "Group": "Primer::Alpha::ActionMenu::Group",
159
157
  "Heading": "Primer::Alpha::ActionMenu::Heading",
160
158
  "List": "Primer::Alpha::ActionMenu::List",
161
159
  "ListWrapper": "Primer::Alpha::ActionMenu::ListWrapper",
162
- "SELECT_VARIANT_OPTIONS": [
163
- "single",
164
- "multiple",
165
- "none"
166
- ]
160
+ "Menu": "Primer::Alpha::ActionMenu::Menu",
161
+ "PrimaryMenu": "Primer::Alpha::ActionMenu::PrimaryMenu",
162
+ "SubMenu": "Primer::Alpha::ActionMenu::SubMenu",
163
+ "SubMenuItem": "Primer::Alpha::ActionMenu::SubMenuItem"
167
164
  },
168
165
  "Primer::Alpha::ActionMenu::Group": {
169
166
  "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::Group::GeneratedSlotMethods"
@@ -183,6 +180,29 @@
183
180
  "Primer::Alpha::ActionMenu::ListWrapper": {
184
181
  "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::ListWrapper::GeneratedSlotMethods"
185
182
  },
183
+ "Primer::Alpha::ActionMenu::Menu": {
184
+ "DEFAULT_PRELOAD": false,
185
+ "DEFAULT_SELECT_VARIANT": "none",
186
+ "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::Menu::GeneratedSlotMethods",
187
+ "SELECT_VARIANT_OPTIONS": [
188
+ "single",
189
+ "multiple",
190
+ "none"
191
+ ]
192
+ },
193
+ "Primer::Alpha::ActionMenu::PrimaryMenu": {
194
+ "DEFAULT_ANCHOR_ALIGN": "start",
195
+ "DEFAULT_ANCHOR_SIDE": "outside_bottom",
196
+ "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::PrimaryMenu::GeneratedSlotMethods"
197
+ },
198
+ "Primer::Alpha::ActionMenu::SubMenu": {
199
+ "DEFAULT_ANCHOR_ALIGN": "start",
200
+ "DEFAULT_ANCHOR_SIDE": "outside_right",
201
+ "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::SubMenu::GeneratedSlotMethods"
202
+ },
203
+ "Primer::Alpha::ActionMenu::SubMenuItem": {
204
+ "GeneratedSlotMethods": "Primer::Alpha::ActionMenu::SubMenuItem::GeneratedSlotMethods"
205
+ },
186
206
  "Primer::Alpha::AutoComplete": {
187
207
  "GeneratedSlotMethods": "Primer::Alpha::AutoComplete::GeneratedSlotMethods",
188
208
  "Item": "Primer::Alpha::AutoComplete::Item"