@worksafevictoria/wcl7.5 1.9.0-beta.13 → 1.9.0-beta.15

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.9.0-beta.13",
3
+ "version": "1.9.0-beta.15",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,7 +16,7 @@ $app-menu-gold: #fecc56;
16
16
  $primary-color: $app-menu-gold;
17
17
  $app-menu-white: #ffffff;
18
18
  $app-menu-black: #191919;
19
- $app-menu-grey: lightgrey;
19
+ $app-menu-grey: #f2f2f2;
20
20
  $app-menu-green: #356041;
21
21
  $app-menu-border-color: rgba(255, 255, 255, 0.3);
22
22
  // $app-menu-border-color: $app-menu-black;
@@ -24,8 +24,10 @@ $app-menu-border-color: rgba(255, 255, 255, 0.3);
24
24
  $app-header-background-colour: $app-menu-grey !default;
25
25
  $app-header-text-colour: $app-menu-black !default;
26
26
  $app-header-hover: $app-menu-gold !default;
27
- $app-header-active: $app-menu-yellow !default;
27
+ $app-header-active: $app-menu-black !default;
28
28
  $app-subheader-text-colour: $app-menu-white !default;
29
+ $app-header-active-text-colour: $app-menu-white !default;
30
+
29
31
 
30
32
  @if ($primary-color == #478157) {
31
33
  $app-header-background-colour: $app-menu-green !global;
@@ -6,6 +6,7 @@
6
6
  >
7
7
  <!-- Top menu -->
8
8
  <div class="logo">
9
+ <!-- Logo -->
9
10
  <nuxt-link class="dark" to="/">
10
11
  <img
11
12
  :alt="
@@ -19,31 +20,34 @@
19
20
  />
20
21
  </nuxt-link>
21
22
  <span class="logo__nav">
22
- <table>
23
- <tbody>
24
- <tr>
23
+ <!-- Roles added for accessibility -->
24
+ <table role="presentation" >
25
+ <tbody role="presentation">
26
+ <tr role="presentation">
25
27
  <td>
28
+ <!-- Language link -->
26
29
  <nuxt-link
27
30
  to="/languages"
28
31
  @click.native="fireAnalytics('Choose your language', '/languages')"
29
32
  title="Language"
30
33
  >
31
34
  <span v-if="!topLevelIconsOnly">Choose your language </span>
32
- <img alt="Language Icon" width="20px" height="20px" :src=LanguageIcon />
35
+ <img alt="Language Icon" width="15px" height="15px" :src=LanguageIcon />
33
36
  </nuxt-link>
34
37
  </td>
35
38
  <td>
39
+ <!-- Contrast link -->
36
40
  <a href="javascript:void(0)" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
37
- <span v-if="!topLevelIconsOnly">Adjust contrast</span> <img alt="Contrast Icon" width="20px" height="20px" :src=ContrastIcon />
41
+ <span v-if="!topLevelIconsOnly">Adjust contrast</span> <img alt="Contrast Icon" width="15px" height="15px" :src=ContrastIcon />
38
42
  </a>
39
43
  <div
40
44
  ref="contrastChoices"
41
45
  class="flex-container"
42
46
  v-if="show"
43
47
  >
44
- <div class="contrast_slide--box-list">
48
+ <div class="flex-item contrast_slide--box-list">
45
49
  <div v-for="list in lists" :key="list.value">
46
- <label>
50
+ <label :class="{'last-radio': list.label==='Greyscale'}">
47
51
  <input
48
52
  type="radio"
49
53
  :name="list.name"
@@ -58,19 +62,21 @@
58
62
  </div>
59
63
  </td>
60
64
  <td>
65
+ <!-- Search link -->
61
66
  <nuxt-link
62
67
  class="cta-button cta-button--text-only cta-button--slim"
63
68
  to="/search"
64
69
  title="Search"
65
- ><span v-if="!topLevelButtonIconsOnly">Search &nbsp;</span> <img alt="Search Icon" width="20px" height="20px" :src=NavSearchIcon />
70
+ ><span v-if="!topLevelButtonIconsOnly">Search &nbsp;</span> <img alt="Search Icon" width="15px" height="15px" :src=NavSearchIcon />
66
71
  </nuxt-link>
67
72
  </td>
68
73
  <td>
74
+ <!-- Login link -->
69
75
  <nuxt-link
70
76
  class="cta-button cta-button--text-only cta-button--slim cta-button--dark-no-filter"
71
77
  to="/login"
72
78
  title="Login"
73
- ><span v-if="!topLevelButtonIconsOnly">Login &nbsp;</span><span><img alt="Login Icon" width="20px" height="20px" :src=LoginLeft /></span>
79
+ ><span v-if="!topLevelButtonIconsOnly">Login &nbsp;</span><span><img alt="Login Icon" width="15px" height="15px" :src=LoginLeft /></span>
74
80
  </nuxt-link>
75
81
  </td>
76
82
  </tr>
@@ -80,7 +86,8 @@
80
86
  </div>
81
87
  <!-- Bottom menu -->
82
88
  <div class="app-header__wrap" @keyup.esc="closeMegaMenu">
83
- <div class="app-header__close-button mobile-close">
89
+ <div class="app-header__close-button mobile-close">
90
+ <!-- Close Button -->
84
91
  <button
85
92
  v-if="
86
93
  (isMobileMenuOpen && screen === 'mobile' && !isSecondLevelOpen)
@@ -93,15 +100,7 @@
93
100
  Close menu
94
101
  </button>
95
102
  </div>
96
- <div
97
- v-if="
98
- (!isSecondLevelOpen && screen === 'desktop') ||
99
- (!isMobileMenuOpen && screen === 'mobile')
100
- "
101
- class="app-header__app-branding"
102
- >
103
-
104
- </div>
103
+ <!-- Bottom menu Items -->
105
104
  <nav
106
105
  v-if="isMobileMenuOpen || screen === 'desktop'"
107
106
  :class="{
@@ -151,6 +150,7 @@
151
150
  >
152
151
  <span>{{ firstLevelLink.title }}</span>
153
152
  </nuxt-link>
153
+ <!-- Sub-Menu 2nd Level -->
154
154
  <div v-if="isSecondLevelOpen" class="sub-nav-container">
155
155
  <div class="app-header__close-button">
156
156
  <button
@@ -187,6 +187,7 @@
187
187
  screen === 'mobile' && isSecondLevelOpen,
188
188
  }"
