openproject-primer_view_components 0.96.0 → 0.97.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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/app/assets/javascripts/primer_view_components.js +5 -5
  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_list/item.rb +2 -1
  8. data/app/components/primer/alpha/action_list.css +1 -1
  9. data/app/components/primer/alpha/action_list.css.json +9 -22
  10. data/app/components/primer/alpha/action_list.css.map +1 -1
  11. data/app/components/primer/alpha/action_list.html.erb +1 -5
  12. data/app/components/primer/alpha/action_list.pcss +43 -81
  13. data/app/components/primer/alpha/action_list.rb +9 -7
  14. data/app/components/primer/alpha/action_menu/action_menu_element.js +84 -234
  15. data/app/components/primer/alpha/action_menu/action_menu_element.ts +92 -273
  16. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +1 -1
  17. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.ts +1 -1
  18. data/app/components/primer/alpha/action_menu/menu_loader.d.ts +21 -0
  19. data/app/components/primer/alpha/action_menu/menu_loader.js +221 -0
  20. data/app/components/primer/alpha/action_menu/menu_loader.ts +269 -0
  21. data/lib/primer/view_components/version.rb +1 -1
  22. data/previews/primer/alpha/action_list_preview.rb +46 -1
  23. data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +1 -1
  24. data/previews/primer/alpha/action_menu_preview.rb +5 -2
  25. data/static/arguments.json +2 -2
  26. data/static/classes.json +3 -3
  27. data/static/classnames.cjs +1 -1
  28. data/static/classnames.js +1 -1
  29. data/static/info_arch.json +21 -2
  30. data/static/previews.json +13 -0
  31. metadata +4 -1
data/static/classnames.js CHANGED
@@ -23,6 +23,7 @@ const classNames = new Set([
23
23
  'ActionListItem',
24
24
  'ActionListItem--danger',
25
25
  'ActionListItem--disabled',
26
+ 'ActionListItem--divided',
26
27
  'ActionListItem--hasSubItem',
27
28
  'ActionListItem--navActive',
28
29
  'ActionListItem--subItem',
@@ -43,7 +44,6 @@ const classNames = new Set([
43
44
  'ActionListItem-visual--leading',
44
45
  'ActionListItem-visual--trailing',
45
46
  'ActionListWrap',
46
- 'ActionListWrap--divided',
47
47
  'ActionListWrap--inset',
48
48
  'AvatarStack',
49
49
  'AvatarStack--right',
@@ -216,7 +216,7 @@
216
216
  "name": "show_dividers",
217
217
  "type": "Boolean",
218
218
  "default": "`false`",
219
- "description": "Display a divider above each item in the list when it does not follow a header or divider."
219
+ "description": "Display a dividing line above each item in the list when it does not follow a header or divider. These are more subtle than manually inserted dividers. Only supported by `ActionList` itself so far. Menus have too many special cases. Hidden items are not supported, whether they are rendered with `hidden: true` or hidden later, eg. by filtering: the lines are placed with CSS sibling selectors. To leave items out, don't render them, or remove them from the DOM rather than setting `hidden`."
220
220
  },
221
221
  {
222
222
  "name": "select_variant",
@@ -374,6 +374,12 @@
374
374
  "parameters": [],
375
375
  "return_types": []
376
376
  },
377
+ {
378
+ "name": "show_dividers",
379
+ "description": "Returns the value of attribute show_dividers.",
380
+ "parameters": [],
381
+ "return_types": []
382
+ },
377
383
  {
378
384
  "name": "build_item",
379
385
  "description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.",
@@ -502,6 +508,19 @@
502
508
  ]
503
509
  }
504
510
  },
511
+ {
512
+ "preview_path": "primer/alpha/action_list/with_dividers",
513
+ "name": "with_dividers",
514
+ "snapshot": "true",
515
+ "skip_rules": {
516
+ "wont_fix": [
517
+ "region"
518
+ ],
519
+ "will_fix": [
520
+ "color-contrast"
521
+ ]
522
+ }
523
+ },
505
524
  {
506
525
  "preview_path": "primer/alpha/action_list/divider",
507
526
  "name": "divider",
@@ -2488,7 +2507,7 @@
2488
2507
  "name": "show_dividers",
2489
2508
  "type": "Boolean",
2490
2509
  "default": "`false`",
2491
- "description": "Display a divider above each item in the list when it does not follow a header or divider."
2510
+ "description": "Display a dividing line above each item in the list when it does not follow a header or divider. These are more subtle than manually inserted dividers. Only supported by `ActionList` itself so far. Menus have too many special cases. Hidden items are not supported, whether they are rendered with `hidden: true` or hidden later, eg. by filtering: the lines are placed with CSS sibling selectors. To leave items out, don't render them, or remove them from the DOM rather than setting `hidden`."
2492
2511
  },
2493
2512
  {
2494
2513
  "name": "select_variant",
data/static/previews.json CHANGED
@@ -143,6 +143,19 @@
143
143
  ]
144
144
  }
145
145
  },
146
+ {
147
+ "preview_path": "primer/alpha/action_list/with_dividers",
148
+ "name": "with_dividers",
149
+ "snapshot": "true",
150
+ "skip_rules": {
151
+ "wont_fix": [
152
+ "region"
153
+ ],
154
+ "will_fix": [
155
+ "color-contrast"
156
+ ]
157
+ }
158
+ },
146
159
  {
147
160
  "preview_path": "primer/alpha/action_list/divider",
148
161
  "name": "divider",
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.96.0
4
+ version: 0.97.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
@@ -125,6 +125,9 @@ files:
125
125
  - app/components/primer/alpha/action_menu/list_wrapper.rb
126
126
  - app/components/primer/alpha/action_menu/menu.html.erb
127
127
  - app/components/primer/alpha/action_menu/menu.rb
128
+ - app/components/primer/alpha/action_menu/menu_loader.d.ts
129
+ - app/components/primer/alpha/action_menu/menu_loader.js
130
+ - app/components/primer/alpha/action_menu/menu_loader.ts
128
131
  - app/components/primer/alpha/action_menu/primary_menu.rb
129
132
  - app/components/primer/alpha/action_menu/sub_menu.rb
130
133
  - app/components/primer/alpha/action_menu/sub_menu_item.html.erb