@worksafevictoria/wcl7.5 1.2.2 → 1.4.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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/assets/icons/WSV-reversed.svg +20 -0
  3. package/src/assets/icons/contrast.svg +4 -0
  4. package/src/assets/icons/lang.svg +13 -0
  5. package/src/assets/icons/login.svg +4 -0
  6. package/src/components/Common/CardGrid/index.vue +2 -2
  7. package/src/components/Containers/Carousel/index.stories.js +30 -0
  8. package/src/components/Containers/Carousel/index.vue +165 -0
  9. package/src/components/Containers/HomepageHeaderNew/index.stories.js +75 -0
  10. package/src/components/Containers/HomepageHeaderNew/index.vue +198 -0
  11. package/src/components/Containers/Subheader/index.vue +8 -2
  12. package/src/components/Global/AppFooter/index.vue +30 -28
  13. package/src/components/Global/AppHeader/index.vue +9 -10
  14. package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +71 -0
  15. package/src/components/Global/AppHeaderNew/ModalSearch/styles.scss +43 -0
  16. package/src/components/Global/AppHeaderNew/includes.scss +71 -0
  17. package/src/components/Global/AppHeaderNew/index.stories.js +74 -0
  18. package/src/components/Global/AppHeaderNew/index.vue +1105 -0
  19. package/src/components/Global/AppHeaderNew/mobile.scss +269 -0
  20. package/src/components/Global/AppHeaderNew/styles.scss +621 -0
  21. package/src/components/Global/HeroHeader/index.vue +12 -13
  22. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +21 -17
  23. package/src/components/Paragraphs/BrowseContent/index.vue +1 -5
  24. package/src/components/Paragraphs/ListGroup/index.vue +55 -46
  25. package/src/components/Paragraphs/Statistics/index.vue +1 -0
  26. package/src/components/Paragraphs/TabbedCards/index.vue +42 -38
  27. package/src/components/SubComponents/CardGroup/index.vue +33 -27
  28. package/src/components/SubComponents/CtaButton/index.vue +27 -25
  29. package/src/components/SubComponents/ResourceGroup/index.vue +13 -4
  30. package/src/includes/scss/mixins/src/grid.scss +4 -2
  31. package/src/mock/app-header-new.js +703 -0
  32. package/src/mock/carousel-items.js +57 -0
@@ -75,77 +75,77 @@ export default {
75
75
  components: {
76
76
  arrowRight,
77
77
  arrowLeft,
78
- icon
78
+ icon,
79
79
  },
80
80
  props: {
81
81
  type: {
82
82
  type: String,
83
83
  default: 'default',
84
84
  validator: (value) =>
85
- ['default', 'white', 'gray', 'workwell', 'dark'].indexOf(value) >= 0
85
+ ['default', 'white', 'gray', 'workwell', 'dark'].indexOf(value) >= 0,
86
86
  },
87
87
  url: {
88
88
  type: String,
89
89
  required: false,
90
- default: ''
90
+ default: '',
91
91
  },
92
92
  alt: {
93
93
  type: String,
94
- default: ''
94
+ default: '',
95
95
  },
96
96
  rtl: {
97
97
  type: Boolean,
98
- default: false
98
+ default: false,
99
99
  },
100
100
  glyph: {
101
101
  type: [Object, String],
102
102
  required: false,
103
- default: () => null
103
+ default: () => null,
104
104
  },
105
105
  glyphHeight: {
106
106
  type: Number,
107
107
  required: false,
108
- default: 15
108
+ default: 15,
109
109
  },
110
110
  glyphWidth: {
111
111
  type: Number,
112
112
  required: false,
113
- default: 25
113
+ default: 25,
114
114
  },
115
115
  workwell: {
116
116
  type: Boolean,
117
- default: false
117
+ default: false,
118
118
  },
119
119
  isCentred: {
120
120
  type: Boolean,
121
- default: false
121
+ default: false,
122
122
  },
123
123
  textOnly: {
124
124
  type: Boolean,
125
- default: false
125
+ default: false,
126
126
  },
127
127
  isFluid: {
128
128
  type: Boolean,
129
- default: true
129
+ default: true,
130
130
  },
131
131
  stretch: {
132
132
  type: Boolean,
133
- default: false
133
+ default: false,
134
134
  },
135
135
  slim: {
136
136
  type: Boolean,
137
- default: false
137
+ default: false,
138
138
  },
139
139
  focusOutline: {
140
140
  type: String,
141
141
  default: 'default',
142
- validator: (value) => ['default', 'light', 'dark'].indexOf(value) >= 0
143
- }
142
+ validator: (value) => ['default', 'light', 'dark'].indexOf(value) >= 0,
143
+ },
144
144
  },