189
189
  >
190
+ <!-- Selected Title -->
190
191
  <div
191
192
  class="selected-title"
192
193
  :class="{ 'selected-title--chrome': isChrome }"
@@ -203,6 +204,7 @@
203
204
  </nuxt-link>
204
205
  <span v-else>{{ firstLevelLink.title }}</span>
205
206
  </div>
207
+ <!-- Selected Items -->
206
208
  <div class="selected-items">
207
209
  <ul v-if="firstLevelLink.below" class="sub-nav-group">
208
210
  <li
@@ -252,6 +254,7 @@
252
254
  >
253
255
  <span>{{ secondLevelLink.title }}</span>
254
256
  </nuxt-link>
257
+ <!-- Sub Menu - Third Level Menu -->
255
258
  <div v-if="isThirdLevelOpen" class="sub-nav">
256
259
  <div class="sub-nav__wrap">
257
260
  <div class="selected-title">
@@ -311,246 +314,20 @@
311
314
  </div>
312
315
  </div>
313
316
  </li>
314
-
315
- <!-- More action button in bottom menu -->
316
-
317
- <li class="nav-item" id="moreDesktop" v-if="screen === 'desktop' && this.moreList.length > 0">
318
- <a class="dark" role="button" @click="showMore = !showMore">
319
- <span>More</span>
320
- <caret-down class="caret-down" style="padding-top: 4px; height: 16px; width: 16px"/>
321
- </a>
322
- <div
323
- v-if="showMore"
324
- class="styled-scrollbar"
325
- >
326
- <div >
327
- <div class="sub-nav-container__innermore">
328
- <ul id="moreMenu">
329
- <li v-for="(firstLevelLink, parentIndex) in this.moreList"
330
- :key="firstLevelLink.key"
331
- :ref="`firstLevelMenuItemM-${parentIndex}`"
332
- class="nav-item more-menu"
333
- >
334
- <a
335
- v-if="firstLevelLink.below"
336
- class="dark"
337
- href
338
- role="button"
339
- aria-expanded="false"
340
- @click.prevent="firstLevelClick(firstLevelLink,`firstLevelMenuItemM-${parentIndex}`,)"
341
- @mouseover="mouseHover('firstLevelMenuItemM', parentIndex)"
342
- @mouseleave="mouseLeave('firstLevelMenuItemM', parentIndex)"
343
- @focusin="mouseHover('firstLevelMenuItemM', parentIndex)"
344
- @focusout="mouseLeave('firstLevelMenuItemM', parentIndex)"
345
- >
346
- <span>{{ firstLevelLink.title }}</span>
347
-
348
- <caret-right
349
- v-if="!isSecondLevelOpen && !isThirdLevelOpen"
350
- class="caret-right"
351
- />
352
- </a>
353
- <a
354
- v-else-if="!firstLevelLink.relative"
355
- :href="firstLevelLink.absolute"
356
- target="_blank"
357
- @click.native="showMore = !showMore"
358
- class="dark"
359
- >
360
- <span>{{ firstLevelLink.title }}</span>
361
-
362
- </a>
363
- <nuxt-link
364
- v-else
365
- class="dark"
366
- :to="firstLevelLink.relative"
367
- @click.native="showMore = !showMore; fireAnalytics(firstLevelLink.title, firstLevelLink.relative)"
368
- >
369
- <span>{{ firstLevelLink.title }}</span>
370
- <caret-right
371
- v-if="!isSecondLevelOpen && !isThirdLevelOpen"
372
- class="caret-right"
373
- />
374
- </nuxt-link>
375
- <div v-if="isSecondLevelOpen" class="sub-nav-container">
376
- <div class="app-header__close-button">
377
- <button
378
- v-if="screen === 'mobile'"
379
- ref="menuBackButton"
380
- class="dark"
381
- @click="mobileGoBack"
382
- @keydown.tab="submenuFocus"
383
- >
384
- <caret-left/>
385
- {{ isThirdLevelOpen ? firstLevelItemName : 'Main menu' }}
386
- </button>
387
- <button
388
- v-if="
389
- (isSecondLevelOpen && screen === 'desktop') ||
390
- (isMobileMenuOpen && screen === 'mobile')
391
- "
392
- ref="closeMenuButton"
393
- class="dark"
394
- @click="closeMegaMenu"
395
- >
396
- <img :alt="Close" width="12" height="12" :src="Close"/>
397
- Close menu
398
- </button>
399
- </div>
400
- <div
401
- class="sub-nav-container__inner"
402
- :class="{ 'styled-scrollbar': screen === 'desktop' }"
403
- >
404
- <div
405
- class="sub-nav-container__wrap"
406
- :class="{'styled-scrollbar': screen === 'mobile' && isSecondLevelOpen,}"
407
- >
408
- <div
409
- class="selected-title"
410
- :class="{ 'selected-title--chrome': isChrome }"
411
- >
412
- <nuxt-link
413
- v-if="firstLevelLink.relative"
414
- :ref="`secondLevelSelectedTitleM-${parentIndex}`"
415
- :to="firstLevelLink.relative"
416
- class="dark"
417
- @click.native="fireAnalytics(firstLevelLink.title, firstLevelLink.relative)"
418
- @keydown.tab.native="backBtnFocus($event)"
419
- >
420
- <span>{{ firstLevelLink.title }}</span>
421
- </nuxt-link>
422
- <span v-else>{{ firstLevelLink.title }}</span>
423
- </div>
424
- <div class="selected-items">
425
- <ul v-if="firstLevelLink.below" class="sub-nav-group">
426
- <li
427
- v-for="(
428
- secondLevelLink, secondIndex
429
- ) in firstLevelLink.below"
430
- :key="secondLevelLink.key"
431
- :ref="`secondLevelMenuItemM-${parentIndex}-${secondIndex}`"
432
- class="sub-nav-parent-item"
433
- >
434
- <a
435
- v-if="secondLevelLink.below"
436
- href
437
- class="dark"
438
- role="button"
439
- aria-expanded="false"
440
- @keydown.tab="searchFocus(secondIndex,firstLevelLink.below.length,$event,)"
441
- @click.prevent="secondLevelClick(secondLevelLink,`secondLevelMenuItemM-${parentIndex}-${secondIndex}`,)"
442
- @mouseover="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
443
- @mouseleave="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
444
- @focusin="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
445
- @focusout="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
446
- >
447
- <span>{{ secondLevelLink.title }}</span>
448
- <caret-right
449
- v-if="!(screen === 'mobile' && isThirdLevelOpen)"
450
- class="caret-right"
451
- />
452
- </a>
453
- <a
454
- v-else-if="!secondLevelLink.relative"
455
- :href="secondLevelLink.absolute"
456
- class="dark"
457
- >
458
- <span>{{ secondLevelLink.title }}</span>
459
- </a>
460
- <nuxt-link
461
- v-else
462
- class="dark"
463
- :to="secondLevelLink.relative"
464
- @keydown.tab.native="searchFocus( secondIndex,firstLevelLink.below.length,$event,)"
465
- @mouseover.native="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
466
- @mouseleave.native="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
467
- @focusin.native="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
468
- @focusout.native="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
469
- @click.native="fireAnalytics(secondLevelLink.title, secondLevelLink.relative)"
470
- >
471
- <span>{{ secondLevelLink.title }}</span>
472
- </nuxt-link>
473
- <div v-if="isThirdLevelOpen" class="sub-nav">
474
- <div class="sub-nav__wrap">
475
- <div class="selected-title">
476
- <nuxt-link
477
- v-if="secondLevelLink.relative"
478
- :ref="`secondLevelSelectedTitleM-${parentIndex}-${secondIndex}`"
479
- :to="secondLevelLink.relative"
480
- class="dark"
481
- @click.native="fireAnalytics(secondLevelLink.title, secondLevelLink.relative)"
482
- @keydown.tab.native="backBtnFocus($event)"
483
- >
484
- <span>{{ secondLevelLink.title }}</span>
485
- </nuxt-link>
486
- <span v-else>{{ secondLevelLink.title }}</span>
487
- </div>
488
- <div class="selected-sub-nav">
489
- <ul
490
- v-if="secondLevelLink.below"
491
- class="sub-nav-group"
492
- >
493
- <li
494
- v-for="(
495
- thirdLevelLink, thirdIndex
496
- ) in secondLevelLink.below"
497
- :key="thirdLevelLink.key"
498
- :ref="`thirdLevelMenuItemM-${parentIndex}-${secondIndex}-${thirdIndex}`"
499
- >
500
- <nuxt-link
501
- v-if="thirdLevelLink.relative"
502
- class="dark"
503
- :to="thirdLevelLink.relative"
504
- @keydown.tab.native="searchFocus(thirdIndex,secondLevelLink.below.length,$event,)"
505
- @mouseover.native="mouseHover('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
506
- @mouseleave.native="mouseLeave('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
507
- @focusin.native="mouseHover('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
508
- @focusout.native="mouseLeave('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
509
- @click.native="fireAnalytics(thirdLevelLink.title, thirdLevelLink.relative)"
510
- >
511
- <span>{{ thirdLevelLink.title }}</span>
512
- </nuxt-link>
513
- <a
514
- v-else
515
- class="dark"
516
- :href="thirdLevelLink.absolute"
517
- >
518
- <span>{{ thirdLevelLink.title }}</span>
519
- </a>
520
- </li>
521
- </ul>
522
- </div>
523
- </div>
524
- </div>
525
- </li>
526
- </ul>
527
- </div>
528
- </div>
529
- </div>
530
- </div>
531
- </li>
532
- </ul>
533
- </div>
534
- </div>
535
-
536
-
537
- </div>
538
- </li>
539
317
  <li v-if="isWorkWell && screen === 'desktop'" class="nav-item hide">
