@1024pix/pix-ui 20.0.1 → 20.1.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 +10 -0
- package/addon/components/pix-collapsible.hbs +11 -3
- package/addon/styles/_pix-block.scss +2 -3
- package/addon/styles/_pix-collapsible.scss +21 -6
- package/app/modifiers/trap-focus.js +1 -0
- package/app/stories/pix-collapsible.stories.js +17 -0
- package/app/stories/pix-collapsible.stories.mdx +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v20.1.0 (13/10/2022)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :rocket: Amélioration
|
|
7
|
+
- [#241](https://github.com/1024pix/pix-ui/pull/241) [FEATURE] PixCollapsible : Autoriser l'utilisation d'un Block Content pour le titre
|
|
8
|
+
|
|
9
|
+
### :bug: Correction
|
|
10
|
+
- [#264](https://github.com/1024pix/pix-ui/pull/264) [BUGFIX] Réparer l'ombre du compsant Pix Block.
|
|
11
|
+
- [#263](https://github.com/1024pix/pix-ui/pull/263) [BUGFIX] Permettre le scroll quand la modale est détruite
|
|
12
|
+
|
|
3
13
|
## v20.0.1 (11/10/2022)
|
|
4
14
|
|
|
5
15
|
|
|
@@ -8,14 +8,22 @@
|
|
|
8
8
|
aria-expanded={{if this.isUnCollapsed "true" "false"}}
|
|
9
9
|
...attributes
|
|
10
10
|
>
|
|
11
|
-
<span>
|
|
11
|
+
<span class="pix-collapsible-title__container">
|
|
12
12
|
{{#if @titleIcon}}
|
|
13
13
|
<FaIcon @icon={{@titleIcon}} class="pix-collapsible-title__icon" />
|
|
14
14
|
{{/if}}
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
{{#if (has-block "title")}}
|
|
17
|
+
{{yield to="title"}}
|
|
18
|
+
{{else}}
|
|
19
|
+
{{this.title}}
|
|
20
|
+
{{/if}}
|
|
16
21
|
</span>
|
|
17
22
|
|
|
18
|
-
<FaIcon
|
|
23
|
+
<FaIcon
|
|
24
|
+
@icon="{{if this.isCollapsed 'plus' 'minus'}}"
|
|
25
|
+
class="pix-collapsible-title__toggle-icon"
|
|
26
|
+
/>
|
|
19
27
|
</button>
|
|
20
28
|
|
|
21
29
|
<div
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
border-radius: 5px;
|
|
5
5
|
|
|
6
6
|
&--shadow-light {
|
|
7
|
-
box-shadow: 0px 4px 8px
|
|
7
|
+
box-shadow: 0px 4px 8px rgba($pix-neutral-110, 0.08);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&--shadow-heavy {
|
|
11
|
-
box-shadow:
|
|
12
|
-
0 7px 14px 0 rgba($pix-neutral-100, 0.1);
|
|
11
|
+
box-shadow: 0px 12px 24px rgba($pix-neutral-110, 0.08);
|
|
13
12
|
}
|
|
14
13
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
background-color: $pix-neutral-0;
|
|
13
13
|
|
|
14
14
|
&__title {
|
|
15
|
-
padding: 14px
|
|
15
|
+
padding: 14px 16px;
|
|
16
16
|
min-width: 100%;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
display: flex;
|
|
@@ -22,11 +22,7 @@
|
|
|
22
22
|
color: $pix-neutral-60;
|
|
23
23
|
font-size: 1rem;
|
|
24
24
|
font-weight: 500;
|
|
25
|
-
|
|
26
|
-
.pix-collapsible-title__icon {
|
|
27
|
-
color: $pix-neutral-45;
|
|
28
|
-
margin-right: 6px;
|
|
29
|
-
}
|
|
25
|
+
align-items: center;
|
|
30
26
|
|
|
31
27
|
&:hover {
|
|
32
28
|
background-color: $pix-neutral-10;
|
|
@@ -41,6 +37,25 @@
|
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
|
|
40
|
+
&-title {
|
|
41
|
+
|
|
42
|
+
&__container {
|
|
43
|
+
align-items: center;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__icon{
|
|
49
|
+
color: $pix-neutral-45;
|
|
50
|
+
margin-right: 6px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__toggle-icon{
|
|
54
|
+
color: $pix-neutral-45;
|
|
55
|
+
margin-left: 16px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
44
59
|
&__content {
|
|
45
60
|
padding: 16px 20px;
|
|
46
61
|
display: none;
|
|
@@ -13,6 +13,23 @@ export const collapsible = (args) => {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
export const collapsibleWithBlockTitle = (args) => {
|
|
17
|
+
return {
|
|
18
|
+
template: hbs`
|
|
19
|
+
<PixCollapsible
|
|
20
|
+
@titleIcon={{titleIcon}}>
|
|
21
|
+
<:title>
|
|
22
|
+
<span>Titre avec <em>contenu de type block</em></span>
|
|
23
|
+
</:title>
|
|
24
|
+
<:default>
|
|
25
|
+
<div>Contenu du PixCollapsible</div>
|
|
26
|
+
</:default>
|
|
27
|
+
</PixCollapsible>
|
|
28
|
+
`,
|
|
29
|
+
context: args,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
16
33
|
export const multipleCollapsible = (args) => {
|
|
17
34
|
return {
|
|
18
35
|
template: hbs`
|
|
@@ -20,6 +20,10 @@ Par défaut le contenu est masqué et cliquer sur le libellé permet de montrer
|
|
|
20
20
|
<Story name='PixCollapsible' story={stories.collapsible} height={150} />
|
|
21
21
|
</Canvas>
|
|
22
22
|
|
|
23
|
+
<Canvas>
|
|
24
|
+
<Story name='With block title' story={stories.collapsibleWithBlockTitle} height={150} />
|
|
25
|
+
</Canvas>
|
|
26
|
+
|
|
23
27
|
<Canvas>
|
|
24
28
|
<Story name='MultiplePixCollapsible' story={stories.multipleCollapsible} height={260} />
|
|
25
29
|
</Canvas>
|