openproject-primer_view_components 0.91.1 → 0.91.3

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -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/layout.css +1 -1
  8. data/app/components/primer/alpha/layout.css.json +2 -0
  9. data/app/components/primer/alpha/layout.css.map +1 -1
  10. data/app/components/primer/alpha/layout.pcss +20 -0
  11. data/app/components/primer/alpha/layout.rb +3 -1
  12. data/app/components/primer/alpha/toggle_switch.css +1 -1
  13. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  14. data/app/components/primer/alpha/toggle_switch.pcss +6 -0
  15. data/app/components/primer/alpha/tree_view/sub_tree.html.erb +2 -2
  16. data/app/components/primer/alpha/tree_view/sub_tree.rb +6 -0
  17. data/app/components/primer/alpha/tree_view/tree_view.d.ts +1 -1
  18. data/app/components/primer/alpha/tree_view/tree_view.js +13 -3
  19. data/app/components/primer/alpha/tree_view/tree_view.ts +17 -3
  20. data/app/components/primer/alpha/tree_view.css +1 -1
  21. data/app/components/primer/alpha/tree_view.css.map +1 -1
  22. data/app/components/primer/alpha/tree_view.pcss +1 -1
  23. data/app/components/primer/open_project/border_box/collapsible_header.d.ts +1 -2
  24. data/app/components/primer/open_project/border_box/collapsible_header.js +1 -0
  25. data/app/components/primer/open_project/border_box/collapsible_header.ts +1 -1
  26. data/app/components/primer/open_project/collapsible_section.d.ts +1 -2
  27. data/app/components/primer/open_project/collapsible_section.js +1 -0
  28. data/app/components/primer/open_project/collapsible_section.ts +1 -1
  29. data/app/components/primer/open_project/zen_mode_button.js +0 -1
  30. data/app/components/primer/open_project/zen_mode_button.ts +0 -1
  31. data/app/controllers/primer/view_components/tree_view_items_controller.rb +1 -1
  32. data/app/lib/primer/forms/text_field.html.erb +7 -3
  33. data/app/views/primer/view_components/tree_view_items/async_alpha.html_fragment.erb +1 -1
  34. data/config/locales/en.yml +3 -0
  35. data/lib/primer/view_components/version.rb +1 -1
  36. data/previews/primer/alpha/layout_preview.rb +16 -0
  37. data/previews/primer/alpha/tree_view_preview/async_alpha.html.erb +1 -1
  38. data/previews/primer/alpha/tree_view_preview.rb +3 -3
  39. data/static/classnames.cjs +2 -0
  40. data/static/classnames.js +2 -0
  41. data/static/constants.json +6 -2
  42. data/static/info_arch.json +27 -1
  43. data/static/previews.json +26 -0
  44. metadata +1 -1
@@ -6,7 +6,7 @@ module Primer
6
6
  module VERSION
7
7
  MAJOR = 0
8
8
  MINOR = 91
9
- PATCH = 1
9
+ PATCH = 3
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
12
12
  end
@@ -131,6 +131,22 @@ module Primer
131
131
  component.with_sidebar(width: :wide, bg: :accent, p: 6) { "Sidebar content" }
132
132
  end
133
133
  end
134
+
135
+ # @label XWide
136
+ def sidebar_width_xwide
137
+ render(Primer::Alpha::Layout.new) do |component|
138
+ component.with_main(bg: :attention, p: 6) { "Main content" }
139
+ component.with_sidebar(width: :xwide, bg: :accent, p: 6) { "Sidebar content" }
140
+ end
141
+ end
142
+
143
+ # @label XXWide
144
+ def sidebar_width_xxwide
145
+ render(Primer::Alpha::Layout.new) do |component|
146
+ component.with_main(bg: :attention, p: 6) { "Main content" }
147
+ component.with_sidebar(width: :xxwide, bg: :accent, p: 6) { "Sidebar content" }
148
+ end
149
+ end
134
150
  #
135
151
  # @!endgroup
136
152
 
@@ -6,7 +6,7 @@
6
6
  <% icons.with_collapsed_icon(icon: :"file-directory-fill", color: :accent) %>
7
7
  <% end %>
8
8
 
9
- <% sub_tree.with_loading_skeleton(src: primer_view_components.tree_view_items_async_alpha_path(action_menu_expanded: action_menu_expanded, select_variant: select_variant)) %>
9
+ <% sub_tree.with_loading_skeleton(src: primer_view_components.tree_view_items_async_alpha_path(nested_children_expanded: nested_children_expanded, select_variant: select_variant)) %>
10
10
  <% end %>
11
11
  <% end %>
12
12
  </div>
@@ -113,11 +113,11 @@ module Primer
113
113
 
114
114
  # @label Async alpha
115
115
  #
116
- # @param action_menu_expanded [Boolean] toggle
116
+ # @param nested_children_expanded [Boolean] toggle
117
117
  # @param select_variant [Symbol] select [none, single, multiple]
