@worksafevictoria/wcl7.5 1.9.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.
- package/.storybook/preview.js +1 -1
- package/package.json +1 -1
- package/src/assets/styles/generated-icons.scss +46 -46
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +39 -45
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +29 -32
- package/src/components/Common/CardGridItem/index.vue +8 -2
- package/src/components/Containers/Carousel/index.stories.js +6 -4
- package/src/components/Containers/Carousel/index.vue +131 -120
- package/src/components/Containers/HomepageHeader/index.stories.js +1 -1
- package/src/components/Containers/HomepageHeaderNew/index.stories.js +3 -15
- package/src/components/Containers/HomepageHeaderNew/index.vue +3 -7
- package/src/components/Global/AppFooter/index.vue +130 -137
- package/src/components/Global/AppHeader/ModalSearch/index.vue +7 -1
- package/src/components/Global/AppHeader/index.stories.js +2 -2
- package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +21 -17
- package/src/components/Global/AppHeaderNew/index.stories.js +2 -2
- package/src/components/Global/AppHeaderNew/index.vue +53 -24
- package/src/components/Global/AppHeaderNew/styles.scss +1 -4
- package/src/components/Global/BackToTop/index.vue +16 -16
- package/src/components/Global/ContrastMode/index.stories.js +1 -1
- package/src/components/Global/HeroHeader/index.vue +62 -73
- package/src/components/Global/SocialShare/index.vue +114 -129
- package/src/components/Global/Strip/index.vue +82 -70
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +22 -24
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +15 -15
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +74 -75
- package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +31 -39
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +104 -107
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +152 -120
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +127 -133
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +158 -128
- package/src/components/Paragraphs/Tabs/index.vue +4 -4
- package/src/components/Paragraphs/TabulatedData/index.vue +21 -20
- package/src/components/SubComponents/CtaButton/index.vue +47 -44
- package/src/components/SubComponents/Icon/README.md +2 -2
- package/src/components/SubComponents/Icon/example.js +1 -0
- package/src/components/SubComponents/Icon/index.stories.js +1 -1
- package/src/components/SubComponents/Icon/index.vue +47 -47
- package/src/components/SubComponents/ResourceGroup/cardbody.vue +49 -61
- package/src/components/SubComponents/Search/index.vue +4 -0
- package/src/components/SubComponents/VideoThumbnail/index.vue +8 -6
- package/src/mock/carousel-items.js +46 -81
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div :class="`${type}-strip ${themeColor} ${layout}`">
|
|
3
3
|
<b-alert
|
|
4
4
|
:class="`${type}-strip__inner`"
|
|
5
|
-
show
|
|
6
5
|
v-model="dismissibleAlert"
|
|
7
6
|
:dismissible="!mini"
|
|
7
|
+
show
|
|
8
8
|
:variant="`${type === 'alert' ? 'danger' : 'information'}`"
|
|
9
|
-
:dismiss-label="
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
@dismissed="handleDismissed()"
|
|
9
|
+
:dismiss-label="`Close ${type === 'alert' ? 'alert' : 'information'} message`"
|
|
10
|
+
@dismissed="handleDismissed"
|
|
13
11
|
>
|
|
14
12
|
<div
|
|
15
13
|
:role="mini ? 'link' : null"
|
|
@@ -20,116 +18,130 @@
|
|
|
20
18
|
@keypress.enter="mini ? handleClick() : false"
|
|
21
19
|
>
|
|
22
20
|
<div :class="`${type}-strip__icon`">
|
|
23
|
-
<img
|
|
24
|
-
|
|
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" />
|
|
25
27
|
</div>
|
|
26
28
|
<div
|
|
27
29
|
:class="{
|
|
28
30
|
[`${type}-strip__content`]: true,
|
|
29
31
|
[`${type}-strip__content--left`]: !rtl,
|
|
30
|
-
[`${type}-strip__content--right`]: rtl
|
|
32
|
+
[`${type}-strip__content--right`]: rtl,
|
|
31
33
|
}"
|
|
32
34
|
>
|
|
33
|
-
<
|
|
35
|
+
<h2
|
|
34
36
|
:class="{
|
|
35
37
|
[`${type}-strip__heading`]: true,
|
|
36
38
|
[`${type}-strip__heading--left`]: !rtl,
|
|
37
|
-
[`${type}-strip__heading--right`]: rtl
|
|
39
|
+
[`${type}-strip__heading--right`]: rtl,
|
|
38
40
|
}"
|
|
39
|
-
>{{ stripTitle }}</span
|
|
40
41
|
>
|
|
42
|
+
{{ stripTitle }}
|
|
43
|
+
</h2>
|
|
41
44
|
<rich-text :content="stripContent" :without-container="true" />
|
|
42
45
|
</div>
|
|
43
46
|
<img
|
|
44
47
|
v-if="mini"
|
|
45
48
|
height="16"
|
|
46
49
|
class="alert-strip__icon--caret"
|
|
47
|
-
alt=""
|
|
50
|
+
alt="alert icon"
|
|
48
51
|
:src="chevronIcon"
|
|
49
52
|
/>
|
|
50
53
|
</div>
|
|
51
54
|
</b-alert>
|
|
52
55
|
<div v-if="mini && type === 'alert'" class="alert-strip__link">
|
|
53
|
-
<nuxt-link
|
|
56
|
+
<nuxt-link to="/safety-alerts">All safety alerts</nuxt-link>
|
|
54
57
|
</div>
|
|
55
58
|
</div>
|
|
56
59
|
</template>
|
|
57
60
|
|
|
58
|
-
<script setup>
|
|
59
|
-
import { ref } from 'vue'
|
|
60
|
-
|
|
61
|
-
const dismissibleAlert = ref(true)
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
61
|
<script>
|
|
65
|
-
import exclamationIcon from
|
|
66
|
-
import arrowIcon from
|
|
67
|
-
import dismissIcon from
|
|
68
|
-
import infoIcon from
|
|
69
|
-
import chevronIcon from
|
|
70
|
-
import RichText from
|
|
71
|
-
import { BAlert } from
|
|
62
|
+
import exclamationIcon from "../../../assets/icons/Strip/Exclamation triangle fill.svg?url";
|
|
63
|
+
import arrowIcon from "../../../assets/icons/Strip/Arrow right.svg?url";
|
|
64
|
+
import dismissIcon from "../../../assets/icons/Strip/Dismiss.svg?url";
|
|
65
|
+
import infoIcon from "../../../assets/icons/Strip/Info circle fill.svg?url";
|
|
66
|
+
import chevronIcon from "../../../assets/icons/caret-right.svg?url";
|
|
67
|
+
import RichText from "../../Paragraphs/RichText/index.vue";
|
|
68
|
+
import { BAlert } from "bootstrap-vue-next";
|
|
72
69
|
|
|
73
70
|
export default {
|
|
74
|
-
name:
|
|
71
|
+
name: "Strip",
|
|
75
72
|
components: {
|
|
76
73
|
RichText,
|
|
77
|
-
BAlert
|
|
74
|
+
BAlert,
|
|
78
75
|
},
|
|
79
76
|
props: {
|
|
77
|
+
modelValue: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: true,
|
|
80
|
+
},
|
|
80
81
|
stripHeading: {
|
|
81
82
|
type: String,
|
|
82
|
-
default:
|
|
83
|
+
default: "",
|
|
83
84
|
},
|
|
84
85
|
stripContent: {
|
|
85
86
|
type: String,
|
|
86
|
-
default:
|
|
87
|
+
default: "",
|
|
87
88
|
},
|
|
88
89
|
url: {
|
|
89
90
|
type: String,
|
|
90
|
-
default:
|
|
91
|
+
default: "#",
|
|
91
92
|
},
|
|
92
93
|
type: {
|
|
93
94
|
type: String,
|
|
94
|
-
required: true
|
|
95
|
+
required: true,
|
|
95
96
|
},
|
|
96
97
|
mini: {
|
|
97
98
|
type: Boolean,
|
|
98
|
-
default: true
|
|
99
|
+
default: true,
|
|
99
100
|
},
|
|
100
101
|
rtl: {
|
|
101
102
|
type: Boolean,
|
|
102
|
-
default: false
|
|
103
|
-
}
|
|
103
|
+
default: false,
|
|
104
|
+
},
|
|
104
105
|
},
|
|
106
|
+
emits: ["update:modelValue", "dismissed"],
|
|
105
107
|
data() {
|
|
106
108
|
return {
|
|
107
|
-
|
|
109
|
+
dismissibleAlert: this.modelValue,
|
|
108
110
|
exclamationIcon,
|
|
109
111
|
arrowIcon,
|
|
110
112
|
dismissIcon,
|
|
111
113
|
infoIcon,
|
|
112
|
-
chevronIcon
|
|
113
|
-
}
|
|
114
|
+
chevronIcon,
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
watch: {
|
|
118
|
+
modelValue(val) {
|
|
119
|
+
this.dismissibleAlert = val;
|
|
120
|
+
},
|
|
121
|
+
dismissibleAlert(val) {
|
|
122
|
+
if (val !== this.modelValue) {
|
|
123
|
+
this.$emit("update:modelValue", val);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
114
126
|
},
|
|
115
127
|
computed: {
|
|
116
128
|
layout() {
|
|
117
|
-
return this.mini ?
|
|
129
|
+
return this.mini ? "mini" : "full";
|
|
118
130
|
},
|
|
119
131
|
themeColor() {
|
|
120
|
-
return this.type ===
|
|
132
|
+
return this.type === "alert" ? "red" : "blue";
|
|
121
133
|
},
|
|
122
134
|
stripTitle() {
|
|
123
|
-
if (this.mini && this.type ===
|
|
124
|
-
return
|
|
125
|
-
} else if (this.mini && this.type ===
|
|
126
|
-
return
|
|
135
|
+
if (this.mini && this.type === "alert") {
|
|
136
|
+
return "Safety alert";
|
|
137
|
+
} else if (this.mini && this.type === "notice") {
|
|
138
|
+
return "Information";
|
|
127
139
|
} else if (this.stripHeading) {
|
|
128
|
-
return this.stripHeading
|
|
140
|
+
return this.stripHeading;
|
|
129
141
|
} else {
|
|
130
|
-
return
|
|
142
|
+
return "";
|
|
131
143
|
}
|
|
132
|
-
}
|
|
144
|
+
},
|
|
133
145
|
},
|
|
134
146
|
methods: {
|
|
135
147
|
handleClick() {
|
|
@@ -138,38 +150,39 @@ export default {
|
|
|
138
150
|
label: this.stripContent,
|
|
139
151
|
link: this.mini ? this.url : false,
|
|
140
152
|
clickedOnPage: this.$route.path,
|
|
141
|
-
globalStrip: false
|
|
142
|
-
}
|
|
153
|
+
globalStrip: false,
|
|
154
|
+
};
|
|
143
155
|
if (this.$gtm) {
|
|
144
156
|
this.$gtm.push({
|
|
145
157
|
event: `custom.interaction.${this.type}.click`,
|
|
146
|
-
...attrs
|
|
147
|
-
})
|
|
158
|
+
...attrs,
|
|
159
|
+
});
|
|
148
160
|
}
|
|
149
|
-
this.$router.push(this.url)
|
|
161
|
+
this.$router.push(this.url);
|
|
150
162
|
},
|
|
151
163
|
handleDismissed() {
|
|
152
|
-
this
|
|
153
|
-
this.$emit(
|
|
164
|
+
this.$emit("update:modelValue", false);
|
|
165
|
+
this.$emit("dismissed");
|
|
154
166
|
|
|
155
167
|
if (this.$gtm) {
|
|
156
168
|
const attrs = {
|
|
157
169
|
group: this.type,
|
|
158
170
|
label: this.stripHeading,
|
|
159
171
|
clickedOnPage: this.$route.path,
|
|
160
|
-
globalStrip: false
|
|
161
|
-
}
|
|
172
|
+
globalStrip: false,
|
|
173
|
+
};
|
|
162
174
|
this.$gtm.push({
|
|
163
175
|
event: `custom.interaction.${this.type}.close`,
|
|
164
|
-
...attrs
|
|
165
|
-
})
|
|
176
|
+
...attrs,
|
|
177
|
+
});
|
|
166
178
|
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
170
182
|
</script>
|
|
183
|
+
|
|
171
184
|
<style lang="scss" scoped>
|
|
172
|
-
@import
|
|
185
|
+
@import "../../../includes/scss/all";
|
|
173
186
|
.red {
|
|
174
187
|
.alert-strip {
|
|
175
188
|
&__inner {
|
|
@@ -303,7 +316,7 @@ export default {
|
|
|
303
316
|
max-width: 794px;
|
|
304
317
|
}
|
|
305
318
|
|
|
306
|
-
@include mq(
|
|
319
|
+
@include mq("sm") {
|
|
307
320
|
flex-direction: column;
|
|
308
321
|
margin-right: 16px;
|
|
309
322
|
|
|
@@ -333,13 +346,12 @@ export default {
|
|
|
333
346
|
color: $black;
|
|
334
347
|
text-decoration: none;
|
|
335
348
|
}
|
|
336
|
-
a:hover {
|
|
337
|
-
|
|
338
|
-
|
|
349
|
+
a:hover {
|
|
350
|
+
text-decoration: underline;
|
|
351
|
+
}
|
|
339
352
|
a:focus {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
353
|
+
text-decoration: underline;
|
|
354
|
+
}
|
|
343
355
|
}
|
|
344
356
|
&__icon {
|
|
345
357
|
&--caret {
|
|
@@ -12,25 +12,23 @@
|
|
|
12
12
|
<a
|
|
13
13
|
:id="'accordion' + itemid"
|
|
14
14
|
role="button"
|
|
15
|
-
:aria-expanded="showAccordion
|
|
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
|
-
|
|
24
|
-
|
|
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
|
|
68
|
-
import CaretUp from
|
|
69
|
-
import RichText from
|
|
70
|
-
import Icon from
|
|
71
|
-
import { BCard, BCardBody } from
|
|
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:
|
|
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:
|
|
82
|
+
default: "Item",
|
|
85
83
|
},
|
|
86
84
|
preHeading: {
|
|
87
85
|
type: String,
|
|
88
|
-
default:
|
|
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:
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
68
|
-
import CaretUp from
|
|
69
|
-
import RichText from
|
|
70
|
-
import Icon from
|
|
71
|
-
import { BCard, BCardBody } from
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
134
|
+
@import "../../../../includes/scss/all";
|
|
135
135
|
.subcomponent--accordion-stepper {
|
|
136
136
|
.accordion-stepper {
|
|
137
137
|
border-radius: 6px;
|