540
318
  <a href="#" class="dark" @focus="resetTab"></a>
541
319
  </li>
542
- </ul>
543
-
544
-
320
+ </ul>
545
321
  </nav>
322
+ <!-- Mobile Menu -->
546
323
  <div v-if="screen === 'mobile'" class="app-header__mobile-menu-container">
547
324
  <ul id="mobileitems">
548
325
  <li v-if="!isMobileMenuOpen">
549
- <a class="dark" role="button" @click.prevent="showMobileMenu">
550
- <span>Menu</span>
551
- <menu-icon class="menu-icon" />
552
- </a>
553
- </li>
326
+ <a class="dark" role="button" @click.prevent="showMobileMenu">
327
+ <span>Menu</span>
328
+ <menu-icon class="menu-icon" />
329
+ </a>
330
+ </li>
554
331
  </ul>
555
332
  </div>
556
333
  </div>
@@ -559,7 +336,7 @@
559
336
  </template>
560
337
 
561
338
  <script>
562
- import ModalSearch from './ModalSearch/index.vue'
339
+
563
340
  import Close from './../../../assets/icons/close.svg?url'
564
341
  import WorkSafeLogo from './../../../assets/icons/WSV-reversed.svg?url'
565
342
  import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url'
@@ -579,16 +356,11 @@ import { ref } from "vue";
579
356
  export default {
580
357
  setup() {
581
358
  const show = ref(false);
582
- const showMore = ref(false);
583
- const moreList = [];
584
359
  return {
585
360
  show,
586
- showMore,
587
- moreList
588
361
  };
589
362
  },
590
363
  components: {
591
- ModalSearch,
592
364
  Close,
593
365
  CaretRight,
594
366
  CaretDown,
@@ -705,14 +477,10 @@ export default {
705
477
  } else {
706
478
  this.topLevelButtonIconsOnly = false
707
479
  }
708
- this.updateMoreMenu(val)
709
480
  },
710
481
  },
