@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,60 @@
|
|
|
1
|
+
import Tabs from './index.vue'
|
|
2
|
+
|
|
3
|
+
const mockData = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Overview',
|
|
6
|
+
content: ''
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
title: 'Step 1',
|
|
10
|
+
content: ''
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: 'Step 2',
|
|
14
|
+
content: ''
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: 'Step 3',
|
|
18
|
+
content: ''
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
title: 'Step 4',
|
|
22
|
+
content: ''
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Step 5',
|
|
26
|
+
content: ''
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: 'Step 6',
|
|
30
|
+
content: ''
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: 'Step 7',
|
|
34
|
+
content: ''
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Other Resources',
|
|
38
|
+
content: ''
|
|
39
|
+
}
|
|
40
|
+
].map((item, index) => {
|
|
41
|
+
item.content = {
|
|
42
|
+
value: `<h1>My ${index} Heading</h1>
|
|
43
|
+
<p>My ${index} paragraph.</p>`
|
|
44
|
+
}
|
|
45
|
+
return item
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
title: 'Paragraphs/Tabs',
|
|
50
|
+
component: Tabs,
|
|
51
|
+
args: {
|
|
52
|
+
items: mockData,
|
|
53
|
+
rtl: false,
|
|
54
|
+
workwell: false,
|
|
55
|
+
titleTag: 'h2',
|
|
56
|
+
title: 'Tabs'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const Default = {}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<card-grid
|
|
4
|
+
v-if="!isPDF"
|
|
5
|
+
:title="title"
|
|
6
|
+
:title-tag="titleTag"
|
|
7
|
+
:cards="[{}]"
|
|
8
|
+
:force-lg-columns-per-row="1"
|
|
9
|
+
:force-md-columns-per-row="1"
|
|
10
|
+
:rtl="rtl"
|
|
11
|
+
:is-selectable="false"
|
|
12
|
+
:row-spacing="'small'"
|
|
13
|
+
:class="`paragraph--tabs ${workwell ? 'workwell' : ''}`"
|
|
14
|
+
>
|
|
15
|
+
<template v-slot:cardItem>
|
|
16
|
+
<b-tabs v-model="tabIndex">
|
|
17
|
+
<b-tab
|
|
18
|
+
v-for="(item, index) in items"
|
|
19
|
+
:key="`${index}-${_uid}`"
|
|
20
|
+
:title="item.title"
|
|
21
|
+
:title-link-class="`tab-item-${index}-${_uid}`"
|
|
22
|
+
>
|
|
23
|
+
<rich-text
|
|
24
|
+
:content="item.content.value"
|
|
25
|
+
:without-container="true"
|
|
26
|
+
/>
|
|
27
|
+
</b-tab>
|
|
28
|
+
</b-tabs>
|
|
29
|
+
</template>
|
|
30
|
+
</card-grid>
|
|
31
|
+
<container v-else class="pdf-tabs">
|
|
32
|
+
<row v-if="title"
|
|
33
|
+
><column
|
|
34
|
+
><rich-text
|
|
35
|
+
:tag="titleTag"
|
|
36
|
+
:content="title"
|
|
37
|
+
:without-container="true"/></column
|
|
38
|
+
></row>
|
|
39
|
+
<row v-for="(item, index) in items" :key="`${index}-${_uid}`">
|
|
40
|
+
<column>
|
|
41
|
+
<rich-text :content="getPdfContent(item)" :without-container="true" />
|
|
42
|
+
</column>
|
|
43
|
+
</row>
|
|
44
|
+
</container>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import Row from './../../Containers/Row/index.vue'
|
|
50
|
+
import Container from './../../Containers/Container/index.vue'
|
|
51
|
+
import Column from './../../Containers/Column/index.vue'
|
|
52
|
+
import RichText from './../../Paragraphs/RichText/index.vue'
|
|
53
|
+
import CardGrid from './../../Common/CardGrid/index.vue'
|
|
54
|
+
import { BTabs, BTab } from 'bootstrap-vue-next'
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
components: {
|
|
58
|
+
RichText,
|
|
59
|
+
CardGrid,
|
|
60
|
+
Container,
|
|
61
|
+
Row,
|
|
62
|
+
Column,
|
|
63
|
+
BTab,
|
|
64
|
+
BTabs
|
|
65
|
+
},
|
|
66
|
+
props: {
|
|
67
|
+
title: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
titleTag: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'h2'
|
|
74
|
+
},
|
|
75
|
+
items: {
|
|
76
|
+
type: Array,
|
|
77
|
+
required: true
|
|
78
|
+
},
|
|
79
|
+
rtl: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
workwell: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
tabIndex: 0,
|
|
91
|
+
scrollIntoViewOptions: {
|
|
92
|
+
behavior: 'smooth',
|
|
93
|
+
block: 'center',
|
|
94
|
+
inline: 'nearest'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
activeTabEl() {
|
|
100
|
+
let el = document.querySelector(`.tab-item-${this.tabIndex}-${this._uid}`)
|
|
101
|
+
return el
|
|
102
|
+
},
|
|
103
|
+
isPDF() {
|
|
104
|
+
return typeof this.$isPDF === 'function' ? this.$isPDF() : false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
handleTabNav(direction) {
|
|
109
|
+
if (direction === 'next' && this.tabIndex < this.items.length - 1) {
|
|
110
|
+
this.tabIndex++
|
|
111
|
+
this.activeTabEl.scrollIntoView(this.scrollIntoViewOptions)
|
|
112
|
+
} else if (direction === 'prev' && this.tabIndex !== 0) {
|
|
113
|
+
this.tabIndex--
|
|
114
|
+
this.activeTabEl.scrollIntoView(this.scrollIntoViewOptions)
|
|
115
|
+
} else {
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
getPdfContent(item) {
|
|
120
|
+
return `<${this.titleTag}>${item.title}</${this.titleTag}>${item.content.value}`
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
125
|
+
<style lang="scss" scoped>
|
|
126
|
+
@import './styles.scss';
|
|
127
|
+
</style>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@import '../../../includes/scss/all';
|
|
2
|
+
.pdf-tabs {
|
|
3
|
+
:deep(.wcl-rich-text) {
|
|
4
|
+
margin-bottom: 32px;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
.paragraph--tabs {
|
|
8
|
+
:deep(.container .section-group__block) {
|
|
9
|
+
border-bottom: 2px solid $lightgray;
|
|
10
|
+
padding-bottom: 32px;
|
|
11
|
+
}
|
|
12
|
+
// Tab Nav
|
|
13
|
+
.tab-nav {
|
|
14
|
+
height: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: flex-end;
|
|
17
|
+
place-content: flex-end;
|
|
18
|
+
padding-right: 4px;
|
|
19
|
+
|
|
20
|
+
&.rtl {
|
|
21
|
+
direction: ltr;
|
|
22
|
+
padding-left: 4px;
|
|
23
|
+
}
|
|
24
|
+
button {
|
|
25
|
+
background: none;
|
|
26
|
+
border: none;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
|
|
30
|
+
img {
|
|
31
|
+
height: 16px;
|
|
32
|
+
width: 16px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Default Styling
|
|
37
|
+
.tabs {
|
|
38
|
+
:deep(ul.nav.nav-tabs) {
|
|
39
|
+
@include fp(padding-left, 0, 45);
|
|
40
|
+
@include fp(padding-right, 0, 45);
|
|
41
|
+
border-bottom: 4px solid $orange;
|
|
42
|
+
flex-wrap: nowrap;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// styling for button
|
|
49
|
+
:deep(ul.nav.nav-tabs li button) {
|
|
50
|
+
color: $black;
|
|
51
|
+
//styleName: Label/Medium;
|
|
52
|
+
font-size: 16px;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
line-height: 20px;
|
|
56
|
+
letter-spacing: 0px;
|
|
57
|
+
border: none;
|
|
58
|
+
border-radius: 4px 4px 0 0;
|
|
59
|
+
padding: 16px 32px;
|
|
60
|
+
margin-bottom: 0;
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
background: $orange;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
background: $orange;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
background: $lightyellow;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// styling for an a link
|
|
76
|
+
:deep(ul.nav.nav-tabs li a) {
|
|
77
|
+
color: $black;
|
|
78
|
+
//styleName: Label/Medium;
|
|
79
|
+
font-size: 16px;
|
|
80
|
+
font-style: normal;
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
line-height: 20px;
|
|
83
|
+
letter-spacing: 0px;
|
|
84
|
+
border: none;
|
|
85
|
+
border-radius: 4px 4px 0 0;
|
|
86
|
+
padding: 16px 32px;
|
|
87
|
+
margin-bottom: 0;
|
|
88
|
+
|
|
89
|
+
&.active {
|
|
90
|
+
background: $orange;
|
|
91
|
+
|
|
92
|
+
&:hover {
|
|
93
|
+
background: $orange;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:hover {
|
|
98
|
+
background: $lightyellow;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:deep(.tab-content) {
|
|
103
|
+
padding-top: 45px;
|
|
104
|
+
@include fp(padding-left, 0, 45);
|
|
105
|
+
@include fp(padding-right, 0, 45);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// WorkWell Overrides
|
|
109
|
+
&.workwell {
|
|
110
|
+
.tabs {
|
|
111
|
+
:deep(ul.nav.nav-tabs) {
|
|
112
|
+
border-bottom: 4px solid $green;
|
|
113
|
+
}
|
|
114
|
+
// styling for button
|
|
115
|
+
:deep(ul.nav.nav-tabs li button) {
|
|
116
|
+
&.active {
|
|
117
|
+
background-color: $green;
|
|
118
|
+
color: $white;
|
|
119
|
+
|
|
120
|
+
&:hover {
|
|
121
|
+
background: $green;
|
|
122
|
+
color: $white;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
background: $lightgreen;
|
|
128
|
+
color: $black;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// styling for a link
|
|
132
|
+
:deep(ul.nav.nav-tabs li a) {
|
|
133
|
+
&.active {
|
|
134
|
+
background-color: $green;
|
|
135
|
+
color: $white;
|
|
136
|
+
|
|
137
|
+
&:hover {
|
|
138
|
+
background: $green;
|
|
139
|
+
color: $white;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&:hover {
|
|
144
|
+
background: $lightgreen;
|
|
145
|
+
color: $black;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
const fields = {
|
|
2
|
+
links: [
|
|
3
|
+
{ key: 'movie_title', label: 'Movie title', sortable: true },
|
|
4
|
+
{ key: 'rank', label: 'Rank', sortable: true },
|
|
5
|
+
{ key: 'year', label: 'Year', sortable: false },
|
|
6
|
+
{ key: 'rating', label: 'Rating', sortable: true },
|
|
7
|
+
{ key: 'gross', label: 'Gross', sortable: true }
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const fieldsAr = {
|
|
12
|
+
rtl: 'true',
|
|
13
|
+
links: [
|
|
14
|
+
{ key: 'movie_title', label: 'عنوان الفيلم', sortable: true },
|
|
15
|
+
{ key: 'rank', label: 'رتبة', sortable: true },
|
|
16
|
+
{ key: 'year', label: 'سنة', sortable: false },
|
|
17
|
+
{ key: 'rating', label: 'تقييم', sortable: true },
|
|
18
|
+
{ key: 'gross', label: 'إجمالي', sortable: true }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const items = {
|
|
23
|
+
links: [
|
|
24
|
+
{
|
|
25
|
+
movie_title: 'Avengers: Endgame',
|
|
26
|
+
rank: '1',
|
|
27
|
+
year: '01/10/2009',
|
|
28
|
+
rating: '86%',
|
|
29
|
+
gross: '$858.37M'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
movie_title: 'Avatar',
|
|
33
|
+
rank: '2',
|
|
34
|
+
year: '01/09/2009',
|
|
35
|
+
rating: '78%',
|
|
36
|
+
gross: '$760.51M'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
movie_title: 'Titanic',
|
|
40
|
+
rank: '3',
|
|
41
|
+
year: '01/09/1997',
|
|
42
|
+
rating: '78%',
|
|
43
|
+
gross: '$659.33M'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
movie_title: 'Star Wars: Episode VII - The Force Awakens',
|
|
47
|
+
rank: '4',
|
|
48
|
+
year: '01/10/2015',
|
|
49
|
+
rating: '80%',
|
|
50
|
+
gross: '$936.66M'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
movie_title: 'Avengers: Infinity War',
|
|
54
|
+
rank: '5',
|
|
55
|
+
year: '01/09/2018',
|
|
56
|
+
rating: '85%',
|
|
57
|
+
gross: '$678.82M'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
movie_title: 'Jurassic World',
|
|
61
|
+
rank: '6',
|
|
62
|
+
year: '09/10/2015',
|
|
63
|
+
rating: '70%',
|
|
64
|
+
gross: '$652.27M'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
movie_title: 'The Lion King',
|
|
68
|
+
rank: '7',
|
|
69
|
+
year: '01/10/2019',
|
|
70
|
+
rating: '71%',
|
|
71
|
+
gross: '$529.91M'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
movie_title: 'The Avengers',
|
|
75
|
+
rank: '8',
|
|
76
|
+
year: '01/09/2012',
|
|
77
|
+
rating: '80%',
|
|
78
|
+
gross: '$623.36M'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
movie_title: 'Furious 7',
|
|
82
|
+
rank: '9',
|
|
83
|
+
year: '01/06/2015',
|
|
84
|
+
rating: '72%',
|
|
85
|
+
gross: '$353.01M'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const itemsAr = {
|
|
91
|
+
rtl: 'true',
|
|
92
|
+
links: [
|
|
93
|
+
{
|
|
94
|
+
movie_title: 'المنتقمون: نهاية اللعبة',
|
|
95
|
+
rank: '1',
|
|
96
|
+
year: '01/10/2009',
|
|
97
|
+
rating: '86%',
|
|
98
|
+
gross: '$858.37M'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
movie_title: 'الصورة الرمزية',
|
|
102
|
+
rank: '2',
|
|
103
|
+
year: '01/09/2009',
|
|
104
|
+
rating: '78%',
|
|
105
|
+
gross: '$760.51M'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
movie_title: 'تايتانيك',
|
|
109
|
+
rank: '3',
|
|
110
|
+
year: '01/09/1997',
|
|
111
|
+
rating: '78%',
|
|
112
|
+
gross: '$659.33M'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
movie_title: 'حرب النجوم: الحلقة السابعة - القوة يوقظ',
|
|
116
|
+
rank: '4',
|
|
117
|
+
year: '01/10/2015',
|
|
118
|
+
rating: '80%',
|
|
119
|
+
gross: '$936.66M'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
movie_title: 'المنتقمون: إنفينيتي وور',
|
|
123
|
+
rank: '5',
|
|
124
|
+
year: '01/09/2018',
|
|
125
|
+
rating: '85%',
|
|
126
|
+
gross: '$678.82M'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
movie_title: 'العالم الجوراسي',
|
|
130
|
+
rank: '6',
|
|
131
|
+
year: '09/10/2015',
|
|
132
|
+
rating: '70%',
|
|
133
|
+
gross: '$652.27M'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
movie_title: 'الاسد الملك',
|
|
137
|
+
rank: '7',
|
|
138
|
+
year: '01/10/2019',
|
|
139
|
+
rating: '71%',
|
|
140
|
+
gross: '$529.91M'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
movie_title: 'المنتقمون',
|
|
144
|
+
rank: '8',
|
|
145
|
+
year: '01/09/2012',
|
|
146
|
+
rating: '80%',
|
|
147
|
+
gross: '$623.36M'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
movie_title: 'غاضب 7',
|
|
151
|
+
rank: '9',
|
|
152
|
+
year: '01/06/2015',
|
|
153
|
+
rating: '72%',
|
|
154
|
+
gross: '$353.01M'
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
export { fields, fieldsAr, items, itemsAr }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import TabulatedData from './index.vue'
|
|
2
|
+
import { fields, fieldsAr, items, itemsAr } from './Constants'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Paragraphs/TabulatedData',
|
|
6
|
+
component: TabulatedData,
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
TabulatedData,
|
|
10
|
+
fields,
|
|
11
|
+
fieldsAr,
|
|
12
|
+
items,
|
|
13
|
+
itemsAr
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
isFixedWidth: {
|
|
18
|
+
control: 'boolean',
|
|
19
|
+
table: { disable: true }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
args: {
|
|
23
|
+
rtl: false,
|
|
24
|
+
isFixedWidth: true,
|
|
25
|
+
items: items.links,
|
|
26
|
+
rtlItems: itemsAr.links,
|
|
27
|
+
fields: fields.links,
|
|
28
|
+
rtlFields: fieldsAr.links,
|
|
29
|
+
caption: 'The table caption',
|
|
30
|
+
initialSortBy: 'rank'
|
|
31
|
+
},
|
|
32
|
+
template: `<tabulated-data
|
|
33
|
+
v-bind="args"
|
|
34
|
+
:items="rtl ? args.rtlItems : args.items"
|
|
35
|
+
:fields="rtl ? args.rtlFields : args.fields"
|
|
36
|
+
/> `
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Default = {}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section-group
|
|
3
|
+
:sub-heading="caption"
|
|
4
|
+
class="paragraph--tabulated-data paragraph--tabulated-data--fitcontent"
|
|
5
|
+
:size="'content'"
|
|
6
|
+
>
|
|
7
|
+
<div :class="isFluid ? 'table-scrolled' : ''">
|
|
8
|
+
<b-table
|
|
9
|
+
v-if="items"
|
|
10
|
+
:items="items"
|
|
11
|
+
:fields="fields"
|
|
12
|
+
:class="`${rtl ? 'rtl' : ''} ${isFluid ? 'isScrolled' : ''}`"
|
|
13
|
+
class="table border"
|
|
14
|
+
:striped="true"
|
|
15
|
+
v-model:sort-desc="sortDesc"
|
|
16
|
+
v-model:sort-by="sortBy"
|
|
17
|
+
:borderless="false"
|
|
18
|
+
:responsive="!isFluid"
|
|
19
|
+
:stacked="!isFluid ? 'sm' : false"
|
|
20
|
+
>
|
|
21
|
+
<template #head()="data">
|
|
22
|
+
<span class="iconHeader table-active" tabindex="0" @keypress.enter="accessSort(data.field)" scope="colgroup">
|
|
23
|
+
{{ data.label }}
|
|
24
|
+
<span class="sortImg" v-if="data.field.sortable">
|
|
25
|
+
<img v-if="data.field.thAttr['aria-sort'] === 'none'" :src="sortIconNeutral" alt="image indicating no sort" style="width: 0.55rem; height: 0.90rem;"/>
|
|
26
|
+
<img v-if="data.field.thAttr['aria-sort'] === 'ascending'" :src="sortIconAsc" alt="image indicating ascending sort" style="width: 0.55rem; height: 0.90rem;"/>
|
|
27
|
+
<img v-else-if="data.field.thAttr['aria-sort'] === 'descending'" :src="sortIconDesc" alt="image indicating descending sort" style="width: 0.55rem; height: 0.90rem;"/>
|
|
28
|
+
</span>
|
|
29
|
+
</span>
|
|
30
|
+
</template>
|
|
31
|
+
<template #cell()="data">
|
|
32
|
+
<rich-text :content="data.value" />
|
|
33
|
+
</template>
|
|
34
|
+
</b-table>
|
|
35
|
+
</div>
|
|
36
|
+
</section-group>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
import SectionGroup from './../../Containers/SectionGroup/index.vue'
|
|
41
|
+
import RichText from '../../Paragraphs/RichText/index.vue'
|
|
42
|
+
import { BTable } from 'bootstrap-vue-next'
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: 'TabulatedData',
|
|
46
|
+
components: { SectionGroup, RichText, BTable},
|
|
47
|
+
props: {
|
|
48
|
+
items: {
|
|
49
|
+
type: Array,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
fields: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default: undefined
|
|
55
|
+
},
|
|
56
|
+
rtl: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
60
|
+
isFixedWidth: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
caption: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: '',
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
initialSortBy: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: undefined,
|
|
72
|
+
required: false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
sortBy: this.initialSortBy,
|
|
78
|
+
sortDesc: false,
|
|
79
|
+
sortIconNeutral:
|
|
80
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' opacity='.3' d='M51 1l25 23 24 22H1l25-22zM51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e",
|
|
81
|
+
sortIconDesc:
|
|
82
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' d='M51 1l25 23 24 22H1l25-22z'/%3e%3cpath fill='black' opacity='.3' d='M51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e",
|
|
83
|
+
sortIconAsc:
|
|
84
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' opacity='.3' d='M51 1l25 23 24 22H1l25-22z'/%3e%3cpath fill='black' d='M51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
computed: {
|
|
88
|
+
isFluid() {
|
|
89
|
+
return this.isFixedWidth
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
accessSort(fieldVar) {
|
|
94
|
+
this.sortBy = fieldVar.key
|
|
95
|
+
if (fieldVar.thAttr['aria-sort'] === 'none' || fieldVar.thAttr['aria-sort'] === 'descending' ) {
|
|
96
|
+
this.sortDesc = false
|
|
97
|
+
} else {
|
|
98
|
+
this.sortDesc = true
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="scss">
|
|
106
|
+
.paragraph--tabulated-data {
|
|
107
|
+
@import '../../../includes/scss/all';
|
|
108
|
+
|
|
109
|
+
.section-group__block {
|
|
110
|
+
margin-top: -32px;
|
|
111
|
+
margin-bottom: -48px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.table.isScrolled {
|
|
115
|
+
max-width: 1140px;
|
|
116
|
+
}
|
|
117
|
+
.table-scrolled {
|
|
118
|
+
overflow: auto;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.table th,
|
|
122
|
+
.table td {
|
|
123
|
+
margin: 1rem;
|
|
124
|
+
vertical-align: middle;
|
|
125
|
+
@media screen and (max-width: 540px) {
|
|
126
|
+
margin: 0.5rem;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.iconHeader {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: row;
|
|
133
|
+
flex-wrap: nowrap;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.rtl {
|
|
137
|
+
@include makeRTL();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.sortImg {
|
|
141
|
+
vertical-align: middle;
|
|
142
|
+
margin-left: 5px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|