118
- def async_alpha(action_menu_expanded: false, select_variant: :none)
118
+ def async_alpha(nested_children_expanded: false, select_variant: :none)
119
119
  render_with_template(locals: {
120
- action_menu_expanded: coerce_bool(action_menu_expanded),
120
+ nested_children_expanded: coerce_bool(nested_children_expanded),
121
121
  select_variant: select_variant.to_sym
122
122
  })
123
123
  end
@@ -206,6 +206,8 @@ module.exports = new Set([
206
206
  'Layout--gutter-spacious',
207
207
  'Layout--sidebar-narrow',
208
208
  'Layout--sidebar-wide',
209
+ 'Layout--sidebar-xwide',
210
+ 'Layout--sidebar-xxwide',
209
211
  'Layout--sidebarPosition-end',
210
212
  'Layout--sidebarPosition-flowRow-end',
211
213
  'Layout--sidebarPosition-flowRow-none',
data/static/classnames.js CHANGED
@@ -206,6 +206,8 @@ const classNames = new Set([
206
206
  'Layout--gutter-spacious',
207
207
  'Layout--sidebar-narrow',
208
208
  'Layout--sidebar-wide',
209
+ 'Layout--sidebar-xwide',
210
+ 'Layout--sidebar-xxwide',
209
211
  'Layout--sidebarPosition-end',
210
212
  'Layout--sidebarPosition-flowRow-end',
211
213
  'Layout--sidebarPosition-flowRow-none',
@@ -469,12 +469,16 @@
469
469
  "SIDEBAR_WIDTH_MAPPINGS": {
470
470
  "default": "",
471
471
  "narrow": "Layout--sidebar-narrow",
472
- "wide": "Layout--sidebar-wide"
472
+ "wide": "Layout--sidebar-wide",
473
+ "xwide": "Layout--sidebar-xwide",
474
+ "xxwide": "Layout--sidebar-xxwide"
473
475
  },
474
476
  "SIDEBAR_WIDTH_OPTIONS": [
475
477
  "default",
476
478
  "narrow",
477
- "wide"
479
+ "wide",
480
+ "xwide",
481
+ "xxwide"
478
482
  ],
479
483
  "STACKING_BREAKPOINT_DEFAULT": "md",
480
484
  "STACKING_BREAKPOINT_MAPPINGS": {
@@ -5242,7 +5242,7 @@
5242
5242
  "name": "width",
5243
5243
  "type": "Symbol",
5244
5244
  "default": "N/A",
5245
- "description": "One of `:default`, `:narrow`, or `:wide`."
5245
+ "description": "One of `:default`, `:narrow`, `:wide`, `:xwide`, or `:xxwide`."
5246
5246
  },
5247
5247
  {
5248
5248
  "name": "col_placement",
@@ -5436,6 +5436,32 @@
5436
5436
  ]
5437
5437
  }
5438
5438
  },
5439
+ {
5440
+ "preview_path": "primer/alpha/layout/sidebar_width_xwide",
5441
+ "name": "sidebar_width_xwide",
5442
+ "snapshot": "false",
5443
+ "skip_rules": {
5444
+ "wont_fix": [
5445
+ "region"
5446
+ ],
5447
+ "will_fix": [
5448
+ "color-contrast"
5449
+ ]
5450
+ }
5451
+ },
5452
+ {
5453
+ "preview_path": "primer/alpha/layout/sidebar_width_xxwide",
5454
+ "name": "sidebar_width_xxwide",
5455
+ "snapshot": "false",
5456
+ "skip_rules": {
5457
+ "wont_fix": [
5458
+ "region"
5459
+ ],
5460
+ "will_fix": [
5461
+ "color-contrast"
5462
+ ]
5463
+ }
5464
+ },
5439
5465
  {
5440
5466
  "preview_path": "primer/alpha/layout/sidebar_col_placement_start",
5441
5467
  "name": "sidebar_col_placement_start",
data/static/previews.json CHANGED
@@ -2296,6 +2296,32 @@
2296
2296
  ]
2297
2297
  }
2298
2298
  },
2299
+ {
2300
+ "preview_path": "primer/alpha/layout/sidebar_width_xwide",
2301
+ "name": "sidebar_width_xwide",
2302
+ "snapshot": "false",
2303
+ "skip_rules": {
2304
+ "wont_fix": [
2305
+ "region"
2306
+ ],
2307
+ "will_fix": [
2308
+ "color-contrast"
2309
+ ]
2310
+ }
2311
+ },
2312
+ {
2313
+ "preview_path": "primer/alpha/layout/sidebar_width_xxwide",
2314
+ "name": "sidebar_width_xxwide",
2315
+ "snapshot": "false",
2316
+ "skip_rules": {
2317
+ "wont_fix": [
2318
+ "region"
2319
+ ],
2320
+ "will_fix": [
2321
+ "color-contrast"
2322
+ ]
2323
+ }
2324
+ },
2299
2325
  {
2300
2326
  "preview_path": "primer/alpha/layout/sidebar_col_placement_start",
2301
2327
  "name": "sidebar_col_placement_start",
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.91.1
4
+ version: 0.91.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source