711
482
  mounted() {
712
- this.$nextTick(() => {
713
- window.addEventListener('resize', this.updateMoreMenu())
714
- })
715
- this.updateMoreMenu()
483
+
716
484
  let selectedMode = document
717
485
  .getElementById('contrastStyle')
718
486
  ?.getAttribute('data-sel')
@@ -725,8 +493,7 @@ export default {
725
493
  window.removeEventListener('scroll', this.resetContrast)
726
494
  },
727
495
  destroyed() {
728
- window.removeEventListener('resize', this.screenWidth),
729
- window.removeEventListener('resize', this.updateMoreMenu)
496
+ window.removeEventListener('resize', this.screenWidth);
730
497
  },
731
498
  created() {
732
499
  if (typeof window !== 'undefined' && window) {
@@ -746,64 +513,29 @@ export default {
746
513
  screenWidth() {
747
514
  this.windowWidth = window.innerWidth;
748
515
  },
749
- updateMoreMenu(screenVal) {
750
- const nItems = document.getElementById('navitems')
751
- var scrollWidth = nItems?.scrollWidth
752
-
753
- if (scrollWidth > this.windowWidth) {
754
- scrollWidth = scrollWidth + this.addWidth
755
-
756
- while (scrollWidth > this.windowWidth) {
757
- if ( this.headerMenu.length > 1) { // check that there's more than one item in header
758
- var tempItem = this.headerMenu.pop()
759
- this.moreList.unshift(tempItem)
760
- scrollWidth = scrollWidth - tempItem.title.length
761
- } else {
762
- scrollWidth = this.windowWidth
763
- }
764
- }
765
- } else if ( this.moreList.length > 0 ) {
766
- let tempWidth = scrollWidth
767
- let ctr = 1
768
- while (ctr <= this.moreList.length) {
769
- var tempItem1 = this.moreList[0]
770
- tempWidth = tempWidth + tempItem1.title.length
771
- if (tempWidth > this.windoWidth) { //stop if newWidth would be greater than the windowWidth
772
- ctr = this.moreList.length
773
- } else { // move item fron dropdownArray to headerArray
774
- var tempItem2 = this.moreList.shift()
775
- this.headerMenu.push(tempItem2)
776
- scrollWidth = tempWidth
777
- }
778
- ctr++
779
- }
780
- }
781
- },
782
516
  firstLevelClick(item, ref) {
783
517
  // Reset screen to fix whitespace
784
- if (window && window.scrollTo && this.screen === 'desktop') {
785
- window.scrollTo(0, 0)
518
+ if (window && window.scrollTo && this.screen === "desktop") {
519
+ window.scrollTo(0, 0);
786
520
  }
787
521
 
788
- let selectedItem = this.$refs[ref][0]
789
- let previouslyOpenItem = this.getActiveParent()
522
+ let selectedItem = this.$refs[ref][0];
523
+ let previouslyOpenItem = this.getActiveParent();
790
524
 
791
525
  // Set this for mobile
792
- this.firstLevelItemName = item.title
793
- this.firstLevelItemRef = ref
794
-
526
+ this.firstLevelItemName = item.title;
527
+ this.firstLevelItemRef = ref;
528
+
795
529
  // Set the first item to the variable
796
530
  if (previouslyOpenItem.length) {
797
- previouslyOpenItem = previouslyOpenItem[0]
531
+ previouslyOpenItem = previouslyOpenItem[0];
798
532
  }
799
533
  // If the menu is not open, open it
800
534
  if (item.below && this.isSecondLevelOpen === false) {
801
- selectedItem.classList.add('isActiveParent')
802
- selectedItem
803
- .getElementsByTagName('a')[0]
804
- .setAttribute('aria-expanded', 'true')
805
- this.isSecondLevelOpen = true
806
- this.letBodyOverflow(false)
535
+ selectedItem.classList.add("isActiveParent");
536
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "true");
537
+ this.isSecondLevelOpen = true;
538
+ this.letBodyOverflow(false);
807
539
  }
808
540
  // If the menu is already open and the same item is clicked,
809
541
  // close it
@@ -812,33 +544,29 @@ export default {
812
544
  this.isSecondLevelOpen === true &&
813
545
  selectedItem === previouslyOpenItem
814
546
  ) {
815
- selectedItem.classList.remove('isActiveParent')
816
- selectedItem
817
- .getElementsByTagName('a')[0]
818
- .setAttribute('aria-expanded', 'false')
819
- this.isSecondLevelOpen = false
820
- this.letBodyOverflow(true)
547
+ selectedItem.classList.remove("isActiveParent");
548
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "false");
549
+ this.isSecondLevelOpen = false;
550
+ this.letBodyOverflow(true);
821
551
  }
822
552
  // If the link has no children then go to that page
823
553
  else if (!item.below) {
824
- if (item.relative !== '/') {
825
- this.$router.push(item.relative)
554
+ if (item.relative !== "/") {
555
+ this.$router.push(item.relative);
826
556
  }
827
557
  }
828
558
  // Otherwise just remove the existing open menu and add
829
559
  // the isActive class on the new selected item
830
560
  else {
831
- previouslyOpenItem.classList.remove('isActiveParent')
832
- selectedItem.classList.add('isActiveParent')
561
+ previouslyOpenItem.classList.remove("isActiveParent");
562
+ selectedItem.classList.add("isActiveParent");
833
563
  previouslyOpenItem
834
- .getElementsByTagName('a')[0]
835
- .setAttribute('aria-expanded', 'false')
836
- selectedItem
837
- .getElementsByTagName('a')[0]
838
- .setAttribute('aria-expanded', 'true')
564
+ .getElementsByTagName("a")[0]
565
+ .setAttribute("aria-expanded", "false");
566
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "true");
839
567
  }
840
- if (this.screen === 'mobile') {
841
- this.focusOnNext(selectedItem)
568
+ if (this.screen === "mobile") {
569
+ this.focusOnNext(selectedItem);
842
570
  }
843
571
  },
844
572
  secondLevelClick(item, ref) {
@@ -902,7 +630,6 @@ export default {
902
630
 
903
631
  this.isMobileMenuOpen = true
904
632
  this.letBodyOverflow(false)
905
- // this.showMore = false
906
633
  this.$nextTick(() => {
907
634
  this.$refs['firstLevelMenuItem-0'][0].firstElementChild.focus()
908
635
  })
@@ -1194,7 +921,8 @@ export default {
1194
921
  if (this.show) {
1195
922
  this.show = !this.show
1196
923
  }
1197
- }
924
+ },
925
+
1198
926
  },
1199
927
  }
1200
928
  </script>
@@ -4,7 +4,7 @@
4
4
  color: $app-menu-white;
5
5
  z-index: 27;
6
6
  position: relative;
7
- padding: 10px;
7
+ padding: 0px 10px;
8
8
  width: 100%;
9
9
  font-size: 14px;
10
10
 
@@ -14,7 +14,7 @@
14
14
  overflow-y: scroll;
15
15
  background: $app-header-background-colour;
16
16
  border-radius: 3px;
17
- height: 70px;
17
+ height: 44px;
18
18
  padding: 0px 15px;
19
19
  display: table;
20
20
  width: 100%;
@@ -29,12 +29,17 @@
29
29
  .isActiveParent {
30
30
  background-color: $app-header-active;
31
31
  border: $app-header-active;
32
+
32
33
 
33
34
  > a > span {
34
- // border-bottom: 3px solid $app-header-active;
35
35
  background-color: $app-header-active;
36
+ color: $app-header-active-text-colour;
36
37
  }
37
- }
38
+
39
+ :focus {
40
+ outline: none !important;
41
+ }
42
+ }
38
43
  .isActiveChild {
39
44
  > a {
40
45
  background: $app-header-active;
@@ -96,7 +101,7 @@
96
101
 
97
102
  li {
98
103
  display: inline;
99
- padding: 0;
104
+ padding: 12px;
100
105
  margin-right: 18px;
101
106
 
102
107
  @media screen and (max-width: 1065px) and (min-width: 981px) {
@@ -197,7 +202,7 @@
197
202
  display: none;
198
203
  position: fixed;
199
204
  background: $app-menu-black;
200
- top: 165px;
205
+ top: 128px;
201
206
  left: 10px;
202
207
  right: 10px;
203
208
  bottom: 10px;
@@ -208,18 +213,6 @@
208
213
  position: relative;
209
214
  }
210
215
 
211
- &__innermore {
212
- overflow-x: auto;
213
- height: max-content;
214
- left: 10px;
215
- right: 10px;
216
- top: 165px;
217
- position: fixed;
218
- padding-top: 15px !important;
219
- background-color: $app-menu-black !important;
220
- border-radius: 3px;
221
- }
222
-
223
216
  &__wrap {
224
217
  position: relative;
225
218
  margin: 0 auto;
@@ -249,9 +242,9 @@
249
242
 
250
243
  & > span {
251
244
  margin-right: 10px;
252
- @media screen and (max-width: 1010px) and (min-width: 981px) {
253
- margin-right: 5px;
254
- }
245
+ // @media screen and (max-width: 1010px) and (min-width: 981px) {
246
+ // margin-right: 5px;
247
+ // }
255
248
  }
256
249
  }
257
250
  }
@@ -335,21 +328,6 @@
335
328
  }
336
329
  }
337
330
 
338
- //
339
- // Search Container
340
- //
341
- .search-container {
342
- position: fixed;
343
- top: 0;
344
- left: 0;
345
- right: 0;
346
- background: $app-menu-white;
347
- color: $app-header-background-colour;
348
- bottom: 0;
349
- overflow-y: scroll;
350
- z-index: 1;
351
- }
352
-
353
331
  .styled-scrollbar {
354
332
  overflow-y: scroll;
355
333
  white-space: normal !important;
@@ -377,12 +355,6 @@
377
355
  }
378
356
  }
379
357
 
380
- .more-menu {
381
- height: 56px;
382
- vertical-align: middle;
383
- padding: 0px 10px !important;
384
- }
385
-
386
358
  .skip-link {
387
359
  @include visually-hidden;
388
360
  color: $app-menu-black;
@@ -420,10 +392,18 @@
420
392
  text-align: right;
421
393
  font-weight: bold;
422
394
  overflow-y:auto;
395
+
396
+ a:focus {
397
+ border: 1px solid #BABABA !important;
398
+ border-radius: 8px;
399
+ outline: none !important;
400
+ }
423
401
  }
402
+
424
403
  a {
425
404
  color: black;
426
405
  text-decoration: none;
406
+ padding: 10px;
427
407
 
428
408
  &.router-link-exact-active {
429
409
  span {
@@ -431,6 +411,7 @@
431
411
  }
432
412
  }
433
413
  }
414
+
434
415
  table {
435
416
  display: inline-block;
436
417
  }
@@ -587,7 +568,6 @@
587
568
  }
