openproject-primer_view_components 0.59.1 → 0.59.2

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.
@@ -1,7 +1,7 @@
1
1
  declare class CollapsibleHeaderElement extends HTMLElement {
2
2
  arrowDown: HTMLElement;
3
3
  arrowUp: HTMLElement;
4
- description: HTMLElement;
4
+ description: HTMLElement | undefined;
5
5
  collapsed: string;
6
6
  private _collapsed;
7
7
  connectedCallback(): void;
@@ -29,19 +29,15 @@ let CollapsibleHeaderElement = class CollapsibleHeaderElement extends HTMLElemen
29
29
  }
30
30
  }
31
31
  hideAll() {
32
- this.arrowDown.classList.remove('d-none');
33
- this.arrowUp.classList.add('d-none');
34
- if (this.description !== undefined) {
35
- this.description.classList.add('d-none');
36
- }
32
+ this.arrowDown?.classList.remove('d-none');
33
+ this.arrowUp?.classList.add('d-none');
34
+ this.description?.classList.add('d-none');
37
35
  this.classList.add('CollapsibleHeader--collapsed');
38
36
  }
39
37
  expandAll() {
40
- this.arrowDown.classList.add('d-none');
41
- this.arrowUp.classList.remove('d-none');
42
- if (this.description !== undefined) {
43
- this.description.classList.remove('d-none');
44
- }
38
+ this.arrowDown?.classList.add('d-none');
39
+ this.arrowUp?.classList.remove('d-none');
40
+ this.description?.classList.remove('d-none');
45
41
  this.classList.remove('CollapsibleHeader--collapsed');
46
42
  }
47
43
  };
@@ -3,9 +3,8 @@
3
3
  module Primer
4
4
  module OpenProject
5
5
  module BorderBox
6
- # Add a general description of component here
7
- # Add additional usage considerations or best practices that may aid the user to use the component correctly.
8
- # @accessibility Add any accessibility considerations
6
+ # A component to be used inside Primer::Beta::BorderBox.
7
+ # It will toggle the visibility of the complete Box body
9
8
  class CollapsibleHeader < Primer::Component
10
9
  status :open_project
11
10
 
@@ -4,7 +4,7 @@ import {attr, controller, target} from '@github/catalyst'
4
4
  class CollapsibleHeaderElement extends HTMLElement {
5
5
  @target arrowDown: HTMLElement
6
6
  @target arrowUp: HTMLElement
7
- @target description: HTMLElement
7
+ @target description: HTMLElement | undefined
8
8
 
9
9
  @attr collapsed: string
10
10
  private _collapsed: boolean
@@ -33,23 +33,19 @@ class CollapsibleHeaderElement extends HTMLElement {
33
33
  }
34
34
 
35
35
  private hideAll() {
36
- this.arrowDown.classList.remove('d-none')
37
- this.arrowUp.classList.add('d-none')
36
+ this.arrowDown?.classList.remove('d-none')
37
+ this.arrowUp?.classList.add('d-none')
38
38
 
39
- if (this.description !== undefined) {
40
- this.description.classList.add('d-none')
41
- }
39
+ this.description?.classList.add('d-none')
42
40
 
43
41
  this.classList.add('CollapsibleHeader--collapsed')
44
42
  }
45
43
 
46
44
  private expandAll() {
47
- this.arrowDown.classList.add('d-none')
48
- this.arrowUp.classList.remove('d-none')
45
+ this.arrowDown?.classList.add('d-none')
46
+ this.arrowUp?.classList.remove('d-none')
49
47
 
50
- if (this.description !== undefined) {
51
- this.description.classList.remove('d-none')
52
- }
48
+ this.description?.classList.remove('d-none')
53
49
 
54
50
  this.classList.remove('CollapsibleHeader--collapsed')
55
51
  }
@@ -6,7 +6,7 @@ module Primer
6
6
  module VERSION
7
7
  MAJOR = 0
8
8
  MINOR = 59
9
- PATCH = 1
9
+ PATCH = 2
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
12
12
  end
@@ -17448,8 +17448,8 @@
17448
17448
  },
17449
17449
  {
17450
17450
  "fully_qualified_name": "Primer::OpenProject::BorderBox::CollapsibleHeader",
17451
- "description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.",
17452
- "accessibility_docs": "Add any accessibility considerations",
17451
+ "description": "A component to be used inside Primer::Beta::BorderBox.\nIt will toggle the visibility of the complete Box body",
17452
+ "accessibility_docs": null,
17453
17453
  "is_form_component": false,
17454
17454
  "is_published": true,
17455
17455
  "requires_js": false,
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.59.1
4
+ version: 0.59.2
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-03 00:00:00.000000000 Z
12
+ date: 2025-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview