@worksafevictoria/wcl7.5 1.10.0 → 1.11.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.
Files changed (39) hide show
  1. package/package.json +1 -1
  2. package/src/assets/styles/generated-icons.scss +46 -46
  3. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +39 -45
  4. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +1 -1
  5. package/src/components/Common/CardGridItem/index.vue +8 -2
  6. package/src/components/Containers/Carousel/index.stories.js +6 -4
  7. package/src/components/Containers/Carousel/index.vue +131 -120
  8. package/src/components/Containers/HomepageHeader/index.stories.js +1 -1
  9. package/src/components/Containers/HomepageHeaderNew/index.stories.js +3 -15
  10. package/src/components/Containers/HomepageHeaderNew/index.vue +3 -7
  11. package/src/components/Global/AppFooter/index.vue +130 -137
  12. package/src/components/Global/AppHeader/ModalSearch/index.vue +7 -1
  13. package/src/components/Global/AppHeader/index.stories.js +2 -2
  14. package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +21 -17
  15. package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
  16. package/src/components/Global/AppHeaderNew/index.vue +53 -24
  17. package/src/components/Global/BackToTop/index.vue +16 -16
  18. package/src/components/Global/ContrastMode/index.stories.js +1 -1
  19. package/src/components/Global/HeroHeader/index.vue +62 -73
  20. package/src/components/Global/SocialShare/index.vue +114 -129
  21. package/src/components/Global/Strip/index.vue +9 -5
  22. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +22 -24
  23. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
  24. package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
  25. package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
  26. package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
  27. package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +152 -120
  28. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
  29. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +158 -128
  30. package/src/components/Paragraphs/Tabs/index.vue +4 -4
  31. package/src/components/Paragraphs/TabulatedData/index.vue +21 -20
  32. package/src/components/SubComponents/CtaButton/index.vue +47 -44
  33. package/src/components/SubComponents/Icon/README.md +2 -2
  34. package/src/components/SubComponents/Icon/example.js +1 -0
  35. package/src/components/SubComponents/Icon/index.stories.js +1 -1
  36. package/src/components/SubComponents/Icon/index.vue +47 -47
  37. package/src/components/SubComponents/ResourceGroup/cardbody.vue +49 -61
  38. package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
  39. package/src/mock/carousel-items.js +46 -81
@@ -7,153 +7,138 @@
7
7
  <div class="social-share__wrap">
8
8
  <span class="social-share__header">Share</span>
9
9
  <div class="social-share__button-wrapper">
10
- <b-button
10
+ <a
11
11
  v-if="showEmail"
12
- tabindex="-1"
13
- variant="link"
14
- class="social-share__button"
12
+ :href="`mailto:?body=${url}`"
13
+ class="social-share__button social-share__anchor"
15
14
  >
16
15
  <div class="social-share__circle--black">
17
- <a
18
- tabindex="0"
19
- class="social-share__anchor"
20
- :href="`mailto:?body=${url}`"
21
- >
22
- <span class="visually-hidden">Email</span>
23
- <img
24
- role="presentation"
25
- class="social-share__img"
26
- :src="emailIcon"
27
- alt=""
28
- />
29
- </a></div
30
- ></b-button>
31
- <b-button
16
+ <span class="visually-hidden">Email</span>
17
+ <img
18
+ role="presentation"
19
+ class="social-share__img"
20
+ :src="emailIcon"
21
+ alt="social share email icon"
22
+ />
23
+ </div>
24
+ </a>
25
+
26
+ <a
32
27
  v-if="showFacebook"
33
- tabindex="-1"
34
- variant="link"
35
- class="social-share__button"
36
- ><div class="social-share__circle--black">
37
- <a
38
- tabindex="0"
39
- class="social-share__anchor"
40
- :href="`https://www.facebook.com/sharer.php?u=${url}`"
41
- target="_blank"
42
- >
43
- <span class="visually-hidden">Facebook</span>
44
- <img
45
- role="presentation"
46
- class="social-share__img"
47
- :src="facebookIcon"
48
- alt=""
49
- />
50
- </a></div
51
- ></b-button>
52
- <b-button
28
+ :href="`https://www.facebook.com/sharer.php?u=${url}`"
29
+ class="social-share__button social-share__anchor"
30
+ target="_blank"
31
+ >
32
+ <div class="social-share__circle--black">
33
+ <span class="visually-hidden">Facebook</span>
34
+ <img
35
+ role="presentation"
36
+ class="social-share__img"
37
+ :src="facebookIcon"
38
+ alt="social share facebook icon"
39
+ />
40
+ </div>
41
+ </a>
42
+
43
+ <a
53
44
  v-if="showTwitter"