588
569
 
589
570
  &--box {
590
- // position: relative;
591
571
  display: none;
592
572
 
593
573
  &.clicked {
@@ -603,10 +583,17 @@
603
583
  text-align: left;
604
584
  position: fixed;
605
585
  z-index: 1000;
586
+
587
+ label {
588
+ margin-bottom: 5px !important;
589
+ }
590
+ .last-radio {
591
+ margin-bottom: 0 !important;
592
+ }
606
593
  }
607
594
  label {
608
595
  display: block;
609
- padding: 6px 0;
596
+ padding: 10px 0;
610
597
 
611
598
  input[type='radio'] {
612
599
  border: 2px solid #bebebe;
@@ -634,6 +621,23 @@
634
621
  }
635
622
  }
636
623
  }
637
- }
624
+ }
625
+ }
626
+ }
627
+
628
+ .flex-container {
629
+ margin-left: -5px;
630
+ }
631
+
632
+ .flex-item {
633
+ border: 1px solid;
634
+ border-color: #BABABA;
635
+ padding: 10px;
636
+ margin: 7px 5px 5px;
637
+ border-radius: 8px;
638
+
639
+ input[type="radio"] {
640
+ accent-color: black;
641
+ margin-right: 5px;
638
642
  }
639
643
  }
@@ -13,8 +13,8 @@
13
13
  :class="`paragraph--tabs ${workwell ? 'workwell' : ''}`"
