@1024pix/pix-ui 14.5.0 → 14.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v14.6.0 (27/06/2022)
4
+
5
+
6
+ ### :rocket: Amélioration
7
+ - [#225](https://github.com/1024pix/pix-ui/pull/225) [FEATURE] Rendre le contenu de PixCollapsible en lazy
8
+
9
+ ### :coffee: Autre
10
+ - [#167](https://github.com/1024pix/pix-ui/pull/167) Bump axios from 0.21.1 to 0.21.2
11
+
3
12
  ## v14.5.0 (22/06/2022)
4
13
 
5
14
 
@@ -24,6 +24,8 @@
24
24
  class="pix-collapsible__content
25
25
  {{if this.isUnCollapsed ' pix-collapsible__content--uncollapse'}}"
26
26
  >
27
- {{yield}}
27
+ {{#if this.isContentRendered}}
28
+ {{yield}}
29
+ {{/if}}
28
30
  </div>
29
31
  </div>
@@ -8,11 +8,16 @@ export default class PixCollapsible extends Component {
8
8
  contentId = 'pix-collapsible-' + guidFor(this);
9
9
 
10
10
  @tracked isCollapsed = true;
11
+ @tracked hasUnCollapsedOnce = false;
11
12
 
12
13
  get isUnCollapsed() {
13
14
  return !this.isCollapsed;
14
15
  }
15
16
 
17
+ get isContentRendered() {
18
+ return this.hasUnCollapsedOnce;
19
+ }
20
+
16
21
  get title() {
17
22
  if (!this.args.title || !this.args.title.trim()) {
18
23
  throw new Error('ERROR in PixCollapsible component, @title param is not provided');
@@ -23,5 +28,6 @@ export default class PixCollapsible extends Component {
23
28
  @action
24
29
  toggleCollapsible() {
25
30
  this.isCollapsed = !this.isCollapsed;
31
+ this.hasUnCollapsedOnce = true;
26
32
  }
27
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "14.5.0",
3
+ "version": "14.6.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"