54
- tabindex="-1"
55
- variant="link"
56
- class="social-share__button"
57
- ><div class="social-share__circle--black">
58
- <a
59
- tabindex="0"
60
- class="social-share__anchor"
61
- :href="`https://twitter.com/intent/tweet?url=${url}`"
62
- target="_blank"
63
- >
64
- <span class="visually-hidden">Twitter</span>
65
- <img
66
- role="presentation"
67
- class="social-share__img"
68
- :src="twitterIcon"
69
- alt=""
70
- />
71
- </a></div
72
- ></b-button>
45
+ :href="`https://twitter.com/intent/tweet?url=${url}`"
46
+ class="social-share__button social-share__anchor"
47
+ target="_blank"
48
+ >
49
+ <div class="social-share__circle--black">
50
+ <span class="visually-hidden">Twitter</span>
51
+ <img
52
+ role="presentation"
53
+ class="social-share__img"
54
+ :src="twitterIcon"
55
+ alt="social share twitter icon"
56
+ />
57
+ </div>
58
+ </a>
73
59
 
74
60
  <hr v-if="showPdf" class="social-share__hr" />
75
61
 
76
- <b-button
62
+ <a
77
63
  v-if="showPdf"
78
- tabindex="-1"
79
- variant="link"
64
+ href="#"
80
65
  class="social-share__button"
81
66
  @click.prevent="savePdf()"
82
- ><div class="social-share__circle--white">
83
- <a tabindex="0" class="social-share__anchor" href="#">
84
- <span class="visually-hidden">PDF</span>
85
- <img
86
- role="presentation"
87
- class="social-share__img-pdf"
88
- :src="officeFilePdfIcon"
89
- alt=""
90
- />
91
- </a></div
92
- ></b-button>
67
+ >
68
+ <div class="social-share__circle--white">
69
+ <span class="visually-hidden">PDF</span>
70
+ <img
71
+ role="presentation"
72
+ class="social-share__img-pdf"
73
+ :src="officeFilePdfIcon"
74
+ alt="social share pdf icon"
75
+ />
76
+ </div>
77
+ </a>
93
78
  </div>
94
79
  </div>
95
80
  </b-button-group>
96
81
  </template>
97
82
 
98
83
  <script>
99
- import emailIcon from '../../../assets/icons/SocialShare/email-white.svg?url'
100
- import facebookIcon from '../../../assets/icons/SocialShare/facebook-white.svg?url'
101
- import twitterIcon from '../../../assets/icons/SocialShare/x-icon-white.svg?url'
102
- import officeFilePdfIcon from '../../../assets/icons/SocialShare/office-file-pdf.svg?url'
103
- import { BButton, BButtonGroup } from 'bootstrap-vue-next'
84
+ import emailIcon from "../../../assets/icons/SocialShare/email-white.svg?url";
85
+ import facebookIcon from "../../../assets/icons/SocialShare/facebook-white.svg?url";
86
+ import twitterIcon from "../../../assets/icons/SocialShare/x-icon-white.svg?url";
87
+ import officeFilePdfIcon from "../../../assets/icons/SocialShare/office-file-pdf.svg?url";
88
+ import { BButton, BButtonGroup } from "bootstrap-vue-next";
104
89
 