14
14
  >
15
15
  <template v-slot:cardItem>
16
- <b-tabs v-model="tabIndex">
17
- <b-tab
16
+ <BTabs v-model:index="tabIndex" card>
17
+ <BTab
18
18
  v-for="(item, index) in items"
19
19
  :key="`${index}-${$.uid}`"
20
20
  :title="item.title"
@@ -24,8 +24,8 @@
24
24
  :content="item.content.value"
25
25
  :without-container="true"
26
26
  />
27
- </b-tab>
28
- </b-tabs>
27
+ </BTab>
28
+ </BTabs>
29
29
  </template>
30
30
  </card-grid>
31
31
  <container v-else class="pdf-tabs">
@@ -5,7 +5,7 @@
5
5
  :size="'content'"
6
6
  >
7
7
  <div :class="isFluid ? 'table-scrolled' : ''">
8
- <b-table
8
+ <BTable
9
9
  v-if="items"
10
10
  :items="items"
11
11
  :fields="fields"
@@ -46,20 +46,20 @@
46
46
  <template #cell()="data">
47
47
  <rich-text :content="data.value" />
48
48
  </template>
49
- </b-table>
49
+ </BTable>
50
50
  </div>
51
51
  </section-group>
52
52
  </template>
53
53
 
54
54
  <script>
