@1024pix/pix-ui 49.1.0 → 49.2.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/addon/components/pix-navigation.hbs +22 -6
- package/addon/components/pix-navigation.js +33 -0
- package/addon/styles/_pix-app-layout.scss +7 -1
- package/addon/styles/_pix-navigation.scss +115 -11
- package/addon/styles/_pix-select-list.scss +3 -4
- package/addon/styles/_pix-structure-switcher.scss +36 -0
- package/package.json +1 -1
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
<aside
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<aside
|
|
2
|
+
...attributes
|
|
3
|
+
class="pix-navigation {{if this.navigationMenuOpened 'pix-navigation--opened'}}"
|
|
4
|
+
>
|
|
5
|
+
<header class="pix-navigation__brand">{{yield to="brand"}}
|
|
6
|
+
<div class="pix-navigation__burger-menu"><PixButton
|
|
7
|
+
aria-controls="{{this.navigationId}} {{this.footerId}}"
|
|
8
|
+
aria-expanded={{this.navigationMenuOpened}}
|
|
9
|
+
@iconBefore={{if this.navigationMenuOpened "close" "menu"}}
|
|
10
|
+
@triggerAction={{this.toggleNavigationMenu}}
|
|
11
|
+
>{{@menuLabel}}</PixButton>
|
|
12
|
+
</div>
|
|
13
|
+
</header>
|
|
14
|
+
<nav
|
|
15
|
+
class="pix-navigation__nav"
|
|
16
|
+
{{on "click" this.handleNavigationClick}}
|
|
17
|
+
aria-label={{@navigationAriaLabel}}
|
|
18
|
+
id={{this.navigationId}}
|
|
19
|
+
>
|
|
20
|
+
{{yield to="navElements"}}
|
|
21
|
+
</nav>
|
|
22
|
+
<footer class="pix-navigation__footer" id={{this.footerId}}>{{yield to="footer"}}</footer>
|
|
7
23
|
</aside>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { action } from '@ember/object';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { guidFor } from '@ember/object/internals';
|
|
5
|
+
|
|
6
|
+
export default class PixMNavigation extends Component {
|
|
7
|
+
constructor(...args) {
|
|
8
|
+
super(...args);
|
|
9
|
+
this._navigationId = 'navigation-' + guidFor(this);
|
|
10
|
+
}
|
|
11
|
+
@tracked
|
|
12
|
+
navigationMenuOpened = false;
|
|
13
|
+
|
|
14
|
+
@action
|
|
15
|
+
toggleNavigationMenu() {
|
|
16
|
+
this.navigationMenuOpened = !this.navigationMenuOpened;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@action
|
|
20
|
+
handleNavigationClick(event) {
|
|
21
|
+
if (event.target.nodeName === 'A') {
|
|
22
|
+
this.navigationMenuOpened = false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
get navigationId() {
|
|
27
|
+
return `${this._navigationId}-nav`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get footerId() {
|
|
31
|
+
return `${this._navigationId}-footer`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
.pix-app-layout {
|
|
2
|
+
--pix-navigation-width: 13.375rem;
|
|
3
|
+
|
|
2
4
|
display: grid;
|
|
3
|
-
grid-template-columns:
|
|
5
|
+
grid-template-columns: var(--pix-navigation-width) 1fr;
|
|
4
6
|
gap: var(--pix-spacing-6x);
|
|
5
7
|
padding: var(--pix-spacing-6x);
|
|
6
8
|
|
|
9
|
+
@include device-is('mobile') {
|
|
10
|
+
display: block
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
&--orga {
|
|
8
14
|
background-color: var(--pix-orga-50);
|
|
9
15
|
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
.pix-navigation {
|
|
2
|
+
--bg-color-focus: rgb(var(--pix-neutral-100-inline), 50%);
|
|
3
|
+
--bg-color-active: rgb(var(--pix-neutral-100-inline), 30%);
|
|
4
|
+
|
|
5
|
+
|
|
2
6
|
position: sticky;
|
|
3
7
|
bottom: var(--pix-spacing-6x);
|
|
8
|
+
z-index: 1;
|
|
4
9
|
display: flex;
|
|
5
10
|
flex-direction: column;
|
|
6
11
|
gap:var(--pix-spacing-6x);
|
|
7
12
|
align-items: center;
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
min-width: var(--pix-navigation-width);
|
|
15
|
+
height: auto;
|
|
10
16
|
min-height: calc(100vh - var(--pix-spacing-6x) * 2);
|
|
11
17
|
|
|
12
18
|
// using a margin top / bottom allow user to discover rapidly
|
|
@@ -17,14 +23,72 @@
|
|
|
17
23
|
background-color: var(--pix-navigation-color);
|
|
18
24
|
border-radius: var(--pix-spacing-6x);
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
|
|
27
|
+
@include device-is('mobile') {
|
|
28
|
+
position: static;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: stretch;
|
|
31
|
+
width: 100%;
|
|
32
|
+
min-height: auto;
|
|
33
|
+
padding: 0;
|
|
34
|
+
|
|
35
|
+
&--opened {
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
|
|
23
41
|
&__brand {
|
|
24
42
|
margin-bottom: 0;
|
|
25
43
|
padding:0;
|
|
26
44
|
line-height: 0;
|
|
27
45
|
|
|
46
|
+
img {
|
|
47
|
+
width: 132px;
|
|
48
|
+
height: 48px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include device-is('mobile') {
|
|
52
|
+
display:flex;
|
|
53
|
+
flex-direction: row;
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding: var(--pix-spacing-4x) var(--pix-spacing-2x) var(--pix-spacing-4x) var(--pix-spacing-10x);
|
|
56
|
+
|
|
57
|
+
img {
|
|
58
|
+
width: 85px;
|
|
59
|
+
height: 32px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.pix-navigation--opened & {
|
|
63
|
+
padding-bottom: 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__burger-menu {
|
|
69
|
+
display: none;
|
|
70
|
+
|
|
71
|
+
@include device-is('mobile') {
|
|
72
|
+
display: block;
|
|
73
|
+
margin-left:auto;
|
|
74
|
+
|
|
75
|
+
.pix-button {
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
|
|
78
|
+
&:focus, &:focus-visible {
|
|
79
|
+
background-color: rgb(var(--pix-neutral-800-inline), 20%);
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: rgb(var(--pix-neutral-800-inline), 20%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:active {
|
|
88
|
+
background-color: rgb(var(--pix-neutral-800-inline), 30%);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
28
92
|
}
|
|
29
93
|
|
|
30
94
|
&__nav {
|
|
@@ -32,6 +96,17 @@
|
|
|
32
96
|
flex-direction: column;
|
|
33
97
|
gap: var(--pix-spacing-2x);
|
|
34
98
|
align-self: stretch;
|
|
99
|
+
|
|
100
|
+
@include device-is('mobile') {
|
|
101
|
+
display: none;
|
|
102
|
+
padding: 0 var(--pix-spacing-6x);
|
|
103
|
+
|
|
104
|
+
.pix-navigation--opened & {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
35
110
|
}
|
|
36
111
|
|
|
37
112
|
&__footer {
|
|
@@ -39,30 +114,60 @@
|
|
|
39
114
|
flex-direction: column;
|
|
40
115
|
gap: var(--pix-spacing-2x);
|
|
41
116
|
margin-top: auto;
|
|
117
|
+
padding: 0;
|
|
42
118
|
text-align: center;
|
|
43
119
|
|
|
44
120
|
@extend %pix-body-s;
|
|
45
121
|
|
|
122
|
+
p {
|
|
123
|
+
word-break: break-all;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@include device-is('mobile') {
|
|
127
|
+
display: none;
|
|
128
|
+
|
|
129
|
+
.pix-navigation--opened & {
|
|
130
|
+
display: flex;
|
|
131
|
+
justify-content: stretch;
|
|
132
|
+
padding: 0 var(--pix-spacing-6x) var(--pix-spacing-4x);
|
|
133
|
+
|
|
134
|
+
&::before {
|
|
135
|
+
width: 80px;
|
|
136
|
+
margin: var(--pix-spacing-6x) auto;
|
|
137
|
+
border-top: 1px solid var(--pix-neutral-100);
|
|
138
|
+
content: "";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.pix-button {
|
|
144
|
+
width: 100%;
|
|
145
|
+
|
|
146
|
+
@include device-is('mobile') {
|
|
147
|
+
width: auto;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
46
151
|
& .pix-button--primary {
|
|
47
152
|
color: var(--pix-navigation-color);
|
|
48
153
|
background-color:var(--pix-navigation-text-color);
|
|
49
154
|
|
|
50
155
|
&:hover {
|
|
51
156
|
color: currentcolor;
|
|
52
|
-
background-color: var(--
|
|
157
|
+
background-color: var(--bg-color-focus);
|
|
53
158
|
fill: currentcolor;
|
|
54
159
|
}
|
|
55
160
|
|
|
56
161
|
&:focus,
|
|
57
162
|
&:focus-visible {
|
|
58
163
|
color: currentcolor;
|
|
59
|
-
background-color: var(--
|
|
164
|
+
background-color: var(--bg-color-focus);
|
|
60
165
|
outline-color: currentcolor;
|
|
61
166
|
}
|
|
62
167
|
|
|
63
168
|
&:active {
|
|
64
169
|
color: currentcolor;
|
|
65
|
-
background-color: var(--
|
|
170
|
+
background-color: var(--bg-color-active);
|
|
66
171
|
}
|
|
67
172
|
}
|
|
68
173
|
|
|
@@ -72,20 +177,20 @@
|
|
|
72
177
|
|
|
73
178
|
&:hover {
|
|
74
179
|
color: currentcolor;
|
|
75
|
-
background-color: var(--
|
|
180
|
+
background-color: var(--bg-color-focus);
|
|
76
181
|
fill: currentcolor;
|
|
77
182
|
}
|
|
78
183
|
|
|
79
184
|
&:focus,
|
|
80
185
|
&:focus-visible {
|
|
81
186
|
color: currentcolor;
|
|
82
|
-
background-color: var(--
|
|
187
|
+
background-color: var(--bg-color-focus);
|
|
83
188
|
outline-color: currentcolor;
|
|
84
189
|
}
|
|
85
190
|
|
|
86
191
|
&:active {
|
|
87
192
|
color: currentcolor;
|
|
88
|
-
background-color: var(--
|
|
193
|
+
background-color: var(--bg-color-active);
|
|
89
194
|
}
|
|
90
195
|
}
|
|
91
196
|
|
|
@@ -101,6 +206,5 @@
|
|
|
101
206
|
}
|
|
102
207
|
}
|
|
103
208
|
}
|
|
104
|
-
|
|
105
209
|
}
|
|
106
210
|
|
|
@@ -22,15 +22,14 @@
|
|
|
22
22
|
&__option {
|
|
23
23
|
@extend %pix-body-s;
|
|
24
24
|
|
|
25
|
-
&:nth-child(even) {
|
|
26
|
-
background-color: var(--pix-neutral-20);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
25
|
position: relative;
|
|
30
26
|
padding: var(--pix-spacing-2x) var(--pix-spacing-8x) var(--pix-spacing-2x) var(--pix-spacing-4x);
|
|
31
27
|
color: var(--pix-neutral-900);
|
|
32
28
|
border-radius: 8px;
|
|
33
29
|
|
|
30
|
+
&:nth-child(even) {
|
|
31
|
+
background-color: var(--pix-neutral-20);
|
|
32
|
+
}
|
|
34
33
|
|
|
35
34
|
&:hover,
|
|
36
35
|
&:focus {
|
|
@@ -9,8 +9,17 @@
|
|
|
9
9
|
--pix-structure-bg-hover: var(--pix-certif-50);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
@include device-is("mobile") {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
.pix-button {
|
|
13
17
|
width: 100%;
|
|
18
|
+
|
|
19
|
+
.pix-navigation--opened & {
|
|
20
|
+
width: auto;
|
|
21
|
+
margin:auto;
|
|
22
|
+
}
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
.pix-select__dropdown {
|
|
@@ -24,13 +33,32 @@
|
|
|
24
33
|
margin-left: var(--pix-spacing-6x) !important; // we need to override popperjs inline styles
|
|
25
34
|
overflow-y: auto;
|
|
26
35
|
border-radius: 8px;
|
|
36
|
+
|
|
37
|
+
@include device-is('mobile') {
|
|
38
|
+
position: static !important;
|
|
39
|
+
display: none;
|
|
40
|
+
width: 0; // force dropdown to resize to its parent
|
|
41
|
+
max-width: none;
|
|
42
|
+
max-height: none;
|
|
43
|
+
margin-left:0 !important;
|
|
44
|
+
overflow-y: visible;
|
|
45
|
+
transform: none !important;
|
|
46
|
+
transition: none;
|
|
47
|
+
|
|
48
|
+
.pix-navigation--opened &:not(.pix-select__dropdown--closed) {
|
|
49
|
+
display: block;
|
|
50
|
+
margin-top: var(--pix-spacing-4x) !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
27
53
|
}
|
|
28
54
|
|
|
29
55
|
.pix-select_list {
|
|
30
56
|
display: flex;
|
|
31
57
|
flex-direction: column;
|
|
32
58
|
gap: var(--pix-spacing-2x);
|
|
59
|
+
min-width: 100%;
|
|
33
60
|
padding: var(--pix-spacing-2x);
|
|
61
|
+
border-top: none;
|
|
34
62
|
}
|
|
35
63
|
|
|
36
64
|
.pix-select-list-category__option--hidden {
|
|
@@ -47,6 +75,10 @@
|
|
|
47
75
|
text-overflow: ellipsis;
|
|
48
76
|
border-radius: var(--border-radius-2x);
|
|
49
77
|
|
|
78
|
+
&:focus:not(.pix-select-list-category__option--selected ) {
|
|
79
|
+
background-color: var(--pix-structure-bg-hover);
|
|
80
|
+
}
|
|
81
|
+
|
|
50
82
|
&:hover {
|
|
51
83
|
background-color: var(--pix-structure-bg-hover);
|
|
52
84
|
}
|
|
@@ -60,5 +92,9 @@
|
|
|
60
92
|
&:hover {
|
|
61
93
|
background-color: var(--pix-navigation-color);
|
|
62
94
|
}
|
|
95
|
+
|
|
96
|
+
&:focus {
|
|
97
|
+
color: var(--pix-neutral-800)
|
|
98
|
+
}
|
|
63
99
|
}
|
|
64
100
|
}
|