105
90
  export default {
106
- name: 'SocialShare',
107
- components: { BButtonGroup, BButton },
108
- props: {
109
- rtl: {
110
- type: Boolean,
111
- default: false
112
- }
91
+ name: "SocialShare",
92
+ components: { BButtonGroup, BButton },
93
+ props: {
94
+ rtl: {
95
+ type: Boolean,
96
+ default: false,
113
97
  },
114
- data() {
115
- return {
116
- url: null,
117
- emailIcon,
118
- facebookIcon,
119
- twitterIcon,
120
- officeFilePdfIcon,
121
- mobileToggle: false,
122
- rightToggle: true
123
- };
98
+ },
99
+ data() {
100
+ return {
101
+ url: null,
102
+ emailIcon,
103
+ facebookIcon,
104
+ twitterIcon,
105
+ officeFilePdfIcon,
106
+ mobileToggle: false,
107
+ rightToggle: true,
108
+ };
109
+ },
110
+ computed: {
111
+ showFacebook() {
112
+ return true;
124
113
  },
125
- computed: {
126
- showFacebook() {
127
- return true;
128
- },
129
- showTwitter() {
130
- return true;
131
- },
132
- showEmail() {
133
- return true;
134
- },
135
- showPdf() {
136
- return this.$canPrint && this.$canPrint();
137
- }
114
+ showTwitter() {
115
+ return true;
138
116
  },
139
- mounted() {
140
- let winHref = window.location.href
141
- if (winHref.toLowerCase().includes("worksafe")) {
142
- this.url = window.location.href;
143
- }
117
+ showEmail() {
118
+ return true;
144
119
  },
145
- methods: {
146
- savePdf() {
147
- window.printOnLoad = true;
148
- let URL = `/pdf${window.location.pathname}`;
149
- window.open(URL);
150
- }
120
+ showPdf() {
121
+ return this.$canPrint && this.$canPrint();
122
+ },
123
+ },
124
+ mounted() {
125
+ let winHref = window.location.href;
126
+ if (winHref.toLowerCase().includes("worksafe")) {
127
+ this.url = window.location.href;
151
128
  }
152
- }
129
+ },
130
+ methods: {
131
+ savePdf() {
132
+ window.printOnLoad = true;
133
+ let URL = `/pdf${window.location.pathname}`;
134
+ window.open(URL);
135
+ },
136
+ },
137
+ };
153
138
  </script>
154
139
 
155
140
  <style lang="scss" scoped>
156
- @import '../../../includes/scss/all';
141
+ @import "../../../includes/scss/all";
157
142
 
158
143
  .social-share {
159
144
  background: $white;
@@ -167,7 +152,7 @@ export default {
167
152
  left: 0;
168
153
  z-index: 2;
169
154
 
170
- @include mq('sm') {
155
+ @include mq("sm") {
171
156
  position: relative;
172
157
  top: auto;
173
158
  left: auto;
@@ -179,7 +164,7 @@ export default {
179
164
  &__header {
180
165
  font-size: 14px;
181
166
  line-height: 50px;
182
- @include mq('sm') {
167
+ @include mq("sm") {
183
168
  line-height: 40px;
184
169
  }
185
170
  }
@@ -191,7 +176,7 @@ export default {
191
176
  align-content: center;
192
177
  margin: auto;
193
178
 
194
- @include mq('sm') {
179
+ @include mq("sm") {
195
180
  display: block;
196
181
  margin: 0;
197
182
  flex-direction: unset;
@@ -226,7 +211,7 @@ export default {
226
211
  left: 0px;
227
212
  position: relative;
228
213
 
229
- @include mq('sm') {
214
+ @include mq("sm") {
230
215
  display: none;
231
216
  }
232
217
  }
@@ -238,10 +223,10 @@ export default {
238
223
  border: 0;
239
224
  margin-bottom: 8px;
240
225
 
241
- @include mq('sm') {
226
+ @include mq("sm") {
242
227
  margin-right: 8px;
243
228
  }
244
- @include mq('xs') {
229
+ @include mq("xs") {
245
230
  margin-bottom: 0px;
246
231
  }
247
232
  a {
@@ -264,7 +249,7 @@ export default {
264
249
 
265
250
  &__vr {
266
251
  border: 0;
267
- @include mq('sm') {
252
+ @include mq("sm") {
268
253
  border-left: 2px solid $lightgray;
269
254
  margin-left: 12px;
270
255
  }
@@ -289,7 +274,7 @@ export default {
289
274
  }
290
275
  }
291
276
  }
292
- @include mq('sm') {
277
+ @include mq("sm") {
293
278
  .fixed {
294
279
  position: fixed;
295
280
  bottom: 0;
@@ -312,7 +297,7 @@ export default {
312
297
  left: inherit;
313
298
  right: 0;
314
299
 
315
- @include mq('sm') {
300
+ @include mq("sm") {
316
301
  border-radius: 0;
317
302
  }
318
303
  }
@@ -18,8 +18,12 @@
18
18
  @keypress.enter="mini ? handleClick() : false"
19
19
  >
20
20
  <div :class="`${type}-strip__icon`">
21
- <img v-if="type === 'alert'" :src="exclamationIcon" alt="" />
22
- <img v-else :src="infoIcon" alt="" />
21
+ <img
22
+ v-if="type === 'alert'"
23
+ :src="exclamationIcon"
24
+ alt="alert exclamation icon"
25
+ />
26
+ <img v-else :src="infoIcon" alt="alert information icon" />
23
27
  </div>
24
28
  <div
25
29
  :class="{
@@ -28,7 +32,7 @@
28
32
  [`${type}-strip__content--right`]: rtl,
29
33
  }"
30
34
  >
31
- <span
35
+ <h2
32
36
  :class="{
33
37
  [`${type}-strip__heading`]: true,
34
38
  [`${type}-strip__heading--left`]: !rtl,
@@ -36,14 +40,14 @@
36
40
  }"
37
41
  >
38
42
  {{ stripTitle }}
39
- </span>
43
+ </h2>
40
44
  <rich-text :content="stripContent" :without-container="true" />
41
45
  </div>
42
46
  <img
43
47
  v-if="mini"
44
48
  height="16"
45
49
  class="alert-strip__icon--caret"
46
- alt=""
50
+ alt="alert icon"
47
51
  :src="chevronIcon"
48
52
  />
49
53
  </div>
@@ -12,25 +12,23 @@
12
12
  <a
13
13
  :id="'accordion' + itemid"
14
14
  role="button"
15
- :aria-expanded="showAccordion ? 'true' : 'false'"
15
+ :aria-expanded="showAccordion"
16
16
  class="accordion-item__title"
17
17
  :aria-controls="'sect' + itemid"
18
18
  tabindex="0"
19
19
  @click.prevent="toggleAccordion"
20
20
  @keypress.enter="toggleAccordion"
21
21
  >
22
- <span
23
- v-if="preHeading && showPreHeading"
24
- class="accordion-item__pre-heading"
25
- >{{ preHeading }}</span
26
- >
22
+ <span v-if="preHeading && showPreHeading" class="accordion-item__pre-heading">{{
23
+ preHeading
24
+ }}</span>
27
25
  <rich-text :tag="'h4'" :tag-class="'card-title'" :content="title" />
28
26
  <icon
29
27
  v-show="showAccordion && content"
30
28
  width="18"
31
29
  height="12"
32
30
  class="accordion-icon"
33
- :icon-alt="'collapse'"
31
+ :icon-alt="'collapse icon'"
34
32
  :glyph="CaretUp"
35
33
  :class="{
36
34
  '--with-pre-heading': preHeading && showPreHeading,
@@ -41,7 +39,7 @@
41
39
  width="18"
42
40
  height="12"
43
41
  class="accordion-icon"
44
- :icon-alt="'expand'"
42
+ :icon-alt="'expand icon'"
45
43
  :glyph="CaretDown"
46
44
  :class="{
47
45
  '--with-pre-heading': preHeading && showPreHeading,
@@ -64,14 +62,14 @@
64
62
  </template>
65
63
 
66
64
  <script>
67
- import CaretDown from '../../../../assets/icons/caret-down.svg?url'
68
- import CaretUp from '../../../../assets/icons/caret-up.svg?url'
69
- import RichText from '../../RichText/index.vue'
70
- import Icon from '../../../SubComponents/Icon/index.vue'
71
- import { BCard, BCardBody } from 'bootstrap-vue-next'
65
+ import CaretDown from "../../../../assets/icons/caret-down.svg?url";
66
+ import CaretUp from "../../../../assets/icons/caret-up.svg?url";
67
+ import RichText from "../../RichText/index.vue";
68
+ import Icon from "../../../SubComponents/Icon/index.vue";
69
+ import { BCard, BCardBody } from "bootstrap-vue-next";
72
70
 
73
71
  export default {
74
- name: 'AccordionItem',
72
+ name: "AccordionItem",
75
73
  components: {
76
74
  RichText,
77
75
  Icon,
@@ -81,11 +79,11 @@ export default {
81
79
  props: {
82
80
  title: {
83
81
  type: String,
84
- default: 'Item',
82
+ default: "Item",
85
83
  },
86
84
  preHeading: {
87
85
  type: String,
88
- default: 'PRE-HEADING',
86
+ default: "PRE-HEADING",
89
87
  },
90
88
  content: {
91
89
  type: String,
@@ -109,7 +107,7 @@ export default {
109
107
  },
110
108
  itemid: {
111
109
  type: String,
112
- default: 'Item',
110
+ default: "Item",
113
111
  },
114
112
  },
115
113
  data: () => ({
@@ -119,28 +117,28 @@ export default {
119
117
  }),
120
118
  mounted() {
121
119
  this.$nextTick(() => {
122
- this.showAccordion = this.open
123
- })
120
+ this.showAccordion = this.open;
121
+ });
124
122
  },
125
123
  methods: {
126
124
  toggleAccordion() {
127
- this.showAccordion = !this.showAccordion
125
+ this.showAccordion = !this.showAccordion;
128
126
  if (this.showAccordion) {
129
127
  if (this.$bus) {
130
- this.$bus.$emit('accordionItemOpen', this.meta) // this.$root.$emit('accordionItemOpen', this.meta)
128
+ this.$bus.$emit("accordionItemOpen", this.meta); // this.$root.$emit('accordionItemOpen', this.meta)
131
129
  }
132
130
  } else {
133
131
  if (this.$bus) {
134
- this.$bus.$emit('accordionItemClose', this.meta) // this.$root.$emit('accordionItemClose', this.meta)
132
+ this.$bus.$emit("accordionItemClose", this.meta); // this.$root.$emit('accordionItemClose', this.meta)
135
133
  }
136
134
  }
137
135
  },
138
136
  },
139
- }
137
+ };
140
138
  </script>
141
139
 
142
140
  <style lang="scss">
143
- @import '../../../../includes/scss/all';
141
+ @import "../../../../includes/scss/all";
144
142
  .subcomponent--accordion-item {
145
143
  .accordion-item {
146
144
  border-radius: 6px;
@@ -34,7 +34,7 @@
34
34
  width="18"
35
35
  height="12"
36
36
  class="stepper-icon"
37
- :icon-alt="'collapse'"
37
+ :icon-alt="'collapse icon'"
38
38
  :glyph="CaretUp"
39
39
  />
40
40
  <icon
@@ -42,7 +42,7 @@
42
42
  width="18"
43
43
  height="12"
44
44
  class="stepper-icon"
45
- :icon-alt="'expand'"
45
+ :icon-alt="'expand icon'"
46
46
  :glyph="CaretDown"
47
47
  />
48
48
  </div>
@@ -64,14 +64,14 @@
64
64
  </template>
65
65
 
66
66
  <script>
67
- import CaretDown from '../../../../assets/icons/caret-down.svg?url'
68
- import CaretUp from '../../../../assets/icons/caret-up.svg?url'
69
- import RichText from '../../RichText/index.vue'
70
- import Icon from '../../../SubComponents/Icon/index.vue'
71
- import { BCard, BCardBody } from 'bootstrap-vue-next'
67
+ import CaretDown from "../../../../assets/icons/caret-down.svg?url";
68
+ import CaretUp from "../../../../assets/icons/caret-up.svg?url";
69
+ import RichText from "../../RichText/index.vue";
70
+ import Icon from "../../../SubComponents/Icon/index.vue";
71
+ import { BCard, BCardBody } from "bootstrap-vue-next";
72
72
 
73
73
  export default {
74
- name: 'StepperItem',
74
+ name: "StepperItem",
75
75
  components: {
76
76
  RichText,
77
77
  Icon,
@@ -81,7 +81,7 @@ export default {
81
81
  props: {
82
82
  title: {
83
83
  type: String,
84
- default: 'Item',
84
+ default: "Item",
85
85
  },
86
86
  content: {
87
87
  type: String,
@@ -109,7 +109,7 @@ export default {
109
109
  },
110
110
  itemid: {
111
111
  type: String,
112
- default: 'Item',
112
+ default: "Item",
113
113
  },
114
114
  },
115
115
  data: () => ({
@@ -119,19 +119,19 @@ export default {
119
119
  }),
120
120
  mounted() {
121
121
  this.$nextTick(() => {
122
- this.showAccordion = this.open
123
- })
122
+ this.showAccordion = this.open;
123
+ });
124
124
  },
125
125
  methods: {
126
126
  toggleAccordion() {
127
- this.showAccordion = !this.showAccordion
127
+ this.showAccordion = !this.showAccordion;
128
128
  },
129
129
  },
130
- }
130
+ };
131
131
  </script>
132
132
 
133
133
  <style lang="scss">
134
- @import '../../../../includes/scss/all';
134
+ @import "../../../../includes/scss/all";
135
135
  .subcomponent--accordion-stepper {
136
136
  .accordion-stepper {
137
137
  border-radius: 6px;