@asd20/ui 3.2.522 → 3.2.523
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/package.json
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="menuContainer"
|
|
4
|
-
id="main-menu-list"
|
|
5
4
|
class="asd20-site-menu"
|
|
6
|
-
role="group"
|
|
7
5
|
@click="onBackgroundClick"
|
|
8
6
|
@focus="onFocus"
|
|
9
7
|
@blur="onBlur"
|
|
@@ -16,7 +14,7 @@
|
|
|
16
14
|
@keydown.tab.stop="dismiss"
|
|
17
15
|
tabindex="0"
|
|
18
16
|
>
|
|
19
|
-
|
|
17
|
+
<!-- <div
|
|
20
18
|
id="main-menu-list"
|
|
21
19
|
ref="menuContainer"
|
|
22
20
|
class="asd20-site-menu"
|
|
@@ -29,20 +27,23 @@
|
|
|
29
27
|
> -->
|
|
30
28
|
<focus-trap :active="active" :initial-focus="() => $refs.focused[0]">
|
|
31
29
|
<div class="asd20-site-menu__viewport">
|
|
32
|
-
<transition name="slide-right">
|
|
30
|
+
<transition name="slide-right" role="group">
|
|
33
31
|
<div
|
|
34
32
|
v-if="!activeSection"
|
|
35
|
-
|
|
33
|
+
id="main-menu-list"
|
|
36
34
|
class="asd20-table-of-contents"
|
|
35
|
+
tabindex="-1"
|
|
36
|
+
role="menubar"
|
|
37
37
|
>
|
|
38
38
|
<button
|
|
39
39
|
v-for="(section, index) in sections"
|
|
40
40
|
:key="index"
|
|
41
41
|
:id="`asd20-site-menu__section-${index}`"
|
|
42
42
|
class="asd20-table-of-contents__item"
|
|
43
|
+
role="menuitem"
|
|
43
44
|
ref="focused"
|
|
44
45
|
aria-expanded="false"
|
|
45
|
-
:aria-
|
|
46
|
+
:aria-controls="`asd20-site-menu__item-${index}`"
|
|
46
47
|
@click="activeSectionIndex = index"
|
|
47
48
|
@mouseup="keyboardTriggeredLastAction = false"
|
|
48
49
|
@keyup="keyboardTriggeredLastAction = true"
|
|
@@ -61,38 +62,44 @@
|
|
|
61
62
|
aria-hidden="true"
|
|
62
63
|
returnFocusOnDeactivate="true"
|
|
63
64
|
> -->
|
|
64
|
-
<div
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
<div
|
|
66
|
+
v-if="activeSection"
|
|
67
|
+
id="main-menu-list"
|
|
68
|
+
class="asd20-site-menu__section"
|
|
69
|
+
>
|
|
70
|
+
<!-- <div> -->
|
|
71
|
+
<button
|
|
72
|
+
class="asd20-site-menu__section__back"
|
|
73
|
+
aria-expanded="true"
|
|
74
|
+
role="menuitem"
|
|
75
|
+
@click="deactivateSection"
|
|
76
|
+
@mouseup="keyboardTriggeredLastAction = false"
|
|
77
|
+
@keyup="keyboardTriggeredLastAction = true"
|
|
78
|
+
>
|
|
79
|
+
<asd20-icon name="chevron" size="sm" />
|
|
80
|
+
<span class="title">{{ activeSection.title }}</span>
|
|
81
|
+
</button>
|
|
76
82
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
<div
|
|
84
|
+
:id="`asd20-site-menu__item-${activeSectionIndex}`"
|
|
85
|
+
class="asd20-site-menu__items"
|
|
86
|
+
role="group"
|
|
87
|
+
>
|
|
88
|
+
<a
|
|
89
|
+
v-for="(item, index) in activeSection.items"
|
|
90
|
+
:id="`asd20-site-menu__item-${activeSectionIndex}-${index}`"
|
|
91
|
+
:key="index"
|
|
92
|
+
role="menuitem"
|
|
93
|
+
class="asd20-site-menu__item"
|
|
94
|
+
:href="item.url"
|
|
95
|
+
:target="
|
|
96
|
+
!item.url || item.url.startsWith('/') ? undefined : '_blank'
|
|
97
|
+
"
|
|
98
|
+
>{{ item.title }}</a
|
|
80
99
|
>
|
|
81
|
-
<a
|
|
82
|
-
v-for="(item, index) in activeSection.items"
|
|
83
|
-
:id="`asd20-site-menu__item-${activeSectionIndex}-${index}`"
|
|
84
|
-
:key="index"
|
|
85
|
-
|
|
86
|
-
class="asd20-site-menu__item"
|
|
87
|
-
:href="item.url"
|
|
88
|
-
:target="
|
|
89
|
-
!item.url || item.url.startsWith('/') ? undefined : '_blank'
|
|
90
|
-
"
|
|
91
|
-
>{{ item.title }}</a
|
|
92
|
-
>
|
|
93
|
-
</div>
|
|
94
100
|
</div>
|
|
95
101
|
</div>
|
|
102
|
+
<!-- </div> -->
|
|
96
103
|
<!-- </focus-trap> -->
|
|
97
104
|
</transition>
|
|
98
105
|
</div>
|
|
@@ -104,7 +111,6 @@
|
|
|
104
111
|
import { setTimeout } from 'timers'
|
|
105
112
|
import { FocusTrap } from 'focus-trap-vue'
|
|
106
113
|
import Asd20Icon from '../../atoms/Asd20Icon'
|
|
107
|
-
|
|
108
114
|
export default {
|
|
109
115
|
name: 'Asd20SiteMenu',
|
|
110
116
|
components: { Asd20Icon, FocusTrap },
|
|
@@ -205,7 +211,6 @@ export default {
|
|
|
205
211
|
`asd20-site-menu__section-${this.focusedSectionIndex}`
|
|
206
212
|
)
|
|
207
213
|
let timeout = el ? 0 : 200
|
|
208
|
-
|
|
209
214
|
setTimeout(() => {
|
|
210
215
|
el = document.getElementById(
|
|
211
216
|
`asd20-site-menu__section-${this.focusedSectionIndex}`
|
|
@@ -238,7 +243,6 @@ export default {
|
|
|
238
243
|
<style lang="scss" scoped>
|
|
239
244
|
@import '../../../design/_variables.scss';
|
|
240
245
|
@import '../../../design/_mixins.scss';
|
|
241
|
-
|
|
242
246
|
.slide-right-enter-active,
|
|
243
247
|
.slide-right-leave-active {
|
|
244
248
|
transition: all asd20-speed(1) $anim-easing;
|
|
@@ -247,7 +251,6 @@ export default {
|
|
|
247
251
|
.slide-right-leave-to {
|
|
248
252
|
transform: translate3d(-100%, 0, 0);
|
|
249
253
|
}
|
|
250
|
-
|
|
251
254
|
.slide-left-enter-active,
|
|
252
255
|
.slide-left-leave-active {
|
|
253
256
|
transition: all asd20-speed(1) $anim-easing;
|
|
@@ -256,7 +259,6 @@ export default {
|
|
|
256
259
|
.slide-left-leave-to {
|
|
257
260
|
transform: translate3d(100%, 0, 0);
|
|
258
261
|
}
|
|
259
|
-
|
|
260
262
|
.asd20-site-menu {
|
|
261
263
|
position: fixed;
|
|
262
264
|
z-index: 300;
|
|
@@ -273,7 +275,6 @@ export default {
|
|
|
273
275
|
// outline: none;
|
|
274
276
|
}
|
|
275
277
|
}
|
|
276
|
-
|
|
277
278
|
.asd20-site-menu__viewport {
|
|
278
279
|
position: absolute;
|
|
279
280
|
left: 0;
|
|
@@ -285,7 +286,6 @@ export default {
|
|
|
285
286
|
overflow: auto;
|
|
286
287
|
// overflow-y: scroll !important;
|
|
287
288
|
}
|
|
288
|
-
|
|
289
289
|
.asd20-table-of-contents {
|
|
290
290
|
display: flex;
|
|
291
291
|
flex-grow: 1;
|
|
@@ -299,7 +299,6 @@ export default {
|
|
|
299
299
|
right: 0;
|
|
300
300
|
bottom: 0;
|
|
301
301
|
// box-shadow: 1px 10px 10px 0 rgba(0, 0, 0, 0.25);
|
|
302
|
-
|
|
303
302
|
&__item {
|
|
304
303
|
appearance: none;
|
|
305
304
|
border: none;
|
|
@@ -341,7 +340,6 @@ export default {
|
|
|
341
340
|
}
|
|
342
341
|
}
|
|
343
342
|
}
|
|
344
|
-
|
|
345
343
|
.asd20-site-menu__section {
|
|
346
344
|
display: flex;
|
|
347
345
|
flex-direction: column;
|
|
@@ -367,13 +365,11 @@ export default {
|
|
|
367
365
|
&:active {
|
|
368
366
|
background: rgba(0, 0, 0, 0.0625);
|
|
369
367
|
}
|
|
370
|
-
|
|
371
368
|
&:focus {
|
|
372
369
|
background: rgba(0, 0, 0, 0.0625);
|
|
373
370
|
// outline: none;
|
|
374
371
|
box-shadow: 0 0 0 5px var(--website-menu__link-color) inset;
|
|
375
372
|
}
|
|
376
|
-
|
|
377
373
|
.title {
|
|
378
374
|
color: var(--website-menu__title-color);
|
|
379
375
|
font-weight: 900;
|
|
@@ -387,12 +383,10 @@ export default {
|
|
|
387
383
|
// opacity: 0.5;
|
|
388
384
|
}
|
|
389
385
|
}
|
|
390
|
-
|
|
391
386
|
.asd20-site-menu__items {
|
|
392
387
|
overflow-y: scroll; /* has to be scroll, not auto */
|
|
393
388
|
// -webkit-overflow-scrolling: touch;
|
|
394
389
|
}
|
|
395
|
-
|
|
396
390
|
.asd20-site-menu__item {
|
|
397
391
|
display: flex;
|
|
398
392
|
justify-content: flex-start;
|
|
@@ -411,7 +405,6 @@ export default {
|
|
|
411
405
|
&:active {
|
|
412
406
|
background: var(--website-menu__hover-background-color);
|
|
413
407
|
}
|
|
414
|
-
|
|
415
408
|
&:last-child {
|
|
416
409
|
box-shadow: none;
|
|
417
410
|
}
|
|
@@ -423,7 +416,6 @@ export default {
|
|
|
423
416
|
}
|
|
424
417
|
// display: none;
|
|
425
418
|
}
|
|
426
|
-
|
|
427
419
|
@media (min-width: 768px) {
|
|
428
420
|
.asd20-site-menu__section {
|
|
429
421
|
flex-grow: 0.1;
|
|
@@ -437,7 +429,6 @@ export default {
|
|
|
437
429
|
}
|
|
438
430
|
}
|
|
439
431
|
}
|
|
440
|
-
|
|
441
432
|
@media (min-width: 1024px) {
|
|
442
433
|
.asd20-site-menu {
|
|
443
434
|
position: fixed;
|
|
@@ -451,7 +442,6 @@ export default {
|
|
|
451
442
|
display: flex;
|
|
452
443
|
flex-direction: column;
|
|
453
444
|
}
|
|
454
|
-
|
|
455
445
|
.asd20-site-menu__viewport {
|
|
456
446
|
position: absolute;
|
|
457
447
|
left: 0;
|
|
@@ -476,7 +466,6 @@ export default {
|
|
|
476
466
|
}
|
|
477
467
|
}
|
|
478
468
|
}
|
|
479
|
-
|
|
480
469
|
.asd20-site-menu__section {
|
|
481
470
|
&__back {
|
|
482
471
|
background: var(--website-menu__open-background-color, white);
|