@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,220 @@
|
|
|
1
|
+
import BrowseContent from './index.vue'
|
|
2
|
+
|
|
3
|
+
const bundleContent = ['news', 'page']
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Paragraphs/BrowseContent',
|
|
7
|
+
component: { BrowseContent },
|
|
8
|
+
argTypes: {
|
|
9
|
+
background: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['grey', 'white', 'yellow'],
|
|
12
|
+
defaultValue: 'grey'
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
defaultValue: 'Card Group Auto title'
|
|
17
|
+
},
|
|
18
|
+
titleTag: {
|
|
19
|
+
control: 'select',
|
|
20
|
+
options: ['h2', 'h3'],
|
|
21
|
+
defaultValue: 'h2'
|
|
22
|
+
},
|
|
23
|
+
bundle: {
|
|
24
|
+
control: 'object',
|
|
25
|
+
defaultValue: bundleContent
|
|
26
|
+
},
|
|
27
|
+
columns: {
|
|
28
|
+
control: 'select',
|
|
29
|
+
options: [4, 3, 2, 1],
|
|
30
|
+
defaultValue: 3
|
|
31
|
+
},
|
|
32
|
+
initialDisplyLimit: {
|
|
33
|
+
control: 'number',
|
|
34
|
+
defaultValue: 3
|
|
35
|
+
},
|
|
36
|
+
fetchContent: {
|
|
37
|
+
control: 'function',
|
|
38
|
+
defaultValue: null,
|
|
39
|
+
table: { disable: true }
|
|
40
|
+
},
|
|
41
|
+
enableBundleFilter: {
|
|
42
|
+
control: 'boolean',
|
|
43
|
+
defaultValue: true
|
|
44
|
+
},
|
|
45
|
+
showMore: {
|
|
46
|
+
control: 'boolean',
|
|
47
|
+
defaultValue: true
|
|
48
|
+
},
|
|
49
|
+
type: {
|
|
50
|
+
control: 'text',
|
|
51
|
+
defaultValue: 'auto',
|
|
52
|
+
table: { disable: true }
|
|
53
|
+
},
|
|
54
|
+
showFilter: {
|
|
55
|
+
control: 'boolean',
|
|
56
|
+
defaultValue: true
|
|
57
|
+
},
|
|
58
|
+
rows: {
|
|
59
|
+
control: 'select',
|
|
60
|
+
options: [3, 2, 1],
|
|
61
|
+
defaultValue: 3
|
|
62
|
+
},
|
|
63
|
+
hasPreselectedFilters: {
|
|
64
|
+
control: 'boolean',
|
|
65
|
+
defaultValue: false
|
|
66
|
+
},
|
|
67
|
+
totalResults: {
|
|
68
|
+
control: 'number',
|
|
69
|
+
defaultValue: 10
|
|
70
|
+
},
|
|
71
|
+
filterResults: {
|
|
72
|
+
control: 'number',
|
|
73
|
+
defaultValue: 1
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const DefaultContent = (args, { argTypes }) => ({
|
|
79
|
+
components: { BrowseContent },
|
|
80
|
+
props: Object.keys(argTypes),
|
|
81
|
+
mounted() {
|
|
82
|
+
this.reset()
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
searchResults() {
|
|
86
|
+
return {
|
|
87
|
+
results: Array(this.totalResults).fill({
|
|
88
|
+
title: 'News Kitchen Sink 11',
|
|
89
|
+
imageSrc: '',
|
|
90
|
+
imageAlt: '',
|
|
91
|
+
description: 'test',
|
|
92
|
+
link: '/news/2021-08/news-kitchen-sink-11',
|
|
93
|
+
pillText: 'News',
|
|
94
|
+
colour: 'blue',
|
|
95
|
+
date: '',
|
|
96
|
+
location: '',
|
|
97
|
+
rtl: false
|
|
98
|
+
}),
|
|
99
|
+
numFound: this.totalResults
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
data() {
|
|
104
|
+
return {
|
|
105
|
+
rerenderKey: 0
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
reset() {
|
|
110
|
+
this.rerenderKey += 1
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
this.$refs.bc.loadFiltersAndContent()
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
fetchCards(qs, filters, bundleIndex) {
|
|
116
|
+
const hasFilters = Object.values(filters).some(
|
|
117
|
+
(filter) => filter.filter((item) => !item.preselected).length > 0
|
|
118
|
+
)
|
|
119
|
+
const data = JSON.parse(JSON.stringify(this.searchResults))
|
|
120
|
+
data.results.forEach((item, index) => {
|
|
121
|
+
item.pillText = qs.bundle
|
|
122
|
+
item.colour = ['blue', 'pink'][bundleIndex]
|
|
123
|
+
item.title = `${qs.bundle} ` + (index + 1)
|
|
124
|
+
return item
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
data.results = hasFilters
|
|
128
|
+
? data.results.slice(0, this.filterResults)
|
|
129
|
+
: data.results.slice(qs.start, qs.start + qs.rows)
|
|
130
|
+
data.numFound = hasFilters ? this.filterResults : data.numFound
|
|
131
|
+
|
|
132
|
+
return Promise.resolve(data)
|
|
133
|
+
},
|
|
134
|
+
fetchFilters() {
|
|
135
|
+
return Promise.resolve(
|
|
136
|
+
this.showFilter
|
|
137
|
+
? [
|
|
138
|
+
{
|
|
139
|
+
name: 'industry',
|
|
140
|
+
terms: [
|
|
141
|
+
{
|
|
142
|
+
tid: '421',
|
|
143
|
+
name: 'Locked Industry',
|
|
144
|
+
preselected: true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
tid: '401',
|
|
148
|
+
name: 'Aged care'
|
|
149
|
+
}
|
|
150
|
+
].filter((item) =>
|
|
151
|
+
this.hasPreselectedFilters ? true : !item.preselected
|
|
152
|
+
),
|
|
153
|
+
record_id: 'industry'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'topic',
|
|
157
|
+
terms: [
|
|
158
|
+
{
|
|
159
|
+
tid: '411',
|
|
160
|
+
name: 'Asbestos'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
tid: '4121',
|
|
164
|
+
name: 'Locked Industry',
|
|
165
|
+
preselected: true
|
|
166
|
+
}
|
|
167
|
+
].filter((item) =>
|
|
168
|
+
this.hasPreselectedFilters ? true : !item.preselected
|
|
169
|
+
),
|
|
170
|
+
record_id: 'topic'
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
: []
|
|
174
|
+
)
|
|
175
|
+
},
|
|
176
|
+
getBundleAlias(string) {
|
|
177
|
+
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
watch: {
|
|
181
|
+
showFilter: {
|
|
182
|
+
handler: function() {
|
|
183
|
+
this.reset()
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
rows: {
|
|
187
|
+
handler: function() {
|
|
188
|
+
this.reset()
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
totalResults: {
|
|
192
|
+
handler: function() {
|
|
193
|
+
this.reset()
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
filterResults: {
|
|
197
|
+
handler: function() {
|
|
198
|
+
this.reset()
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
hasPreselectedFilters: {
|
|
202
|
+
handler: function() {
|
|
203
|
+
this.reset()
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
template: `
|
|
208
|
+
<browse-content
|
|
209
|
+
v-bind="$props"
|
|
210
|
+
ref="bc"
|
|
211
|
+
:key="rerenderKey"
|
|
212
|
+
:initial-disply-limit="rows * 3"
|
|
213
|
+
:fetch-content="fetchCards"
|
|
214
|
+
:get-bundle-alias="getBundleAlias"
|
|
215
|
+
:fetch-filters="fetchFilters"
|
|
216
|
+
/>
|
|
217
|
+
`
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
export const Default = DefaultContent.bind({})
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<card-group
|
|
3
|
+
:title="title"
|
|
4
|
+
:title-tag="titleTag"
|
|
5
|
+
:background="background"
|
|
6
|
+
:cards="displayedCards"
|
|
7
|
+
:loading="loading"
|
|
8
|
+
:columns="columns"
|
|
9
|
+
:show-load-more="showMore && hasMorePages"
|
|
10
|
+
:class="`wcl-browse-content card_group__card--col-${columns}`"
|
|
11
|
+
@loadMore="() => loadMoreCards(false)"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-if="enableBundleFilter && bundle.length > 1"
|
|
15
|
+
v-slot:cardGroupFilter
|
|
16
|
+
>
|
|
17
|
+
<switcher
|
|
18
|
+
v-if="enableBundleFilter"
|
|
19
|
+
:options="bundle"
|
|
20
|
+
class="wcl-browse-content__switcher"
|
|
21
|
+
:get-option-alias="getBundleAlias"
|
|
22
|
+
@switched="onSwitcher"
|
|
23
|
+
@reset="onSwitcher"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<template v-if="filters.taxonomies.length > 0" v-slot:cardGroupPreContent>
|
|
28
|
+
<directory-filters
|
|
29
|
+
class="wcl-browse-content__filter"
|
|
30
|
+
:filters="filters"
|
|
31
|
+
:results="allCards.total"
|
|
32
|
+
:is-filtering="loading"
|
|
33
|
+
@onFilter="onFilter"
|
|
34
|
+
@onReset="reset"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
</card-group>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
import CardGroup from '../../SubComponents/CardGroup/index.vue'
|
|
42
|
+
import DirectoryFilters from '../../Global/DirectoryFilters/index.vue'
|
|
43
|
+
import Switcher from './switcher.vue'
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
name: 'BrowseContent',
|
|
47
|
+
components: {
|
|
48
|
+
CardGroup,
|
|
49
|
+
DirectoryFilters,
|
|
50
|
+
Switcher
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
background: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'grey'
|
|
56
|
+
},
|
|
57
|
+
title: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: ''
|
|
60
|
+
},
|
|
61
|
+
titleTag: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'h2'
|
|
64
|
+
},
|
|
65
|
+
bundle: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: () => ['']
|
|
68
|
+
},
|
|
69
|
+
columns: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: 0
|
|
72
|
+
},
|
|
73
|
+
initialDisplyLimit: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: 0
|
|
76
|
+
},
|
|
77
|
+
fetchContent: {
|
|
78
|
+
type: Function,
|
|
79
|
+
required: true
|
|
80
|
+
},
|
|
81
|
+
fetchFilters: {
|
|
82
|
+
type: Function,
|
|
83
|
+
required: false,
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
enableBundleFilter: {
|
|
87
|
+
type: Boolean
|
|
88
|
+
},
|
|
89
|
+
getBundleAlias: {
|
|
90
|
+
type: Function,
|
|
91
|
+
required: false,
|
|
92
|
+
default: null
|
|
93
|
+
},
|
|
94
|
+
showMore: {
|
|
95
|
+
type: Boolean
|
|
96
|
+
},
|
|
97
|
+
type: {
|
|
98
|
+
type: String,
|
|
99
|
+
required: true
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
async fetch() {
|
|
103
|
+
if (this.displayedCards.length === 0) {
|
|
104
|
+
await this.loadFiltersAndContent()
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
data() {
|
|
108
|
+
return {
|
|
109
|
+
hasMorePages: false,
|
|
110
|
+
displayedCards: [],
|
|
111
|
+
loading: true,
|
|
112
|
+
bundleCache: {},
|
|
113
|
+
displayLimit: 0,
|
|
114
|
+
allCards: undefined,
|
|
115
|
+
filters: {
|
|
116
|
+
taxonomies: [],
|
|
117
|
+
selected: {},
|
|
118
|
+
availableBundles: []
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
fetchOnServer: true,
|
|
123
|
+
fetchKey: 'ws-browscontent',
|
|
124
|
+
methods: {
|
|
125
|
+
async loadFiltersAndContent() {
|
|
126
|
+
await Promise.all([
|
|
127
|
+
this.fetchFilters ? this.loadFilters() : Promise.resolve(),
|
|
128
|
+
this.loadMoreCards(true)
|
|
129
|
+
])
|
|
130
|
+
},
|
|
131
|
+
init() {
|
|
132
|
+
this.allCards = {
|
|
133
|
+
total: 0,
|
|
134
|
+
cards: []
|
|
135
|
+
}
|
|
136
|
+
this.displayLimit = 0
|
|
137
|
+
this.hasMorePages = false
|
|
138
|
+
this.displayedCards = []
|
|
139
|
+
this.bundleCache = {}
|
|
140
|
+
},
|
|
141
|
+
async fetchCards(currentDisplayedCards, allCards, addMoreBy, bundles) {
|
|
142
|
+
const shouldMakeNewFetchCall =
|
|
143
|
+
currentDisplayedCards.length + addMoreBy > allCards.cards.length
|
|
144
|
+
if (shouldMakeNewFetchCall) {
|
|
145
|
+
const cardBundles = await Promise.all(
|
|
146
|
+
bundles.map((bundle, index) =>
|
|
147
|
+
this.getBundle(bundle, addMoreBy, index)
|
|
148
|
+
)
|
|
149
|
+
)
|
|
150
|
+
allCards = this.getShuffledCards(cardBundles)
|
|
151
|
+
|
|
152
|
+
if (
|
|
153
|
+
this.type === 'paragraph--cards_group_latest' ||
|
|
154
|
+
this.type === 'paragraph--browse_content'
|
|
155
|
+
) {
|
|
156
|
+
allCards.cards = this.sortByDate(allCards.cards)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return allCards
|
|
160
|
+
},
|
|
161
|
+
async loadMoreCards(init) {
|
|
162
|
+
const attrs = {
|
|
163
|
+
group: this.$store?.state?.page?.content?.title
|
|
164
|
+
}
|
|
165
|
+
if (this.$gtm && !init) {
|
|
166
|
+
this.$gtm.push({ event: 'custom.interaction.showmore.click', ...attrs })
|
|
167
|
+
}
|
|
168
|
+
if (init) {
|
|
169
|
+
this.init()
|
|
170
|
+
}
|
|
171
|
+
this.loading = true
|
|
172
|
+
const addMoreBy = this.initialDisplyLimit
|
|
173
|
+
this.displayLimit += addMoreBy
|
|
174
|
+
const bundles =
|
|
175
|
+
this.filters.availableBundles.length > 0
|
|
176
|
+
? this.filters.availableBundles
|
|
177
|
+
: this.bundle
|
|
178
|
+
this.allCards = await this.fetchCards(
|
|
179
|
+
this.displayedCards,
|
|
180
|
+
this.allCards,
|
|
181
|
+
addMoreBy,
|
|
182
|
+
bundles
|
|
183
|
+
)
|
|
184
|
+
this.hasMorePages = this.allCards.total > this.allCards.cards.length
|
|
185
|
+
this.displayedCards = this.allCards.cards.slice(0, this.displayLimit)
|
|
186
|
+
this.loading = false
|
|
187
|
+
},
|
|
188
|
+
getBundle(bundle, addMoreBy, index) {
|
|
189
|
+
let start
|
|
190
|
+
const rows = addMoreBy
|
|
191
|
+
const cache = (this.bundleCache[bundle] = this.bundleCache[bundle] || {
|
|
192
|
+
response: {
|
|
193
|
+
results: [],
|
|
194
|
+
numFound: 0
|
|
195
|
+
},
|
|
196
|
+
qs: {
|
|
197
|
+
start
|
|
198
|
+
}
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
if (cache.qs.start === undefined) {
|
|
202
|
+
start = 0
|
|
203
|
+
} else if (cache.response.numFound > cache.response.results.length) {
|
|
204
|
+
start = cache.response.results.length
|
|
205
|
+
} else {
|
|
206
|
+
return Promise.resolve(cache.response)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const qs = {
|
|
210
|
+
bundle,
|
|
211
|
+
rows,
|
|
212
|
+
start
|
|
213
|
+
}
|
|
214
|
+
return this.fetchContent(qs, this.filters.selected, index).then(
|
|
215
|
+
(response) => {
|
|
216
|
+
cache.qs.start = qs.start
|
|
217
|
+
cache.response.numFound = response.numFound
|
|
218
|
+
cache.response.results.push(...response.results)
|
|
219
|
+
return cache.response
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
},
|
|
223
|
+
getShuffledCards(cardBundles) {
|
|
224
|
+
const shuffled = []
|
|
225
|
+
const bundleWithMostCards = cardBundles.reduce(
|
|
226
|
+
(a, b) => (a.results.length > b.results.length ? a : b),
|
|
227
|
+
{ results: [] }
|
|
228
|
+
).results.length
|
|
229
|
+
|
|
230
|
+
for (let i = 0; i < bundleWithMostCards; i++) {
|
|
231
|
+
cardBundles.forEach((bundle) => {
|
|
232
|
+
if (bundle.results[i]) {
|
|
233
|
+
shuffled.push(bundle.results[i])
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const total = cardBundles.reduce((acc, bundle) => {
|
|
239
|
+
return acc + bundle.numFound
|
|
240
|
+
}, 0)
|
|
241
|
+
|
|
242
|
+
return { cards: shuffled, total }
|
|
243
|
+
},
|
|
244
|
+
loadFilters() {
|
|
245
|
+
return this.fetchFilters().then((taxonomies) => {
|
|
246
|
+
this.filters.taxonomies = taxonomies
|
|
247
|
+
return Promise.resolve(taxonomies)
|
|
248
|
+
})
|
|
249
|
+
},
|
|
250
|
+
onFilter(filters) {
|
|
251
|
+
this.bundleCache = {}
|
|
252
|
+
Object.keys(filters).forEach((filter) => {
|
|
253
|
+
this.filters.selected[filter] = filters[filter].map((obj) => obj.tid)
|
|
254
|
+
})
|
|
255
|
+
this.loadMoreCards(true)
|
|
256
|
+
},
|
|
257
|
+
onSwitcher(switchToBundle) {
|
|
258
|
+
this.filters.selected = {}
|
|
259
|
+
this.filters.availableBundles.length = 0
|
|
260
|
+
if (switchToBundle) {
|
|
261
|
+
this.filters.availableBundles.push(switchToBundle)
|
|
262
|
+
}
|
|
263
|
+
this.loadMoreCards(true)
|
|
264
|
+
},
|
|
265
|
+
async reset() {
|
|
266
|
+
this.bundleCache = {}
|
|
267
|
+
this.filters.selected = {}
|
|
268
|
+
this.filters.availableBundles.length = 0
|
|
269
|
+
await this.loadMoreCards(true)
|
|
270
|
+
},
|
|
271
|
+
sortByDate(cards) {
|
|
272
|
+
const sorted = cards.sort((a, b) => {
|
|
273
|
+
return new Date(b.dateSort) - new Date(a.dateSort)
|
|
274
|
+
})
|
|
275
|
+
return sorted
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
</script>
|
|
280
|
+
<style lang="scss" scoped>
|
|
281
|
+
.wcl-browse-content {
|
|
282
|
+
&__filter {
|
|
283
|
+
align-items: flex-end;
|
|
284
|
+
place-content: flex-end;
|
|
285
|
+
}
|
|
286
|
+
&.card_group__card--col-4 {
|
|
287
|
+
:deep(.card-grid__column .card-grid-item__description) {
|
|
288
|
+
display: none;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
:deep(.card_group__card--blue .card_item__desc p) {
|
|
292
|
+
margin-top: 12px;
|
|
293
|
+
}
|
|
294
|
+
:deep(.card_group__card--red .card_item__desc p) {
|
|
295
|
+
margin-top: 12px;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="switcher">
|
|
3
|
+
<div v-for="(o, i) in options" :key="i" class="switcher__item">
|
|
4
|
+
<filter-button
|
|
5
|
+
:selected="selected === o"
|
|
6
|
+
:is-reset="false"
|
|
7
|
+
@clicked="$emit('switched', o), (selected = o), (switched = true)"
|
|
8
|
+
>
|
|
9
|
+
<span>{{ getOptionAlias ? getOptionAlias(o) : o }}</span>
|
|
10
|
+
<span class="visually-hidden"> filters content below</span>
|
|
11
|
+
</filter-button>
|
|
12
|
+
</div>
|
|
13
|
+
<div v-if="switched" class="switcher__item">
|
|
14
|
+
<filter-button
|
|
15
|
+
:is-reset="true"
|
|
16
|
+
@clicked="$emit('reset'), (selected = null), (switched = false)"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import FilterButton from '../../Common/FilterButton/index.vue'
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
components: {
|
|
27
|
+
FilterButton
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
options: {
|
|
31
|
+
type: Array,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
getOptionAlias: {
|
|
35
|
+
type: Function,
|
|
36
|
+
required: false,
|
|
37
|
+
default: null
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
switched: false,
|
|
43
|
+
selected: null
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
@import '../../../includes/scss/all';
|
|
50
|
+
.switcher {
|
|
51
|
+
&__item {
|
|
52
|
+
display: inline-block;
|
|
53
|
+
padding-right: 16px;
|
|
54
|
+
line-height: 3;
|
|
55
|
+
@include mq('xs') {
|
|
56
|
+
padding-right: 8px;
|
|
57
|
+
}
|
|
58
|
+
&:last-child {
|
|
59
|
+
padding-right: 0px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</style>
|