@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,333 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<card-grid
|
|
3
|
+
:title="title"
|
|
4
|
+
:title-tag="titleTag"
|
|
5
|
+
:sub-heading="subHeading"
|
|
6
|
+
:cards="list"
|
|
7
|
+
:rtl="rtl"
|
|
8
|
+
:force-lg-columns-per-row="1"
|
|
9
|
+
:force-md-columns-per-row="1"
|
|
10
|
+
:force-sm-columns-per-row="1"
|
|
11
|
+
:is-selectable="true"
|
|
12
|
+
:row-spacing="showListLink ? 'none' : 'small'"
|
|
13
|
+
:row-classes="showListLink ? 'list_link' : ''"
|
|
14
|
+
class="list_group"
|
|
15
|
+
:class="showListLink ? 'list_group__link' : ''"
|
|
16
|
+
:background-variant="darkBackground ? 'dark' : 'none'"
|
|
17
|
+
:size="'content'"
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
@selected="selectedCard"
|
|
20
|
+
@focussed="focussed($event)"
|
|
21
|
+
>
|
|
22
|
+
<template v-slot:cardItem="{ card }">
|
|
23
|
+
<card-grid-item
|
|
24
|
+
:show-divider="false"
|
|
25
|
+
:header-size="'large'"
|
|
26
|
+
class="list_group__card mb-1"
|
|
27
|
+
:class="showListLink ? 'list_group__link--card' : ''"
|
|
28
|
+
:card-header-title="card.title"
|
|
29
|
+
:rtl="rtl || card.rtl"
|
|
30
|
+
:caret="
|
|
31
|
+
showListLink
|
|
32
|
+
? getCaret(card) === 'external'
|
|
33
|
+
? getCaret(card)
|
|
34
|
+
: null
|
|
35
|
+
: getCaret(card)
|
|
36
|
+
"
|
|
37
|
+
:caret-position="showListLink ? 'after-title' : 'top'"
|
|
38
|
+
:glyph-icon-component="showListLink ? 'arrow-right' : ''"
|
|
39
|
+
:icon-is-bordered="false"
|
|
40
|
+
:icon-position="showListLink ? 'top-right' : 'top'"
|
|
41
|
+
:icon-size="showListLink ? 'xsmall' : 'small'"
|
|
42
|
+
:card-padding="showLargeSpacing ? 'large' : 'small'"
|
|
43
|
+
:border-type="'thin'"
|
|
44
|
+
:description="showListLink ? '' : card.description"
|
|
45
|
+
:description-class="showListLink ? '' : 'list-item__text'"
|
|
46
|
+
:strip-description-html="true"
|
|
47
|
+
:link="card.link ? card.link : false"
|
|
48
|
+
:taxonomies="{
|
|
49
|
+
industry: card.industry,
|
|
50
|
+
topic: card.topic,
|
|
51
|
+
language: card.language
|
|
52
|
+
}"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
55
|
+
<template v-slot:cardGridFooter>
|
|
56
|
+
<rich-text
|
|
57
|
+
v-if="!$slots.cardDescription && footerHeading"
|
|
58
|
+
:content="footerHeading"
|
|
59
|
+
:without-container="true"
|
|
60
|
+
/>
|
|
61
|
+
</template>
|
|
62
|
+
</card-grid>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
import CardGrid from './../../Common/CardGrid/index.vue'
|
|
67
|
+
import CardGridItem from './../../Common/CardGridItem/index.vue'
|
|
68
|
+
import RichText from './../../Paragraphs/RichText/index.vue'
|
|
69
|
+
import {
|
|
70
|
+
isAbsoluteUrl,
|
|
71
|
+
navigateToPath,
|
|
72
|
+
isGovSite
|
|
73
|
+
} from './../../../../lib/utility'
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
name: 'ListGroup',
|
|
77
|
+
components: { CardGrid, CardGridItem, RichText },
|
|
78
|
+
props: {
|
|
79
|
+
list: {
|
|
80
|
+
type: Array,
|
|
81
|
+
default() {
|
|
82
|
+
return []
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
role: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: 'button'
|
|
88
|
+
},
|
|
89
|
+
darkBackground: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
},
|
|
93
|
+
title: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: ''
|
|
96
|
+
},
|
|
97
|
+
titleTag: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: 'h3'
|
|
100
|
+
},
|
|
101
|
+
subHeading: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: null
|
|
104
|
+
},
|
|
105
|
+
footerHeading: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: null
|
|
108
|
+
},
|
|
109
|
+
rtl: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
},
|
|
113
|
+
showListItemNavigationArrow: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: false
|
|
116
|
+
},
|
|
117
|
+
showLargeSpacing: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false
|
|
120
|
+
},
|
|
121
|
+
showListLink: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
methods: {
|
|
127
|
+
getCaret(card) {
|
|
128
|
+
if (this.showListItemNavigationArrow) {
|
|
129
|
+
if (isAbsoluteUrl(card.link)) {
|
|
130
|
+
return 'external'
|
|
131
|
+
} else {
|
|
132
|
+
return 'right'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return null
|
|
136
|
+
},
|
|
137
|
+
selectedCard(card) {
|
|
138
|
+
// Some custom logic for gov caretaker logic
|
|
139
|
+
if (process.env.CARETAKER && process.env.CARETAKER === 'true') {
|
|
140
|
+
if (!isGovSite(card?.selectedCard?.link)) {
|
|
141
|
+
this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
|
|
142
|
+
this.$root.$emit('caretaker-open', card?.selectedCard?.link)
|
|
143
|
+
} else {
|
|
144
|
+
navigateToPath.call(
|
|
145
|
+
this,
|
|
146
|
+
card?.selectedCard?.link,
|
|
147
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
navigateToPath.call(
|
|
152
|
+
this,
|
|
153
|
+
card?.selectedCard?.link,
|
|
154
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
focussed(ev) {
|
|
159
|
+
const path = ev.path || (ev.composedPath && ev.composedPath())
|
|
160
|
+
const theTabbedCards = path.find(
|
|
161
|
+
(el) => el['_prevClass'] === 'tabbed-cards'
|
|
162
|
+
)
|
|
163
|
+
if (ev.shiftKey && theTabbedCards) {
|
|
164
|
+
ev.preventDefault()
|
|
165
|
+
let selectedTabbedCards = theTabbedCards.getElementsByClassName(
|
|
166
|
+
'isSelected'
|
|
167
|
+
)
|
|
168
|
+
let selectedCard = selectedTabbedCards[0].getElementsByTagName('button')
|
|
169
|
+
let thePrevLGItem = ev.target?.parentElement?.parentElement?.previousSibling?.getElementsByTagName(
|
|
170
|
+
'button'
|
|
171
|
+
)
|
|
172
|
+
if (thePrevLGItem) {
|
|
173
|
+
thePrevLGItem[0].focus()
|
|
174
|
+
} else {
|
|
175
|
+
selectedCard[0].focus()
|
|
176
|
+
}
|
|
177
|
+
} else if (!ev.shiftKey && theTabbedCards) {
|
|
178
|
+
ev.preventDefault()
|
|
179
|
+
let selectedTabbedCards = theTabbedCards.getElementsByClassName(
|
|
180
|
+
'isSelected'
|
|
181
|
+
)
|
|
182
|
+
let nextTabbedCard = selectedTabbedCards[0]?.parentElement?.nextSibling?.getElementsByTagName(
|
|
183
|
+
'button'
|
|
184
|
+
)
|
|
185
|
+
let theNextLGItem = ev.target?.parentElement?.parentElement?.nextSibling?.getElementsByTagName(
|
|
186
|
+
'button'
|
|
187
|
+
)
|
|
188
|
+
if (theNextLGItem) {
|
|
189
|
+
theNextLGItem[0].focus()
|
|
190
|
+
} else if (nextTabbedCard) {
|
|
191
|
+
nextTabbedCard[0].focus()
|
|
192
|
+
} else {
|
|
193
|
+
let nextFocus = this.focusNextElement()
|
|
194
|
+
this.$root.$emit('last-focus-out')
|
|
195
|
+
nextFocus.focus()
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
return true
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
focusNextElement(reverse, activeElem) {
|
|
202
|
+
/*check if an element is defined or use activeElement*/
|
|
203
|
+
activeElem =
|
|
204
|
+
activeElem instanceof HTMLElement ? activeElem : document.activeElement
|
|
205
|
+
|
|
206
|
+
let queryString = [
|
|
207
|
+
'a:not([disabled]):not([tabindex="-1"])',
|
|
208
|
+
'button:not([disabled]):not([tabindex="-1"])',
|
|
209
|
+
'input:not([disabled]):not([tabindex="-1"])',
|
|
210
|
+
'select:not([disabled]):not([tabindex="-1"])',
|
|
211
|
+
'[tabindex]:not([disabled]):not([tabindex="-1"])'
|
|
212
|
+
/* add custom queries here */
|
|
213
|
+
].join(','),
|
|
214
|
+
queryResult = Array.prototype.filter.call(
|
|
215
|
+
document.querySelectorAll(queryString),
|
|
216
|
+
(elem) => {
|
|
217
|
+
/*check for visibility while always include the current activeElement*/
|
|
218
|
+
return (
|
|
219
|
+
elem.offsetWidth > 0 ||
|
|
220
|
+
elem.offsetHeight > 0 ||
|
|
221
|
+
elem === activeElem
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
indexedList = queryResult
|
|
226
|
+
.slice()
|
|
227
|
+
.filter((elem) => {
|
|
228
|
+
/* filter out all indexes not greater than 0 */
|
|
229
|
+
return elem.tabIndex == 0 || elem.tabIndex == -1 ? false : true
|
|
230
|
+
})
|
|
231
|
+
.sort((a, b) => {
|
|
232
|
+
/* sort the array by index from smallest to largest */
|
|
233
|
+
return a.tabIndex != 0 && b.tabIndex != 0
|
|
234
|
+
? a.tabIndex < b.tabIndex
|
|
235
|
+
? -1
|
|
236
|
+
: b.tabIndex < a.tabIndex
|
|
237
|
+
? 1
|
|
238
|
+
: 0
|
|
239
|
+
: a.tabIndex != 0
|
|
240
|
+
? -1
|
|
241
|
+
: b.tabIndex != 0
|
|
242
|
+
? 1
|
|
243
|
+
: 0
|
|
244
|
+
}),
|
|
245
|
+
focusable = [].concat(
|
|
246
|
+
indexedList,
|
|
247
|
+
queryResult.filter((elem) => {
|
|
248
|
+
/* filter out all indexes above 0 */
|
|
249
|
+
return elem.tabIndex == 0 || elem.tabIndex == -1 ? true : false
|
|
250
|
+
})
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
/* if reverse is true return the previous focusable element
|
|
254
|
+
if reverse is false return the next focusable element */
|
|
255
|
+
return reverse
|
|
256
|
+
? focusable[focusable.indexOf(activeElem) - 1] ||
|
|
257
|
+
focusable[focusable.length - 1]
|
|
258
|
+
: focusable[focusable.indexOf(activeElem) + 1] || focusable[0]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
</script>
|
|
263
|
+
<style lang="scss" scoped>
|
|
264
|
+
@import '../../../includes/scss/vars/src/colors';
|
|
265
|
+
|
|
266
|
+
.list_group {
|
|
267
|
+
margin-top: -16px;
|
|
268
|
+
margin-bottom: -16px;
|
|
269
|
+
:deep(.list_group__card) {
|
|
270
|
+
button {
|
|
271
|
+
border: 2px solid $lightgray;
|
|
272
|
+
border-left: thick solid $orange;
|
|
273
|
+
}
|
|
274
|
+
.card-title {
|
|
275
|
+
margin-bottom: 0;
|
|
276
|
+
}
|
|
277
|
+
.wysiwyg {
|
|
278
|
+
margin-top: 12px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
:deep(.card-grid__row--list_link) {
|
|
282
|
+
> div:first-child .list_group__card button {
|
|
283
|
+
border-top: 1px solid #d1d1d1;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
:deep(.list_group__link--card) {
|
|
288
|
+
h3 {
|
|
289
|
+
font-size: 16px;
|
|
290
|
+
}
|
|
291
|
+
button {
|
|
292
|
+
border: none;
|
|
293
|
+
border-radius: 0;
|
|
294
|
+
color: #006bff;
|
|
295
|
+
font-weight: 700;
|
|
296
|
+
font-size: 16px;
|
|
297
|
+
|
|
298
|
+
&:hover {
|
|
299
|
+
background-color: #f3f3f3;
|
|
300
|
+
color: $black;
|
|
301
|
+
opacity: unset;
|
|
302
|
+
svg,
|
|
303
|
+
svg path,
|
|
304
|
+
img {
|
|
305
|
+
fill: $black;
|
|
306
|
+
color: $black;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
&:last-child {
|
|
310
|
+
border-bottom: 1px solid #d1d1d1;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
h3 span {
|
|
314
|
+
text-decoration: underline;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
svg,
|
|
318
|
+
svg path,
|
|
319
|
+
img {
|
|
320
|
+
fill: #006bff;
|
|
321
|
+
color: #006bff;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@media all and (-ms-high-contrast: none) {
|
|
327
|
+
::-ms-backdrop,
|
|
328
|
+
&__card {
|
|
329
|
+
padding-bottom: 8px;
|
|
330
|
+
} /* IE11 */
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
</style>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import ListGroup from './index.vue'
|
|
2
|
+
import { storyData, storyDataAr } from './Constants'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Paragraphs/ListGroup',
|
|
6
|
+
component: ListGroup,
|
|
7
|
+
argTypes: {
|
|
8
|
+
darkBackground: {
|
|
9
|
+
control: 'boolean',
|
|
10
|
+
defaultValue: false
|
|
11
|
+
},
|
|
12
|
+
items: {
|
|
13
|
+
control: 'object',
|
|
14
|
+
defaultValue: storyData.links
|
|
15
|
+
},
|
|
16
|
+
rtlItems: {
|
|
17
|
+
control: 'object',
|
|
18
|
+
defaultValue: storyDataAr.links
|
|
19
|
+
},
|
|
20
|
+
rtl: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
defaultValue: false
|
|
23
|
+
},
|
|
24
|
+
titleTag: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
defaultValue: 'h3'
|
|
27
|
+
},
|
|
28
|
+
showListItemNavigationArrow: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
defaultValue: true
|
|
31
|
+
},
|
|
32
|
+
showLargeSpacing: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
defaultValue: false
|
|
35
|
+
},
|
|
36
|
+
list: {
|
|
37
|
+
table: {
|
|
38
|
+
disable: true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
title: {
|
|
42
|
+
table: {
|
|
43
|
+
disable: true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const Template = (args, { argTypes }) => ({
|
|
50
|
+
components: { ListGroup },
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
storyData,
|
|
54
|
+
storyDataAr
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
props: Object.keys(argTypes),
|
|
58
|
+
template: `<list-group
|
|
59
|
+
v-bind="$props"
|
|
60
|
+
:list="rtl ? rtlItems : items"
|
|
61
|
+
:title="(rtl ? storyDataAr.title : storyData.title)" />`
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
export const Default = Template.bind({})
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import ListGroup from './index.vue'
|
|
2
|
+
import { storyData, storyDataAr } from './Constants'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Paragraphs/NavigationCards',
|
|
6
|
+
component: ListGroup,
|
|
7
|
+
argTypes: {
|
|
8
|
+
darkBackground: {
|
|
9
|
+
control: 'boolean',
|
|
10
|
+
defaultValue: true
|
|
11
|
+
},
|
|
12
|
+
items: {
|
|
13
|
+
control: 'object',
|
|
14
|
+
defaultValue: storyData.links
|
|
15
|
+
},
|
|
16
|
+
rtlItems: {
|
|
17
|
+
control: 'object',
|
|
18
|
+
defaultValue: storyDataAr.links
|
|
19
|
+
},
|
|
20
|
+
rtl: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
defaultValue: false
|
|
23
|
+
},
|
|
24
|
+
titleTag: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
defaultValue: 'h2'
|
|
27
|
+
},
|
|
28
|
+
showListItemNavigationArrow: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
defaultValue: false
|
|
31
|
+
},
|
|
32
|
+
showLargeSpacing: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
defaultValue: false
|
|
35
|
+
},
|
|
36
|
+
list: {
|
|
37
|
+
table: {
|
|
38
|
+
disable: true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
title: {
|
|
42
|
+
table: {
|
|
43
|
+
disable: true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const Template = (args, { argTypes }) => ({
|
|
50
|
+
components: { ListGroup },
|
|
51
|
+
props: Object.keys(argTypes),
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
storyData,
|
|
55
|
+
storyDataAr
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
template: `<list-group
|
|
59
|
+
v-bind="$props"
|
|
60
|
+
:list="rtl ? rtlItems : items"
|
|
61
|
+
:title="(rtl ? storyDataAr.title : storyData.title)"
|
|
62
|
+
/>
|
|
63
|
+
`
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const Default = Template.bind({})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import MarketingBanner from './index.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Paragraphs/MarketingBanner',
|
|
5
|
+
component: MarketingBanner,
|
|
6
|
+
argTypes: {
|
|
7
|
+
image: {
|
|
8
|
+
control: 'text'
|
|
9
|
+
},
|
|
10
|
+
leftText: {
|
|
11
|
+
control: 'text'
|
|
12
|
+
},
|
|
13
|
+
leftBg: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: ['yellow', 'black', 'white']
|
|
16
|
+
},
|
|
17
|
+
rightText: {
|
|
18
|
+
control: 'text'
|
|
19
|
+
},
|
|
20
|
+
rightBg: {
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: ['yellow', 'black', 'white']
|
|
23
|
+
},
|
|
24
|
+
withLink: {
|
|
25
|
+
control: 'boolean'
|
|
26
|
+
},
|
|
27
|
+
hideLeft: {
|
|
28
|
+
control: 'boolean'
|
|
29
|
+
},
|
|
30
|
+
link: {
|
|
31
|
+
control: 'text',
|
|
32
|
+
table: { disable: true }
|
|
33
|
+
},
|
|
34
|
+
linkAltText: {
|
|
35
|
+
control: 'text',
|
|
36
|
+
table: { disable: true }
|
|
37
|
+
},
|
|
38
|
+
linkText: {
|
|
39
|
+
control: 'text',
|
|
40
|
+
table: { disable: true }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
args: {
|
|
44
|
+
image: 'https://picsum.photos/1200/514',
|
|
45
|
+
leftText: 'h2. left copy xx',
|
|
46
|
+
rightText: 'h2. right copy xx',
|
|
47
|
+
withLink: true,
|
|
48
|
+
hideLeft: false,
|
|
49
|
+
link: '',
|
|
50
|
+
linkAltText: '',
|
|
51
|
+
linkText: ''
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const DefaultMarketingBanner = (args) => ({
|
|
56
|
+
components: { MarketingBanner },
|
|
57
|
+
setup() {
|
|
58
|
+
return { args }
|
|
59
|
+
},
|
|
60
|
+
template: `
|
|
61
|
+
<MarketingBanner v-bind="args" :leftText="args.hideLeft ? null : args.leftText" :link="args.withLink ? 'www.google.com' : null" />
|
|
62
|
+
`
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
export const Default = DefaultMarketingBanner.bind({})
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="!!link ? 'button' : 'div'"
|
|
4
|
+
:href="!!link ? link : null"
|
|
5
|
+
class="wcl-marketing-banner"
|
|
6
|
+
:title="linkAltText || linkText"
|
|
7
|
+
@click.prevent="selected"
|
|
8
|
+
><section-group
|
|
9
|
+
:background-image="image"
|
|
10
|
+
class="wcl-marketing-banner__section"
|
|
11
|
+
:apply-background-on="'section'"
|
|
12
|
+
:size="'full'"
|
|
13
|
+
:background-variant="'none'"
|
|
14
|
+
:no-padding-bottom="true"
|
|
15
|
+
:no-padding-top="true"
|
|
16
|
+
>
|
|
17
|
+
<div class="wcl-marketing-banner__wrap">
|
|
18
|
+
<div v-if="leftText" :class="getClassString(leftBg, 'left')">
|
|
19
|
+
<rich-text :content="leftText" :tag="'h2'" />
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="rightText" :class="getClassString(rightBg, 'right')">
|
|
22
|
+
<rich-text :content="rightText" :tag="'h2'" />
|
|
23
|
+
</div>
|
|
24
|
+
</div> </section-group
|
|
25
|
+
></component>
|
|
26
|
+
</template>
|
|
27
|
+
<script>
|
|
28
|
+
import SectionGroup from '../../Containers/SectionGroup/index.vue'
|
|
29
|
+
import RichText from '../RichText/index.vue'
|
|
30
|
+
import { navigateToPath } from '../../../../lib/utility'
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'MarketingBanner',
|
|
34
|
+
components: {
|
|
35
|
+
SectionGroup,
|
|
36
|
+
RichText
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
image: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
leftText: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ''
|
|
46
|
+
},
|
|
47
|
+
leftBg: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: 'yellow'
|
|
50
|
+
},
|
|
51
|
+
rightText: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
54
|
+
},
|
|
55
|
+
rightBg: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'black'
|
|
58
|
+
},
|
|
59
|
+
link: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ''
|
|
62
|
+
},
|
|
63
|
+
linkAltText: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: ''
|
|
66
|
+
},
|
|
67
|
+
linkText: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: ''
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
urlHostname() {
|
|
74
|
+
return window.location.protocol + '//' + window.location.host
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
getClassString(color, position) {
|
|
79
|
+
return {
|
|
80
|
+
'wcl-marketing-banner__block': true,
|
|
81
|
+
['wcl-marketing-banner__block--bg-' + color]: true,
|
|
82
|
+
single: !this.leftText || !this.rightText,
|
|
83
|
+
[position]: this.leftText && this.rightText
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
selected() {
|
|
87
|
+
this.fireGTM()
|
|
88
|
+
if (this.link) {
|
|
89
|
+
navigateToPath.call(this, this.link)
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
fireGTM() {
|
|
93
|
+
if (this.$gtm) {
|
|
94
|
+
// format link
|
|
95
|
+
const linkStr = this.link
|
|
96
|
+
let linkURL = linkStr
|
|
97
|
+
if (linkStr !== false && !linkStr.includes(this.urlHostname)) {
|
|
98
|
+
linkURL = this.urlHostname + linkStr
|
|
99
|
+
}
|
|
100
|
+
// gather attrs
|
|
101
|
+
let attrs = {
|
|
102
|
+
label: this.linkAltText,
|
|
103
|
+
data: linkURL
|
|
104
|
+
}
|
|
105
|
+
// fire the event
|
|
106
|
+
this.$gtm.push({
|
|
107
|
+
event: 'custom.interaction.marketing.click',
|
|
108
|
+
group: 'Marketing',
|
|
109
|
+
...attrs
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</script>
|
|
116
|
+
<style lang="scss" scoped>
|
|
117
|
+
@import './styles';
|
|
118
|
+
</style>
|