openproject-primer_view_components 0.61.0 → 0.61.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/open_project/border_box/collapsible_header.html.erb +2 -2
- data/app/components/primer/open_project/border_box/collapsible_header.rb +1 -0
- data/app/components/primer/open_project/collapsible.js +4 -4
- data/app/components/primer/open_project/collapsible.ts +4 -4
- data/app/components/primer/open_project/collapsible_section.html.erb +4 -5
- data/lib/primer/view_components/version.rb +1 -1
- metadata +2 -2
@@ -5,8 +5,8 @@
|
|
5
5
|
<% if count? %>
|
6
6
|
<%= count %>
|
7
7
|
<% end %>
|
8
|
-
<%= render(Primer::Beta::Octicon.new(icon: "chevron-up", data: { target: "collapsible-header.arrowUp" })) %>
|
9
|
-
<%= render(Primer::Beta::Octicon.new(icon: "chevron-down", hidden:
|
8
|
+
<%= render(Primer::Beta::Octicon.new(icon: "chevron-up", hidden: @collapsed, data: { target: "collapsible-header.arrowUp" })) %>
|
9
|
+
<%= render(Primer::Beta::Octicon.new(icon: "chevron-down", hidden: !@collapsed, data: { target: "collapsible-header.arrowDown" })) %>
|
10
10
|
<% end %>
|
11
11
|
<%= flex.with_row do %>
|
12
12
|
<% if description? %>
|
@@ -26,16 +26,16 @@ export class CollapsibleElement extends HTMLElement {
|
|
26
26
|
}
|
27
27
|
hideAll() {
|
28
28
|
// For whatever reason, setting `hidden` directly does not work on the SVGs
|
29
|
-
this.arrowDown
|
30
|
-
this.arrowUp
|
29
|
+
this.arrowDown?.removeAttribute('hidden');
|
30
|
+
this.arrowUp?.setAttribute('hidden', '');
|
31
31
|
for (const el of this.collapsibleElements) {
|
32
32
|
el.hidden = true;
|
33
33
|
}
|
34
34
|
this.classList.add(`${this.baseClass}--collapsed`);
|
35
35
|
}
|
36
36
|
expandAll() {
|
37
|
-
this.arrowUp
|
38
|
-
this.arrowDown
|
37
|
+
this.arrowUp?.removeAttribute('hidden');
|
38
|
+
this.arrowDown?.setAttribute('hidden', '');
|
39
39
|
for (const el of this.collapsibleElements) {
|
40
40
|
el.hidden = false;
|
41
41
|
}
|
@@ -24,8 +24,8 @@ export abstract class CollapsibleElement extends HTMLElement {
|
|
24
24
|
|
25
25
|
hideAll() {
|
26
26
|
// For whatever reason, setting `hidden` directly does not work on the SVGs
|
27
|
-
this.arrowDown
|
28
|
-
this.arrowUp
|
27
|
+
this.arrowDown?.removeAttribute('hidden')
|
28
|
+
this.arrowUp?.setAttribute('hidden', '')
|
29
29
|
|
30
30
|
for (const el of this.collapsibleElements) {
|
31
31
|
el.hidden = true
|
@@ -35,8 +35,8 @@ export abstract class CollapsibleElement extends HTMLElement {
|
|
35
35
|
}
|
36
36
|
|
37
37
|
expandAll() {
|
38
|
-
this.arrowUp
|
39
|
-
this.arrowDown
|
38
|
+
this.arrowUp?.removeAttribute('hidden')
|
39
|
+
this.arrowDown?.setAttribute('hidden', '')
|
40
40
|
|
41
41
|
for (const el of this.collapsibleElements) {
|
42
42
|
el.hidden = false
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<%= render(Primer::BaseComponent.new(**@system_arguments)) do %>
|
2
2
|
<%= render(Primer::OpenProject::FlexLayout.new) do |flex| %>
|
3
|
-
<%= flex.with_row(
|
4
|
-
classes: "CollapsibleSection--triggerArea",
|
3
|
+
<%= flex.with_row(classes: "CollapsibleSection--triggerArea",
|
5
4
|
data: { action: "click:collapsible-section#toggle" }) do %>
|
6
5
|
<%= render(Primer::OpenProject::FlexLayout.new(display: :flex, align_items: :center)) do |header| %>
|
7
6
|
<%= header.with_column do %>
|
@@ -11,15 +10,15 @@
|
|
11
10
|
<%= caption %>
|
12
11
|
<% end %>
|
13
12
|
<%= header.with_column do %>
|
14
|
-
<%= render(Primer::Beta::Octicon.new(icon: "chevron-up", data: { target: "collapsible-section.arrowUp" })) %>
|
15
|
-
<%= render(Primer::Beta::Octicon.new(icon: "chevron-down", hidden:
|
13
|
+
<%= render(Primer::Beta::Octicon.new(icon: "chevron-up", hidden: @collapsed, data: { target: "collapsible-section.arrowUp" })) %>
|
14
|
+
<%= render(Primer::Beta::Octicon.new(icon: "chevron-down", hidden: !@collapsed, data: { target: "collapsible-section.arrowDown" })) %>
|
16
15
|
<% end %>
|
17
16
|
<%= header.with_column(flex: 1, text_align: :right) do %>
|
18
17
|
<%= additional_information %>
|
19
18
|
<% end %>
|
20
19
|
<% end %>
|
21
20
|
<% end %>
|
22
|
-
<%= flex.with_row(data: { targets: "collapsible-section.collapsibleElements" }) do %>
|
21
|
+
<%= flex.with_row(hidden: @collapsed, mt: 3, data: { targets: "collapsible-section.collapsibleElements" }) do %>
|
23
22
|
<%= collapsible_content %>
|
24
23
|
<% end %>
|
25
24
|
<% end %>
|
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.61.
|
4
|
+
version: 0.61.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: 2025-04-
|
12
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|