@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,184 @@
|
|
|
1
|
+
import ScrollSpy from './index.vue'
|
|
2
|
+
|
|
3
|
+
const itemList = [
|
|
4
|
+
{
|
|
5
|
+
text: 'Section one heading',
|
|
6
|
+
id: 'item-1'
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
text: 'Section two heading spans over two lines',
|
|
10
|
+
id: 'item-2'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
text:
|
|
14
|
+
'Section three heading spans over three lines and is active yellow or green',
|
|
15
|
+
id: 'item-3'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: 'Section four heading',
|
|
19
|
+
id: 'item-4'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
const arabicItemList = [
|
|
23
|
+
{
|
|
24
|
+
text: 'عنوان القسم الأول',
|
|
25
|
+
id: 'item-1'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
text: 'يمتد عنوان القسم الثاني على سطرين',
|
|
29
|
+
id: 'item-2'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text:
|
|
33
|
+
'يمتد عنوان القسم الثالث على ثلاثة أسطر ويكون نشطًا باللون الأصفر أو الأخضر',
|
|
34
|
+
id: 'item-3'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
text: 'عنوان الباب الرابع',
|
|
38
|
+
id: 'item-4'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
export default {
|
|
42
|
+
title: 'Paragraphs/ScrollSpy',
|
|
43
|
+
component: ScrollSpy,
|
|
44
|
+
argTypes: {
|
|
45
|
+
title: {
|
|
46
|
+
control: 'text',
|
|
47
|
+
defaultValue: 'On this page'
|
|
48
|
+
},
|
|
49
|
+
itemList: {
|
|
50
|
+
control: 'array'
|
|
51
|
+
},
|
|
52
|
+
itemListEnglish: {
|
|
53
|
+
control: 'array',
|
|
54
|
+
defaultValue: itemList
|
|
55
|
+
},
|
|
56
|
+
itemListArabic: {
|
|
57
|
+
control: 'array',
|
|
58
|
+
defaultValue: arabicItemList
|
|
59
|
+
},
|
|
60
|
+
rtl: {
|
|
61
|
+
control: 'boolean',
|
|
62
|
+
defaultValue: false
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const DefaultContent = (args, { argTypes }) => ({
|
|
67
|
+
components: { ScrollSpy },
|
|
68
|
+
props: Object.keys(argTypes),
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
text: `
|
|
72
|
+
Quis magna Lorem anim amet ipsum do mollit sit cillum voluptate ex nulla
|
|
73
|
+
tempor. Laborum consequat non elit enim exercitation cillum aliqua
|
|
74
|
+
consequat id aliqua. Esse ex consectetur mollit voluptate est in duis
|
|
75
|
+
laboris ad sit ipsum anim Lorem. Incididunt veniam velit elit elit veniam
|
|
76
|
+
Lorem aliqua quis ullamco deserunt sit enim elit aliqua esse irure. Laborum
|
|
77
|
+
nisi sit est tempor laborum mollit labore officia laborum excepteur
|
|
78
|
+
commodo non commodo dolor excepteur commodo. Ipsum fugiat ex est consectetur
|
|
79
|
+
ipsum commodo tempor sunt in proident.
|
|
80
|
+
`,
|
|
81
|
+
arabicText: `هنالك العديد من الأنواع المتوفرة لنصوص لوريم إيبسوم، ولكن الغالبية تم تعديلها بشكل ما عبر إدخال بعض النوادر أو الكلمات العشوائية إلى النص. إن كنت تريد أن تستخدم نص لوريم إيبسوم ما، عليك أن تتحقق أولاً أن ليس هناك أي كلمات أو عبارات محرجة أو غير لائقة مخبأة في هذا النص. بينما تعمل جميع مولّدات نصوص لوريم إيبسوم على الإنترنت على إعادة تكرار مقاطع من نص لوريم إيبسوم نفسه عدة مرات بما تتطلبه الحاجة، يقوم مولّدنا هذا باستخدام كلمات من قاموس يحوي على أكثر من 200 كلمة لا تينية، مضاف إليها مجموعة من الجمل النموذجية، لتكوين نص لوريم إيبسوم ذو شكل منطقي قريب إلى النص الحقيقي. وبالتالي يكون النص الناتح خالي من التكرار، أو أي كلمات أو عبارات غير لائقة أو ما شابه. وهذا ما يجعله أول مولّد نص لوريم إيبسوم حقيقي على الإنترنت.`,
|
|
82
|
+
itemList,
|
|
83
|
+
arabicItemList
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
template: `
|
|
87
|
+
<b-container fluid>
|
|
88
|
+
<b-row v-if="!rtl">
|
|
89
|
+
<b-col cols="8">
|
|
90
|
+
<div
|
|
91
|
+
id="scrollspy-nested"
|
|
92
|
+
>
|
|
93
|
+
<h4 id="item-1">Section one heading</h4>
|
|
94
|
+
<p>{{ text }}</p>
|
|
95
|
+
<p>{{ text }}</p>
|
|
96
|
+
<p>{{ text }}</p>
|
|
97
|
+
<p>{{ text }}</p>
|
|
98
|
+
<p>{{ text }}</p>
|
|
99
|
+
<p>{{ text }}</p>
|
|
100
|
+
<p>{{ text }}</p>
|
|
101
|
+
<p>{{ text }}</p>
|
|
102
|
+
<h4 id="item-2">Section two heading spans over two lines</h4>
|
|
103
|
+
<p>{{ text }}</p>
|
|
104
|
+
<p>{{ text }}</p>
|
|
105
|
+
<p>{{ text }}</p>
|
|
106
|
+
<p>{{ text }}</p>
|
|
107
|
+
<p>{{ text }}</p>
|
|
108
|
+
<p>{{ text }}</p>
|
|
109
|
+
<p>{{ text }}</p>
|
|
110
|
+
<h4 id="item-3">Section three heading spans over three lines and is active yellow or green</h4>
|
|
111
|
+
<p>{{ text }}</p>
|
|
112
|
+
<p>{{ text }}</p>
|
|
113
|
+
<p>{{ text }}</p>
|
|
114
|
+
<p>{{ text }}</p>
|
|
115
|
+
<p>{{ text }}</p>
|
|
116
|
+
<p>{{ text }}</p>
|
|
117
|
+
<p>{{ text }}</p>
|
|
118
|
+
<h4 id="item-4">Section four heading</h4>
|
|
119
|
+
<p>{{ text }}</p>
|
|
120
|
+
<p>{{ text }}</p>
|
|
121
|
+
<p>{{ text }}</p>
|
|
122
|
+
<p>{{ text }}</p>
|
|
123
|
+
<p>{{ text }}</p>
|
|
124
|
+
<p>{{ text }}</p>
|
|
125
|
+
<p>{{ text }}</p>
|
|
126
|
+
</div>
|
|
127
|
+
</b-col>
|
|
128
|
+
<b-col cols="4">
|
|
129
|
+
<scroll-spy v-bind="$props" :item-list="itemListEnglish" />
|
|
130
|
+
</b-col>
|
|
131
|
+
</b-row>
|
|
132
|
+
|
|
133
|
+
<b-row v-else style="{
|
|
134
|
+
direction: rtl;
|
|
135
|
+
text-align: right;
|
|
136
|
+
}">
|
|
137
|
+
<b-col cols="8">
|
|
138
|
+
<div
|
|
139
|
+
id="scrollspy-nested"
|
|
140
|
+
>
|
|
141
|
+
<h4 id="item-1">عنوان القسم الأول</h4>
|
|
142
|
+
<p>{{ arabicText }}</p>
|
|
143
|
+
<p>{{ arabicText }}</p>
|
|
144
|
+
<p>{{ arabicText }}</p>
|
|
145
|
+
<p>{{ arabicText }}</p>
|
|
146
|
+
<p>{{ arabicText }}</p>
|
|
147
|
+
<p>{{ arabicText }}</p>
|
|
148
|
+
<p>{{ arabicText }}</p>
|
|
149
|
+
<p>{{ arabicText }}</p>
|
|
150
|
+
<h4 id="item-2">يمتد عنوان القسم الثاني على سطرين</h4>
|
|
151
|
+
<p>{{ arabicText }}</p>
|
|
152
|
+
<p>{{ arabicText }}</p>
|
|
153
|
+
<p>{{ arabicText }}</p>
|
|
154
|
+
<p>{{ arabicText }}</p>
|
|
155
|
+
<p>{{ arabicText }}</p>
|
|
156
|
+
<p>{{ arabicText }}</p>
|
|
157
|
+
<p>{{ arabicText }}</p>
|
|
158
|
+
<h4 id="item-3">يمتد عنوان القسم الثالث على ثلاثة أسطر ويكون نشطًا باللون الأصفر أو الأخضر</h4>
|
|
159
|
+
<p>{{ arabicText }}</p>
|
|
160
|
+
<p>{{ arabicText }}</p>
|
|
161
|
+
<p>{{ arabicText }}</p>
|
|
162
|
+
<p>{{ arabicText }}</p>
|
|
163
|
+
<p>{{ arabicText }}</p>
|
|
164
|
+
<p>{{ arabicText }}</p>
|
|
165
|
+
<p>{{ arabicText }}</p>
|
|
166
|
+
<h4 id="item-4">عنوان الباب الرابع</h4>
|
|
167
|
+
<p>{{ arabicText }}</p>
|
|
168
|
+
<p>{{ arabicText }}</p>
|
|
169
|
+
<p>{{ arabicText }}</p>
|
|
170
|
+
<p>{{ arabicText }}</p>
|
|
171
|
+
<p>{{ arabicText }}</p>
|
|
172
|
+
<p>{{ arabicText }}</p>
|
|
173
|
+
<p>{{ arabicText }}</p>
|
|
174
|
+
</div>
|
|
175
|
+
</b-col>
|
|
176
|
+
<b-col cols="4">
|
|
177
|
+
<scroll-spy v-bind="$props" :item-list="arabicItemList" />
|
|
178
|
+
</b-col>
|
|
179
|
+
</b-row>
|
|
180
|
+
</b-container>`
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
export const Default = DefaultContent.bind({})
|
|
184
|
+
Default.parameters = { controls: { exclude: ['itemList'] } }
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section-group class="sticky-top">
|
|
3
|
+
<b-navbar class="paragraph--scrollspy" :class="{ rtl: rtl }">
|
|
4
|
+
<b-list-group
|
|
5
|
+
v-b-scrollspy="{ offset: 100, method: 'auto' }"
|
|
6
|
+
class="flex-column"
|
|
7
|
+
>
|
|
8
|
+
<div class="scrollspy__title">{{ title }}</div>
|
|
9
|
+
<b-list-group-item
|
|
10
|
+
v-for="(item, index) in itemList"
|
|
11
|
+
:key="index"
|
|
12
|
+
class="scrollspy__item"
|
|
13
|
+
role="link"
|
|
14
|
+
:href="`#${item.id}`"
|
|
15
|
+
@click.prevent="scrollToAnchor(item.id)"
|
|
16
|
+
>{{ item.text }}</b-list-group-item
|
|
17
|
+
>
|
|
18
|
+
</b-list-group>
|
|
19
|
+
</b-navbar>
|
|
20
|
+
</section-group>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import SectionGroup from '../../Containers/SectionGroup/index.vue'
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'ScrollSpy',
|
|
28
|
+
components: { SectionGroup },
|
|
29
|
+
props: {
|
|
30
|
+
title: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'On this page'
|
|
33
|
+
},
|
|
34
|
+
itemList: {
|
|
35
|
+
type: Array,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
rtl: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
scrollToAnchor(anchor) {
|
|
45
|
+
const anchorElement = document.getElementById(anchor)
|
|
46
|
+
if (anchorElement) {
|
|
47
|
+
anchorElement.focus()
|
|
48
|
+
anchorElement.scrollIntoView({
|
|
49
|
+
behavior: 'smooth'
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<style lang="scss">
|
|
58
|
+
@import '../../../includes/scss/all';
|
|
59
|
+
.paragraph--scrollspy {
|
|
60
|
+
padding: 0 !important;
|
|
61
|
+
|
|
62
|
+
.scrollspy__title {
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
margin-bottom: 32px;
|
|
65
|
+
line-height: 20px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.scrollspy__item {
|
|
69
|
+
position: relative;
|
|
70
|
+
padding-left: 32px;
|
|
71
|
+
margin-bottom: 32px;
|
|
72
|
+
color: $black;
|
|
73
|
+
text-decoration: underline;
|
|
74
|
+
padding-top: 0;
|
|
75
|
+
padding-bottom: 0;
|
|
76
|
+
border: none;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
|
|
79
|
+
&:hover,
|
|
80
|
+
&:focus {
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
background-color: $white;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:focus {
|
|
86
|
+
outline-offset: 12px;
|
|
87
|
+
background-color: $white;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:first-of-type {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&::before {
|
|
95
|
+
background-color: $gray;
|
|
96
|
+
width: 24px;
|
|
97
|
+
height: 24px;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
left: -8px;
|
|
100
|
+
top: 0;
|
|
101
|
+
z-index: 1;
|
|
102
|
+
content: '';
|
|
103
|
+
display: block;
|
|
104
|
+
position: absolute;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:not(:last-child)::after {
|
|
108
|
+
border-left: 1px dotted $gray;
|
|
109
|
+
border-right: 1px dotted $gray;
|
|
110
|
+
top: 4px;
|
|
111
|
+
bottom: -40px;
|
|
112
|
+
left: 3px;
|
|
113
|
+
z-index: 0;
|
|
114
|
+
content: '';
|
|
115
|
+
display: block;
|
|
116
|
+
position: absolute;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.active {
|
|
120
|
+
background: $white;
|
|
121
|
+
color: $black;
|
|
122
|
+
border: none;
|
|
123
|
+
margin-top: 0;
|
|
124
|
+
&::before {
|
|
125
|
+
background-color: $yellow;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.rtl {
|
|
131
|
+
@include makeRTL();
|
|
132
|
+
.scrollspy__item {
|
|
133
|
+
padding-left: 0;
|
|
134
|
+
padding-right: 32px;
|
|
135
|
+
&:before {
|
|
136
|
+
right: -8px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:not(:last-child)::after {
|
|
140
|
+
right: 3px;
|
|
141
|
+
border-right: 2px dotted $gray;
|
|
142
|
+
border-left: none;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import SelectableCards from './../index.vue'
|
|
2
|
+
import { mockSelectableCards } from '../../../../mock/control-selectable-cards'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Paragraphs/SelectableCards',
|
|
6
|
+
component: SelectableCards,
|
|
7
|
+
argTypes: {
|
|
8
|
+
cardType: {
|
|
9
|
+
table: { disable: true }
|
|
10
|
+
},
|
|
11
|
+
cardTextAlign: {
|
|
12
|
+
table: { disable: true }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
cards: mockSelectableCards,
|
|
17
|
+
title: 'Pick an object?',
|
|
18
|
+
headingTag: 'h2',
|
|
19
|
+
subHeading: 'Pick an object from the selections or if you know exactly how heavy is the object that is being dropped, enter the height in input box below.',
|
|
20
|
+
iconIsBordered: false,
|
|
21
|
+
columns: 4,
|
|
22
|
+
cardType: 'control-selectcards',
|
|
23
|
+
cardTextAlign: 'center'
|
|
24
|
+
},
|
|
25
|
+
template:
|
|
26
|
+
'<selectable-cards v-bind="args" class="control-selectablecards" />'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const Control = {}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<p v-if="card.value" class="card-unit">{{ card.value }} {{ card.units }}</p>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
card: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
<style lang="scss" scoped>
|
|
16
|
+
.card-unit {
|
|
17
|
+
margin: 0;
|
|
18
|
+
@media (min-width: 576px) {
|
|
19
|
+
padding-bottom: 25px;
|
|
20
|
+
}
|
|
21
|
+
@media (min-width: 768px) {
|
|
22
|
+
padding-bottom: 30px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="card" class="card_item">
|
|
3
|
+
<div
|
|
4
|
+
v-if="card.pillText"
|
|
5
|
+
class="card_item__pillTop pillTop"
|
|
6
|
+
:class="{
|
|
7
|
+
[`card_item__pillTop--rtl-${!!card.rtl}`]: true
|
|
8
|
+
}"
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
>
|
|
11
|
+
{{ card.pillText }}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="card_item__pillTop pillTopText card_item__pillTop--rtl-true">
|
|
14
|
+
<label
|
|
15
|
+
class="card_item__control"
|
|
16
|
+
:class="{ [`card_item__control-${buttonRole}`]: true }"
|
|
17
|
+
><span></span
|
|
18
|
+
></label>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="card_item__spacer card_item__spacer--withTextOnly"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
components: {},
|
|
27
|
+
props: {
|
|
28
|
+
card: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
buttonRole: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'radio'
|
|
35
|
+
},
|
|
36
|
+
isSelectable: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
@import '../../../includes/scss/all';
|
|
45
|
+
$borderRadius: 8px;
|
|
46
|
+
$cardTextPadding: 16px;
|
|
47
|
+
|
|
48
|
+
@mixin label-small {
|
|
49
|
+
//styleName: Label/Small;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
letter-spacing: 0px;
|
|
55
|
+
color: $black;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card_item {
|
|
59
|
+
&__pillTop {
|
|
60
|
+
padding: 6px 24px 6px $cardTextPadding;
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 24px;
|
|
63
|
+
background-color: $orange;
|
|
64
|
+
@include label-small;
|
|
65
|
+
|
|
66
|
+
&--rtl {
|
|
67
|
+
&-true {
|
|
68
|
+
right: 0;
|
|
69
|
+
border-top-left-radius: 10px;
|
|
70
|
+
border-bottom-left-radius: 10px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-false {
|
|
74
|
+
left: 0;
|
|
75
|
+
border-top-right-radius: 10px;
|
|
76
|
+
border-bottom-right-radius: 10px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.pillTopText {
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: flex-end;
|
|
84
|
+
background: none;
|
|
85
|
+
@include label-small;
|
|
86
|
+
padding: 0 16px;
|
|
87
|
+
margin-top: 5px;
|
|
88
|
+
|
|
89
|
+
@media (min-width: 576px) {
|
|
90
|
+
padding: 0 10px;
|
|
91
|
+
margin-top: -10px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__spacer {
|
|
97
|
+
&--withImage {
|
|
98
|
+
height: $cardTextPadding;
|
|
99
|
+
}
|
|
100
|
+
&--withPillOnly {
|
|
101
|
+
height: $cardTextPadding * 4.5;
|
|
102
|
+
}
|
|
103
|
+
&--withoutImage {
|
|
104
|
+
height: $cardTextPadding;
|
|
105
|
+
}
|
|
106
|
+
@media screen and (min-width: 575px) {
|
|
107
|
+
&--withTextOnly {
|
|
108
|
+
height: $cardTextPadding * 2;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import SelectableCards from './index.vue'
|
|
2
|
+
import { mockSelectableCards } from '../../../mock/selectable-cards'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Paragraphs/SelectableCards',
|
|
6
|
+
component: SelectableCards,
|
|
7
|
+
argTypes: {
|
|
8
|
+
cardType: {
|
|
9
|
+
table: { disable: true }
|
|
10
|
+
},
|
|
11
|
+
cardTextAlign: {
|
|
12
|
+
table: { disable: true }
|
|
13
|
+
},
|
|
14
|
+
iconIsBordered: {
|
|
15
|
+
table: { disable: true }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
cards: mockSelectableCards,
|
|
20
|
+
title: 'Selectable cards',
|
|
21
|
+
headingTag: 'h2',
|
|
22
|
+
columns: 4,
|
|
23
|
+
subHeading: null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Default = {}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<card-grid
|
|
3
|
+
ref="cardgrid"
|
|
4
|
+
:cards="cards"
|
|
5
|
+
:title="title"
|
|
6
|
+
:title-tag="headingTag"
|
|
7
|
+
:sub-heading="subHeading"
|
|
8
|
+
:columns-per-row="columns || 4"
|
|
9
|
+
class="selectable-cards"
|
|
10
|
+
:is-selectable="true"
|
|
11
|
+
:card-id-prefix="'selectable-cc-card'"
|
|
12
|
+
@selected="selectedCardChangeFocus"
|
|
13
|
+
>
|
|
14
|
+
<template v-slot:cardItem="{ card }">
|
|
15
|
+
<!-----CONTROL SELECTED CARD START-------->
|
|
16
|
+
<card-grid-item
|
|
17
|
+
v-if="cardType === 'control-selectcards'"
|
|
18
|
+
class="control_selectcard"
|
|
19
|
+
:button-role="'radio'"
|
|
20
|
+
:glyph-src="card.icon"
|
|
21
|
+
:icon-size="'medium'"
|
|
22
|
+
:show-divider="false"
|
|
23
|
+
:header-size="'medium'"
|
|
24
|
+
:card-header-title="card.name"
|
|
25
|
+
:card-padding="'small'"
|
|
26
|
+
:border-type="'dark'"
|
|
27
|
+
:border-on-select-background="'blue'"
|
|
28
|
+
:icon-is-bordered="iconIsBordered"
|
|
29
|
+
:card-text-align="cardTextAlign"
|
|
30
|
+
>
|
|
31
|
+
<template v-slot:cardTop>
|
|
32
|
+
<card-top :card="card" :button-role="'radio'" :is-selectable="true" />
|
|
33
|
+
</template>
|
|
34
|
+
<template v-slot:cardDescription>
|
|
35
|
+
<card-body :card="card" />
|
|
36
|
+
</template>
|
|
37
|
+
</card-grid-item>
|
|
38
|
+
<!-----CONTROL SELECTED CARD END-------->
|
|
39
|
+
<card-grid-item
|
|
40
|
+
v-else
|
|
41
|
+
class="selectcard"
|
|
42
|
+
:glyph-src="card.icon"
|
|
43
|
+
:show-divider="false"
|
|
44
|
+
:header-size="'large'"
|
|
45
|
+
:card-header-title="card.name"
|
|
46
|
+
:card-padding="'small'"
|
|
47
|
+
:invert-on-select-background="'black'"
|
|
48
|
+
:border-type="'shadow'"
|
|
49
|
+
:description="card.description"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
<template v-slot:cardGridFooter>
|
|
53
|
+
<slot name="cardGridFooter"></slot>
|
|
54
|
+
</template>
|
|
55
|
+
</card-grid>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
import CardGrid from './../../Common/CardGrid/index.vue'
|
|
60
|
+
import CardGridItem from './../../Common/CardGridItem/index.vue'
|
|
61
|
+
import CardBody from './cardbody.vue'
|
|
62
|
+
import CardTop from './cardtop.vue'
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: 'SelectableCards',
|
|
66
|
+
components: {
|
|
67
|
+
CardGrid,
|
|
68
|
+
CardGridItem,
|
|
69
|
+
CardBody,
|
|
70
|
+
CardTop
|
|
71
|
+
},
|
|
72
|
+
props: {
|
|
73
|
+
cards: {
|
|
74
|
+
type: Array,
|
|
75
|
+
required: true,
|
|
76
|
+
default: () => []
|
|
77
|
+
},
|
|
78
|
+
title: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
headingTag: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: 'h2'
|
|
85
|
+
},
|
|
86
|
+
subHeading: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
90
|
+
iconIsBordered: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: true
|
|
93
|
+
},
|
|
94
|
+
columns: {
|
|
95
|
+
type: Number,
|
|
96
|
+
default: 4
|
|
97
|
+
},
|
|
98
|
+
cardType: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: null
|
|
101
|
+
},
|
|
102
|
+
cardTextAlign: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: null
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
selectedCardChangeFocus(card) {
|
|
109
|
+
this.$emit('selected', card.selectedCard)
|
|
110
|
+
},
|
|
111
|
+
clearCard() {
|
|
112
|
+
this.$refs.cardgrid.clearCards()
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
</script>
|