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