@worksafevictoria/wcl7.5 1.0.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 (392) hide show
  1. package/.editorconfig +13 -0
  2. package/.env +4 -0
  3. package/.eslintrc.cjs +10 -0
  4. package/.eslintrc.js +25 -0
  5. package/.husky/commit-msg +4 -0
  6. package/.prettierrc +5 -0
  7. package/.prettierrc.json +8 -0
  8. package/.storybook/main.js +18 -0
  9. package/.storybook/preview.js +34 -0
  10. package/LICENSE +21 -0
  11. package/README.md +159 -0
  12. package/babel.config.js +8 -0
  13. package/bin/clean.sh +52 -0
  14. package/bin/deploy.sh +25 -0
  15. package/ci/build/Build_Validation.md +35 -0
  16. package/ci/build/build_validation.yml +47 -0
  17. package/ci/release/Release_Beta.md +39 -0
  18. package/ci/release/Release_Master.md +29 -0
  19. package/ci/release/beta.yml +69 -0
  20. package/ci/release/master.yml +39 -0
  21. package/commitlint.config.js +1 -0
  22. package/index.html +13 -0
  23. package/jest.config.js +21 -0
  24. package/lib/detect-browser.js +33 -0
  25. package/lib/utility.js +59 -0
  26. package/lib/utility.test.js +15 -0
  27. package/package.json +93 -0
  28. package/public/favicon.ico +0 -0
  29. package/src/assets/base.css +86 -0
  30. package/src/assets/fonts/VIC-Bold.eot +0 -0
  31. package/src/assets/fonts/VIC-Bold.ttf +0 -0
  32. package/src/assets/fonts/VIC-Bold.woff +0 -0
  33. package/src/assets/fonts/VIC-Bold.woff2 +0 -0
  34. package/src/assets/fonts/VIC-BoldItalic.eot +0 -0
  35. package/src/assets/fonts/VIC-BoldItalic.ttf +0 -0
  36. package/src/assets/fonts/VIC-BoldItalic.woff +0 -0
  37. package/src/assets/fonts/VIC-BoldItalic.woff2 +0 -0
  38. package/src/assets/fonts/VIC-ExtraLight.eot +0 -0
  39. package/src/assets/fonts/VIC-ExtraLight.ttf +0 -0
  40. package/src/assets/fonts/VIC-ExtraLight.woff +0 -0
  41. package/src/assets/fonts/VIC-ExtraLight.woff2 +0 -0
  42. package/src/assets/fonts/VIC-ExtraLightItalic.eot +0 -0
  43. package/src/assets/fonts/VIC-ExtraLightItalic.ttf +0 -0
  44. package/src/assets/fonts/VIC-ExtraLightItalic.woff +0 -0
  45. package/src/assets/fonts/VIC-ExtraLightItalic.woff2 +0 -0
  46. package/src/assets/fonts/VIC-Italic.eot +0 -0
  47. package/src/assets/fonts/VIC-Italic.ttf +0 -0
  48. package/src/assets/fonts/VIC-Italic.woff +0 -0
  49. package/src/assets/fonts/VIC-Italic.woff2 +0 -0
  50. package/src/assets/fonts/VIC-Light.eot +0 -0
  51. package/src/assets/fonts/VIC-Light.ttf +0 -0
  52. package/src/assets/fonts/VIC-Light.woff +0 -0
  53. package/src/assets/fonts/VIC-Light.woff2 +0 -0
  54. package/src/assets/fonts/VIC-LightItalic.eot +0 -0
  55. package/src/assets/fonts/VIC-LightItalic.ttf +0 -0
  56. package/src/assets/fonts/VIC-LightItalic.woff +0 -0
  57. package/src/assets/fonts/VIC-LightItalic.woff2 +0 -0
  58. package/src/assets/fonts/VIC-Medium.eot +0 -0
  59. package/src/assets/fonts/VIC-Medium.ttf +0 -0
  60. package/src/assets/fonts/VIC-Medium.woff +0 -0
  61. package/src/assets/fonts/VIC-Medium.woff2 +0 -0
  62. package/src/assets/fonts/VIC-MediumItalic.eot +0 -0
  63. package/src/assets/fonts/VIC-MediumItalic.ttf +0 -0
  64. package/src/assets/fonts/VIC-MediumItalic.woff +0 -0
  65. package/src/assets/fonts/VIC-MediumItalic.woff2 +0 -0
  66. package/src/assets/fonts/VIC-Regular.eot +0 -0
  67. package/src/assets/fonts/VIC-Regular.ttf +0 -0
  68. package/src/assets/fonts/VIC-Regular.woff +0 -0
  69. package/src/assets/fonts/VIC-Regular.woff2 +0 -0
  70. package/src/assets/fonts/VIC-SemiBold.eot +0 -0
  71. package/src/assets/fonts/VIC-SemiBold.ttf +0 -0
  72. package/src/assets/fonts/VIC-SemiBold.woff +0 -0
  73. package/src/assets/fonts/VIC-SemiBold.woff2 +0 -0
  74. package/src/assets/fonts/VIC-SemiBoldItalic.eot +0 -0
  75. package/src/assets/fonts/VIC-SemiBoldItalic.ttf +0 -0
  76. package/src/assets/fonts/VIC-SemiBoldItalic.woff +0 -0
  77. package/src/assets/fonts/VIC-SemiBoldItalic.woff2 +0 -0
  78. package/src/assets/icons/AppFooter/australian-aboriginal-flag.svg +7 -0
  79. package/src/assets/icons/AppFooter/facebook-ws-footer.svg +58 -0
  80. package/src/assets/icons/AppFooter/facebook-ww-footer.svg +59 -0
  81. package/src/assets/icons/AppFooter/instagram-ww-footer.svg +70 -0
  82. package/src/assets/icons/AppFooter/linkedin-ws-footer.svg +59 -0
  83. package/src/assets/icons/AppFooter/linkedin-ww-footer.svg +60 -0
  84. package/src/assets/icons/AppFooter/logo-workwell-reversed.svg +45 -0
  85. package/src/assets/icons/AppFooter/pride-flag.svg +12 -0
  86. package/src/assets/icons/AppFooter/torres-strait-islanders-flag.svg +9 -0
  87. package/src/assets/icons/AppFooter/twitter-ws-footer.svg +58 -0
  88. package/src/assets/icons/AppFooter/twitter-ww-footer.svg +59 -0
  89. package/src/assets/icons/AppFooter/worksafe-footer-logo.svg +9 -0
  90. package/src/assets/icons/AppFooter/youtube-ws-footer.svg +55 -0
  91. package/src/assets/icons/AppFooter/youtube-ww-footer.svg +56 -0
  92. package/src/assets/icons/AppHeader/chev-down-16.svg +17 -0
  93. package/src/assets/icons/AppHeader/chev-left-24px.svg +13 -0
  94. package/src/assets/icons/AppHeader/chev-right-16px.svg +25 -0
  95. package/src/assets/icons/AppHeader/chev-right-24px.svg +13 -0
  96. package/src/assets/icons/AppHeader/close-32px.svg +15 -0
  97. package/src/assets/icons/AppHeader/menu-32px.svg +20 -0
  98. package/src/assets/icons/AppHeader/search-32px.svg +19 -0
  99. package/src/assets/icons/Email-circle-black.svg +4 -0
  100. package/src/assets/icons/Info-circle-fill.svg +10 -0
  101. package/src/assets/icons/Phone-circle-black.svg +4 -0
  102. package/src/assets/icons/SocialShare/bookmark-white.svg +3 -0
  103. package/src/assets/icons/SocialShare/bookmark-ww-footer.svg +57 -0
  104. package/src/assets/icons/SocialShare/bookmark.svg +56 -0
  105. package/src/assets/icons/SocialShare/email-white.svg +3 -0
  106. package/src/assets/icons/SocialShare/facebook-white.svg +3 -0
  107. package/src/assets/icons/SocialShare/facebook-ws-footer.svg +58 -0
  108. package/src/assets/icons/SocialShare/facebook-ww-footer.svg +59 -0
  109. package/src/assets/icons/SocialShare/facebook.svg +1 -0
  110. package/src/assets/icons/SocialShare/office-file-pdf.svg +1 -0
  111. package/src/assets/icons/SocialShare/print.svg +3 -0
  112. package/src/assets/icons/SocialShare/twitter-white.svg +3 -0
  113. package/src/assets/icons/SocialShare/twitter-ws-footer.svg +58 -0
  114. package/src/assets/icons/SocialShare/twitter-ww-footer.svg +59 -0
  115. package/src/assets/icons/SocialShare/twitter.svg +1 -0
  116. package/src/assets/icons/Strip/AlertDismiss.svg +4 -0
  117. package/src/assets/icons/Strip/Arrow right.svg +4 -0
  118. package/src/assets/icons/Strip/Chevron right.svg +3 -0
  119. package/src/assets/icons/Strip/Dismiss.svg +4 -0
  120. package/src/assets/icons/Strip/Exclamation triangle fill.svg +8 -0
  121. package/src/assets/icons/Strip/Info circle fill.svg +15 -0
  122. package/src/assets/icons/Strip/Information.svg +15 -0
  123. package/src/assets/icons/Strip/Warning.svg +8 -0
  124. package/src/assets/icons/arrow-left.svg +9 -0
  125. package/src/assets/icons/arrow-right.svg +9 -0
  126. package/src/assets/icons/bookmark.svg +56 -0
  127. package/src/assets/icons/brand-VicStateGov-logo-reversed.svg +72 -0
  128. package/src/assets/icons/bullet-empty.svg +3 -0
  129. package/src/assets/icons/bullet.svg +3 -0
  130. package/src/assets/icons/caret-down.svg +1 -0
  131. package/src/assets/icons/caret-left.svg +9 -0
  132. package/src/assets/icons/caret-right.svg +9 -0
  133. package/src/assets/icons/caret-up.svg +1 -0
  134. package/src/assets/icons/chev-down-white.svg +3 -0
  135. package/src/assets/icons/chev-down.svg +3 -0
  136. package/src/assets/icons/chev-left.svg +3 -0
  137. package/src/assets/icons/chev-right.svg +3 -0
  138. package/src/assets/icons/chev-up.svg +3 -0
  139. package/src/assets/icons/clock.svg +3 -0
  140. package/src/assets/icons/close.svg +1 -0
  141. package/src/assets/icons/cross.svg +3 -0
  142. package/src/assets/icons/document.svg +1 -0
  143. package/src/assets/icons/earth.svg +1 -0
  144. package/src/assets/icons/email.svg +6 -0
  145. package/src/assets/icons/external-link-16px.svg +18 -0
  146. package/src/assets/icons/external-link.svg +4 -0
  147. package/src/assets/icons/icon-close.svg +15 -0
  148. package/src/assets/icons/instagram.svg +3 -0
  149. package/src/assets/icons/key.svg +3 -0
  150. package/src/assets/icons/location.svg +10 -0
  151. package/src/assets/icons/phone.svg +3 -0
  152. package/src/assets/icons/refresh.svg +3 -0
  153. package/src/assets/icons/right-arrow.svg +3 -0
  154. package/src/assets/icons/search.svg +5 -0
  155. package/src/assets/icons/tick.svg +3 -0
  156. package/src/assets/icons/video-play.svg +4 -0
  157. package/src/assets/images/hero-header-chevron.svg +9 -0
  158. package/src/assets/images/hero-header-mask.png +0 -0
  159. package/src/assets/images/hero-header-mask.svg +3 -0
  160. package/src/assets/logo.svg +1 -0
  161. package/src/assets/main.css +35 -0
  162. package/src/assets/styles/button.scss +206 -0
  163. package/src/assets/styles/focus.scss +4 -0
  164. package/src/assets/styles/generated-icons.scss +374 -0
  165. package/src/assets/styles/modal.scss +12 -0
  166. package/src/assets/styles/rtl.scss +8 -0
  167. package/src/assets/styles/storybook.scss +9 -0
  168. package/src/assets/styles/stylesheet.scss +7 -0
  169. package/src/assets/styles/webfonts.css +155 -0
  170. package/src/components/Common/CardGrid/cardgrid.stories.js +269 -0
  171. package/src/components/Common/CardGrid/index.vue +321 -0
  172. package/src/components/Common/CardGridItem/card-grid-item-caret.vue +164 -0
  173. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +163 -0
  174. package/src/components/Common/CardGridItem/index.vue +848 -0
  175. package/src/components/Common/FilterButton/index.vue +93 -0
  176. package/src/components/Containers/Column/index.stories.js +35 -0
  177. package/src/components/Containers/Column/index.vue +14 -0
  178. package/src/components/Containers/Container/index.stories.js +13 -0
  179. package/src/components/Containers/Container/index.vue +15 -0
  180. package/src/components/Containers/HomepageHeader/index.stories.js +78 -0
  181. package/src/components/Containers/HomepageHeader/index.vue +186 -0
  182. package/src/components/Containers/Row/index.stories.js +12 -0
  183. package/src/components/Containers/Row/index.vue +14 -0
  184. package/src/components/Containers/SectionGroup/index.stories.js +148 -0
  185. package/src/components/Containers/SectionGroup/index.vue +310 -0
  186. package/src/components/Containers/Subheader/index.stories.js +74 -0
  187. package/src/components/Containers/Subheader/index.vue +149 -0
  188. package/src/components/Global/AlertStrip/index.stories.js +13 -0
  189. package/src/components/Global/AlertStrip/index.vue +145 -0
  190. package/src/components/Global/AlertStrip/styles.scss +78 -0
  191. package/src/components/Global/AppFooter/FooterSocialShare/index.vue +105 -0
  192. package/src/components/Global/AppFooter/FooterSocialShare/styles.scss +41 -0
  193. package/src/components/Global/AppFooter/index.stories.js +24 -0
  194. package/src/components/Global/AppFooter/index.vue +632 -0
  195. package/src/components/Global/AppFooter/storiesConst.js +110 -0
  196. package/src/components/Global/AppFooter/styles.scss +393 -0
  197. package/src/components/Global/AppHeader/ModalSearch/index.vue +66 -0
  198. package/src/components/Global/AppHeader/ModalSearch/styles.scss +43 -0
  199. package/src/components/Global/AppHeader/includes.scss +68 -0
  200. package/src/components/Global/AppHeader/index.stories.js +82 -0
  201. package/src/components/Global/AppHeader/index.vue +878 -0
  202. package/src/components/Global/AppHeader/mobile.scss +240 -0
  203. package/src/components/Global/AppHeader/styles.scss +371 -0
  204. package/src/components/Global/BackToTop/index.stories.js +18 -0
  205. package/src/components/Global/BackToTop/index.vue +67 -0
  206. package/src/components/Global/BackToTop/styles.scss +46 -0
  207. package/src/components/Global/ContrastMode/index.stories.js +39 -0
  208. package/src/components/Global/ContrastMode/index.vue +308 -0
  209. package/src/components/Global/Cookies/Constants.js +72 -0
  210. package/src/components/Global/Cookies/index.storieshide.js +45 -0
  211. package/src/components/Global/Cookies/index.vue +453 -0
  212. package/src/components/Global/Cookies/styles.scss +259 -0
  213. package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +196 -0
  214. package/src/components/Global/DirectoryFilters/index.vue +176 -0
  215. package/src/components/Global/GlobalNotice/index.vue +266 -0
  216. package/src/components/Global/HeroHeader/index.stories.js +93 -0
  217. package/src/components/Global/HeroHeader/index.vue +343 -0
  218. package/src/components/Global/HeroHeader/styles.scss +480 -0
  219. package/src/components/Global/ProgressBar/index.stories.js +51 -0
  220. package/src/components/Global/ProgressBar/index.vue +58 -0
  221. package/src/components/Global/ProgressBar/styles.scss +116 -0
  222. package/src/components/Global/SocialShare/index.stories.js +18 -0
  223. package/src/components/Global/SocialShare/index.vue +318 -0
  224. package/src/components/Global/Strip/index.stories.js +70 -0
  225. package/src/components/Global/Strip/index.vue +357 -0
  226. package/src/components/HelloWorld.vue +44 -0
  227. package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +232 -0
  228. package/src/components/Paragraphs/Accordion/StepperItem/index.vue +274 -0
  229. package/src/components/Paragraphs/Accordion/index.stories.js +84 -0
  230. package/src/components/Paragraphs/Accordion/index.vue +202 -0
  231. package/src/components/Paragraphs/Breakout/index.stories.js +39 -0
  232. package/src/components/Paragraphs/Breakout/index.vue +115 -0
  233. package/src/components/Paragraphs/BrowseContent/index.stories.js +220 -0
  234. package/src/components/Paragraphs/BrowseContent/index.vue +298 -0
  235. package/src/components/Paragraphs/BrowseContent/switcher.vue +63 -0
  236. package/src/components/Paragraphs/Calculator/CardContainer/index.vue +278 -0
  237. package/src/components/Paragraphs/Calculator/CardContainer/styles.scss +152 -0
  238. package/src/components/Paragraphs/Calculator/Constants.js +246 -0
  239. package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +124 -0
  240. package/src/components/Paragraphs/Calculator/RiskLevel/styles.scss +73 -0
  241. package/src/components/Paragraphs/Calculator/index.stories.js +27 -0
  242. package/src/components/Paragraphs/Calculator/index.vue +284 -0
  243. package/src/components/Paragraphs/Calculator/styles.scss +49 -0
  244. package/src/components/Paragraphs/Directory/Records/CJ/index.vue +59 -0
  245. package/src/components/Paragraphs/Directory/Records/ISP/distance.js +46 -0
  246. package/src/components/Paragraphs/Directory/Records/ISP/index.vue +88 -0
  247. package/src/components/Paragraphs/Directory/Records/PRS/index.vue +59 -0
  248. package/src/components/Paragraphs/Directory/Records/PRS/recordContent.vue +91 -0
  249. package/src/components/Paragraphs/Directory/Records/PRS/recordDetails.vue +49 -0
  250. package/src/components/Paragraphs/Directory/Records/index.vue +203 -0
  251. package/src/components/Paragraphs/Directory/Records/styles.scss +129 -0
  252. package/src/components/Paragraphs/Directory/constants.js +79 -0
  253. package/src/components/Paragraphs/Directory/index.vue +334 -0
  254. package/src/components/Paragraphs/ListGroup/Constants.js +72 -0
  255. package/src/components/Paragraphs/ListGroup/Link/list-link.stories.js +71 -0
  256. package/src/components/Paragraphs/ListGroup/index.vue +333 -0
  257. package/src/components/Paragraphs/ListGroup/list-group.stories.js +64 -0
  258. package/src/components/Paragraphs/ListGroup/navigation-card.stories.js +66 -0
  259. package/src/components/Paragraphs/MarketingBanner/index.stories.js +65 -0
  260. package/src/components/Paragraphs/MarketingBanner/index.vue +118 -0
  261. package/src/components/Paragraphs/MarketingBanner/styles.scss +87 -0
  262. package/src/components/Paragraphs/ProofPoints/index.stories.js +173 -0
  263. package/src/components/Paragraphs/ProofPoints/index.vue +64 -0
  264. package/src/components/Paragraphs/RelatedInformation/index.stories.js +32 -0
  265. package/src/components/Paragraphs/RelatedInformation/index.vue +62 -0
  266. package/src/components/Paragraphs/RelatedInformation/styles.scss +50 -0
  267. package/src/components/Paragraphs/RichText/index.stories.js +393 -0
  268. package/src/components/Paragraphs/RichText/index.vue +113 -0
  269. package/src/components/Paragraphs/RichText/scss/base.scss +355 -0
  270. package/src/components/Paragraphs/RichText/scss/definition-list.scss +35 -0
  271. package/src/components/Paragraphs/RichText/scss/styled-list.scss +152 -0
  272. package/src/components/Paragraphs/RichText/scss/table.scss +85 -0
  273. package/src/components/Paragraphs/ScrollSpy/index.stories.js +184 -0
  274. package/src/components/Paragraphs/ScrollSpy/index.vue +147 -0
  275. package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +29 -0
  276. package/src/components/Paragraphs/SelectableCards/cardbody.vue +25 -0
  277. package/src/components/Paragraphs/SelectableCards/cardtop.vue +113 -0
  278. package/src/components/Paragraphs/SelectableCards/index.stories.js +27 -0
  279. package/src/components/Paragraphs/SelectableCards/index.vue +116 -0
  280. package/src/components/Paragraphs/Statistics/index.stories.js +106 -0
  281. package/src/components/Paragraphs/Statistics/index.vue +95 -0
  282. package/src/components/Paragraphs/TabbedCards/TempIcons/cake-black-18dp.svg +1 -0
  283. package/src/components/Paragraphs/TabbedCards/TempIcons/commute-black-18dp.svg +1 -0
  284. package/src/components/Paragraphs/TabbedCards/TempIcons/fire_extinguisher-black-18dp.svg +1 -0
  285. package/src/components/Paragraphs/TabbedCards/TempIcons/free_breakfast-black-18dp.svg +1 -0
  286. package/src/components/Paragraphs/TabbedCards/TempIcons/portrait-black-18dp.svg +1 -0
  287. package/src/components/Paragraphs/TabbedCards/TempIcons/storefront-black-18dp.svg +1 -0
  288. package/src/components/Paragraphs/TabbedCards/TempIcons/tag_faces-black-18dp.svg +1 -0
  289. package/src/components/Paragraphs/TabbedCards/index.stories.js +36 -0
  290. package/src/components/Paragraphs/TabbedCards/index.vue +393 -0
  291. package/src/components/Paragraphs/Tabs/index.stories.js +60 -0
  292. package/src/components/Paragraphs/Tabs/index.vue +127 -0
  293. package/src/components/Paragraphs/Tabs/styles.scss +150 -0
  294. package/src/components/Paragraphs/TabulatedData/Constants.js +158 -0
  295. package/src/components/Paragraphs/TabulatedData/index.stories.js +39 -0
  296. package/src/components/Paragraphs/TabulatedData/index.vue +145 -0
  297. package/src/components/Paragraphs/TaskFinder/index.stories.js +45 -0
  298. package/src/components/Paragraphs/TaskFinder/index.vue +192 -0
  299. package/src/components/Paragraphs/TaskFinder/pdf/index.vue +109 -0
  300. package/src/components/Paragraphs/TaskFinder/task-finder-column.vue +146 -0
  301. package/src/components/Paragraphs/TextMedia/MediaTypes/Image/index.vue +24 -0
  302. package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +29 -0
  303. package/src/components/Paragraphs/TextMedia/index.stories.js +94 -0
  304. package/src/components/Paragraphs/TextMedia/index.vue +150 -0
  305. package/src/components/Paragraphs/VideoGrid/index.stories.js +167 -0
  306. package/src/components/Paragraphs/VideoGrid/index.vue +124 -0
  307. package/src/components/Paragraphs/VideoPlayer/index.stories.js +95 -0
  308. package/src/components/Paragraphs/VideoPlayer/index.vue +110 -0
  309. package/src/components/Paragraphs/Webform/index.stories.js +70 -0
  310. package/src/components/Paragraphs/Webform/index.vue +103 -0
  311. package/src/components/SubComponents/Breadcrumb/constants.js +15 -0
  312. package/src/components/SubComponents/Breadcrumb/index.stories.js +22 -0
  313. package/src/components/SubComponents/Breadcrumb/index.vue +91 -0
  314. package/src/components/SubComponents/CardGroup/cardbody.vue +109 -0
  315. package/src/components/SubComponents/CardGroup/cardtop.vue +106 -0
  316. package/src/components/SubComponents/CardGroup/index.stories.js +145 -0
  317. package/src/components/SubComponents/CardGroup/index.vue +297 -0
  318. package/src/components/SubComponents/CtaButton/index.stories.js +357 -0
  319. package/src/components/SubComponents/CtaButton/index.vue +256 -0
  320. package/src/components/SubComponents/FormAddressPostcode/index.stories.js +43 -0
  321. package/src/components/SubComponents/FormAddressPostcode/index.vue +314 -0
  322. package/src/components/SubComponents/FormInstance/index.stories.js +8 -0
  323. package/src/components/SubComponents/FormInstance/index.vue +12 -0
  324. package/src/components/SubComponents/GoogleSearch/index.stories.js +8 -0
  325. package/src/components/SubComponents/GoogleSearch/index.vue +405 -0
  326. package/src/components/SubComponents/Icon/README.md +40 -0
  327. package/src/components/SubComponents/Icon/example.js +41 -0
  328. package/src/components/SubComponents/Icon/index.stories.js +84 -0
  329. package/src/components/SubComponents/Icon/index.vue +127 -0
  330. package/src/components/SubComponents/Icon/styles.scss +38 -0
  331. package/src/components/SubComponents/Loading/index.stories.js +9 -0
  332. package/src/components/SubComponents/Loading/index.vue +15 -0
  333. package/src/components/SubComponents/MediaPlayer/index.stories.js +58 -0
  334. package/src/components/SubComponents/MediaPlayer/index.vue +69 -0
  335. package/src/components/SubComponents/Pagination/index.stories.js +119 -0
  336. package/src/components/SubComponents/Pagination/index.vue +184 -0
  337. package/src/components/SubComponents/Pagination/pagination.js +58 -0
  338. package/src/components/SubComponents/ResourceGroup/List/index.stories.js +268 -0
  339. package/src/components/SubComponents/ResourceGroup/cardbody.vue +221 -0
  340. package/src/components/SubComponents/ResourceGroup/cardfooter.vue +61 -0
  341. package/src/components/SubComponents/ResourceGroup/cardtop.vue +94 -0
  342. package/src/components/SubComponents/ResourceGroup/index.stories.js +268 -0
  343. package/src/components/SubComponents/ResourceGroup/index.vue +575 -0
  344. package/src/components/SubComponents/ResourceGroup/styles.scss +317 -0
  345. package/src/components/SubComponents/ResourceGroup/switcher.vue +63 -0
  346. package/src/components/SubComponents/Search/SearchListing/index.vue +217 -0
  347. package/src/components/SubComponents/Search/index.stories.js +43 -0
  348. package/src/components/SubComponents/Search/index.vue +238 -0
  349. package/src/components/SubComponents/SingleImage/index.stories.js +60 -0
  350. package/src/components/SubComponents/SingleImage/index.vue +98 -0
  351. package/src/components/SubComponents/VideoThumbnail/index.stories.js +41 -0
  352. package/src/components/SubComponents/VideoThumbnail/index.vue +239 -0
  353. package/src/components/TheWelcome.vue +88 -0
  354. package/src/components/WelcomeItem.vue +87 -0
  355. package/src/components/icons/IconCommunity.vue +7 -0
  356. package/src/components/icons/IconDocumentation.vue +7 -0
  357. package/src/components/icons/IconEcosystem.vue +7 -0
  358. package/src/components/icons/IconSupport.vue +7 -0
  359. package/src/components/icons/IconTooling.vue +19 -0
  360. package/src/includes/scss/all.scss +2 -0
  361. package/src/includes/scss/mixins/all.scss +6 -0
  362. package/src/includes/scss/mixins/src/focus.scss +38 -0
  363. package/src/includes/scss/mixins/src/fp.scss +31 -0
  364. package/src/includes/scss/mixins/src/grid.scss +125 -0
  365. package/src/includes/scss/mixins/src/mq.scss +30 -0
  366. package/src/includes/scss/mixins/src/rtl.scss +8 -0
  367. package/src/includes/scss/mixins/src/units.scss +110 -0
  368. package/src/includes/scss/vars/all.scss +2 -0
  369. package/src/includes/scss/vars/src/breakpoints.scss +20 -0
  370. package/src/includes/scss/vars/src/colors.module.scss +53 -0
  371. package/src/includes/scss/vars/src/colors.scss +53 -0
  372. package/src/index.js +116 -0
  373. package/src/main.js +18 -0
  374. package/src/mock/accordion.js +104 -0
  375. package/src/mock/app-header.js +683 -0
  376. package/src/mock/control-selectable-cards.js +58 -0
  377. package/src/mock/jest.svgtransformer.js +7 -0
  378. package/src/mock/list-group.js +46 -0
  379. package/src/mock/proof-points.js +55 -0
  380. package/src/mock/related-info.js +44 -0
  381. package/src/mock/selectable-cards.js +48 -0
  382. package/src/mock/statistics.js +63 -0
  383. package/src/mock/styleMock.js +1 -0
  384. package/src/mock/tabbed-cards.js +197 -0
  385. package/src/mock/task-finder.js +68 -0
  386. package/src/mock/video-grid.js +409 -0
  387. package/src/mock/video-media.js +51 -0
  388. package/src/public/places/api/v1/geocode/json +69 -0
  389. package/src/public/places/api/v1/place/autocomplete/json +226 -0
  390. package/stylelint.config.js +63 -0
  391. package/vite.config.js +19 -0
  392. package/vitest.config.js +14 -0
