@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,70 @@
|
|
|
1
|
+
import WebformPara from './index.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Paragraphs/Webform',
|
|
5
|
+
component: WebformPara,
|
|
6
|
+
argTypes: {
|
|
7
|
+
preview: {
|
|
8
|
+
control: 'boolean',
|
|
9
|
+
defaultValue: true,
|
|
10
|
+
table: {
|
|
11
|
+
disable: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
contentApiUrl: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
defaultValue: process.env.CONTENT_API_URL
|
|
17
|
+
},
|
|
18
|
+
processID: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
defaultValue: `proc-id-form-api
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.split(' ')
|
|
23
|
+
.join('-')}`,
|
|
24
|
+
table: {
|
|
25
|
+
disable: true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
formid: {
|
|
29
|
+
control: 'string',
|
|
30
|
+
defaultValue: 'review_of_an_agent_decision',
|
|
31
|
+
table: {
|
|
32
|
+
disable: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
type: {
|
|
36
|
+
control: 'text',
|
|
37
|
+
defaultValue: 'api',
|
|
38
|
+
table: {
|
|
39
|
+
disable: true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
webFormJson: {
|
|
43
|
+
control: 'object',
|
|
44
|
+
table: {
|
|
45
|
+
disable: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const Template = (args, { argTypes }) => ({
|
|
52
|
+
components: { WebformPara },
|
|
53
|
+
props: Object.keys(argTypes),
|
|
54
|
+
template: `
|
|
55
|
+
<div>
|
|
56
|
+
<h2>This is a web page with embedded webform</h2>
|
|
57
|
+
<p> Below is an example webform</p>
|
|
58
|
+
<br>
|
|
59
|
+
<br>
|
|
60
|
+
<div style="background-color: lightgrey">
|
|
61
|
+
<webform-para v-bind="$props" />
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`
|
|
65
|
+
})
|
|
66
|
+
export const Default = Template.bind({})
|
|
67
|
+
Default.args = {
|
|
68
|
+
type: 'api',
|
|
69
|
+
formid: 'review_of_an_agent_decision',
|
|
70
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="webform_para container-sm container-md container-lg container-xl">
|
|
3
|
+
<div class="row">
|
|
4
|
+
<div class="col-12 col-md-9">
|
|
5
|
+
<!-- <form-handler
|
|
6
|
+
:formid="formid"
|
|
7
|
+
:web-form-json="webFormJson"
|
|
8
|
+
:content-api-url="contentApiUrl"
|
|
9
|
+
:preview="preview"
|
|
10
|
+
:process-i-d="processID"
|
|
11
|
+
@changed="(e, i) => $emit('changed', e, i)"
|
|
12
|
+
@submitted="(e, i) => $emit('submitted', e, i)"
|
|
13
|
+
@rendered="() => $emit('rendered')"
|
|
14
|
+
@nextPage="() => $emit('nextPage')"
|
|
15
|
+
@prevPage="() => $emit('prevPage')"
|
|
16
|
+
/>
|
|
17
|
+
<i v-if="preview" class="fa fa-info-circle text-muted">
|
|
18
|
+
preview mode. submission logged to console
|
|
19
|
+
</i> -->
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
name: 'WebformPara'/* ,
|
|
28
|
+
components: { FormHandler },
|
|
29
|
+
props: {
|
|
30
|
+
formid: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: false,
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
35
|
+
webFormJson: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: false,
|
|
38
|
+
default: () => null
|
|
39
|
+
},
|
|
40
|
+
contentApiUrl: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false,
|
|
43
|
+
default: ''
|
|
44
|
+
},
|
|
45
|
+
preview: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
processID: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
backgroundStyle() {
|
|
57
|
+
let styles
|
|
58
|
+
if (this.formBackground) {
|
|
59
|
+
let bgColour
|
|
60
|
+
switch (this.formBackground) {
|
|
61
|
+
case 'grey':
|
|
62
|
+
case 'light':
|
|
63
|
+
bgColour = colors.lightgray
|
|
64
|
+
break
|
|
65
|
+
case 'dark':
|
|
66
|
+
bgColour = colors.gray
|
|
67
|
+
break
|
|
68
|
+
case 'yellow':
|
|
69
|
+
bgColour = colors.orange
|
|
70
|
+
break
|
|
71
|
+
case 'white':
|
|
72
|
+
bgColour = colors.white
|
|
73
|
+
break
|
|
74
|
+
case 'lightblue':
|
|
75
|
+
bgColour = colors.lightblue
|
|
76
|
+
break
|
|
77
|
+
case 'lightred':
|
|
78
|
+
bgColour = colors.lightred
|
|
79
|
+
break
|
|
80
|
+
default:
|
|
81
|
+
bgColour = 'transparent'
|
|
82
|
+
}
|
|
83
|
+
styles = {
|
|
84
|
+
...(styles || {}),
|
|
85
|
+
[`background-color`]: bgColour
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return styles
|
|
89
|
+
}
|
|
90
|
+
} */
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<style scoped lang="scss">
|
|
95
|
+
.webform_para {
|
|
96
|
+
width: 100%;
|
|
97
|
+
padding-top: 32px;
|
|
98
|
+
padding-bottom: 64px;
|
|
99
|
+
// :deep() {
|
|
100
|
+
// @import './../../SubComponents/FormInstance/style.scss';
|
|
101
|
+
// }
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Breadcrumb from './index.vue'
|
|
2
|
+
import mockData from './constants'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'SubComponents/Breadcrumb',
|
|
6
|
+
component: Breadcrumb,
|
|
7
|
+
argTypes: {
|
|
8
|
+
breadcrumbItems: {
|
|
9
|
+
control: 'array'
|
|
10
|
+
},
|
|
11
|
+
rtl: {
|
|
12
|
+
control: 'boolean'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: {
|
|
19
|
+
breadcrumbItems: mockData,
|
|
20
|
+
rtl: false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="wcl-breadcrumb"
|
|
4
|
+
:class="{ ['wcl-breadcrumb--rtl']: rtl, ['wcl-breadcrumb--ltr']: !rtl }"
|
|
5
|
+
>
|
|
6
|
+
<ol class="breadcrumb">
|
|
7
|
+
<li
|
|
8
|
+
v-for="(item, index) in breadcrumbItems"
|
|
9
|
+
:key="index"
|
|
10
|
+
class="breadcrumb-item"
|
|
11
|
+
>
|
|
12
|
+
<a v-if="item.href" :href="item.href" target="_self">{{ item.text }}</a>
|
|
13
|
+
<nuxt-link v-else-if="item.to" :to="item.to">{{ item.text }}</nuxt-link>
|
|
14
|
+
</li>
|
|
15
|
+
</ol>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
name: 'Breadcrumb',
|
|
21
|
+
props: {
|
|
22
|
+
breadcrumbItems: {
|
|
23
|
+
type: Array,
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
rtl: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
required: false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
@import '../../../includes/scss/vars/src/colors.scss';
|
|
35
|
+
|
|
36
|
+
.wcl-breadcrumb {
|
|
37
|
+
.breadcrumb {
|
|
38
|
+
background: none;
|
|
39
|
+
padding: 0;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
margin-bottom: 6px !important;
|
|
42
|
+
|
|
43
|
+
.breadcrumb-item a {
|
|
44
|
+
color: $black !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&--rtl {
|
|
49
|
+
direction: rtl;
|
|
50
|
+
text-align: right;
|
|
51
|
+
.breadcrumb-item {
|
|
52
|
+
&:last-of-type::after {
|
|
53
|
+
content: '';
|
|
54
|
+
padding-right: 0rem;
|
|
55
|
+
}
|
|
56
|
+
&:after {
|
|
57
|
+
color: $black;
|
|
58
|
+
content: '>';
|
|
59
|
+
padding-right: 0.5rem;
|
|
60
|
+
margin-left: 0.5rem;
|
|
61
|
+
}
|
|
62
|
+
&:before {
|
|
63
|
+
content: '';
|
|
64
|
+
}
|
|
65
|
+
padding-right: 0.5rem;
|
|
66
|
+
padding-left: 0;
|
|
67
|
+
&:first-of-type,
|
|
68
|
+
&:last-of-type {
|
|
69
|
+
padding-right: 0px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&--ltr {
|
|
75
|
+
.breadcrumb-item {
|
|
76
|
+
&:first-of-type::before {
|
|
77
|
+
content: '';
|
|
78
|
+
}
|
|
79
|
+
&:before {
|
|
80
|
+
color: $black;
|
|
81
|
+
content: '>';
|
|
82
|
+
vertical-align: middle;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:first-of-type {
|
|
86
|
+
padding-left: 0px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="card" class="card_item__body">
|
|
3
|
+
<row v-if="card.date">
|
|
4
|
+
<column :sm="1">
|
|
5
|
+
<icon
|
|
6
|
+
:glyph="Clock"
|
|
7
|
+
:icon-alt="'clock icon'"
|
|
8
|
+
:height="20"
|
|
9
|
+
:width="20"
|
|
10
|
+
/>
|
|
11
|
+
</column>
|
|
12
|
+
<column class="card_item__meta card_item__meta--date">
|
|
13
|
+
<rich-text :content="card.date" :without-container="true" />
|
|
14
|
+
</column>
|
|
15
|
+
</row>
|
|
16
|
+
<row v-if="card.location">
|
|
17
|
+
<column :sm="1">
|
|
18
|
+
<icon
|
|
19
|
+
:glyph="LocationIcon"
|
|
20
|
+
:icon-alt="'location icon'"
|
|
21
|
+
:height="20"
|
|
22
|
+
:width="20"
|
|
23
|
+
/>
|
|
24
|
+
</column>
|
|
25
|
+
<column class="card_item__meta card_item__meta--location">
|
|
26
|
+
<rich-text :content="card.location" :without-container="true" />
|
|
27
|
+
</column>
|
|
28
|
+
</row>
|
|
29
|
+
|
|
30
|
+
<template v-if="card.description">
|
|
31
|
+
<rich-text
|
|
32
|
+
:content="card.description"
|
|
33
|
+
:without-container="true"
|
|
34
|
+
class="card_item__desc pb-3"
|
|
35
|
+
:class="{ rtl: card.rtl }"
|
|
36
|
+
:strip-html="true"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import Row from '../../Containers/Row/index.vue'
|
|
44
|
+
import Column from '../../Containers/Column/index.vue'
|
|
45
|
+
import Icon from '../Icon/index.vue'
|
|
46
|
+
import Clock from '../../../assets/icons/clock.svg?url'
|
|
47
|
+
import LocationIcon from '../../../assets/icons/location.svg?url'
|
|
48
|
+
import RichText from '../../Paragraphs/RichText/index.vue'
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
components: {
|
|
52
|
+
Column,
|
|
53
|
+
Icon,
|
|
54
|
+
Row,
|
|
55
|
+
RichText
|
|
56
|
+
},
|
|
57
|
+
props: {
|
|
58
|
+
card: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
Clock,
|
|
66
|
+
LocationIcon
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
@import '../../../includes/scss/all';
|
|
73
|
+
@mixin label-small {
|
|
74
|
+
//styleName: Label/Small;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
font-style: normal;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
line-height: 20px;
|
|
79
|
+
letter-spacing: 0px;
|
|
80
|
+
color: $black;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.card_item {
|
|
84
|
+
&__body {
|
|
85
|
+
@keyframes fade-in {
|
|
86
|
+
0% {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
}
|
|
89
|
+
100% {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
animation-name: fade-in;
|
|
94
|
+
animation-fill-mode: both;
|
|
95
|
+
animation-duration: 1s;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&__meta {
|
|
99
|
+
@include label-small;
|
|
100
|
+
padding-top: 4px;
|
|
101
|
+
padding-bottom: 4px;
|
|
102
|
+
}
|
|
103
|
+
&__desc {
|
|
104
|
+
&.rtl {
|
|
105
|
+
@include makeRTL;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="card" class="card_item">
|
|
3
|
+
<div
|
|
4
|
+
v-if="card.imageSrc"
|
|
5
|
+
class="card_item__image"
|
|
6
|
+
:style="`background-image: url('${card.imageSrc}');`"
|
|
7
|
+
></div>
|
|
8
|
+
|
|
9
|
+
<div v-if="card.pillText">
|
|
10
|
+
<div
|
|
11
|
+
class="card_item__pillTop pillTop"
|
|
12
|
+
:class="{
|
|
13
|
+
[`card_item__pillTop--rtl-${!!card.rtl}`]: true
|
|
14
|
+
}"
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
>
|
|
17
|
+
{{ card.pillText }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
:class="
|
|
23
|
+
`card_item__spacer card_item__spacer--${
|
|
24
|
+
card.imageSrc
|
|
25
|
+
? 'withImage'
|
|
26
|
+
: card.pillText
|
|
27
|
+
? 'withPillOnly'
|
|
28
|
+
: 'withoutImage'
|
|
29
|
+
}`
|
|
30
|
+
"
|
|
31
|
+
></div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
components: {},
|
|
38
|
+
props: {
|
|
39
|
+
card: {
|
|
40
|
+
type: Object,
|
|
41
|
+
required: true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
<style lang="scss" scoped>
|
|
47
|
+
@import '../../../includes/scss/all';
|
|
48
|
+
$borderRadius: 8px;
|
|
49
|
+
$cardTextPadding: 16px;
|
|
50
|
+
|
|
51
|
+
@mixin label-small {
|
|
52
|
+
//styleName: Label/Small;
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
line-height: 20px;
|
|
57
|
+
letter-spacing: 0px;
|
|
58
|
+
color: $black;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.card_item {
|
|
62
|
+
&__image {
|
|
63
|
+
height: 196.88px;
|
|
64
|
+
width: 100%;
|
|
65
|
+
margin-top: -1px;
|
|
66
|
+
border-top-left-radius: $borderRadius - 2;
|
|
67
|
+
border-top-right-radius: $borderRadius - 2;
|
|
68
|
+
background-size: cover;
|
|
69
|
+
background-position: center center;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__pillTop {
|
|
73
|
+
padding: 6px 24px 6px $cardTextPadding;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 24px;
|
|
76
|
+
background-color: $orange;
|
|
77
|
+
@include label-small;
|
|
78
|
+
|
|
79
|
+
&--rtl {
|
|
80
|
+
&-true {
|
|
81
|
+
right: 0;
|
|
82
|
+
border-top-left-radius: 10px;
|
|
83
|
+
border-bottom-left-radius: 10px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&-false {
|
|
87
|
+
left: 0;
|
|
88
|
+
border-top-right-radius: 10px;
|
|
89
|
+
border-bottom-right-radius: 10px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__spacer {
|
|
95
|
+
&--withImage {
|
|
96
|
+
height: $cardTextPadding;
|
|
97
|
+
}
|
|
98
|
+
&--withPillOnly {
|
|
99
|
+
height: $cardTextPadding * 4.5;
|
|
100
|
+
}
|
|
101
|
+
&--withoutImage {
|
|
102
|
+
height: $cardTextPadding;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import CardGroup from './index.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'SubComponents/CardGroup',
|
|
5
|
+
component: { CardGroup },
|
|
6
|
+
argTypes: {
|
|
7
|
+
collectionTitle: {
|
|
8
|
+
control: 'text'
|
|
9
|
+
},
|
|
10
|
+
titleTag: {
|
|
11
|
+
control: 'text'
|
|
12
|
+
},
|
|
13
|
+
cards: {
|
|
14
|
+
type: 'number'
|
|
15
|
+
},
|
|
16
|
+
background: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: ['grey', 'yellow', 'white']
|
|
19
|
+
},
|
|
20
|
+
showImage: {
|
|
21
|
+
control: 'boolean'
|
|
22
|
+
},
|
|
23
|
+
link: {
|
|
24
|
+
control: 'text'
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
control: 'text'
|
|
28
|
+
},
|
|
29
|
+
location: {
|
|
30
|
+
control: 'text'
|
|
31
|
+
},
|
|
32
|
+
rtl: {
|
|
33
|
+
control: 'boolean'
|
|
34
|
+
},
|
|
35
|
+
columns: {
|
|
36
|
+
type: 'number'
|
|
37
|
+
},
|
|
38
|
+
emptyCardsText: {
|
|
39
|
+
control: 'text'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const DefaultContent = (args) => ({
|
|
45
|
+
components: { CardGroup },
|
|
46
|
+
setup() {
|
|
47
|
+
return { args };
|
|
48
|
+
},
|
|
49
|
+
data: () => ({
|
|
50
|
+
loading: true,
|
|
51
|
+
filter: null,
|
|
52
|
+
colours: ['orange', 'blue', 'red', 'pink'],
|
|
53
|
+
title: [
|
|
54
|
+
'Card title goes here',
|
|
55
|
+
'Card title goes here. long text long text long text',
|
|
56
|
+
'No description and no image',
|
|
57
|
+
'القوانين والأنظمة'
|
|
58
|
+
],
|
|
59
|
+
description: [
|
|
60
|
+
'Long text. Donec id elit non mi porta gravida at eget metus. id elit non mi porta gravida at eget metus. id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.',
|
|
61
|
+
'Short text. Maecenas sed diam eget risus varius blandit.',
|
|
62
|
+
'',
|
|
63
|
+
'بعض الأمثلة السريعة للنص الذي سيتم بناؤه على علامة التبويب 1 وتشكيل الجزء الأكبر من محتوى البطاقة.'
|
|
64
|
+
],
|
|
65
|
+
images: [
|
|
66
|
+
`https://picsum.photos/900/600/?image=26`,
|
|
67
|
+
'https://picsum.photos/600/300/?image=26',
|
|
68
|
+
undefined,
|
|
69
|
+
'https://picsum.photos/300/200/?image=26'
|
|
70
|
+
]
|
|
71
|
+
}),
|
|
72
|
+
computed: {
|
|
73
|
+
collectionItems() {
|
|
74
|
+
const cardItem = {
|
|
75
|
+
title: undefined,
|
|
76
|
+
imageSrc: undefined,
|
|
77
|
+
imageAlt: args.showImage ? 'card alt' : undefined,
|
|
78
|
+
description: undefined,
|
|
79
|
+
link: args.link,
|
|
80
|
+
pillText: null,
|
|
81
|
+
colour: null,
|
|
82
|
+
date: args.date,
|
|
83
|
+
location: args.location
|
|
84
|
+
}
|
|
85
|
+
return Array(args.cards)
|
|
86
|
+
.fill(cardItem)
|
|
87
|
+
.map((card) => JSON.parse(JSON.stringify(card)))
|
|
88
|
+
.map((card, index) => {
|
|
89
|
+
let colourIndex = index
|
|
90
|
+
if (colourIndex > this.colours.length - 1) {
|
|
91
|
+
colourIndex = (index % (this.colours.length - 1)) - 1
|
|
92
|
+
}
|
|
93
|
+
card.pillText = this.colours[colourIndex]
|
|
94
|
+
card.colour = this.colours[colourIndex]
|
|
95
|
+
card.description = this.description[colourIndex]
|
|
96
|
+
card.title = this.title[colourIndex]
|
|
97
|
+
|
|
98
|
+
if (args.showImage) {
|
|
99
|
+
card.imageSrc = this.images[colourIndex]
|
|
100
|
+
}
|
|
101
|
+
return card
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
mounted() {
|
|
106
|
+
setTimeout(() => {
|
|
107
|
+
this.loading = false
|
|
108
|
+
}, 1000)
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
filterCards(cards) {
|
|
112
|
+
return cards.filter((card) => {
|
|
113
|
+
if (this.filter) {
|
|
114
|
+
return card.pillText === this.filter
|
|
115
|
+
}
|
|
116
|
+
return true
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
template: `
|
|
121
|
+
<card-group
|
|
122
|
+
v-bind="args"
|
|
123
|
+
:title="args.collectionTitle"
|
|
124
|
+
:cards="filterCards(collectionItems)"
|
|
125
|
+
@switched="(e) => filter = e"
|
|
126
|
+
/>
|
|
127
|
+
`
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
export const Default = DefaultContent.bind({})
|
|
131
|
+
|
|
132
|
+
Default.args = {
|
|
133
|
+
collectionTitle: 'Card Group title',
|
|
134
|
+
titleTag: 'h2',
|
|
135
|
+
cards: 8,
|
|
136
|
+
background: 'grey',
|
|
137
|
+
showImage: true,
|
|
138
|
+
link: 'https://www.google.com/',
|
|
139
|
+
date: 'Weekday DD MM YYYY',
|
|
140
|
+
location: '717 Flinders, Melbourne',
|
|
141
|
+
rtl: false,
|
|
142
|
+
columns: 3,
|
|
143
|
+
emptyCardsText: 'No results returned'
|
|
144
|
+
}
|
|
145
|
+
|