@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.
- package/.editorconfig +13 -0
- package/.env +4 -0
- package/.eslintrc.cjs +10 -0
- package/.eslintrc.js +25 -0
- package/.husky/commit-msg +4 -0
- package/.prettierrc +5 -0
- package/.prettierrc.json +8 -0
- package/.storybook/main.js +18 -0
- package/.storybook/preview.js +34 -0
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/babel.config.js +8 -0
- package/bin/clean.sh +52 -0
- package/bin/deploy.sh +25 -0
- package/ci/build/Build_Validation.md +35 -0
- package/ci/build/build_validation.yml +47 -0
- package/ci/release/Release_Beta.md +39 -0
- package/ci/release/Release_Master.md +29 -0
- package/ci/release/beta.yml +69 -0
- package/ci/release/master.yml +39 -0
- package/commitlint.config.js +1 -0
- package/index.html +13 -0
- package/jest.config.js +21 -0
- package/lib/detect-browser.js +33 -0
- package/lib/utility.js +59 -0
- package/lib/utility.test.js +15 -0
- package/package.json +93 -0
- package/public/favicon.ico +0 -0
- package/src/assets/base.css +86 -0
- package/src/assets/fonts/VIC-Bold.eot +0 -0
- package/src/assets/fonts/VIC-Bold.ttf +0 -0
- package/src/assets/fonts/VIC-Bold.woff +0 -0
- package/src/assets/fonts/VIC-Bold.woff2 +0 -0
- package/src/assets/fonts/VIC-BoldItalic.eot +0 -0
- package/src/assets/fonts/VIC-BoldItalic.ttf +0 -0
- package/src/assets/fonts/VIC-BoldItalic.woff +0 -0
- package/src/assets/fonts/VIC-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-ExtraLight.eot +0 -0
- package/src/assets/fonts/VIC-ExtraLight.ttf +0 -0
- package/src/assets/fonts/VIC-ExtraLight.woff +0 -0
- package/src/assets/fonts/VIC-ExtraLight.woff2 +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.eot +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.ttf +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.woff +0 -0
- package/src/assets/fonts/VIC-ExtraLightItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Italic.eot +0 -0
- package/src/assets/fonts/VIC-Italic.ttf +0 -0
- package/src/assets/fonts/VIC-Italic.woff +0 -0
- package/src/assets/fonts/VIC-Italic.woff2 +0 -0
- package/src/assets/fonts/VIC-Light.eot +0 -0
- package/src/assets/fonts/VIC-Light.ttf +0 -0
- package/src/assets/fonts/VIC-Light.woff +0 -0
- package/src/assets/fonts/VIC-Light.woff2 +0 -0
- package/src/assets/fonts/VIC-LightItalic.eot +0 -0
- package/src/assets/fonts/VIC-LightItalic.ttf +0 -0
- package/src/assets/fonts/VIC-LightItalic.woff +0 -0
- package/src/assets/fonts/VIC-LightItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Medium.eot +0 -0
- package/src/assets/fonts/VIC-Medium.ttf +0 -0
- package/src/assets/fonts/VIC-Medium.woff +0 -0
- package/src/assets/fonts/VIC-Medium.woff2 +0 -0
- package/src/assets/fonts/VIC-MediumItalic.eot +0 -0
- package/src/assets/fonts/VIC-MediumItalic.ttf +0 -0
- package/src/assets/fonts/VIC-MediumItalic.woff +0 -0
- package/src/assets/fonts/VIC-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/VIC-Regular.eot +0 -0
- package/src/assets/fonts/VIC-Regular.ttf +0 -0
- package/src/assets/fonts/VIC-Regular.woff +0 -0
- package/src/assets/fonts/VIC-Regular.woff2 +0 -0
- package/src/assets/fonts/VIC-SemiBold.eot +0 -0
- package/src/assets/fonts/VIC-SemiBold.ttf +0 -0
- package/src/assets/fonts/VIC-SemiBold.woff +0 -0
- package/src/assets/fonts/VIC-SemiBold.woff2 +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.eot +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.woff +0 -0
- package/src/assets/fonts/VIC-SemiBoldItalic.woff2 +0 -0
- package/src/assets/icons/AppFooter/australian-aboriginal-flag.svg +7 -0
- package/src/assets/icons/AppFooter/facebook-ws-footer.svg +58 -0
- package/src/assets/icons/AppFooter/facebook-ww-footer.svg +59 -0
- package/src/assets/icons/AppFooter/instagram-ww-footer.svg +70 -0
- package/src/assets/icons/AppFooter/linkedin-ws-footer.svg +59 -0
- package/src/assets/icons/AppFooter/linkedin-ww-footer.svg +60 -0
- package/src/assets/icons/AppFooter/logo-workwell-reversed.svg +45 -0
- package/src/assets/icons/AppFooter/pride-flag.svg +12 -0
- package/src/assets/icons/AppFooter/torres-strait-islanders-flag.svg +9 -0
- package/src/assets/icons/AppFooter/twitter-ws-footer.svg +58 -0
- package/src/assets/icons/AppFooter/twitter-ww-footer.svg +59 -0
- package/src/assets/icons/AppFooter/worksafe-footer-logo.svg +9 -0
- package/src/assets/icons/AppFooter/youtube-ws-footer.svg +55 -0
- package/src/assets/icons/AppFooter/youtube-ww-footer.svg +56 -0
- package/src/assets/icons/AppHeader/chev-down-16.svg +17 -0
- package/src/assets/icons/AppHeader/chev-left-24px.svg +13 -0
- package/src/assets/icons/AppHeader/chev-right-16px.svg +25 -0
- package/src/assets/icons/AppHeader/chev-right-24px.svg +13 -0
- package/src/assets/icons/AppHeader/close-32px.svg +15 -0
- package/src/assets/icons/AppHeader/menu-32px.svg +20 -0
- package/src/assets/icons/AppHeader/search-32px.svg +19 -0
- package/src/assets/icons/Email-circle-black.svg +4 -0
- package/src/assets/icons/Info-circle-fill.svg +10 -0
- package/src/assets/icons/Phone-circle-black.svg +4 -0
- package/src/assets/icons/SocialShare/bookmark-white.svg +3 -0
- package/src/assets/icons/SocialShare/bookmark-ww-footer.svg +57 -0
- package/src/assets/icons/SocialShare/bookmark.svg +56 -0
- package/src/assets/icons/SocialShare/email-white.svg +3 -0
- package/src/assets/icons/SocialShare/facebook-white.svg +3 -0
- package/src/assets/icons/SocialShare/facebook-ws-footer.svg +58 -0
- package/src/assets/icons/SocialShare/facebook-ww-footer.svg +59 -0
- package/src/assets/icons/SocialShare/facebook.svg +1 -0
- package/src/assets/icons/SocialShare/office-file-pdf.svg +1 -0
- package/src/assets/icons/SocialShare/print.svg +3 -0
- package/src/assets/icons/SocialShare/twitter-white.svg +3 -0
- package/src/assets/icons/SocialShare/twitter-ws-footer.svg +58 -0
- package/src/assets/icons/SocialShare/twitter-ww-footer.svg +59 -0
- package/src/assets/icons/SocialShare/twitter.svg +1 -0
- package/src/assets/icons/Strip/AlertDismiss.svg +4 -0
- package/src/assets/icons/Strip/Arrow right.svg +4 -0
- package/src/assets/icons/Strip/Chevron right.svg +3 -0
- package/src/assets/icons/Strip/Dismiss.svg +4 -0
- package/src/assets/icons/Strip/Exclamation triangle fill.svg +8 -0
- package/src/assets/icons/Strip/Info circle fill.svg +15 -0
- package/src/assets/icons/Strip/Information.svg +15 -0
- package/src/assets/icons/Strip/Warning.svg +8 -0
- package/src/assets/icons/arrow-left.svg +9 -0
- package/src/assets/icons/arrow-right.svg +9 -0
- package/src/assets/icons/bookmark.svg +56 -0
- package/src/assets/icons/brand-VicStateGov-logo-reversed.svg +72 -0
- package/src/assets/icons/bullet-empty.svg +3 -0
- package/src/assets/icons/bullet.svg +3 -0
- package/src/assets/icons/caret-down.svg +1 -0
- package/src/assets/icons/caret-left.svg +9 -0
- package/src/assets/icons/caret-right.svg +9 -0
- package/src/assets/icons/caret-up.svg +1 -0
- package/src/assets/icons/chev-down-white.svg +3 -0
- package/src/assets/icons/chev-down.svg +3 -0
- package/src/assets/icons/chev-left.svg +3 -0
- package/src/assets/icons/chev-right.svg +3 -0
- package/src/assets/icons/chev-up.svg +3 -0
- package/src/assets/icons/clock.svg +3 -0
- package/src/assets/icons/close.svg +1 -0
- package/src/assets/icons/cross.svg +3 -0
- package/src/assets/icons/document.svg +1 -0
- package/src/assets/icons/earth.svg +1 -0
- package/src/assets/icons/email.svg +6 -0
- package/src/assets/icons/external-link-16px.svg +18 -0
- package/src/assets/icons/external-link.svg +4 -0
- package/src/assets/icons/icon-close.svg +15 -0
- package/src/assets/icons/instagram.svg +3 -0
- package/src/assets/icons/key.svg +3 -0
- package/src/assets/icons/location.svg +10 -0
- package/src/assets/icons/phone.svg +3 -0
- package/src/assets/icons/refresh.svg +3 -0
- package/src/assets/icons/right-arrow.svg +3 -0
- package/src/assets/icons/search.svg +5 -0
- package/src/assets/icons/tick.svg +3 -0
- package/src/assets/icons/video-play.svg +4 -0
- package/src/assets/images/hero-header-chevron.svg +9 -0
- package/src/assets/images/hero-header-mask.png +0 -0
- package/src/assets/images/hero-header-mask.svg +3 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +35 -0
- package/src/assets/styles/button.scss +206 -0
- package/src/assets/styles/focus.scss +4 -0
- package/src/assets/styles/generated-icons.scss +374 -0
- package/src/assets/styles/modal.scss +12 -0
- package/src/assets/styles/rtl.scss +8 -0
- package/src/assets/styles/storybook.scss +9 -0
- package/src/assets/styles/stylesheet.scss +7 -0
- package/src/assets/styles/webfonts.css +155 -0
- package/src/components/Common/CardGrid/cardgrid.stories.js +269 -0
- package/src/components/Common/CardGrid/index.vue +321 -0
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +164 -0
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +163 -0
- package/src/components/Common/CardGridItem/index.vue +848 -0
- package/src/components/Common/FilterButton/index.vue +93 -0
- package/src/components/Containers/Column/index.stories.js +35 -0
- package/src/components/Containers/Column/index.vue +14 -0
- package/src/components/Containers/Container/index.stories.js +13 -0
- package/src/components/Containers/Container/index.vue +15 -0
- package/src/components/Containers/HomepageHeader/index.stories.js +78 -0
- package/src/components/Containers/HomepageHeader/index.vue +186 -0
- package/src/components/Containers/Row/index.stories.js +12 -0
- package/src/components/Containers/Row/index.vue +14 -0
- package/src/components/Containers/SectionGroup/index.stories.js +148 -0
- package/src/components/Containers/SectionGroup/index.vue +310 -0
- package/src/components/Containers/Subheader/index.stories.js +74 -0
- package/src/components/Containers/Subheader/index.vue +149 -0
- package/src/components/Global/AlertStrip/index.stories.js +13 -0
- package/src/components/Global/AlertStrip/index.vue +145 -0
- package/src/components/Global/AlertStrip/styles.scss +78 -0
- package/src/components/Global/AppFooter/FooterSocialShare/index.vue +105 -0
- package/src/components/Global/AppFooter/FooterSocialShare/styles.scss +41 -0
- package/src/components/Global/AppFooter/index.stories.js +24 -0
- package/src/components/Global/AppFooter/index.vue +632 -0
- package/src/components/Global/AppFooter/storiesConst.js +110 -0
- package/src/components/Global/AppFooter/styles.scss +393 -0
- package/src/components/Global/AppHeader/ModalSearch/index.vue +66 -0
- package/src/components/Global/AppHeader/ModalSearch/styles.scss +43 -0
- package/src/components/Global/AppHeader/includes.scss +68 -0
- package/src/components/Global/AppHeader/index.stories.js +82 -0
- package/src/components/Global/AppHeader/index.vue +878 -0
- package/src/components/Global/AppHeader/mobile.scss +240 -0
- package/src/components/Global/AppHeader/styles.scss +371 -0
- package/src/components/Global/BackToTop/index.stories.js +18 -0
- package/src/components/Global/BackToTop/index.vue +67 -0
- package/src/components/Global/BackToTop/styles.scss +46 -0
- package/src/components/Global/ContrastMode/index.stories.js +39 -0
- package/src/components/Global/ContrastMode/index.vue +308 -0
- package/src/components/Global/Cookies/Constants.js +72 -0
- package/src/components/Global/Cookies/index.storieshide.js +45 -0
- package/src/components/Global/Cookies/index.vue +453 -0
- package/src/components/Global/Cookies/styles.scss +259 -0
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +196 -0
- package/src/components/Global/DirectoryFilters/index.vue +176 -0
- package/src/components/Global/GlobalNotice/index.vue +266 -0
- package/src/components/Global/HeroHeader/index.stories.js +93 -0
- package/src/components/Global/HeroHeader/index.vue +343 -0
- package/src/components/Global/HeroHeader/styles.scss +480 -0
- package/src/components/Global/ProgressBar/index.stories.js +51 -0
- package/src/components/Global/ProgressBar/index.vue +58 -0
- package/src/components/Global/ProgressBar/styles.scss +116 -0
- package/src/components/Global/SocialShare/index.stories.js +18 -0
- package/src/components/Global/SocialShare/index.vue +318 -0
- package/src/components/Global/Strip/index.stories.js +70 -0
- package/src/components/Global/Strip/index.vue +357 -0
- package/src/components/HelloWorld.vue +44 -0
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +232 -0
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +274 -0
- package/src/components/Paragraphs/Accordion/index.stories.js +84 -0
- package/src/components/Paragraphs/Accordion/index.vue +202 -0
- package/src/components/Paragraphs/Breakout/index.stories.js +39 -0
- package/src/components/Paragraphs/Breakout/index.vue +115 -0
- package/src/components/Paragraphs/BrowseContent/index.stories.js +220 -0
- package/src/components/Paragraphs/BrowseContent/index.vue +298 -0
- package/src/components/Paragraphs/BrowseContent/switcher.vue +63 -0
- package/src/components/Paragraphs/Calculator/CardContainer/index.vue +278 -0
- package/src/components/Paragraphs/Calculator/CardContainer/styles.scss +152 -0
- package/src/components/Paragraphs/Calculator/Constants.js +246 -0
- package/src/components/Paragraphs/Calculator/RiskLevel/index.vue +124 -0
- package/src/components/Paragraphs/Calculator/RiskLevel/styles.scss +73 -0
- package/src/components/Paragraphs/Calculator/index.stories.js +27 -0
- package/src/components/Paragraphs/Calculator/index.vue +284 -0
- package/src/components/Paragraphs/Calculator/styles.scss +49 -0
- package/src/components/Paragraphs/Directory/Records/CJ/index.vue +59 -0
- package/src/components/Paragraphs/Directory/Records/ISP/distance.js +46 -0
- package/src/components/Paragraphs/Directory/Records/ISP/index.vue +88 -0
- package/src/components/Paragraphs/Directory/Records/PRS/index.vue +59 -0
- package/src/components/Paragraphs/Directory/Records/PRS/recordContent.vue +91 -0
- package/src/components/Paragraphs/Directory/Records/PRS/recordDetails.vue +49 -0
- package/src/components/Paragraphs/Directory/Records/index.vue +203 -0
- package/src/components/Paragraphs/Directory/Records/styles.scss +129 -0
- package/src/components/Paragraphs/Directory/constants.js +79 -0
- package/src/components/Paragraphs/Directory/index.vue +334 -0
- package/src/components/Paragraphs/ListGroup/Constants.js +72 -0
- package/src/components/Paragraphs/ListGroup/Link/list-link.stories.js +71 -0
- package/src/components/Paragraphs/ListGroup/index.vue +333 -0
- package/src/components/Paragraphs/ListGroup/list-group.stories.js +64 -0
- package/src/components/Paragraphs/ListGroup/navigation-card.stories.js +66 -0
- package/src/components/Paragraphs/MarketingBanner/index.stories.js +65 -0
- package/src/components/Paragraphs/MarketingBanner/index.vue +118 -0
- package/src/components/Paragraphs/MarketingBanner/styles.scss +87 -0
- package/src/components/Paragraphs/ProofPoints/index.stories.js +173 -0
- package/src/components/Paragraphs/ProofPoints/index.vue +64 -0
- package/src/components/Paragraphs/RelatedInformation/index.stories.js +32 -0
- package/src/components/Paragraphs/RelatedInformation/index.vue +62 -0
- package/src/components/Paragraphs/RelatedInformation/styles.scss +50 -0
- package/src/components/Paragraphs/RichText/index.stories.js +393 -0
- package/src/components/Paragraphs/RichText/index.vue +113 -0
- package/src/components/Paragraphs/RichText/scss/base.scss +355 -0
- package/src/components/Paragraphs/RichText/scss/definition-list.scss +35 -0
- package/src/components/Paragraphs/RichText/scss/styled-list.scss +152 -0
- package/src/components/Paragraphs/RichText/scss/table.scss +85 -0
- package/src/components/Paragraphs/ScrollSpy/index.stories.js +184 -0
- package/src/components/Paragraphs/ScrollSpy/index.vue +147 -0
- package/src/components/Paragraphs/SelectableCards/Control/index.stories.js +29 -0
- package/src/components/Paragraphs/SelectableCards/cardbody.vue +25 -0
- package/src/components/Paragraphs/SelectableCards/cardtop.vue +113 -0
- package/src/components/Paragraphs/SelectableCards/index.stories.js +27 -0
- package/src/components/Paragraphs/SelectableCards/index.vue +116 -0
- package/src/components/Paragraphs/Statistics/index.stories.js +106 -0
- package/src/components/Paragraphs/Statistics/index.vue +95 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/cake-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/commute-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/fire_extinguisher-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/free_breakfast-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/portrait-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/storefront-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/TempIcons/tag_faces-black-18dp.svg +1 -0
- package/src/components/Paragraphs/TabbedCards/index.stories.js +36 -0
- package/src/components/Paragraphs/TabbedCards/index.vue +393 -0
- package/src/components/Paragraphs/Tabs/index.stories.js +60 -0
- package/src/components/Paragraphs/Tabs/index.vue +127 -0
- package/src/components/Paragraphs/Tabs/styles.scss +150 -0
- package/src/components/Paragraphs/TabulatedData/Constants.js +158 -0
- package/src/components/Paragraphs/TabulatedData/index.stories.js +39 -0
- package/src/components/Paragraphs/TabulatedData/index.vue +145 -0
- package/src/components/Paragraphs/TaskFinder/index.stories.js +45 -0
- package/src/components/Paragraphs/TaskFinder/index.vue +192 -0
- package/src/components/Paragraphs/TaskFinder/pdf/index.vue +109 -0
- package/src/components/Paragraphs/TaskFinder/task-finder-column.vue +146 -0
- package/src/components/Paragraphs/TextMedia/MediaTypes/Image/index.vue +24 -0
- package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +29 -0
- package/src/components/Paragraphs/TextMedia/index.stories.js +94 -0
- package/src/components/Paragraphs/TextMedia/index.vue +150 -0
- package/src/components/Paragraphs/VideoGrid/index.stories.js +167 -0
- package/src/components/Paragraphs/VideoGrid/index.vue +124 -0
- package/src/components/Paragraphs/VideoPlayer/index.stories.js +95 -0
- package/src/components/Paragraphs/VideoPlayer/index.vue +110 -0
- package/src/components/Paragraphs/Webform/index.stories.js +70 -0
- package/src/components/Paragraphs/Webform/index.vue +103 -0
- package/src/components/SubComponents/Breadcrumb/constants.js +15 -0
- package/src/components/SubComponents/Breadcrumb/index.stories.js +22 -0
- package/src/components/SubComponents/Breadcrumb/index.vue +91 -0
- package/src/components/SubComponents/CardGroup/cardbody.vue +109 -0
- package/src/components/SubComponents/CardGroup/cardtop.vue +106 -0
- package/src/components/SubComponents/CardGroup/index.stories.js +145 -0
- package/src/components/SubComponents/CardGroup/index.vue +297 -0
- package/src/components/SubComponents/CtaButton/index.stories.js +357 -0
- package/src/components/SubComponents/CtaButton/index.vue +256 -0
- package/src/components/SubComponents/FormAddressPostcode/index.stories.js +43 -0
- package/src/components/SubComponents/FormAddressPostcode/index.vue +314 -0
- package/src/components/SubComponents/FormInstance/index.stories.js +8 -0
- package/src/components/SubComponents/FormInstance/index.vue +12 -0
- package/src/components/SubComponents/GoogleSearch/index.stories.js +8 -0
- package/src/components/SubComponents/GoogleSearch/index.vue +405 -0
- package/src/components/SubComponents/Icon/README.md +40 -0
- package/src/components/SubComponents/Icon/example.js +41 -0
- package/src/components/SubComponents/Icon/index.stories.js +84 -0
- package/src/components/SubComponents/Icon/index.vue +127 -0
- package/src/components/SubComponents/Icon/styles.scss +38 -0
- package/src/components/SubComponents/Loading/index.stories.js +9 -0
- package/src/components/SubComponents/Loading/index.vue +15 -0
- package/src/components/SubComponents/MediaPlayer/index.stories.js +58 -0
- package/src/components/SubComponents/MediaPlayer/index.vue +69 -0
- package/src/components/SubComponents/Pagination/index.stories.js +119 -0
- package/src/components/SubComponents/Pagination/index.vue +184 -0
- package/src/components/SubComponents/Pagination/pagination.js +58 -0
- package/src/components/SubComponents/ResourceGroup/List/index.stories.js +268 -0
- package/src/components/SubComponents/ResourceGroup/cardbody.vue +221 -0
- package/src/components/SubComponents/ResourceGroup/cardfooter.vue +61 -0
- package/src/components/SubComponents/ResourceGroup/cardtop.vue +94 -0
- package/src/components/SubComponents/ResourceGroup/index.stories.js +268 -0
- package/src/components/SubComponents/ResourceGroup/index.vue +575 -0
- package/src/components/SubComponents/ResourceGroup/styles.scss +317 -0
- package/src/components/SubComponents/ResourceGroup/switcher.vue +63 -0
- package/src/components/SubComponents/Search/SearchListing/index.vue +217 -0
- package/src/components/SubComponents/Search/index.stories.js +43 -0
- package/src/components/SubComponents/Search/index.vue +238 -0
- package/src/components/SubComponents/SingleImage/index.stories.js +60 -0
- package/src/components/SubComponents/SingleImage/index.vue +98 -0
- package/src/components/SubComponents/VideoThumbnail/index.stories.js +41 -0
- package/src/components/SubComponents/VideoThumbnail/index.vue +239 -0
- package/src/components/TheWelcome.vue +88 -0
- package/src/components/WelcomeItem.vue +87 -0
- package/src/components/icons/IconCommunity.vue +7 -0
- package/src/components/icons/IconDocumentation.vue +7 -0
- package/src/components/icons/IconEcosystem.vue +7 -0
- package/src/components/icons/IconSupport.vue +7 -0
- package/src/components/icons/IconTooling.vue +19 -0
- package/src/includes/scss/all.scss +2 -0
- package/src/includes/scss/mixins/all.scss +6 -0
- package/src/includes/scss/mixins/src/focus.scss +38 -0
- package/src/includes/scss/mixins/src/fp.scss +31 -0
- package/src/includes/scss/mixins/src/grid.scss +125 -0
- package/src/includes/scss/mixins/src/mq.scss +30 -0
- package/src/includes/scss/mixins/src/rtl.scss +8 -0
- package/src/includes/scss/mixins/src/units.scss +110 -0
- package/src/includes/scss/vars/all.scss +2 -0
- package/src/includes/scss/vars/src/breakpoints.scss +20 -0
- package/src/includes/scss/vars/src/colors.module.scss +53 -0
- package/src/includes/scss/vars/src/colors.scss +53 -0
- package/src/index.js +116 -0
- package/src/main.js +18 -0
- package/src/mock/accordion.js +104 -0
- package/src/mock/app-header.js +683 -0
- package/src/mock/control-selectable-cards.js +58 -0
- package/src/mock/jest.svgtransformer.js +7 -0
- package/src/mock/list-group.js +46 -0
- package/src/mock/proof-points.js +55 -0
- package/src/mock/related-info.js +44 -0
- package/src/mock/selectable-cards.js +48 -0
- package/src/mock/statistics.js +63 -0
- package/src/mock/styleMock.js +1 -0
- package/src/mock/tabbed-cards.js +197 -0
- package/src/mock/task-finder.js +68 -0
- package/src/mock/video-grid.js +409 -0
- package/src/mock/video-media.js +51 -0
- package/src/public/places/api/v1/geocode/json +69 -0
- package/src/public/places/api/v1/place/autocomplete/json +226 -0
- package/stylelint.config.js +63 -0
- package/vite.config.js +19 -0
- package/vitest.config.js +14 -0
|
@@ -0,0 +1,848 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="card-grid-item">
|
|
3
|
+
<slot v-if="$slots.beforeCard" name="beforeCard"></slot>
|
|
4
|
+
<b-card
|
|
5
|
+
:id="cardId"
|
|
6
|
+
no-body
|
|
7
|
+
:tag="
|
|
8
|
+
buttonRole === 'radio' ? 'div' : isSelectable ? 'button' : 'article'
|
|
9
|
+
"
|
|
10
|
+
class="card-grid-item__card"
|
|
11
|
+
:class="cardClass"
|
|
12
|
+
:role="buttonRole"
|
|
13
|
+
:aria-checked="
|
|
14
|
+
buttonRole === 'radio'
|
|
15
|
+
? isSelectable && selected
|
|
16
|
+
? 'true'
|
|
17
|
+
: 'false'
|
|
18
|
+
: null
|
|
19
|
+
"
|
|
20
|
+
:aria-expanded="
|
|
21
|
+
isExpandable ? (isSelectable && selected ? 'true' : 'false') : null
|
|
22
|
+
"
|
|
23
|
+
:data-href="link"
|
|
24
|
+
@click="cardClicked($event)"
|
|
25
|
+
@keydown.tab="handleFocus($event)"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
v-if="$slots.cardTop"
|
|
29
|
+
class="card-grid-item__top"
|
|
30
|
+
:class="[
|
|
31
|
+
{
|
|
32
|
+
rtl: rtl,
|
|
33
|
+
[`card-grid-item__control-radio`]:
|
|
34
|
+
isSelectable && buttonRole === 'radio',
|
|
35
|
+
[`card-grid-item__selected-radio`]:
|
|
36
|
+
selected && buttonRole === 'radio'
|
|
37
|
+
}
|
|
38
|
+
]"
|
|
39
|
+
>
|
|
40
|
+
<slot name="cardTop"></slot>
|
|
41
|
+
</div>
|
|
42
|
+
<card-grid-item-icon
|
|
43
|
+
v-if="iconPosition === 'top' || iconPosition === 'top-left'"
|
|
44
|
+
:image-src="imageSrc"
|
|
45
|
+
:image-alt="imageAlt"
|
|
46
|
+
:glyph-src="glyphSrc"
|
|
47
|
+
:glyph-icon-component="glyphIconComponent"
|
|
48
|
+
:is-mobile-view="isMobileView"
|
|
49
|
+
:is-tablet-view="isTabletView"
|
|
50
|
+
:grid-column-size="gridColumnSize"
|
|
51
|
+
:icon-size="iconSize"
|
|
52
|
+
:icon-is-bordered="iconIsBordered"
|
|
53
|
+
:class="{
|
|
54
|
+
[`text-left`]: iconPosition === 'top-left',
|
|
55
|
+
rtl: rtl
|
|
56
|
+
}"
|
|
57
|
+
>
|
|
58
|
+
</card-grid-item-icon>
|
|
59
|
+
<b-card-body>
|
|
60
|
+
<div
|
|
61
|
+
class="card-grid-item__caretContainer"
|
|
62
|
+
:class="[
|
|
63
|
+
{
|
|
64
|
+
rtl: rtl,
|
|
65
|
+
[`card-grid-item__caretContainer__control-radio`]:
|
|
66
|
+
isSelectable && buttonRole === 'radio'
|
|
67
|
+
}
|
|
68
|
+
]"
|
|
69
|
+
>
|
|
70
|
+
<b-card-title
|
|
71
|
+
v-if="cardHeaderTitle !== null && cardHeaderTitle !== undefined"
|
|
72
|
+
:title-tag="headerTag"
|
|
73
|
+
class="card-grid-item__header"
|
|
74
|
+
:class="{
|
|
75
|
+
[`card-grid-item__header--${headerSize}`]: true,
|
|
76
|
+
[`card-grid-item__header--align-${headerTextAlign}`]: true
|
|
77
|
+
}"
|
|
78
|
+
>
|
|
79
|
+
<span>{{ cardHeaderTitle }}</span>
|
|
80
|
+
<card-grid-item-caret
|
|
81
|
+
v-if="caretPosition === 'after-title'"
|
|
82
|
+
:caret="caret"
|
|
83
|
+
class="d-inline-block"
|
|
84
|
+
:rtl="rtl"
|
|
85
|
+
>
|
|
86
|
+
</card-grid-item-caret>
|
|
87
|
+
<card-grid-item-icon
|
|
88
|
+
v-if="iconPosition === 'after-title'"
|
|
89
|
+
:image-src="imageSrc"
|
|
90
|
+
:image-alt="imageAlt"
|
|
91
|
+
:glyph-src="glyphSrc"
|
|
92
|
+
:glyph-icon-component="glyphIconComponent"
|
|
93
|
+
:is-mobile-view="isMobileView"
|
|
94
|
+
:is-tablet-view="isTabletView"
|
|
95
|
+
:grid-column-size="gridColumnSize"
|
|
96
|
+
:icon-size="iconSize"
|
|
97
|
+
:icon-is-bordered="iconIsBordered"
|
|
98
|
+
class="d-inline"
|
|
99
|
+
>
|
|
100
|
+
</card-grid-item-icon>
|
|
101
|
+
</b-card-title>
|
|
102
|
+
<card-grid-item-caret
|
|
103
|
+
v-if="caretPosition === 'top'"
|
|
104
|
+
:caret="caret"
|
|
105
|
+
:rtl="rtl"
|
|
106
|
+
>
|
|
107
|
+
</card-grid-item-caret>
|
|
108
|
+
|
|
109
|
+
<card-grid-item-icon
|
|
110
|
+
v-if="iconPosition === 'top-right'"
|
|
111
|
+
:image-src="imageSrc"
|
|
112
|
+
:image-alt="imageAlt"
|
|
113
|
+
:glyph-src="glyphSrc"
|
|
114
|
+
:glyph-icon-component="glyphIconComponent"
|
|
115
|
+
:is-mobile-view="isMobileView"
|
|
116
|
+
:is-tablet-view="isTabletView"
|
|
117
|
+
:grid-column-size="gridColumnSize"
|
|
118
|
+
:icon-size="iconSize"
|
|
119
|
+
:icon-is-bordered="iconIsBordered"
|
|
120
|
+
class="d-inline card-grid-item-icon--top-right"
|
|
121
|
+
:class="{
|
|
122
|
+
[`text-right`]: iconPosition === 'top-right',
|
|
123
|
+
rtl: rtl
|
|
124
|
+
}"
|
|
125
|
+
:rtl="rtl"
|
|
126
|
+
>
|
|
127
|
+
</card-grid-item-icon>
|
|
128
|
+
<span v-if="pillText" class="visually-hidden">{{ pillText }}</span>
|
|
129
|
+
</div>
|
|
130
|
+
<b-card-text
|
|
131
|
+
v-if="$slots.cardDescription || description"
|
|
132
|
+
text-tag="div"
|
|
133
|
+
class="card-grid-item__body"
|
|
134
|
+
:class="{
|
|
135
|
+
rtl: rtl
|
|
136
|
+
}"
|
|
137
|
+
>
|
|
138
|
+
<div
|
|
139
|
+
class="card-grid-item__description"
|
|
140
|
+
:class="{
|
|
141
|
+
[descriptionClass]: !!descriptionClass,
|
|
142
|
+
[`card-grid-item__description--withIcon`]:
|
|
143
|
+
iconPosition === 'before-description'
|
|
144
|
+
}"
|
|
145
|
+
>
|
|
146
|
+
<card-grid-item-icon
|
|
147
|
+
v-if="iconPosition === 'before-description'"
|
|
148
|
+
:image-src="imageSrc"
|
|
149
|
+
:image-alt="imageAlt"
|
|
150
|
+
:glyph-src="glyphSrc"
|
|
151
|
+
:glyph-icon-component="glyphIconComponent"
|
|
152
|
+
:is-mobile-view="isMobileView"
|
|
153
|
+
:is-tablet-view="isTabletView"
|
|
154
|
+
:grid-column-size="gridColumnSize"
|
|
155
|
+
:icon-size="iconSize"
|
|
156
|
+
:icon-is-bordered="iconIsBordered"
|
|
157
|
+
class="w-auto"
|
|
158
|
+
>
|
|
159
|
+
|
|
160
|
+
</card-grid-item-icon>
|
|
161
|
+
<slot v-if="$slots.cardDescription" name="cardDescription"></slot>
|
|
162
|
+
<rich-text
|
|
163
|
+
v-if="!$slots.cardDescription && description"
|
|
164
|
+
:content="description"
|
|
165
|
+
:without-container="true"
|
|
166
|
+
:strip-html="stripDescriptionHtml"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
</b-card-text>
|
|
170
|
+
</b-card-body>
|
|
171
|
+
<div
|
|
172
|
+
v-if="$slots.cardFooter"
|
|
173
|
+
class="card-grid-item__footer"
|
|
174
|
+
:class="{ rtl: rtl }"
|
|
175
|
+
>
|
|
176
|
+
<slot name="cardFooter"></slot>
|
|
177
|
+
</div>
|
|
178
|
+
<div
|
|
179
|
+
v-if="caretPosition === 'bottom'"
|
|
180
|
+
class="card-grid-item__caretContainer card-grid-item__caretContainer--bottom"
|
|
181
|
+
:class="{
|
|
182
|
+
rtl: !rtl
|
|
183
|
+
}"
|
|
184
|
+
>
|
|
185
|
+
<card-grid-item-caret :caret="caret" :rtl="rtl" />
|
|
186
|
+
<span class="card-bottom-border"></span>
|
|
187
|
+
</div>
|
|
188
|
+
</b-card>
|
|
189
|
+
<slot v-if="$slots.afterCard" name="afterCard"></slot>
|
|
190
|
+
</div>
|
|
191
|
+
</template>
|
|
192
|
+
|
|
193
|
+
<script>
|
|
194
|
+
import CardGridItemIcon from './card-grid-item-icon.vue'
|
|
195
|
+
import CardGridItemCaret from './card-grid-item-caret.vue'
|
|
196
|
+
import RichText from '../../Paragraphs/RichText/index.vue'
|
|
197
|
+
import parseISO from 'date-fns/parseISO'
|
|
198
|
+
import { isAbsoluteUrl, isGovSite } from '../../../../lib/utility'
|
|
199
|
+
import { BCard, BCardBody, BCardTitle, BCardText } from 'bootstrap-vue-next'
|
|
200
|
+
|
|
201
|
+
export default {
|
|
202
|
+
name: 'CardGridItem',
|
|
203
|
+
components: { CardGridItemIcon, CardGridItemCaret, RichText, BCard, BCardBody, BCardTitle, BCardText },
|
|
204
|
+
props: {
|
|
205
|
+
backgroundVariant: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: 'white',
|
|
208
|
+
validator: (value) =>
|
|
209
|
+
['white', 'transparent', 'light'].indexOf(value) >= 0
|
|
210
|
+
},
|
|
211
|
+
imageSrc: {
|
|
212
|
+
type: String,
|
|
213
|
+
default: null
|
|
214
|
+
},
|
|
215
|
+
imageAlt: {
|
|
216
|
+
type: String,
|
|
217
|
+
default: null
|
|
218
|
+
},
|
|
219
|
+
description: {
|
|
220
|
+
type: String,
|
|
221
|
+
default: null
|
|
222
|
+
},
|
|
223
|
+
stripDescriptionHtml: {
|
|
224
|
+
type: Boolean
|
|
225
|
+
},
|
|
226
|
+
descriptionClass: {
|
|
227
|
+
type: String,
|
|
228
|
+
default: ''
|
|
229
|
+
},
|
|
230
|
+
glyphSrc: {
|
|
231
|
+
type: [Object, String],
|
|
232
|
+
default: null
|
|
233
|
+
},
|
|
234
|
+
glyphIconComponent: {
|
|
235
|
+
type: String,
|
|
236
|
+
default: null
|
|
237
|
+
},
|
|
238
|
+
iconSize: {
|
|
239
|
+
type: String,
|
|
240
|
+
default: 'small',
|
|
241
|
+
validator: (value) =>
|
|
242
|
+
['xsmall', 'small', 'medium', 'large'].indexOf(value) >= 0
|
|
243
|
+
},
|
|
244
|
+
iconPosition: {
|
|
245
|
+
type: String,
|
|
246
|
+
default: 'top',
|
|
247
|
+
validator: (value) =>
|
|
248
|
+
[
|
|
249
|
+
'top',
|
|
250
|
+
'top-left',
|
|
251
|
+
'top-right',
|
|
252
|
+
'after-title',
|
|
253
|
+
'before-description'
|
|
254
|
+
].indexOf(value) >= 0
|
|
255
|
+
},
|
|
256
|
+
iconIsBordered: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: true
|
|
259
|
+
},
|
|
260
|
+
showDivider: {
|
|
261
|
+
type: Boolean
|
|
262
|
+
},
|
|
263
|
+
cardHeaderTitle: {
|
|
264
|
+
type: String,
|
|
265
|
+
default: null
|
|
266
|
+
},
|
|
267
|
+
invertOnSelectBackground: {
|
|
268
|
+
type: String,
|
|
269
|
+
default: 'none',
|
|
270
|
+
validator: (value) => ['none', 'yellow', 'black'].indexOf(value) >= 0
|
|
271
|
+
},
|
|
272
|
+
borderOnSelectBackground: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: 'none',
|
|
275
|
+
validator: (value) =>
|
|
276
|
+
['none', 'yellow', 'black', 'blue'].indexOf(value) >= 0
|
|
277
|
+
},
|
|
278
|
+
rtl: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
default: false
|
|
281
|
+
},
|
|
282
|
+
headerSize: {
|
|
283
|
+
type: String,
|
|
284
|
+
default: 'custom',
|
|
285
|
+
validator: (value) =>
|
|
286
|
+
['medium', 'large', 'extra-large', 'extra-2x-large', 'custom'].indexOf(
|
|
287
|
+
value
|
|
288
|
+
) >= 0
|
|
289
|
+
},
|
|
290
|
+
headerTextAlign: {
|
|
291
|
+
type: String,
|
|
292
|
+
default: 'left',
|
|
293
|
+
validator: (value) => ['left', 'center', 'right'].indexOf(value) >= 0
|
|
294
|
+
},
|
|
295
|
+
headerTag: {
|
|
296
|
+
type: String,
|
|
297
|
+
required: false,
|
|
298
|
+
default: 'h3'
|
|
299
|
+
},
|
|
300
|
+
caret: {
|
|
301
|
+
type: String,
|
|
302
|
+
default: undefined,
|
|
303
|
+
validator: (value) =>
|
|
304
|
+
['down', 'up', 'right', 'left', 'external'].indexOf(value) >= 0
|
|
305
|
+
},
|
|
306
|
+
caretPosition: {
|
|
307
|
+
type: String,
|
|
308
|
+
default: 'top',
|
|
309
|
+
validator: (value) => ['top', 'bottom', 'after-title'].indexOf(value) >= 0
|
|
310
|
+
},
|
|
311
|
+
cardPadding: {
|
|
312
|
+
type: String,
|
|
313
|
+
default: 'none',
|
|
314
|
+
validator: (value) =>
|
|
315
|
+
['none', 'xsmall', 'small', 'medium', 'large'].indexOf(value) >= 0
|
|
316
|
+
},
|
|
317
|
+
borderType: {
|
|
318
|
+
type: String,
|
|
319
|
+
default: 'none',
|
|
320
|
+
validator: (value) =>
|
|
321
|
+
['none', 'thin', 'shadow', 'thick', 'dark'].indexOf(value) >= 0
|
|
322
|
+
},
|
|
323
|
+
cardTextAlign: {
|
|
324
|
+
type: String,
|
|
325
|
+
default: 'left'
|
|
326
|
+
},
|
|
327
|
+
disableSelect: {
|
|
328
|
+
type: Boolean,
|
|
329
|
+
default: false
|
|
330
|
+
},
|
|
331
|
+
pillText: {
|
|
332
|
+
type: String,
|
|
333
|
+
default: ''
|
|
334
|
+
},
|
|
335
|
+
buttonRole: {
|
|
336
|
+
type: String,
|
|
337
|
+
default: 'link'
|
|
338
|
+
},
|
|
339
|
+
isSelected: {
|
|
340
|
+
type: Boolean,
|
|
341
|
+
default: false
|
|
342
|
+
},
|
|
343
|
+
isExpandable: {
|
|
344
|
+
type: Boolean,
|
|
345
|
+
default: false
|
|
346
|
+
},
|
|
347
|
+
link: {
|
|
348
|
+
type: [String, Boolean],
|
|
349
|
+
default: false
|
|
350
|
+
},
|
|
351
|
+
taxonomies: {
|
|
352
|
+
type: Object,
|
|
353
|
+
default: () => {}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
data: () => ({
|
|
357
|
+
isSelectable: false,
|
|
358
|
+
parentGrid: undefined,
|
|
359
|
+
cardId: undefined,
|
|
360
|
+
gridColumnSize: 0,
|
|
361
|
+
isMobileView: false,
|
|
362
|
+
isTabletView: false,
|
|
363
|
+
selected: false,
|
|
364
|
+
isAbsoluteUrl
|
|
365
|
+
}),
|
|
366
|
+
computed: {
|
|
367
|
+
cardClass() {
|
|
368
|
+
return {
|
|
369
|
+
[`card-grid-item__card--hasIcon`]:
|
|
370
|
+
(this.imageSrc || this.glyphSrc) &&
|
|
371
|
+
(this.iconPosition === 'top' || this.iconPosition === 'top-left'),
|
|
372
|
+
[`card-grid-item__card--selectable`]: this.isSelectable,
|
|
373
|
+
[`card-grid-item__card--selected-inverted--` +
|
|
374
|
+
this.invertOnSelectBackground]:
|
|
375
|
+
this.selected &&
|
|
376
|
+
this.invertOnSelectBackground &&
|
|
377
|
+
this.invertOnSelectBackground !== 'none',
|
|
378
|
+
[`card-grid-item__card--selected-border--` +
|
|
379
|
+
this.borderOnSelectBackground]:
|
|
380
|
+
this.selected &&
|
|
381
|
+
this.borderOnSelectBackground &&
|
|
382
|
+
this.borderOnSelectBackground !== 'none',
|
|
383
|
+
[`card-grid-item__card--selected-focus`]:
|
|
384
|
+
this.selected && this.buttonRole === 'radio',
|
|
385
|
+
[`card-grid-item__card--selected-link`]:
|
|
386
|
+
this.selected && !this.invertOnSelectBackground,
|
|
387
|
+
[`card-grid-item__card--padding-${this.cardPadding}`]: true,
|
|
388
|
+
[`card-grid-item__card--border-${this.borderType}`]: true,
|
|
389
|
+
[`card-grid-item__card--bg-${this.backgroundVariant}`]: true,
|
|
390
|
+
[`card-grid-item__card--select-${this.buttonRole}`]: true,
|
|
391
|
+
[`card-grid-item__card--align-${this.cardTextAlign}`]: true
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
urlHostname() {
|
|
395
|
+
return window.location.protocol + '//' + window.location.host
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
mounted() {
|
|
399
|
+
this.selected = this.isSelected
|
|
400
|
+
},
|
|
401
|
+
created() {
|
|
402
|
+
this.parentGrid = this.getParentGridItem()
|
|
403
|
+
if (this.parentGrid) {
|
|
404
|
+
this.parentGrid.registerChild(this)
|
|
405
|
+
this.setCardId()
|
|
406
|
+
this.isSelectable = !this.disableSelect && this.parentGrid.isSelectable
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
beforeDestroy() {
|
|
410
|
+
if (this.parentGrid) {
|
|
411
|
+
this.parentGrid.deregisterChild(this)
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
methods: {
|
|
415
|
+
cardClicked(ev) {
|
|
416
|
+
if (this.isSelectable) {
|
|
417
|
+
this.parentGrid.cardSelected(this, ev)
|
|
418
|
+
}
|
|
419
|
+
if (this.$gtm) {
|
|
420
|
+
this.fireGTM()
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
getParentGridItem() {
|
|
424
|
+
let counter = 0
|
|
425
|
+
const maxParentDepth = 10
|
|
426
|
+
let currentParent = this.$parent
|
|
427
|
+
let gridParent
|
|
428
|
+
while (maxParentDepth > counter) {
|
|
429
|
+
counter += 1
|
|
430
|
+
if (currentParent && Array.isArray(currentParent.cards)) {
|
|
431
|
+
gridParent = currentParent
|
|
432
|
+
break
|
|
433
|
+
} else if (currentParent) {
|
|
434
|
+
currentParent = currentParent.$parent
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return gridParent
|
|
438
|
+
},
|
|
439
|
+
setCardId() {
|
|
440
|
+
this.cardId = this.parentGrid.cardIdPrefix
|
|
441
|
+
? this.parentGrid.cardIdPrefix +
|
|
442
|
+
'-' +
|
|
443
|
+
this.parentGrid.getChildIndex(this)
|
|
444
|
+
: undefined
|
|
445
|
+
},
|
|
446
|
+
setGridMetaData(gridColumnSize, isMobileView, isTabletView) {
|
|
447
|
+
this.gridColumnSize = gridColumnSize
|
|
448
|
+
this.isMobileView = isMobileView
|
|
449
|
+
this.isTabletView = isTabletView
|
|
450
|
+
},
|
|
451
|
+
handleFocus(ev) {
|
|
452
|
+
this.parentGrid.handleFocus(ev)
|
|
453
|
+
},
|
|
454
|
+
fireGTM() {
|
|
455
|
+
let theEl = this.$slots?.cardDescription
|
|
456
|
+
if (theEl && theEl.length > 0) {
|
|
457
|
+
var content = {
|
|
458
|
+
content: this.$diffInDays(
|
|
459
|
+
parseISO(theEl[0]?.componentOptions?.propsData?.card?.created)
|
|
460
|
+
)
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (this.$gtm) {
|
|
464
|
+
// format link
|
|
465
|
+
const linkStr = this.link
|
|
466
|
+
let linkURL = linkStr
|
|
467
|
+
if (linkStr !== false && !linkStr.includes(this.urlHostname)) {
|
|
468
|
+
linkURL = this.urlHostname + linkStr
|
|
469
|
+
}
|
|
470
|
+
// gather attrs
|
|
471
|
+
let attrs = {
|
|
472
|
+
label: this.cardHeaderTitle,
|
|
473
|
+
data: linkURL,
|
|
474
|
+
...content,
|
|
475
|
+
...this.taxonomies
|
|
476
|
+
}
|
|
477
|
+
// fire the default event
|
|
478
|
+
this.$gtm.push({
|
|
479
|
+
event: 'custom.interaction.tile.click',
|
|
480
|
+
group: this?.parentGrid?.title,
|
|
481
|
+
...attrs
|
|
482
|
+
})
|
|
483
|
+
if (this.pillText === 'News') {
|
|
484
|
+
this.$gtm.push({
|
|
485
|
+
event: 'custom.interaction.news.click',
|
|
486
|
+
group: 'News',
|
|
487
|
+
...attrs
|
|
488
|
+
})
|
|
489
|
+
}
|
|
490
|
+
if (this.pillText === 'Event') {
|
|
491
|
+
this.$gtm.push({
|
|
492
|
+
event: 'custom.interaction.event.click',
|
|
493
|
+
group: 'Event',
|
|
494
|
+
...attrs
|
|
495
|
+
})
|
|
496
|
+
}
|
|
497
|
+
if (this.pillText === 'Safety alert') {
|
|
498
|
+
this.$gtm.push({
|
|
499
|
+
event: 'custom.interaction.safety.click',
|
|
500
|
+
group: 'Safety alert',
|
|
501
|
+
...attrs
|
|
502
|
+
})
|
|
503
|
+
}
|
|
504
|
+
if (
|
|
505
|
+
(this.link,
|
|
506
|
+
this.isAbsoluteUrl(this.link) && process.env.CARETAKER === 'false')
|
|
507
|
+
) {
|
|
508
|
+
this.$gtm.push({
|
|
509
|
+
event: 'custom.interaction.outboundlink',
|
|
510
|
+
category: this.cardHeaderTitle,
|
|
511
|
+
label: this.link
|
|
512
|
+
})
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
// for non gov sites and when caretaker mode is on, analytics is fired from listenersCaretaker.js
|
|
516
|
+
if (
|
|
517
|
+
this.link &&
|
|
518
|
+
this.isAbsoluteUrl(this.link) &&
|
|
519
|
+
isGovSite(this.link) &&
|
|
520
|
+
process.env.CARETAKER === 'true'
|
|
521
|
+
) {
|
|
522
|
+
this.$gtm.push({
|
|
523
|
+
event: 'custom.interaction.outboundlink',
|
|
524
|
+
category: this.cardHeaderTitle,
|
|
525
|
+
label: this.link
|
|
526
|
+
})
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
</script>
|
|
532
|
+
|
|
533
|
+
<style lang="scss" scoped>
|
|
534
|
+
@import '../../../includes/scss/all';
|
|
535
|
+
|
|
536
|
+
.card-grid-item {
|
|
537
|
+
height: 100%;
|
|
538
|
+
width: 100%;
|
|
539
|
+
|
|
540
|
+
&__card {
|
|
541
|
+
color: $black;
|
|
542
|
+
//text-align: left;
|
|
543
|
+
border: none;
|
|
544
|
+
border-radius: 8px;
|
|
545
|
+
height: 100%;
|
|
546
|
+
width: 100%;
|
|
547
|
+
|
|
548
|
+
.rtl {
|
|
549
|
+
@include makeRTL;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.card-body {
|
|
553
|
+
padding: 0px;
|
|
554
|
+
position: relative;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.card-title {
|
|
558
|
+
white-space: inherit;
|
|
559
|
+
word-break: break-word;
|
|
560
|
+
margin-top: 0;
|
|
561
|
+
margin-bottom: 12px;
|
|
562
|
+
vertical-align: baseline;
|
|
563
|
+
vertical-align: -webkit-baseline-middle;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
&--hasIcon {
|
|
567
|
+
.card-title {
|
|
568
|
+
vertical-align: baseline;
|
|
569
|
+
vertical-align: -webkit-baseline-middle;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
&--selectable {
|
|
574
|
+
cursor: pointer;
|
|
575
|
+
|
|
576
|
+
&:hover {
|
|
577
|
+
opacity: 0.7;
|
|
578
|
+
transition: opacity 0.2s ease-out;
|
|
579
|
+
-moz-transition: opacity 0.2s ease-out;
|
|
580
|
+
-webkit-transition: opacity 0.2s ease-out;
|
|
581
|
+
-o-transition: opacity 0.2s ease-out;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
&--padding {
|
|
586
|
+
&-none {
|
|
587
|
+
padding-left: 0px;
|
|
588
|
+
padding-right: 0px;
|
|
589
|
+
}
|
|
590
|
+
&-xsmall {
|
|
591
|
+
padding-left: 6px;
|
|
592
|
+
padding-right: 6px;
|
|
593
|
+
}
|
|
594
|
+
&-small {
|
|
595
|
+
padding-top: 16px;
|
|
596
|
+
padding-bottom: 16px;
|
|
597
|
+
padding-left: 16px;
|
|
598
|
+
padding-right: 16px;
|
|
599
|
+
}
|
|
600
|
+
&-medium {
|
|
601
|
+
padding-top: 24px;
|
|
602
|
+
padding-bottom: 24px;
|
|
603
|
+
padding-left: 16px;
|
|
604
|
+
padding-right: 16px;
|
|
605
|
+
}
|
|
606
|
+
&-large {
|
|
607
|
+
padding-top: 32px;
|
|
608
|
+
padding-bottom: 32px;
|
|
609
|
+
padding-left: 16px;
|
|
610
|
+
padding-right: 16px;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
&--align {
|
|
615
|
+
&-left {
|
|
616
|
+
text-align: left;
|
|
617
|
+
}
|
|
618
|
+
&-right {
|
|
619
|
+
text-align: right;
|
|
620
|
+
}
|
|
621
|
+
&-center {
|
|
622
|
+
text-align: center;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&--selected-focus {
|
|
627
|
+
outline: solid 3px $outline !important;
|
|
628
|
+
outline-offset: 2px;
|
|
629
|
+
border-radius: 3px;
|
|
630
|
+
box-shadow: none !important;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
&--border {
|
|
634
|
+
&-thin {
|
|
635
|
+
box-shadow: none;
|
|
636
|
+
border: 1px solid $gray;
|
|
637
|
+
}
|
|
638
|
+
&-shadow {
|
|
639
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.18);
|
|
640
|
+
border: none;
|
|
641
|
+
}
|
|
642
|
+
&-thick {
|
|
643
|
+
box-shadow: none;
|
|
644
|
+
border: 2px solid $lightgray;
|
|
645
|
+
}
|
|
646
|
+
&-dark {
|
|
647
|
+
box-shadow: none;
|
|
648
|
+
border: 2px solid $gray;
|
|
649
|
+
}
|
|
650
|
+
&-none {
|
|
651
|
+
box-shadow: none;
|
|
652
|
+
border: none;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
&--bg {
|
|
657
|
+
&-white {
|
|
658
|
+
background: $white;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
&-transparent {
|
|
662
|
+
background: transparent;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
&-light {
|
|
666
|
+
background-color: $lightgray;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
&--selected-inverted {
|
|
671
|
+
&--black {
|
|
672
|
+
background-color: $black;
|
|
673
|
+
color: $white;
|
|
674
|
+
:deep(svg) {
|
|
675
|
+
fill: $white !important;
|
|
676
|
+
}
|
|
677
|
+
:deep(path) {
|
|
678
|
+
fill: $white !important;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
&--yellow {
|
|
682
|
+
background-color: $orange;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
&--selected-border {
|
|
687
|
+
&--black {
|
|
688
|
+
border-color: $black;
|
|
689
|
+
:deep(svg) {
|
|
690
|
+
fill: $white !important;
|
|
691
|
+
}
|
|
692
|
+
:deep(path) {
|
|
693
|
+
fill: $white !important;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
&--yellow {
|
|
697
|
+
border-color: $orange;
|
|
698
|
+
}
|
|
699
|
+
&--blue {
|
|
700
|
+
border-color: blue;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
@media screen and (max-width: 575px) {
|
|
705
|
+
&--select-radio {
|
|
706
|
+
display: flex;
|
|
707
|
+
flex-direction: row;
|
|
708
|
+
padding-top: 12px;
|
|
709
|
+
padding-bottom: 12px;
|
|
710
|
+
|
|
711
|
+
> :first-child {
|
|
712
|
+
width: auto;
|
|
713
|
+
height: auto;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
> :not(:first-child) {
|
|
717
|
+
width: fit-content;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
:deep(.card_item__pillTop) {
|
|
721
|
+
top: 15px;
|
|
722
|
+
}
|
|
723
|
+
.card-grid-item-icon {
|
|
724
|
+
:deep(.icon) {
|
|
725
|
+
width: 40px;
|
|
726
|
+
height: 40px;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
.card-body {
|
|
730
|
+
display: flex;
|
|
731
|
+
flex-direction: row;
|
|
732
|
+
align-self: center;
|
|
733
|
+
}
|
|
734
|
+
.card-grid-item__caretContainer {
|
|
735
|
+
margin-left: 10px;
|
|
736
|
+
margin-right: 10px;
|
|
737
|
+
width: auto;
|
|
738
|
+
}
|
|
739
|
+
.card-grid-item__body {
|
|
740
|
+
align-self: center;
|
|
741
|
+
|
|
742
|
+
p {
|
|
743
|
+
margin: 0;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
&__description {
|
|
751
|
+
&--withIcon {
|
|
752
|
+
display: flex;
|
|
753
|
+
align-items: left;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
&__caretContainer {
|
|
758
|
+
display: flex;
|
|
759
|
+
justify-content: space-between;
|
|
760
|
+
align-self: flex-end;
|
|
761
|
+
width: 100%;
|
|
762
|
+
|
|
763
|
+
&__control-radio {
|
|
764
|
+
padding-top: 10px;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
&__top {
|
|
769
|
+
width: 100%;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
&__control-radio {
|
|
773
|
+
:deep(.card_item__control-radio) {
|
|
774
|
+
width: 28px;
|
|
775
|
+
height: 28px;
|
|
776
|
+
line-height: 32px;
|
|
777
|
+
text-align: center;
|
|
778
|
+
border-radius: 50%;
|
|
779
|
+
background-color: lightgrey;
|
|
780
|
+
border: 3px solid lightgrey;
|
|
781
|
+
display: flex;
|
|
782
|
+
justify-content: center;
|
|
783
|
+
align-items: center;
|
|
784
|
+
}
|
|
785
|
+
:deep(.card_item__control-radio span) {
|
|
786
|
+
background-image: url('../../../assets/icons/tick.svg');
|
|
787
|
+
background-position: center;
|
|
788
|
+
background-repeat: no-repeat;
|
|
789
|
+
filter: invert(1);
|
|
790
|
+
width: 100%;
|
|
791
|
+
height: 100%;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
&__selected-radio {
|
|
795
|
+
:deep(.card_item__control-radio) {
|
|
796
|
+
background-color: green;
|
|
797
|
+
border: 3px solid green;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
&__header {
|
|
802
|
+
width: 100%;
|
|
803
|
+
|
|
804
|
+
&--medium {
|
|
805
|
+
font-weight: 700;
|
|
806
|
+
font-size: 16px;
|
|
807
|
+
line-height: 20px;
|
|
808
|
+
}
|
|
809
|
+
&--large {
|
|
810
|
+
font-weight: 700;
|
|
811
|
+
font-size: 20px;
|
|
812
|
+
line-height: 24px;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
&--extra-large {
|
|
816
|
+
margin-bottom: 12px;
|
|
817
|
+
font-size: 32px;
|
|
818
|
+
font-style: normal;
|
|
819
|
+
font-weight: 700;
|
|
820
|
+
line-height: 36px;
|
|
821
|
+
letter-spacing: 0px;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
&--extra-2x-large {
|
|
825
|
+
white-space: nowrap;
|
|
826
|
+
margin-top: 0;
|
|
827
|
+
margin-right: auto;
|
|
828
|
+
margin-bottom: 32px;
|
|
829
|
+
margin-left: auto;
|
|
830
|
+
font-size: 56px;
|
|
831
|
+
font-weight: 700;
|
|
832
|
+
line-height: 80px;
|
|
833
|
+
|
|
834
|
+
@media screen and (max-width: 1199px) and (min-width: 768px) {
|
|
835
|
+
@include fp('font-size', 60, 72);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
&--align-right {
|
|
840
|
+
direction: rtl;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.card-body {
|
|
846
|
+
width: 100%;
|
|
847
|
+
}
|
|
848
|
+
</style>
|