@@ -0,0 +1,575 @@
1
+ <template>
2
+ <card-grid
3
+ :title="title"
4
+ :title-tag="titleTag"
5
+ :cards="displayedCards"
6
+ :rtl="rtl"
7
+ :force-lg-columns-per-row="columns"
8
+ :force-md-columns-per-row="columns"
9
+ :force-sm-columns-per-row="columns"
10
+ :is-selectable="false"
11
+ :row-spacing="'large'"
12
+ :class="[`card_group--${background}`, `card_group--${cardResourseType}`]"
13
+ :background-variant="background"
14
+ @selected="selectedCard"
15
+ >
16
+ <template
17
+ v-if="enableBundleFilter && bundle.length > 1"
18
+ v-slot:gridHeaderRight
19
+ >
20
+ <switcher
21
+ v-if="enableBundleFilter"
22
+ :options="bundle"
23
+ class="card_group__switcher"
24
+ :get-option-alias="getBundleAlias"
25
+ @switched="onSwitcher"
26
+ @reset="onSwitcher"
27
+ />
28
+ </template>
29
+
30
+ <template v-if="filters.taxonomies.length > 0" v-slot:gridPreContent>
31
+ <directory-filters
32
+ class="card_group__filter"
33
+ :filters="filters"
34
+ :results="allCards.total"
35
+ :is-filtering="loader"
36
+ @onFilter="onFilter"
37
+ @onReset="reset"
38
+ />
39
+ </template>
40
+
41
+ <template v-slot:cardItem="{ card }">
42
+ <card-grid-item
43
+ v-if="card"
44
+ :show-divider="false"
45
+ :header-size="'large'"
46
+ class="card_group__card"
47
+ :class="{
48
+ [`card_group__card--${card.colour}`]: card.pillText,
49
+ [`card_group__card--none`]: !card.pillText,
50
+ [`card_group__card--${cardResourseType}`]: 'card_group__card--resourse-group'
51
+ }"
52
+ :card-header-title="card.title"
53
+ :caret="getCaret(card)"
54
+ :description="card.description"
55
+ :card-padding="'none'"
56
+ :caret-position="'bottom'"
57
+ :rtl="card.rtl"
58
+ :border-type="background === 'white' ? 'thick' : 'none'"
59
+ :pill-text="card.pillText"
60
+ :link="card.link ? card.link : false"
61
+ :taxonomies="{
62
+ industry: card.industry,
63
+ topic: card.topic,
64
+ language: card.language
65
+ }"
66
+ >
67
+ <template v-slot:cardTop>
68
+ <card-top :card="card" :resource-type="cardResourseType" />
69
+ </template>
70
+
71
+ <template v-slot:cardDescription>
72
+ <card-body :card="card" :resource-type="cardResourseType" />
73
+ </template>
74
+
75
+ <!-- footer - download button -->
76
+ <template
77
+ v-if="cardResourseType === 'resource-group'"
78
+ v-slot:cardFooter
79
+ >
80
+ <card-footer :card="card" :resource-type="cardResourseType" />
81
+ </template>
82
+ </card-grid-item>
83
+ </template>
84
+
85
+ <template
86
+ v-if="
87
+ loader ||
88
+ (displayedCards.length === 0 && !loader) ||
89
+ $slots.cardGroupFooter ||
90
+ (!loader && showLoadMore && hasMorePages)
91
+ "
92
+ v-slot:cardGridFooter
93
+ >
94
+ <column v-if="loader" sm="12">
95
+ <strong>Loading... </strong>
96
+ <b-spinner class="float-right"></b-spinner>
97
+ </column>
98
+ <column v-if="displayedCards.length === 0 && !loading" sm="12">
99
+ <strong>{{ emptyCardsText }}</strong>
100
+ </column>
101
+ <column v-if="$slots.cardGroupFooter" sm="12">
102
+ <slot name="cardGroupFooter"></slot>
103
+ </column>
104
+ <column v-if="!loader && showLoadMore" sm="12" class="text-center">
105
+ <cta-button
106
+ type="dark"
107
+ :focus-outline="'light'"
108
+ :text-only="true"
109
+ :is-centred="true"
110
+ :class="'card_group__loadmore mb-0'"
111
+ @clicked="handleLoadMore"
112
+ >Load more</cta-button
113
+ >
114
+ </column>
115
+ </template>
116
+ </card-grid>
117
+ </template>
118
+
119
+ <script>
120
+ import Column from './../../Containers/Column/index.vue'
121
+ import CardGrid from './../../Common/CardGrid/index.vue'
122
+ import CardGridItem from './../../Common/CardGridItem/index.vue'
123
+ import CardTop from './cardtop.vue'
124
+ import CardBody from './cardbody.vue'
125
+ import CardFooter from './cardfooter.vue'
126
+ import CtaButton from './../CtaButton/index.vue'
127
+ import DirectoryFilters from './../../Global/DirectoryFilters/index.vue'
128
+ import Switcher from './switcher.vue'
129
+ import {
130
+ isAbsoluteUrl,
131
+ navigateToPath,
132
+ isGovSite
133
+ } from './../../../../lib/utility'
134
+ import { BSpinner } from 'bootstrap-vue-next'
135
+
136
+ export default {
137
+ name: 'ResourceGroup',
138
+ components: {
139
+ Column,
140
+ CardGrid,
141
+ CardGridItem,
142
+ CardTop,
143
+ CardBody,
144
+ CardFooter,
145
+ CtaButton,
146
+ DirectoryFilters,
147
+ Switcher,
148
+ BSpinner
149
+ },
150
+ props: {
151
+ background: {
152
+ type: String,
153
+ default: 'white'
154
+ },
155
+ title: {
156
+ type: String,
157
+ default: ''
158
+ },
159
+ titleTag: {
160
+ type: String,
161
+ default: 'h2'
162
+ },
163
+ rtl: {
164
+ type: Boolean,
165
+ default: false
166
+ },
167
+ bundle: {
168
+ type: Array,
169
+ default: () => ['']
170
+ },
171
+ columns: {
172
+ type: Number,
173
+ default: 3
174
+ },
175
+ initialDisplyLimit: {
176
+ type: Number,
177
+ default: 0
178
+ },
179
+ fetchContent: {
180
+ type: Function,
181
+ required: true
182
+ },
183
+ fetchFilters: {
184
+ type: Function,
185
+ required: false,
186
+ default: null
187
+ },
188
+ enableBundleFilter: {
189
+ type: Boolean
190
+ },
191
+ getBundleAlias: {
192
+ type: Function,
193
+ required: false,
194
+ default: null
195
+ },
196
+ type: {
197
+ type: String,
198
+ required: true
199
+ },
200
+ resourceType: {
201
+ type: String,
202
+ default: 'resource-group'
203
+ },
204
+ showLoadMore: {
205
+ type: Boolean,
206
+ default: false
207
+ },
208
+ emptyCardsText: {
209
+ type: String,
210
+ default: 'No results returned'
211
+ },
212
+ loading: {
213
+ type: Boolean,
214
+ default: false
215
+ }
216
+ },
217
+ async fetch() {
218
+ if (this.displayedCards.length === 0) {
219
+ await this.loadFiltersAndContent()
220
+ }
221
+ },
222
+ data() {
223
+ return {
224
+ loader: this.loading,
225
+ cardResourseType: this.resourceType,
226
+ hasMorePages: false,
227
+ displayedCards: [],
228
+ bundleCache: {},
229
+ displayLimit: 0,
230
+ allCards: undefined,
231
+ filters: {
232
+ taxonomies: [],
233
+ selected: {},
234
+ availableBundles: []
235
+ }
236
+ }
237
+ },
238
+ computed: {
239
+ allCardsRTL() {
240
+ if (this.displayedCards.length === 0) {
241
+ return this.rtl
242
+ }
243
+ return this.displayedCards.every((card) => this.rtl || card.rtl)
244
+ }
245
+ },
246
+ fetchOnServer: true,
247
+ fetchKey: 'wcl-card-group',
248
+ methods: {
249
+ async loadFiltersAndContent() {
250
+ await Promise.all([
251
+ this.fetchFilters ? this.loadFilters() : Promise.resolve(),
252
+ this.loadMoreCards(true)
253
+ ])
254
+ },
255
+ init() {
256
+ this.allCards = {
257
+ total: 0,
258
+ cards: []
259
+ }
260
+ this.displayLimit = 0
261
+ this.hasMorePages = false
262
+ this.displayedCards = []
263
+ this.bundleCache = {}
264
+ },
265
+ async fetchCards(currentDisplayedCards, allCards, addMoreBy, bundles) {
266
+ const shouldMakeNewFetchCall =
267
+ currentDisplayedCards.length + addMoreBy > allCards.cards.length
268
+
269
+ if (shouldMakeNewFetchCall) {
270
+ const cardBundles = await Promise.all(
271
+ bundles.map((bundle, index) =>
272
+ this.getBundle(bundle, addMoreBy, index)
273
+ )
274
+ )
275
+
276
+ allCards = this.getShuffledCards(cardBundles)
277
+
278
+ if (
279
+ this.type === 'paragraph--cards_group_latest' ||
280
+ this.type === 'paragraph--browse_content' ||
281
+ this.type === 'paragraph--resource_group' ||
282
+ this.type === 'paragraph--resource_list'
283
+ ) {
284
+ allCards.cards = this.sortByDate(allCards.cards)
285
+ }
286
+ }
287
+ return allCards
288
+ },
289
+ async loadMoreCards(init) {
290
+ const attrs = {
291
+ group: this.$store?.state?.page?.content?.title
292
+ }
293
+ if (this.$gtm && !init) {
294
+ this.$gtm.push({ event: 'custom.interaction.showmore.click', ...attrs })
295
+ }
296
+ if (init) {
297
+ this.init()
298
+ }
299
+ this.loader = true
300
+ const addMoreBy = this.initialDisplyLimit
301
+ this.displayLimit += addMoreBy
302
+ const bundles =
303
+ this.filters.availableBundles.length > 0
304
+ ? this.filters.availableBundles
305
+ : this.bundle
306
+ this.allCards = await this.fetchCards(
307
+ this.displayedCards,
308
+ this.allCards,
309
+ addMoreBy,
310
+ bundles
311
+ )
312
+
313
+ this.hasMorePages = this.allCards.total > this.allCards.cards.length
314
+ this.displayedCards = this.allCards.cards.slice(0, this.displayLimit)
315
+
316
+ this.loader = false
317
+ },
318
+ getBundle(bundle, addMoreBy, index) {
319
+ let start
320
+ const rows = addMoreBy
321
+ const cache = (this.bundleCache[bundle] = this.bundleCache[bundle] || {
322
+ response: {
323
+ results: [],
324
+ numFound: 0
325
+ },
326
+ qs: {
327
+ start
328
+ }
329
+ })
330
+
331
+ if (cache.qs.start === undefined) {
332
+ start = 0
333
+ } else if (cache.response.numFound > cache.response.results.length) {
334
+ start = cache.response.results.length
335
+ } else {
336
+ return Promise.resolve(cache.response)
337
+ }
338
+
339
+ const qs = {
340
+ bundle,
341
+ rows,
342
+ start
343
+ }
344
+ return this.fetchContent(qs, this.filters.selected, index).then(
345
+ (response) => {
346
+ cache.qs.start = qs.start
347
+ cache.response.numFound = response.numFound
348
+ cache.response.results.push(...response.results)
349
+ return cache.response
350
+ }
351
+ )
352
+ },
353
+ getShuffledCards(cardBundles) {
354
+ const shuffled = []
355
+ const bundleWithMostCards = cardBundles.reduce(
356
+ (a, b) => (a.results.length > b.results.length ? a : b),
357
+ { results: [] }
358
+ ).results.length
359
+
360
+ for (let i = 0; i < bundleWithMostCards; i++) {
361
+ cardBundles.forEach((bundle) => {
362
+ if (bundle.results[i]) {
363
+ shuffled.push(bundle.results[i])
364
+ }
365
+ })
366
+ }
367
+
368
+ const total = cardBundles.reduce((acc, bundle) => {
369
+ return acc + bundle.numFound
370
+ }, 0)
371
+
372
+ return { cards: shuffled, total }
373
+ },
374
+ loadFilters() {
375
+ return this.fetchFilters().then((taxonomies) => {
376
+ this.filters.taxonomies = taxonomies
377
+ return Promise.resolve(taxonomies)
378
+ })
379
+ },
380
+ onFilter(filters) {
381
+ this.bundleCache = {}
382
+ Object.keys(filters).forEach((filter) => {
383
+ this.filters.selected[filter] = filters[filter].map((obj) => obj.tid)
384
+ })
385
+ this.loadMoreCards(true)
386
+ },
387
+ onSwitcher(switchToBundle) {
388
+ this.filters.selected = {}
389
+ this.filters.availableBundles.length = 0
390
+ if (switchToBundle) {
391
+ this.filters.availableBundles.push(switchToBundle)
392
+ }
393
+ this.loadMoreCards(true)
394
+ },
395
+ async reset() {
396
+ this.bundleCache = {}
397
+ this.filters.selected = {}
398
+ this.filters.availableBundles.length = 0
399
+ await this.loadMoreCards(true)
400
+ },
401
+ sortByDate(cards) {
402
+ const sorted = cards.sort((a, b) => {
403
+ return new Date(b.dateSort) - new Date(a.dateSort)
404
+ })
405
+ return sorted
406
+ },
407
+ handleLoadMore() {
408
+ this.loadMoreCards(false)
409
+ },
410
+
411
+ getCaret(card) {
412
+ if (card.link && isAbsoluteUrl(card.link)) {
413
+ return 'external'
414
+ } else {
415
+ return undefined
416
+ }
417
+ },
418
+ selectedCard(card) {
419
+ // Some custom logic for gov caretaker logic
420
+ if (process.env.CARETAKER && process.env.CARETAKER === 'true') {
421
+ if (!isGovSite(card?.selectedCard?.link)) {
422
+ this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
423
+ this.$root.$emit('caretaker-open', card?.selectedCard?.link)
424
+ } else {
425
+ navigateToPath.call(
426
+ this,
427
+ card?.selectedCard?.link,
428
+ card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
429
+ )
430
+ }
431
+ } else {
432
+ navigateToPath.call(
433
+ this,
434
+ card?.selectedCard?.link,
435
+ card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
436
+ )
437
+ }
438
+ },
439
+ focussed(ev) {
440
+ const path = ev.path || (ev.composedPath && ev.composedPath())
441
+ const theTabbedCards = path.find(
442
+ (el) => el['_prevClass'] === 'tabbed-cards'
443
+ )
444
+ if (ev.shiftKey && theTabbedCards) {
445
+ ev.preventDefault()
446
+ let selectedTabbedCards = theTabbedCards.getElementsByClassName(
447
+ 'isSelected'
448
+ )
449
+ let selectedCard = selectedTabbedCards[0].getElementsByTagName('button')
450
+ let thePrevLGItem = ev.target?.parentElement?.parentElement?.previousSibling?.getElementsByTagName(
451
+ 'button'
452
+ )
453
+ if (thePrevLGItem) {
454
+ thePrevLGItem[0].focus()
455
+ } else {
456
+ selectedCard[0].focus()
457
+ }
458
+ } else if (!ev.shiftKey && theTabbedCards) {
459
+ ev.preventDefault()
460
+ let selectedTabbedCards = theTabbedCards.getElementsByClassName(
461
+ 'isSelected'
462
+ )
463
+ let nextTabbedCard = selectedTabbedCards[0]?.parentElement?.nextSibling?.getElementsByTagName(
464
+ 'button'
465
+ )
466
+ let theNextLGItem = ev.target?.parentElement?.parentElement?.nextSibling?.getElementsByTagName(
467
+ 'button'
468
+ )
469
+ if (theNextLGItem) {
470
+ theNextLGItem[0].focus()
471
+ } else if (nextTabbedCard) {
472
+ nextTabbedCard[0].focus()
473
+ } else {
474
+ let nextFocus = this.focusNextElement()
475
+ this.$root.$emit('last-focus-out')
476
+ nextFocus.focus()
477
+ }
478
+ } else {
479
+ return true
480
+ }
481
+ },
482
+ focusNextElement(reverse, activeElem) {
483
+ /*check if an element is defined or use activeElement*/
484
+ activeElem =
485
+ activeElem instanceof HTMLElement ? activeElem : document.activeElement
486
+
487
+ let queryString = [
488
+ 'a:not([disabled]):not([tabindex="-1"])',
489
+ 'button:not([disabled]):not([tabindex="-1"])',
490
+ 'input:not([disabled]):not([tabindex="-1"])',
491
+ 'select:not([disabled]):not([tabindex="-1"])',
492
+ '[tabindex]:not([disabled]):not([tabindex="-1"])'
493
+ /* add custom queries here */
494
+ ].join(','),
495
+ queryResult = Array.prototype.filter.call(
496
+ document.querySelectorAll(queryString),
497
+ (elem) => {
498
+ /*check for visibility while always include the current activeElement*/
499
+ return (
500
+ elem.offsetWidth > 0 ||
501
+ elem.offsetHeight > 0 ||
502
+ elem === activeElem
503
+ )
504
+ }
505
+ ),
506
+ indexedList = queryResult
507
+ .slice()
508
+ .filter((elem) => {
509
+ /* filter out all indexes not greater than 0 */
510
+ return elem.tabIndex == 0 || elem.tabIndex == -1 ? false : true
511
+ })
512
+ .sort((a, b) => {
513
+ /* sort the array by index from smallest to largest */
514
+ return a.tabIndex != 0 && b.tabIndex != 0
515
+ ? a.tabIndex < b.tabIndex
516
+ ? -1
517
+ : b.tabIndex < a.tabIndex
518
+ ? 1
519
+ : 0
520
+ : a.tabIndex != 0
521
+ ? -1
522
+ : b.tabIndex != 0
523
+ ? 1
524
+ : 0
525
+ }),
526
+ focusable = [].concat(
527
+ indexedList,
528
+ queryResult.filter((elem) => {
529
+ /* filter out all indexes above 0 */
530
+ return elem.tabIndex == 0 || elem.tabIndex == -1 ? true : false
531
+ })
532
+ )
533
+
534
+ /* if reverse is true return the previous focusable element
535
+ if reverse is false return the next focusable element */
536
+ return reverse
537
+ ? focusable[focusable.indexOf(activeElem) - 1] ||
538
+ focusable[focusable.length - 1]
539
+ : focusable[focusable.indexOf(activeElem) + 1] || focusable[0]
540
+ }
541
+ }
542
+ }
543
+ </script>
544
+ <style lang="scss" scoped>
545
+ @import '../../../includes/scss/all';
546
+ $cardTextPadding: 16px;
547
+ $borderRadius: 8px;
548
+
549
+ .ws-paragraphs-layout__fullwidth {
550
+ .card_group {
551
+ &--resource-list {
552
+ :deep(.section-group__content) {
553
+ display: flex;
554
+ > .row {
555
+ flex: 0 0 70%;
556
+ }
557
+ }
558
+ }
559
+ }
560
+ }
561
+ .card_group {
562
+ &--resource-list {
563
+ :deep(.card-body) {
564
+ padding-left: $cardTextPadding !important;
565
+ padding-right: $cardTextPadding !important;
566
+ }
567
+ }
568
+ }
569
+ .card_group__card--resource-group {
570
+ :deep(.card-body) {
571
+ padding-left: $cardTextPadding !important;
572
+ padding-right: $cardTextPadding !important;
573
+ }
574
+ }
575
+ </style>