@worksafevictoria/wcl7.5 1.14.0 → 1.15.0-beta.1
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 +1 -1
- package/src/assets/icons/Mental-injury.svg +40 -0
- package/src/assets/icons/Physical-injury.svg +11 -0
- package/src/assets/icons/icon-view-off.svg +1 -0
- package/src/assets/icons/other.svg +19 -0
- package/src/components/Containers/SectionGroup/index.vue +23 -23
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +3 -30
- package/src/components/Paragraphs/Directory/Records/PRS/recordContent.vue +11 -0
- package/src/components/Paragraphs/RTWPlanner/Home/index.vue +83 -0
- package/src/components/Paragraphs/RTWPlanner/NavBar/index.vue +44 -0
- package/src/components/Paragraphs/RTWPlanner/Planners/PlanTasks.vue +169 -0
- package/src/components/Paragraphs/RTWPlanner/Planners/index.vue +239 -0
- package/src/components/Paragraphs/RTWPlanner/icons/ChevRightIcon.vue +16 -0
- package/src/components/Paragraphs/RTWPlanner/icons/DeleteIcon.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/icons/MentalInjury.vue +42 -0
- package/src/components/Paragraphs/RTWPlanner/icons/NotepadIcon.vue +95 -0
- package/src/components/Paragraphs/RTWPlanner/icons/OtherInjury.vue +20 -0
- package/src/components/Paragraphs/RTWPlanner/icons/PhysicalInjury.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/icons/PlusCircleIcon.vue +36 -0
- package/src/components/Paragraphs/RTWPlanner/icons/TickCircleIcon.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/index.stories.js +26 -0
- package/src/components/Paragraphs/RTWPlanner/index.vue +41 -0
- package/src/components/Paragraphs/TextMedia/index.vue +107 -9
- package/src/components/Paragraphs/VideoPlayer/index.vue +157 -23
- package/src/components/SubComponents/VideoThumbnail/index.vue +5 -1
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
<!-- eslint-disable vue/no-v-html -->
|
|
2
2
|
<template>
|
|
3
3
|
<section-group
|
|
4
|
-
class="wcl-media-text"
|
|
5
4
|
:rtl="rtl"
|
|
6
5
|
:background-variant="hasBgColor ? 'light' : 'none'"
|
|
7
|
-
:class="
|
|
6
|
+
:class="[
|
|
7
|
+
'wcl-media-text',
|
|
8
|
+
flip,
|
|
9
|
+
hideImageMob,
|
|
10
|
+
mediaType && `wcl-media-text__${mediaType}`,
|
|
11
|
+
]"
|
|
8
12
|
>
|
|
9
13
|
<template v-slot:content>
|
|
10
|
-
<row align-v="center">
|
|
11
|
-
<column
|
|
14
|
+
<row align-v="center" :class="`wcl-media-text__${mediaType}--row`">
|
|
15
|
+
<column
|
|
16
|
+
:class="[
|
|
17
|
+
mediaType === 'icon'
|
|
18
|
+
? 'wcl-media-text__icon'
|
|
19
|
+
: 'wcl-media-text__image',
|
|
20
|
+
mediaType === 'icon' &&
|
|
21
|
+
`wcl-media-text__${mediaType}--row--${mediaType}`,
|
|
22
|
+
]"
|
|
23
|
+
sm="5"
|
|
24
|
+
:order="flip ? 2 : 1"
|
|
25
|
+
>
|
|
12
26
|
<media-image
|
|
13
27
|
v-if="mediaType === 'image' && image"
|
|
14
28
|
:image-alt="image && image.alt ? image.alt : ''"
|
|
@@ -19,6 +33,16 @@
|
|
|
19
33
|
:video="video"
|
|
20
34
|
:storybook="storybook"
|
|
21
35
|
/>
|
|
36
|
+
<div class="wcl-media-text__icon-inner">
|
|
37
|
+
<Icon
|
|
38
|
+
v-if="mediaType === 'icon'"
|
|
39
|
+
:class="glyphClass"
|
|
40
|
+
:glyph="glyph"
|
|
41
|
+
:icon-alt="'icon alt'"
|
|
42
|
+
:height="glyphHeight"
|
|
43
|
+
:width="glyphWidth"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
22
46
|
</column>
|
|
23
47
|
<column class="wcl-media-text__content" sm="7" :order="flip ? 1 : 2">
|
|
24
48
|
<rich-text
|
|
@@ -43,6 +67,7 @@ import Column from './../../Containers/Column/index.vue'
|
|
|
43
67
|
import MediaImage from './MediaTypes/Image/index.vue'
|
|
44
68
|
import MediaVideo from './MediaTypes/Video/index.vue'
|
|
45
69
|
import RichText from './../RichText/index.vue'
|
|
70
|
+
import Icon from './../../SubComponents/Icon/index.vue'
|
|
46
71
|
|
|
47
72
|
export default {
|
|
48
73
|
name: 'TextMedia',
|
|
@@ -53,6 +78,7 @@ export default {
|
|
|
53
78
|
MediaVideo,
|
|
54
79
|
RichText,
|
|
55
80
|
SectionGroup,
|
|
81
|
+
Icon,
|
|
56
82
|
},
|
|
57
83
|
props: {
|
|
58
84
|
mediaType: {
|
|
@@ -106,6 +132,21 @@ export default {
|
|
|
106
132
|
type: Boolean,
|
|
107
133
|
default: false,
|
|
108
134
|
},
|
|
135
|
+
glyph: {
|
|
136
|
+
type: [Object, String],
|
|
137
|
+
required: false,
|
|
138
|
+
default: () => null,
|
|
139
|
+
},
|
|
140
|
+
glyphHeight: {
|
|
141
|
+
type: Number,
|
|
142
|
+
required: false,
|
|
143
|
+
default: 15,
|
|
144
|
+
},
|
|
145
|
+
glyphWidth: {
|
|
146
|
+
type: Number,
|
|
147
|
+
required: false,
|
|
148
|
+
default: 25,
|
|
149
|
+
},
|
|
109
150
|
},
|
|
110
151
|
}
|
|
111
152
|
</script>
|
|
@@ -114,6 +155,7 @@ export default {
|
|
|
114
155
|
@import '../../../includes/scss/all';
|
|
115
156
|
|
|
116
157
|
.wcl-media-text {
|
|
158
|
+
/* WYSIWYG adjustments */
|
|
117
159
|
.wysiwyg {
|
|
118
160
|
:deep(.cta-button:last-child) {
|
|
119
161
|
@media screen and (max-width: 540px) {
|
|
@@ -135,9 +177,10 @@ export default {
|
|
|
135
177
|
}
|
|
136
178
|
}
|
|
137
179
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
180
|
+
/* variants */
|
|
181
|
+
&.rtl {
|
|
182
|
+
text-align: left;
|
|
183
|
+
}
|
|
141
184
|
|
|
142
185
|
&.hideImageMob {
|
|
143
186
|
@include mq('xs') {
|
|
@@ -147,8 +190,63 @@ export default {
|
|
|
147
190
|
}
|
|
148
191
|
}
|
|
149
192
|
|
|
150
|
-
|
|
151
|
-
|
|
193
|
+
/* ICON COLUMN – card look + perfect centering */
|
|
194
|
+
&__icon {
|
|
195
|
+
&--row {
|
|
196
|
+
&--icon {
|
|
197
|
+
/* the column becomes the card */
|
|
198
|
+
background: #e6e6e6;
|
|
199
|
+
border: 4px solid #9e9e9e;
|
|
200
|
+
border-radius: 16px;
|
|
201
|
+
padding: 24px;
|
|
202
|
+
box-sizing: border-box;
|
|
203
|
+
min-height: clamp(220px, 32vw, 225px);
|
|
204
|
+
|
|
205
|
+
/* center whatever is inside (your .wcl-media-text__icon-inner) */
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* inner wrapper fills the card so centering works reliably */
|
|
212
|
+
&-inner {
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center; /* vertical */
|
|
217
|
+
justify-content: center; /* horizontal */
|
|
218
|
+
line-height: 0; /* kill inline gaps for SVG */
|
|
219
|
+
|
|
220
|
+
/* the actual Icon (SVG) sizing/containment */
|
|
221
|
+
svg,
|
|
222
|
+
img,
|
|
223
|
+
.icon {
|
|
224
|
+
display: block;
|
|
225
|
+
max-width: 100%;
|
|
226
|
+
max-height: 100%;
|
|
227
|
+
width: clamp(80px, 14vw, 140px);
|
|
228
|
+
height: auto;
|
|
229
|
+
margin: 0;
|
|
230
|
+
color: #1a1a1a; /* SVG with currentColor will render dark */
|
|
231
|
+
fill: currentColor; /* in case the SVG honors fill */
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* HOVER STATES (this is the key) */
|
|
236
|
+
&:hover {
|
|
237
|
+
.wcl-media-text__icon--row--icon {
|
|
238
|
+
background: #fff !important;
|
|
239
|
+
border-color: #9e9e9e; /* grey border */
|
|
240
|
+
}
|
|
241
|
+
.wcl-media-text__content {
|
|
242
|
+
/* If CTA lives in the content column, this will catch it under scoped CSS */
|
|
243
|
+
:deep(.cta-button) {
|
|
244
|
+
background-color: #fff;
|
|
245
|
+
border: 1px solid #9e9e9e;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
152
250
|
}
|
|
153
251
|
}
|
|
154
252
|
</style>
|
|
@@ -9,19 +9,68 @@
|
|
|
9
9
|
:size="fixWidth ? 'content' : 'page'"
|
|
10
10
|
@isMobileOrTabletView="(e) => (isMobileOrTabletView = e)"
|
|
11
11
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
<BOverlay
|
|
13
|
+
v-model:show="show"
|
|
14
|
+
no-center
|
|
15
|
+
variant="dark"
|
|
16
|
+
opacity="1"
|
|
17
|
+
@shown="onShown"
|
|
18
|
+
@hidden="onHidden"
|
|
19
|
+
>
|
|
20
|
+
<div>
|
|
21
|
+
<video-player
|
|
22
|
+
:provider="provider"
|
|
23
|
+
:video-id="videoId"
|
|
24
|
+
class="video-media__video-player"
|
|
25
|
+
:rtl="rtl"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- video overlay slot... -->
|
|
30
|
+
<template #overlay>
|
|
31
|
+
<div class="wcl-video-modal__overlay" role="dialog" aria-modal="true">
|
|
32
|
+
<div class="wcl-video-modal__panel">
|
|
33
|
+
<div class="wcl-video-modal__panel--image">
|
|
34
|
+
<img
|
|
35
|
+
class="icon"
|
|
36
|
+
:src="IconView"
|
|
37
|
+
alt="Icon View"
|
|
38
|
+
aria-hidden="true"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="wcl-video-modal__panel--content">
|
|
42
|
+
<rich-text :content="mediaWarningContent" />
|
|
43
|
+
</div>
|
|
44
|
+
<div class="wcl-video-modal__panel--button">
|
|
45
|
+
<CtaButton
|
|
46
|
+
text-only="true"
|
|
47
|
+
aria-describedby="gethelp-label"
|
|
48
|
+
:url="mediaWarningLinkUrl"
|
|
49
|
+
>
|
|
50
|
+
{{ mediaWarningLinkTitle }}
|
|
51
|
+
</CtaButton>
|
|
52
|
+
<CtaButton
|
|
53
|
+
type="gray"
|
|
54
|
+
text-only="true"
|
|
55
|
+
aria-describedby="seevideo-label"
|
|
56
|
+
@click="onSeeVideo"
|
|
57
|
+
>
|
|
58
|
+
See video
|
|
59
|
+
</CtaButton>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
</BOverlay>
|
|
20
65
|
</section-group>
|
|
66
|
+
|
|
67
|
+
<!-- Only visible when overlay is NOT visible -->
|
|
21
68
|
<accordion
|
|
69
|
+
v-show="!show"
|
|
22
70
|
:accordion-list="accordion"
|
|
23
71
|
:option="'close-all'"
|
|
24
72
|
class="video-media__transcript"
|
|
73
|
+
:aria-hidden="show ? 'true' : null"
|
|
25
74
|
/>
|
|
26
75
|
</div>
|
|
27
76
|
</template>
|
|
@@ -30,64 +79,103 @@
|
|
|
30
79
|
import SectionGroup from '../../Containers/SectionGroup/index.vue'
|
|
31
80
|
import VideoPlayer from '../../SubComponents/MediaPlayer/index.vue'
|
|
32
81
|
import Accordion from '../Accordion/index.vue'
|
|
82
|
+
import IconView from './../../../assets/icons/icon-view-off.svg?url'
|
|
83
|
+
import CtaButton from './../../SubComponents/CtaButton/index.vue'
|
|
84
|
+
import RichText from './../../Paragraphs/RichText/index.vue'
|
|
33
85
|
|
|
34
86
|
export default {
|
|
35
87
|
name: 'VideoMedia',
|
|
36
88
|
components: {
|
|
89
|
+
CtaButton,
|
|
37
90
|
VideoPlayer,
|
|
38
91
|
SectionGroup,
|
|
39
|
-
Accordion
|
|
92
|
+
Accordion,
|
|
93
|
+
RichText,
|
|
94
|
+
IconView,
|
|
40
95
|
},
|
|
41
96
|
props: {
|
|
42
97
|
mediaTitle: {
|
|
43
98
|
type: String,
|
|
44
|
-
default: null
|
|
99
|
+
default: null,
|
|
45
100
|
},
|
|
46
101
|
mediaDescription: {
|
|
47
102
|
type: String,
|
|
48
|
-
default: null
|
|
103
|
+
default: null,
|
|
49
104
|
},
|
|
50
105
|
provider: {
|
|
51
106
|
type: String,
|
|
52
|
-
required: true
|
|
107
|
+
required: true,
|
|
53
108
|
},
|
|
54
109
|
videoId: {
|
|
55
110
|
type: String,
|
|
56
|
-
required: true
|
|
111
|
+
required: true,
|
|
57
112
|
},
|
|
58
113
|
transcriptTitle: {
|
|
59
114
|
type: String,
|
|
60
|
-
default: null
|
|
115
|
+
default: null,
|
|
61
116
|
},
|
|
62
117
|
transcript: {
|
|
63
118
|
type: String,
|
|
64
|
-
default: null
|
|
119
|
+
default: null,
|
|
65
120
|
},
|
|
66
121
|
fixWidth: {
|
|
67
122
|
type: Boolean,
|
|
68
|
-
default: false
|
|
123
|
+
default: false,
|
|
69
124
|
},
|
|
70
125
|
rtl: {
|
|
71
126
|
type: Boolean,
|
|
72
|
-
default: false
|
|
127
|
+
default: false,
|
|
73
128
|
},
|
|
74
129
|
titleTag: {
|
|
75
130
|
type: String,
|
|
76
|
-
default: 'h2'
|
|
131
|
+
default: 'h2',
|
|
132
|
+
},
|
|
133
|
+
mediaWarning: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false,
|
|
136
|
+
},
|
|
137
|
+
mediaWarningContent: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: null,
|
|
140
|
+
},
|
|
141
|
+
mediaWarningLinkTitle: {
|
|
142
|
+
type: String,
|
|
143
|
+
default: null,
|
|
144
|
+
},
|
|
145
|
+
mediaWarningLinkUrl: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: null,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
data() {
|
|
151
|
+
return {
|
|
152
|
+
IconView,
|
|
153
|
+
show: this.mediaWarning,
|
|
77
154
|
}
|
|
78
155
|
},
|
|
156
|
+
watch: {
|
|
157
|
+
mediaWarning(v) {
|
|
158
|
+
this.show = v
|
|
159
|
+
},
|
|
160
|
+
},
|
|
79
161
|
computed: {
|
|
80
162
|
accordion() {
|
|
81
163
|
return [
|
|
82
164
|
{
|
|
83
165
|
field_title: this.transcriptTitle,
|
|
84
166
|
field_rich_text: {
|
|
85
|
-
value: this.transcript
|
|
86
|
-
}
|
|
87
|
-
}
|
|
167
|
+
value: this.transcript,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
88
170
|
]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
methods: {
|
|
174
|
+
onSeeVideo() {
|
|
175
|
+
this.show = false
|
|
176
|
+
this.$emit('update:alert', false) // or emit nothing if parent doesn't care
|
|
177
|
+
},
|
|
178
|
+
},
|
|
91
179
|
}
|
|
92
180
|
</script>
|
|
93
181
|
|
|
@@ -106,5 +194,51 @@ export default {
|
|
|
106
194
|
:deep(.section-group--size-page .video-player) {
|
|
107
195
|
@include fp(min-height, 250, 625);
|
|
108
196
|
}
|
|
197
|
+
|
|
198
|
+
/* Center *within the wrapper*, not the window */
|
|
199
|
+
.wcl-video-modal {
|
|
200
|
+
&__overlay {
|
|
201
|
+
position: absolute; /* absolute to .b-overlay-wrap */
|
|
202
|
+
inset: 0; /* fill the wrapper */
|
|
203
|
+
z-index: 10; /* above the video */
|
|
204
|
+
display: grid; /* simple centering */
|
|
205
|
+
place-items: center; /* vertical + horizontal center */
|
|
206
|
+
padding: 1rem;
|
|
207
|
+
text-align: center;
|
|
208
|
+
/* Optional dim */
|
|
209
|
+
background: rgba(0, 0, 0, 0.6);
|
|
210
|
+
overflow: auto; /* scroll if content taller than video area */
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* The centered card */
|
|
214
|
+
&__panel {
|
|
215
|
+
color: white;
|
|
216
|
+
width: min(756px, 100%);
|
|
217
|
+
border-radius: 12px;
|
|
218
|
+
// padding: 1.25rem 1.5rem;
|
|
219
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
|
|
220
|
+
|
|
221
|
+
/* Tidy content */
|
|
222
|
+
img {
|
|
223
|
+
width: 110px;
|
|
224
|
+
margin-bottom: 30px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&--content {
|
|
228
|
+
margin-bottom: 30px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.wcl-cta {
|
|
232
|
+
margin-bottom: 0;
|
|
233
|
+
@media (max-width: 388px) {
|
|
234
|
+
display: block;
|
|
235
|
+
width: 100%;
|
|
236
|
+
margin-left: 0 !important;
|
|
237
|
+
margin-bottom: 10px;
|
|
238
|
+
width: 100%;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
109
243
|
}
|
|
110
244
|
</style>
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
>
|
|
29
29
|
<div class="wcl-video-modal__video">
|
|
30
30
|
<video-media
|
|
31
|
+
:media-warning="video.warning"
|
|
32
|
+
:media-warning-content="video.warningContent"
|
|
33
|
+
:media-warning-link-title="video.warningLinkTitle"
|
|
34
|
+
:media-warning-link-url="video.warningLinkUrl"
|
|
31
35
|
:media-title="video.mediaTitle"
|
|
32
36
|
:media-description="video.mediaDescription"
|
|
33
37
|
:video-id="video.id"
|
|
@@ -36,13 +40,13 @@
|
|
|
36
40
|
:transcript-title="video.transcriptTitle"
|
|
37
41
|
:fix-width="video.fixWidth"
|
|
38
42
|
:rtl="video.rtl"
|
|
43
|
+
:aria-hidden="video.alertStrip ? 'true' : null"
|
|
39
44
|
/>
|
|
40
45
|
</div>
|
|
41
46
|
<template #footer><div></div></template>
|
|
42
47
|
</BModal>
|
|
43
48
|
</div>
|
|
44
49
|
</template>
|
|
45
|
-
|
|
46
50
|
<script>
|
|
47
51
|
import VideoMedia from './../../Paragraphs/VideoPlayer/index.vue'
|
|
48
52
|
import VideoPlay from './../../../assets/icons/video-play.svg?url'
|