55
- import SectionGroup from "./../../Containers/SectionGroup/index.vue";
56
- import RichText from "../../Paragraphs/RichText/index.vue";
57
- import { BTable } from "bootstrap-vue-next";
58
- import CaretUp from "./../../../assets/icons/caret-up.svg?url";
59
- import CaretDown from "./../../../assets/icons/caret-down.svg?url";
55
+ import SectionGroup from './../../Containers/SectionGroup/index.vue'
56
+ import RichText from '../../Paragraphs/RichText/index.vue'
57
+ import { BTable } from 'bootstrap-vue-next'
58
+ import CaretUp from './../../../assets/icons/caret-up.svg?url'
59
+ import CaretDown from './../../../assets/icons/caret-down.svg?url'
60
60
 
61
61
  export default {
62
- name: "TabulatedData",
62
+ name: 'TabulatedData',
63
63
  components: { SectionGroup, RichText, BTable },
64
64
  props: {
65
65
  items: {
@@ -80,7 +80,7 @@ export default {
80
80
  },
81
81
  caption: {
82
82
  type: String,
83
- default: "",
83
+ default: '',
84
84
  required: false,
85
85
  },
86
86
  sortBy: {
@@ -91,33 +91,33 @@ export default {
91
91
  },
92
92
  data() {
93
93
  return {
94
- newSortBy: this.sortBy ? [{ key: this.sortBy, order: "asc" }] : [],
94
+ newSortBy: this.sortBy ? [{ key: this.sortBy, order: 'asc' }] : [],
95
95
  //sortDesc: false,
96
96
  CaretUp,
97
97
  CaretDown,
98
- };
98
+ }
99
99
  },
100
100
  computed: {
101
101
  isFluid() {
102
- return this.isFixedWidth;
102
+ return this.isFixedWidth
103
103
  },
104
104
  },
105
105
  methods: {
106
106
  accessSort(fieldVar) {
107
- const currentSort = fieldVar.thAttr["aria-sort"];
108
- if (currentSort === "ascending") {
109
- this.newSortBy = [{ key: fieldVar.key, order: "desc" }];
107
+ const currentSort = fieldVar.thAttr['aria-sort']
108
+ if (currentSort === 'ascending') {
109
+ this.newSortBy = [{ key: fieldVar.key, order: 'desc' }]
110
110
  } else {
111
- this.newSortBy = [{ key: fieldVar.key, order: "asc" }];
111
+ this.newSortBy = [{ key: fieldVar.key, order: 'asc' }]
112
112
  }
113
113
  },
114
114
  },
115
- };
115
+ }
116
116
  </script>
117
117
 
118
118
  <style lang="scss">
119
119
  .paragraph--tabulated-data {
120
- @import "../../../includes/scss/all";
120
+ @import '../../../includes/scss/all';
121
121
 
122
122
  .section-group__block {
123
123
  margin-top: -32px;
@@ -17,15 +17,16 @@
17
17
  </div>
18
18
  </a>
19
19
  <!-- Modal -->
20
- <b-modal
21
- :id="`wcl-video-modal-${video.id}`"
20
+ <BModal
21
+ v-if="showModal"
22
22
  v-model="showModal"
23
+ :id="`wcl-video-modal-${video.id}`"
23
24
  scrollable
24
25
  class="wcl-video-modal__modal"
25
26
  no-footer
26
27
  size="xl"
27
28
  >
28
- <div class="wcl-video-modal__video" v-if="showModal">
29
+ <div class="wcl-video-modal__video">
29
30
  <video-media
30
31
  :media-title="video.mediaTitle"
31
32
  :media-description="video.mediaDescription"
@@ -38,23 +39,23 @@
38
39
  />
39
40
  </div>
40
41
  <template #footer><div></div></template>
41
- </b-modal>
42
+ </BModal>
42
43
  </div>
43
44
  </template>
44
45
 
45
46
  <script>
46
- import VideoMedia from "./../../Paragraphs/VideoPlayer/index.vue";
47
- import VideoPlay from "./../../../assets/icons/video-play.svg?url";
48
- import IconClose from "./../../../assets/icons/icon-close.svg?url";
49
- import { BModal } from "bootstrap-vue-next";
50
- import axios from "axios";
47
+ import VideoMedia from './../../Paragraphs/VideoPlayer/index.vue'
48
+ import VideoPlay from './../../../assets/icons/video-play.svg?url'
49
+ import IconClose from './../../../assets/icons/icon-close.svg?url'
50
+ import { BModal } from 'bootstrap-vue-next'
51
+ import axios from 'axios'
51
52
 
52
53
  export default {
53
- name: "VideoThumbnail",
54
+ name: 'VideoThumbnail',
54
55
  components: {
55
56
  VideoMedia,
56
57
  IconClose,
57
- "b-modal": BModal,
58
+ 'b-modal': BModal,
58
59
  },
59
60
  props: {
60
61
  video: {
@@ -67,42 +68,42 @@ export default {
67
68
  VideoPlay,
68
69
  IconClose,
69
70
  showModal: false,
70
- videoThumbnail: "",
71
- };
71
+ videoThumbnail: '',
72
+ }
72
73
  },
73
74
  mounted() {
74
- this.getVideoThumbnail();
75
+ this.getVideoThumbnail()
75
76
  },
76
77
  methods: {
77
78
  async getVideoThumbnail(url) {
78
79
  try {
79
- if (this.video.provider === "youtube") {
80
- this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/maxresdefault.jpg`;
81
- const response = await axios.head(this.videoThumbnail);
80
+ if (this.video.provider === 'youtube') {
81
+ this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/maxresdefault.jpg`
82
+ const response = await axios.head(this.videoThumbnail)
82
83
  if (response.status === 200) {
83
84
  } else {
84
- this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/hqdefault.jpg`;
85
+ this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/hqdefault.jpg`
85
86
  }
86
- } else if (this.video.provider === "vimeo") {
87
+ } else if (this.video.provider === 'vimeo') {
87
88
  let thumbnail = await axios.get(
88
- `https://vimeo.com/api/v2/video/${this.video.id}.json`
89
- );
89
+ `https://vimeo.com/api/v2/video/${this.video.id}.json`,
90
+ )
90
91
  if (thumbnail.data) {
91
- this.videoThumbnail = thumbnail.data[0].thumbnail_large;
92
+ this.videoThumbnail = thumbnail.data[0].thumbnail_large
92
93
  }
93
94
  }
94
95
  } catch (error) {
95
96
  if (error.response && error.response.status === 404) {
96
- this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/hqdefault.jpg`;
97
+ this.videoThumbnail = `https://i.ytimg.com/vi/${this.video.id}/hqdefault.jpg`
97
98
  } else {
98
99
  }
99
100
  }
100
101
  },
101
102
  },
102
- };
103
+ }
103
104
  </script>
104
105
  <style lang="scss" scoped>
105
- @import "../../../includes/scss/all";
106
+ @import '../../../includes/scss/all';
106
107
  // Outside wrapper style
107
108
  .wcl-video-thumbnail-wrapper {
108
109
  margin-bottom: 32px;
@@ -128,17 +129,17 @@ export default {
128
129
  left: 50%;
129
130
  //height: 68px;
130
131
  //width: 68px;
131
- @include fp("height", 65, 68);
132
- @include fp("width", 65, 68);
132
+ @include fp('height', 65, 68);
133
+ @include fp('width', 65, 68);
133
134
  -ms-transform: translate(-50%, -50%);
134
135
  transform: translate(-50%, -50%);
135
136
 
136
- @include mq("sm") {
137
+ @include mq('sm') {
137
138
  height: 80px;
138
139
  width: 80px;
139
140
  }
140
141
 
141
- @include mq("xs") {
142
+ @include mq('xs') {
142
143
  height: 64px;
143
144
  width: 64px;
144
145
  }
package/src/index.js CHANGED
@@ -7,7 +7,7 @@ import Subheader from './components/Containers/Subheader/index.vue'
7
7
  import SectionGroup from './components/Containers/SectionGroup/index.vue'
8
8
  import CarouselComponent from './components/Containers/Carousel/index.vue'
9
9
 
10
- import AppHeader from './components/Global/AppHeader/index.vue'
10
+ import AppHeader from './components/Global/AppHeaderNew/index.vue'
11
11
  import AppFooter from './components/Global/AppFooter/index.vue'
12
12
  import HeroHeader from './components/Global/HeroHeader/index.vue'
13
13
  import SocialShare from './components/Global/SocialShare/index.vue'