@worksafevictoria/wcl7.5 1.13.0-beta.17 → 1.13.0-beta.18

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.13.0-beta.17",
3
+ "version": "1.13.0-beta.18",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,10 @@
21
21
  :img-alt="item.imageAlt"
22
22
  @click.prevent="handleClick(item.linkURL)"
23
23
  >
24
- <h4>{{ item.title }}</h4>
24
+ <span
25
+ :class="carousel-caption"
26
+ :aria-label="item.title ? item.title : 'No caption available'"
27
+ :style="item.title === null || item.title === '' ? 'height: 32px;' : null">{{ item.title }}</span>
25
28
  </BCarouselSlide>
26
29
  </BCarousel>
27
30
  </div>
@@ -30,6 +33,7 @@
30
33
  <script>
31
34
  import { BCarousel, BCarouselSlide } from "bootstrap-vue-next"
32
35
  import { isAbsoluteUrl, navigateToPath } from "../../../../lib/utility"
36
+ import { is } from "date-fns/locale";
33
37
 
34
38
  export default {
35
39
  name: "CarouselComponent",
@@ -118,17 +122,28 @@ methods: {
118
122
  position: relative;
119
123
  margin-bottom: 10px;
120
124
  }
125
+
126
+ .carousel-inner {
127
+ border-radius: 8px ;
128
+ }
121
129
  /* Introduced changes to make image responsive */
122
130
  .carousel img {
123
131
  object-fit: cover;
124
- max-height: 420px;
132
+ max-height: 392px;
133
+ height: auto;
125
134
  width: 100%;
126
135
  }
127
136
 
137
+ .carousel-indicators {
138
+ justify-content: end !important;
139
+ margin-right: 10px !important;
140
+ }
141
+
128
142
  .carousel-indicators button {
129
143
  width: 10px !important;
130
144
  height: 10px !important;
131
145
  border-radius: 50% !important;
146
+ background-color: yellow !important;
132
147
  }
133
148
 
134
149
  .carousel-indicators button:focus,
@@ -138,14 +153,24 @@ methods: {
138
153
  }
139
154
 
140
155
  .carousel-caption {
156
+ display: flex;
157
+ font-size: 24px;
158
+ font-weight: normal;
159
+ flex-direction: column;
160
+ align-items: flex-start;
161
+ text-align: left !important;
162
+ width: 100%;
141
163
  color: white;
142
- text-decoration: underline;
143
164
  background-color: black;
165
+ left: 0 !important;
166
+ right: 0 !important;
167
+ bottom: 0 !important;
168
+ padding: 1rem !important;
144
169
  }
145
170
 
146
171
  .carousel-control-next,
147
172
  .carousel-control-prev {
148
- bottom: 7rem;
173
+ bottom: 4rem;
149
174
  }
150
175
 
151
176
  .carousel-control-prev:focus,
@@ -158,9 +183,12 @@ methods: {
158
183
 
159
184
  .carousel-control-prev-icon,
160
185
  .carousel-control-next-icon {
161
- height: 50px !important;
162
- width: 50px !important;
163
- outline:none !important;
186
+ height: 60px !important;
187
+ width: 60px !important;
188
+ }
189
+
190
+ .carousel-item {
191
+ position: relative;
164
192
  }
165
193
 
166
194
  .carouselPara {
@@ -13,7 +13,7 @@
13
13
 
14
14
  <div class="homepage-header__content-wrapper">
15
15
  <container class="homepage-header__content-wrapper__content">
16
- <row>
16
+ <row id="header-row">
17
17
  <!-- changes made to bootstrap grid breakpoints -->
18
18
  <column
19
19
  class="homepage-header__content-wrapper__content-col col-12 col-md-7 col-lg-8 homepage-header__content-wrapper__content-col--split wcl-rich-text--ltr"
@@ -25,6 +25,7 @@
25
25
  />
26
26
  </column>
27
27
  <column
28
+ id="header-links"
28
29
  class="homepage-header__side col-12 col-md-5 col-lg-4"
29
30
  >
30
31
  <div>
@@ -33,8 +34,9 @@
33
34
  :key="i"
34
35
  class="iebtn"
35
36
  :url="link.path"
36
- type="dark"
37
37
  :stretch="true"
38
+ type="dark"
39
+
38
40
  >{{ link.text }}</cta-button
39
41
  >
40
42
  </div>
@@ -83,7 +85,35 @@ export default {
83
85
 
84
86
  data: () => ({
85
87
  earthIcon,
86
- })
88
+ }),
89
+ mounted() {
90
+ window.addEventListener('resize', this.setCarouselHeight)
91
+ this.setCarouselHeight()
92
+ },
93
+ beforeDestroy() {
94
+ window.removeEventListener('resize', this.setCarouselHeight)
95
+ },
96
+ methods: {
97
+ setCarouselHeight() {
98
+ this.$nextTick(() => {
99
+ const sideMenu = this.$el.querySelector('.homepage-header__side')
100
+ const carousel = this.$el.querySelector('.carousel')
101
+ const carouselItem = this.$el.querySelector('.carousel-item')
102
+
103
+ if (sideMenu && carousel && window.innerWidth >= 450 ) {
104
+ const menuHeight = sideMenu.offsetHeight
105
+ const newHeight = menuHeight - 16 // 16px padding adjustment
106
+ carousel.style.height = `${newHeight}px`
107
+ if (carouselItem) {
108
+ carouselItem.style.height = `${newHeight}px`
109
+ }
110
+ } else if (carousel) {
111
+ carousel.removeAttribute('style') // Reset to default styles
112
+ carouselItem.removeAttribute('style') // Reset to default styles
113
+ }
114
+ })
115
+ },
116
+ }
87
117
  }
88
118
  </script>
89
119
 
@@ -99,6 +129,8 @@ export default {
99
129
  border-bottom: none !important;
100
130
  height: auto;
101
131
  align-items: normal;
132
+ padding-top: 30px;
133
+ padding-bottom: 30px;
102
134
 
103
135
  :deep(.wysiwyg) {
104
136
  h1 {
@@ -171,7 +203,6 @@ export default {
171
203
  }
172
204
 
173
205
  &__search {
174
- margin-top: 10px;
175
206
  z-index: 1;
176
207
  width: auto;
177
208
  position: relative;
@@ -218,5 +249,4 @@ export default {
218
249
  }
219
250
  }
220
251
 
221
-
222
252
  </style>
@@ -506,7 +506,6 @@ export default {
506
506
  this.windowWidth = window.innerWidth;
507
507
  },
508
508
  firstLevelClick(item, ref) {
509
- // Reset screen to fix whitespace
510
509
  if (window && window.scrollTo && this.screen === "desktop") {
511
510
  window.scrollTo(0, 0);
512
511
  }
@@ -536,10 +535,8 @@ export default {
536
535
  this.isSecondLevelOpen === true &&
537
536
  selectedItem === previouslyOpenItem
538
537
  ) {
539
- selectedItem.classList.remove("isActiveParent");
540
- selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "false");
541
- this.isSecondLevelOpen = false;
542
- this.letBodyOverflow(true);
538
+ this.closeMegaMenu();
539
+
543
540
  }
544
541
  // If the link has no children then go to that page
545
542
  else if (!item.below) {
@@ -587,6 +584,7 @@ export default {
587
584
  }
588
585
  // If the menu is already open and the same item is clicked,
589
586
  // close it
587
+
590
588
  else if (
591
589
  item.below &&
592
590
  this.isThirdLevelOpen === true &&