@worksafevictoria/wcl7.5 1.17.0-beta.2 → 1.17.0-beta.4
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/chevron-right-icon.svg +14 -0
- package/src/assets/icons/notepad.svg +93 -0
- package/src/assets/icons/question.svg +7 -0
- package/src/components/Common/CardGrid/index.vue +83 -74
- package/src/components/Common/CardGridItem/index.vue +31 -4
- package/src/components/Containers/SectionGroup/index.stories.js +28 -27
- package/src/components/Containers/SectionGroup/index.vue +6 -0
- package/src/components/Global/AppHeaderNew/mobile.scss +1 -0
- package/src/components/Global/AppHeaderNew/styles.scss +6 -5
- package/src/components/Global/HeroHeader/index.vue +74 -57
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +68 -60
- package/src/components/Paragraphs/Calculator/index.vue +24 -22
- package/src/components/Paragraphs/RTWPlanner/CardContainer/index.vue +133 -0
- package/src/components/Paragraphs/RTWPlanner/Constants.js +410 -0
- package/src/components/Paragraphs/RTWPlanner/Footer/index.vue +32 -0
- package/src/components/Paragraphs/RTWPlanner/{NavBar → Header}/index.vue +20 -9
- package/src/components/Paragraphs/RTWPlanner/HomePage/index.vue +72 -0
- package/src/components/Paragraphs/RTWPlanner/Injuries/index.vue +174 -0
- package/src/components/Paragraphs/RTWPlanner/index.stories.js +68 -15
- package/src/components/Paragraphs/RTWPlanner/index.vue +99 -31
- package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +31 -11
- package/src/components/Paragraphs/SelectableCards/cardbody.vue +9 -10
- package/src/components/Paragraphs/SelectableCards/cardtop.vue +23 -16
- package/src/components/Paragraphs/SelectableCards/index.stories.js +29 -8
- package/src/components/Paragraphs/SelectableCards/index.vue +124 -50
- package/src/components/SubComponents/Breadcrumb/index.vue +40 -7
- package/src/includes/scss/vars/src/colors.module.scss +3 -0
- package/src/includes/scss/vars/src/colors.scss +3 -0
- package/src/mock/control-selectable-cards.js +68 -25
- package/src/components/Paragraphs/RTWPlanner/Home/index.vue +0 -83
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
viewBox="0 0 24 24"
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-width="3"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
width="1em"
|
|
10
|
+
height="1em"
|
|
11
|
+
class="chevron-right-icon"
|
|
12
|
+
>
|
|
13
|
+
<polyline points="9 18 15 12 9 6" />
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
4
|
+
width="800px"
|
|
5
|
+
height="800px"
|
|
6
|
+
viewBox="0 0 32 32"
|
|
7
|
+
>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip-notepad">
|
|
10
|
+
<rect width="32" height="32" />
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
<g id="notepad" clip-path="url(#clip-notepad)">
|
|
14
|
+
<g
|
|
15
|
+
id="Group_3042"
|
|
16
|
+
data-name="Group 3042"
|
|
17
|
+
transform="translate(-260 -156)"
|
|
18
|
+
>
|
|
19
|
+
<g id="Group_3024" data-name="Group 3024">
|
|
20
|
+
<g id="Group_3023" data-name="Group 3023">
|
|
21
|
+
<g id="Group_3022" data-name="Group 3022">
|
|
22
|
+
<g id="Group_3021" data-name="Group 3021">
|
|
23
|
+
<path
|
|
24
|
+
id="Path_3967"
|
|
25
|
+
data-name="Path 3967"
|
|
26
|
+
d="M287.632,157.923h-3.559v-.757a1,1,0,0,0-2,0v.757h-2.721v-.757a1,1,0,1,0-2,0v.757h-2.721v-.757a1,1,0,0,0-2,0v.757H269.91v-.757a1,1,0,0,0-2,0v.757h-3.542a1,1,0,0,0-1,1v27.911a1,1,0,0,0,1,1h23.264a1,1,0,0,0,1-1V158.923A1,1,0,0,0,287.632,157.923Zm-1,27.911H265.368V159.923h2.542v.756a1,1,0,0,0,2,0v-.756h2.721v.756a1,1,0,0,0,2,0v-.756h2.721v.756a1,1,0,0,0,2,0v-.756h2.721v.756a1,1,0,0,0,2,0v-.756h2.559Z"
|
|
27
|
+
fill="#344952"
|
|
28
|
+
/>
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
</g>
|
|
32
|
+
</g>
|
|
33
|
+
<g id="Group_3041" data-name="Group 3041">
|
|
34
|
+
<g id="Group_3028" data-name="Group 3028">
|
|
35
|
+
<g id="Group_3027" data-name="Group 3027">
|
|
36
|
+
<g id="Group_3026" data-name="Group 3026">
|
|
37
|
+
<g id="Group_3025" data-name="Group 3025">
|
|
38
|
+
<path
|
|
39
|
+
id="Path_3968"
|
|
40
|
+
data-name="Path 3968"
|
|
41
|
+
d="M283.646,167.92H268.354a1,1,0,0,1,0-2h15.292a1,1,0,0,1,0,2Z"
|
|
42
|
+
fill="#344952"
|
|
43
|
+
/>
|
|
44
|
+
</g>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
</g>
|
|
48
|
+
<g id="Group_3032" data-name="Group 3032">
|
|
49
|
+
<g id="Group_3031" data-name="Group 3031">
|
|
50
|
+
<g id="Group_3030" data-name="Group 3030">
|
|
51
|
+
<g id="Group_3029" data-name="Group 3029">
|
|
52
|
+
<path
|
|
53
|
+
id="Path_3969"
|
|
54
|
+
data-name="Path 3969"
|
|
55
|
+
d="M283.646,171.92H268.354a1,1,0,0,1,0-2h15.292a1,1,0,0,1,0,2Z"
|
|
56
|
+
fill="#344952"
|
|
57
|
+
/>
|
|
58
|
+
</g>
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
</g>
|
|
62
|
+
<g id="Group_3036" data-name="Group 3036">
|
|
63
|
+
<g id="Group_3035" data-name="Group 3035">
|
|
64
|
+
<g id="Group_3034" data-name="Group 3034">
|
|
65
|
+
<g id="Group_3033" data-name="Group 3033">
|
|
66
|
+
<path
|
|
67
|
+
id="Path_3970"
|
|
68
|
+
data-name="Path 3970"
|
|
69
|
+
d="M283.646,175.92H268.354a1,1,0,0,1,0-2h15.292a1,1,0,0,1,0,2Z"
|
|
70
|
+
fill="#344952"
|
|
71
|
+
/>
|
|
72
|
+
</g>
|
|
73
|
+
</g>
|
|
74
|
+
</g>
|
|
75
|
+
</g>
|
|
76
|
+
<g id="Group_3040" data-name="Group 3040">
|
|
77
|
+
<g id="Group_3039" data-name="Group 3039">
|
|
78
|
+
<g id="Group_3038" data-name="Group 3038">
|
|
79
|
+
<g id="Group_3037" data-name="Group 3037">
|
|
80
|
+
<path
|
|
81
|
+
id="Path_3971"
|
|
82
|
+
data-name="Path 3971"
|
|
83
|
+
d="M275.823,179.92h-7.469a1,1,0,0,1,0-2h7.469a1,1,0,0,1,0,2Z"
|
|
84
|
+
fill="#344952"
|
|
85
|
+
/>
|
|
86
|
+
</g>
|
|
87
|
+
</g>
|
|
88
|
+
</g>
|
|
89
|
+
</g>
|
|
90
|
+
</g>
|
|
91
|
+
</g>
|
|
92
|
+
</g>
|
|
93
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Question mark">
|
|
3
|
+
<title>Question Mark</title>
|
|
4
|
+
<text x="50%" y="50%" dominant-baseline="central" text-anchor="middle"
|
|
5
|
+
font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif"
|
|
6
|
+
font-size="20" font-weight="700" fill="#000000">?</text>
|
|
7
|
+
</svg>
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
|
-
import Row from
|
|
56
|
-
import Column from
|
|
57
|
-
import SectionGroup from
|
|
58
|
-
import { debounce } from
|
|
55
|
+
import Row from './../../Containers/Row/index.vue'
|
|
56
|
+
import Column from './../../Containers/Column/index.vue'
|
|
57
|
+
import SectionGroup from './../../Containers/SectionGroup/index.vue'
|
|
58
|
+
import { debounce } from 'lodash-es'
|
|
59
59
|
|
|
60
60
|
export default {
|
|
61
|
-
name:
|
|
61
|
+
name: 'CardGrid',
|
|
62
62
|
components: { Row, Column, SectionGroup },
|
|
63
63
|
props: {
|
|
64
64
|
title: {
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
},
|
|
72
72
|
titleTag: {
|
|
73
73
|
type: String,
|
|
74
|
-
default:
|
|
74
|
+
default: 'h2',
|
|
75
75
|
},
|
|
76
76
|
cards: {
|
|
77
77
|
type: Array,
|
|
@@ -99,9 +99,9 @@ export default {
|
|
|
99
99
|
},
|
|
100
100
|
size: {
|
|
101
101
|
type: String,
|
|
102
|
-
default:
|
|
102
|
+
default: 'page',
|
|
103
103
|
validator: (value) =>
|
|
104
|
-
[
|
|
104
|
+
['half-content', 'content', 'page', 'full'].indexOf(value) >= 0,
|
|
105
105
|
},
|
|
106
106
|
isSelectable: {
|
|
107
107
|
type: Boolean,
|
|
@@ -112,17 +112,24 @@ export default {
|
|
|
112
112
|
},
|
|
113
113
|
backgroundVariant: {
|
|
114
114
|
type: String,
|
|
115
|
-
default:
|
|
115
|
+
default: 'none',
|
|
116
116
|
validator: (value) =>
|
|
117
|
-
[
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
[
|
|
118
|
+
'none',
|
|
119
|
+
'light',
|
|
120
|
+
'dark',
|
|
121
|
+
'grey',
|
|
122
|
+
'yellow',
|
|
123
|
+
'white',
|
|
124
|
+
'lightblue',
|
|
125
|
+
'lavendergray',
|
|
126
|
+
].indexOf(value) >= 0,
|
|
120
127
|
},
|
|
121
128
|
applyBackgroundOn: {
|
|
122
129
|
type: String,
|
|
123
|
-
default:
|
|
130
|
+
default: 'section',
|
|
124
131
|
validator: (value) =>
|
|
125
|
-
[
|
|
132
|
+
['content', 'block', 'container', 'section'].indexOf(value) >= 0,
|
|
126
133
|
},
|
|
127
134
|
noPaddingTop: {
|
|
128
135
|
type: Boolean,
|
|
@@ -132,8 +139,8 @@ export default {
|
|
|
132
139
|
},
|
|
133
140
|
rowSpacing: {
|
|
134
141
|
type: String,
|
|
135
|
-
default:
|
|
136
|
-
validator: (value) => [
|
|
142
|
+
default: 'large',
|
|
143
|
+
validator: (value) => ['none', 'small', 'large'].indexOf(value) >= 0,
|
|
137
144
|
},
|
|
138
145
|
rowClasses: {
|
|
139
146
|
type: String,
|
|
@@ -141,12 +148,12 @@ export default {
|
|
|
141
148
|
},
|
|
142
149
|
columnSpacing: {
|
|
143
150
|
type: String,
|
|
144
|
-
default:
|
|
145
|
-
validator: (value) => [
|
|
151
|
+
default: 'default',
|
|
152
|
+
validator: (value) => ['default', 'none'].indexOf(value) >= 0,
|
|
146
153
|
},
|
|
147
154
|
contentClass: {
|
|
148
155
|
type: String,
|
|
149
|
-
default:
|
|
156
|
+
default: '',
|
|
150
157
|
},
|
|
151
158
|
cardBrowseContent: {
|
|
152
159
|
type: Boolean,
|
|
@@ -154,7 +161,7 @@ export default {
|
|
|
154
161
|
},
|
|
155
162
|
gridId: {
|
|
156
163
|
type: String,
|
|
157
|
-
default:
|
|
164
|
+
default: 'default',
|
|
158
165
|
},
|
|
159
166
|
},
|
|
160
167
|
data() {
|
|
@@ -162,87 +169,89 @@ export default {
|
|
|
162
169
|
childCards: [],
|
|
163
170
|
redrawCounter: 0,
|
|
164
171
|
setColumnSizeDebounce: debounce(this.setColumnSize, 500),
|
|
165
|
-
}
|
|
172
|
+
}
|
|
166
173
|
},
|
|
167
174
|
computed: {
|
|
168
175
|
largeViewPort() {
|
|
169
176
|
if (this.forceLgColumnsPerRow) {
|
|
170
|
-
return 12 / this.forceLgColumnsPerRow
|
|
177
|
+
return 12 / this.forceLgColumnsPerRow
|
|
171
178
|
}
|
|
172
179
|
return 12 / this.cards.length > 12 / (this.columnsPerRow || 3)
|
|
173
180
|
? 12 / this.cards.length
|
|
174
|
-
: 12 / this.columnsPerRow
|
|
181
|
+
: 12 / this.columnsPerRow
|
|
175
182
|
},
|
|
176
183
|
mediumViewPort() {
|
|
177
184
|
if (this.forceMdColumnsPerRow) {
|
|
178
|
-
return 12 / this.forceLgColumnsPerRow
|
|
185
|
+
return 12 / this.forceLgColumnsPerRow
|
|
179
186
|
}
|
|
180
187
|
if (this.largeViewPort === 6) {
|
|
181
|
-
return 6
|
|
188
|
+
return 6
|
|
182
189
|
}
|
|
183
|
-
return 4
|
|
190
|
+
return 4
|
|
184
191
|
},
|
|
185
192
|
smallViewPort() {
|
|
186
193
|
if (this.forceSmColumnsPerRow) {
|
|
187
|
-
return 12 / this.forceLgColumnsPerRow
|
|
194
|
+
return 12 / this.forceLgColumnsPerRow
|
|
188
195
|
}
|
|
189
|
-
return 6
|
|
196
|
+
return 6
|
|
190
197
|
},
|
|
191
198
|
},
|
|
192
199
|
watch: {
|
|
193
200
|
cards: {
|
|
194
201
|
handler: function () {
|
|
195
|
-
this.redrawCounter += 1
|
|
196
|
-
this.setColumnSizeDebounce()
|
|
202
|
+
this.redrawCounter += 1
|
|
203
|
+
this.setColumnSizeDebounce()
|
|
197
204
|
},
|
|
198
205
|
deep: true,
|
|
199
206
|
},
|
|
200
207
|
columnsPerRow: {
|
|
201
208
|
handler: function () {
|
|
202
|
-
this.setColumnSizeDebounce()
|
|
209
|
+
this.setColumnSizeDebounce()
|
|
203
210
|
},
|
|
204
211
|
},
|
|
205
212
|
forceSmColumnsPerRow: {
|
|
206
213
|
handler: function () {
|
|
207
|
-
this.setColumnSizeDebounce()
|
|
214
|
+
this.setColumnSizeDebounce()
|
|
208
215
|
},
|
|
209
216
|
},
|
|
210
217
|
forceMdColumnsPerRow: {
|
|
211
218
|
handler: function () {
|
|
212
|
-
this.setColumnSizeDebounce()
|
|
219
|
+
this.setColumnSizeDebounce()
|
|
213
220
|
},
|
|
214
221
|
},
|
|
215
222
|
forceLgColumnsPerRow: {
|
|
216
223
|
handler: function () {
|
|
217
|
-
this.setColumnSizeDebounce()
|
|
224
|
+
this.setColumnSizeDebounce()
|
|
218
225
|
},
|
|
219
226
|
},
|
|
220
227
|
},
|
|
221
228
|
mounted() {
|
|
222
|
-
window.addEventListener(
|
|
223
|
-
this.setColumnSizeDebounce()
|
|
229
|
+
window.addEventListener('resize', this.setColumnSizeDebounce)
|
|
230
|
+
this.setColumnSizeDebounce()
|
|
224
231
|
},
|
|
225
232
|
beforeDestroy() {
|
|
226
|
-
window.removeEventListener(
|
|
233
|
+
window.removeEventListener('resize', this.setColumnSizeDebounce)
|
|
227
234
|
},
|
|
228
235
|
methods: {
|
|
229
236
|
cardTitleSelected(selectedCard, ev) {
|
|
230
|
-
this.clearCards()
|
|
231
|
-
selectedCard.selected = !!!selectedCard.selected
|
|
232
|
-
const selectedCardModelIndex = this.getChildIndex(selectedCard)
|
|
237
|
+
this.clearCards()
|
|
238
|
+
selectedCard.selected = !!!selectedCard.selected
|
|
239
|
+
const selectedCardModelIndex = this.getChildIndex(selectedCard)
|
|
233
240
|
|
|
234
|
-
this.$emit(
|
|
235
|
-
selectedCard: selectedCard.selected
|
|
241
|
+
this.$emit('selected-title', {
|
|
242
|
+
selectedCard: selectedCard.selected
|
|
243
|
+
? this.cards[selectedCardModelIndex]
|
|
244
|
+
: null,
|
|
236
245
|
selectedCardModelIndex,
|
|
237
246
|
ev,
|
|
238
|
-
})
|
|
247
|
+
})
|
|
239
248
|
},
|
|
240
249
|
cardSelected(selectedCard, ev) {
|
|
241
|
-
this.clearCards()
|
|
242
|
-
selectedCard.selected = !!!selectedCard.selected
|
|
243
|
-
const selectedCardModelIndex = this.getChildIndex(selectedCard)
|
|
250
|
+
this.clearCards()
|
|
251
|
+
selectedCard.selected = !!!selectedCard.selected
|
|
252
|
+
const selectedCardModelIndex = this.getChildIndex(selectedCard)
|
|
244
253
|
|
|
245
|
-
this.$emit(
|
|
254
|
+
this.$emit('selected', {
|
|
246
255
|
selectedCard: selectedCard.selected
|
|
247
256
|
? this.cardBrowseContent
|
|
248
257
|
? this.childCards[selectedCardModelIndex]
|
|
@@ -250,59 +259,59 @@ export default {
|
|
|
250
259
|
: null,
|
|
251
260
|
selectedCardModelIndex,
|
|
252
261
|
ev,
|
|
253
|
-
})
|
|
262
|
+
})
|
|
254
263
|
},
|
|
255
264
|
clearCards(selectedCard) {
|
|
256
265
|
this.childCards.forEach((card) => {
|
|
257
|
-
card.selected = false
|
|
266
|
+
card.selected = false
|
|
258
267
|
if (!selectedCard || selectedCard !== card) {
|
|
259
|
-
card.selected = false
|
|
268
|
+
card.selected = false
|
|
260
269
|
}
|
|
261
|
-
})
|
|
270
|
+
})
|
|
262
271
|
},
|
|
263
272
|
getChildIndex(selectedCard) {
|
|
264
|
-
return this.childCards.findIndex((item) => item === selectedCard)
|
|
273
|
+
return this.childCards.findIndex((item) => item === selectedCard)
|
|
265
274
|
},
|
|
266
275
|
registerChild(child) {
|
|
267
|
-
this.childCards.push(child)
|
|
268
|
-
this.setColumnSizeDebounce()
|
|
276
|
+
this.childCards.push(child)
|
|
277
|
+
this.setColumnSizeDebounce()
|
|
269
278
|
},
|
|
270
279
|
deregisterChild(child) {
|
|
271
|
-
const index = this.childCards.indexOf(child)
|
|
280
|
+
const index = this.childCards.indexOf(child)
|
|
272
281
|
if (index > -1) {
|
|
273
|
-
this.childCards.splice(index, 1)
|
|
282
|
+
this.childCards.splice(index, 1)
|
|
274
283
|
}
|
|
275
284
|
},
|
|
276
285
|
setColumnSize() {
|
|
277
286
|
setTimeout(() => {
|
|
278
|
-
const columns = this.$refs.cardColumns
|
|
287
|
+
const columns = this.$refs.cardColumns
|
|
279
288
|
if (Array.isArray(columns) && columns.length > 0) {
|
|
280
|
-
const row = this.$refs.cardRow
|
|
281
|
-
const elementWidth = columns[0].$el.offsetWidth
|
|
282
|
-
const parentWidth = row.$el.offsetWidth
|
|
283
|
-
const gridColumnSize = parseInt(parentWidth / elementWidth)
|
|
284
|
-
const isMobileView = parentWidth < 480
|
|
285
|
-
const isTabletView = !isMobileView && parentWidth < 767
|
|
286
|
-
this.$emit(
|
|
287
|
-
this.$emit(
|
|
288
|
-
this.$emit(
|
|
289
|
-
this.$emit(
|
|
290
|
-
this.$emit(
|
|
289
|
+
const row = this.$refs.cardRow
|
|
290
|
+
const elementWidth = columns[0].$el.offsetWidth
|
|
291
|
+
const parentWidth = row.$el.offsetWidth
|
|
292
|
+
const gridColumnSize = parseInt(parentWidth / elementWidth)
|
|
293
|
+
const isMobileView = parentWidth < 480
|
|
294
|
+
const isTabletView = !isMobileView && parentWidth < 767
|
|
295
|
+
this.$emit('isMobileView', isMobileView)
|
|
296
|
+
this.$emit('isTabletView', isTabletView)
|
|
297
|
+
this.$emit('isDesktopView', !isTabletView && !isMobileView)
|
|
298
|
+
this.$emit('isMobileOrTabletView', isMobileView || isTabletView)
|
|
299
|
+
this.$emit('gridColumnSize', gridColumnSize)
|
|
291
300
|
this.childCards.forEach((card) =>
|
|
292
|
-
card.setGridMetaData(gridColumnSize, isMobileView, isTabletView)
|
|
293
|
-
)
|
|
301
|
+
card.setGridMetaData(gridColumnSize, isMobileView, isTabletView),
|
|
302
|
+
)
|
|
294
303
|
}
|
|
295
|
-
})
|
|
304
|
+
})
|
|
296
305
|
},
|
|
297
306
|
handleFocus(ev) {
|
|
298
|
-
this.$emit(
|
|
307
|
+
this.$emit('focussed', ev)
|
|
299
308
|
},
|
|
300
309
|
},
|
|
301
|
-
}
|
|
310
|
+
}
|
|
302
311
|
</script>
|
|
303
312
|
|
|
304
313
|
<style lang="scss" scoped>
|
|
305
|
-
@import
|
|
314
|
+
@import '../../../includes/scss/all';
|
|
306
315
|
.card-grid {
|
|
307
316
|
&__column {
|
|
308
317
|
&--default {
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
<BCard
|
|
5
5
|
:id="cardId"
|
|
6
6
|
no-body
|
|
7
|
-
:tag="
|
|
7
|
+
:tag="
|
|
8
|
+
buttonRole === 'radio' || buttonRole === 'none'
|
|
9
|
+
? 'div'
|
|
10
|
+
: isSelectable
|
|
11
|
+
? 'button'
|
|
12
|
+
: 'div'
|
|
13
|
+
"
|
|
8
14
|
class="card-grid-item__card"
|
|
9
15
|
:class="cardClass"
|
|
10
16
|
:role="buttonRole"
|
|
@@ -37,7 +43,7 @@
|
|
|
37
43
|
{
|
|
38
44
|
rtl: rtl,
|
|
39
45
|
[`card-grid-item__control-radio`]:
|
|
40
|
-
isSelectable && buttonRole === 'radio',
|
|
46
|
+
(isSelectable && buttonRole === 'radio') || 'modal-quest',
|
|
41
47
|
[`card-grid-item__selected-radio`]:
|
|
42
48
|
selected && buttonRole === 'radio',
|
|
43
49
|
},
|
|
@@ -390,7 +396,7 @@ export default {
|
|
|
390
396
|
[`card-grid-item__card--hasIcon`]:
|
|
391
397
|
(this.imageSrc || this.glyphSrc) &&
|
|
392
398
|
(this.iconPosition === 'top' || this.iconPosition === 'top-left'),
|
|
393
|
-
[`card-grid-item__card--selectable`]: this.isSelectable,
|
|
399
|
+
[`card-grid-item__card--selectable`]: this.isSelectable === true,
|
|
394
400
|
[`card-grid-item__card--selected-inverted--` +
|
|
395
401
|
this.invertOnSelectBackground]:
|
|
396
402
|
this.selected &&
|
|
@@ -434,7 +440,7 @@ export default {
|
|
|
434
440
|
},
|
|
435
441
|
methods: {
|
|
436
442
|
cardClicked(ev) {
|
|
437
|
-
if (this.isSelectable) {
|
|
443
|
+
if (this.isSelectable === true) {
|
|
438
444
|
this.parentGrid.cardSelected(this, ev)
|
|
439
445
|
}
|
|
440
446
|
|
|
@@ -822,6 +828,27 @@ export default {
|
|
|
822
828
|
width: 100%;
|
|
823
829
|
height: 100%;
|
|
824
830
|
}
|
|
831
|
+
:deep(.card_item__control-modal-quest) {
|
|
832
|
+
width: 28px;
|
|
833
|
+
height: 28px;
|
|
834
|
+
line-height: 32px;
|
|
835
|
+
text-align: center;
|
|
836
|
+
border-radius: 50%;
|
|
837
|
+
background-color: lightgrey;
|
|
838
|
+
border: 3px solid lightgrey;
|
|
839
|
+
display: flex;
|
|
840
|
+
justify-content: center;
|
|
841
|
+
align-items: center;
|
|
842
|
+
cursor: pointer;
|
|
843
|
+
}
|
|
844
|
+
:deep(.card_item__control-modal-quest span) {
|
|
845
|
+
background-image: url('../../../assets/icons/question.svg');
|
|
846
|
+
background-position: center;
|
|
847
|
+
background-repeat: no-repeat;
|
|
848
|
+
filter: invert(1);
|
|
849
|
+
width: 100%;
|
|
850
|
+
height: 100%;
|
|
851
|
+
}
|
|
825
852
|
}
|
|
826
853
|
&__selected-radio {
|
|
827
854
|
:deep(.card_item__control-radio) {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: SectionGroup,
|
|
8
8
|
argTypes: {
|
|
9
9
|
backgroundImage: {
|
|
10
|
-
control: 'boolean'
|
|
10
|
+
control: 'boolean',
|
|
11
11
|
},
|
|
12
12
|
backgroundVariant: {
|
|
13
13
|
control: 'select',
|
|
@@ -18,69 +18,70 @@ export default {
|
|
|
18
18
|
'grey',
|
|
19
19
|
'yellow',
|
|
20
20
|
'white',
|
|
21
|
-
'lightblue'
|
|
22
|
-
|
|
21
|
+
'lightblue',
|
|
22
|
+
'lavendergray',
|
|
23
|
+
],
|
|
23
24
|
},
|
|
24
25
|
applyBackgroundOn: {
|
|
25
26
|
control: 'select',
|
|
26
|
-
options: ['content', 'block', 'container', 'section']
|
|
27
|
+
options: ['content', 'block', 'container', 'section'],
|
|
27
28
|
},
|
|
28
29
|
titleTag: {
|
|
29
30
|
control: 'select',
|
|
30
|
-
options: ['h2', 'h3']
|
|
31
|
+
options: ['h2', 'h3'],
|
|
31
32
|
},
|
|
32
33
|
footer: {
|
|
33
|
-
control: 'boolean'
|
|
34
|
+
control: 'boolean',
|
|
34
35
|
},
|
|
35
36
|
preContent: {
|
|
36
|
-
control: 'boolean'
|
|
37
|
+
control: 'boolean',
|
|
37
38
|
},
|
|
38
39
|
headerRight: {
|
|
39
|
-
control: 'boolean'
|
|
40
|
+
control: 'boolean',
|
|
40
41
|
},
|
|
41
42
|
size: {
|
|
42
43
|
control: 'select',
|
|
43
|
-
options: ['half-content', 'content', 'page', 'full']
|
|
44
|
+
options: ['half-content', 'content', 'page', 'full'],
|
|
44
45
|
},
|
|
45
46
|
headingRightSlot: {
|
|
46
|
-
control: 'text'
|
|
47
|
+
control: 'text',
|
|
47
48
|
},
|
|
48
49
|
preContentSlot: {
|
|
49
|
-
control: 'text'
|
|
50
|
+
control: 'text',
|
|
50
51
|
},
|
|
51
52
|
contentSlot: {
|
|
52
|
-
control: 'text'
|
|
53
|
+
control: 'text',
|
|
53
54
|
},
|
|
54
55
|
footerSlot: {
|
|
55
|
-
control: 'text'
|
|
56
|
+
control: 'text',
|
|
56
57
|
},
|
|
57
58
|
top: {
|
|
58
59
|
control: 'text',
|
|
59
|
-
table: { disable: true }
|
|
60
|
+
table: { disable: true },
|
|
60
61
|
},
|
|
61
62
|
headerTop: {
|
|
62
63
|
control: 'text',
|
|
63
|
-
table: { disable: true }
|
|
64
|
+
table: { disable: true },
|
|
64
65
|
},
|
|
65
66
|
headerBottom: {
|
|
66
67
|
control: 'text',
|
|
67
|
-
table: { disable: true }
|
|
68
|
+
table: { disable: true },
|
|
68
69
|
},
|
|
69
70
|
content: {
|
|
70
71
|
control: 'text',
|
|
71
|
-
table: { disable: true }
|
|
72
|
+
table: { disable: true },
|
|
72
73
|
},
|
|
73
74
|
default: {
|
|
74
75
|
control: 'text',
|
|
75
|
-
table: { disable: true }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
76
|
+
table: { disable: true },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
}
|
|
79
80
|
|
|
80
81
|
const Template = (args) => ({
|
|
81
82
|
components: { SectionGroup, Row, Column },
|
|
82
83
|
setup() {
|
|
83
|
-
return { args }
|
|
84
|
+
return { args }
|
|
84
85
|
},
|
|
85
86
|
template: `
|
|
86
87
|
<div>
|
|
@@ -119,10 +120,10 @@ const Template = (args) => ({
|
|
|
119
120
|
|
|
120
121
|
{{args.sectionBottom}}
|
|
121
122
|
</div>
|
|
122
|
-
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
export const Default =
|
|
123
|
+
`,
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
export const Default = Template.bind({})
|
|
126
127
|
|
|
127
128
|
Default.args = {
|
|
128
129
|
noPaddingTop: false,
|
|
@@ -144,5 +145,5 @@ Default.args = {
|
|
|
144
145
|
footer: true,
|
|
145
146
|
preContent: true,
|
|
146
147
|
headerRight: true,
|
|
147
|
-
size: 'page'
|
|
148
|
+
size: 'page',
|
|
148
149
|
}
|
|
@@ -114,6 +114,7 @@ export default {
|
|
|
114
114
|
'white',
|
|
115
115
|
'lightblue',
|
|
116
116
|
'lightred',
|
|
117
|
+
'lavendergray',
|
|
117
118
|
].indexOf(value) >= 0,
|
|
118
119
|
},
|
|
119
120
|
applyBackgroundOn: {
|
|
@@ -180,6 +181,7 @@ export default {
|
|
|
180
181
|
}
|
|
181
182
|
if (this.backgroundVariant) {
|
|
182
183
|
let bgColour
|
|
184
|
+
console.log('this.backgroundVariant:-', this.backgroundVariant)
|
|
183
185
|
switch (this.backgroundVariant) {
|
|
184
186
|
case 'grey':
|
|
185
187
|
case 'light':
|
|
@@ -200,9 +202,13 @@ export default {
|
|
|
200
202
|
case 'lightred':
|
|
201
203
|
bgColour = colors.lightred
|
|
202
204
|
break
|
|
205
|
+
case 'lavendergray':
|
|
206
|
+
bgColour = colors.lavendergray
|
|
207
|
+
break
|
|
203
208
|
default:
|
|
204
209
|
bgColour = 'transparent'
|
|
205
210
|
}
|
|
211
|
+
|
|
206
212
|
styles = {
|
|
207
213
|
...(styles || {}),
|
|
208
214
|
[`background-color`]: bgColour,
|