145
145
  data() {
146
146
  return {
147
147
  arrowRight,
148
- arrowLeft
148
+ arrowLeft,
149
149
  }
150
150
  },
151
151
  computed: {
@@ -188,12 +188,12 @@ export default {
188
188
  return this.isCentred
189
189
  ? { ['wcl-cta__arrow']: hasArrow }
190
190
  : {
191
- ['wcl-cta__arrow']: hasArrow
191
+ ['wcl-cta__arrow']: hasArrow,
192
192
  }
193
193
  },
194
194
  textClass() {
195
195
  return this.isCentred ? {} : {}
196
- }
196
+ },
197
197
  },
198
198
  methods: {
199
199
  clicked() {
@@ -201,15 +201,17 @@ export default {
201
201
  var attrs
202
202
  if (theEl && theEl.length > 0) {
203
203
  attrs = {
204
- group: this.$store?.state?.page?.content?.title,
204
+ //group: this.$store?.state?.page?.content?.title,
205
+ group: this.$pageStore?.content?.title,
205
206
  label: theEl[0]?.innerText?.split('\n')[0],
206
- data: this.url
207
+ data: this.url,
207
208
  }
208
209
  } else {
209
210
  attrs = {
210
- group: this.$store?.state?.page?.content?.title,
211
+ //group: this.$store?.state?.page?.content?.title,
212
+ group: this.$pageStore?.content?.title,
211
213
  label: '',
212
- data: this.url
214
+ data: this.url,
213
215
  }
214
216
  }
215
217
  // push event to gtm
@@ -225,8 +227,8 @@ export default {
225
227
  this.$router.push(this.url)
226
228
  }
227
229
  this.$emit('clicked')
228
- }
229
- }
230
+ },
231
+ },
230
232
  }
231
233
  </script>
232
234
  <style lang="scss" scoped>
@@ -307,7 +307,8 @@ export default {
307
307
  },
308
308
  async loadMoreCards(init) {
309
309
  const attrs = {
310
- group: this.$store?.state?.page?.content?.title,
310
+ group: this.$pageStore?.content?.title,
311
+ //group: this.$store?.state?.page?.content?.title,
311
312
  }
312
313
  if (this.$gtm && !init) {
313
314
  this.$gtm.push({ event: 'custom.interaction.showmore.click', ...attrs })
@@ -439,8 +440,14 @@ export default {
439
440
  // Some custom logic for gov caretaker logic
440
441
  if (process.env.CARETAKER && process.env.CARETAKER === 'true') {
441
442
  if (!isGovSite(card?.selectedCard?.link)) {
442
- this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
443
- this.$root.$emit('caretaker-open', card?.selectedCard?.link)
443
+ // this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
444
+ // this.$root.$emit('caretaker-open', card?.selectedCard?.link)
445
+ if (this.$pageStore) {
446
+ this.$pageStore.caretaker.referrer = 'list-group'
447
+ }
448
+ if (this.$bus) {
449
+ this.$bus.$emit('caretaker-open', card?.selectedCard?.link)
450
+ }
444
451
  } else {
445
452
  navigateToPath.call(
446
453
  this,
@@ -493,7 +500,9 @@ export default {
493
500
  nextTabbedCard[0].focus()
494
501
  } else {
495
502
  let nextFocus = this.focusNextElement()
496
- this.$root.$emit('last-focus-out')
503
+ if (this.$bus) {
504
+ this.$bus.$emit('last-focus-out')
505
+ }
497
506
  nextFocus.focus()
498
507
  }
499
508
  } else {
@@ -7,14 +7,16 @@ $grid-breakpoints: (
7
7
  sm: 576px,
8
8
  md: 768px,
9
9
  lg: 992px,
10
- xl: 1200px
10
+ xl: 1200px,
11
+ xxl: 1400px
11
12
  );
12
13
 
13
14
  $container-max-widths: (
14
15
  sm: 540px,
15
16
  md: 720px,
16
17
  lg: 960px,
17
- xl: 1140px
18
+ xl: 1140px,
19
+ xxl: 1320px
18
20
  );
19
21
 
20
22
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.