@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
package/.editorconfig
ADDED
package/.env
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
require('@rushstack/eslint-patch/modern-module-resolution')
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
root: true,
|
|
6
|
+
'extends': ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier/skip-formatting', 'plugin:storybook/recommended'],
|
|
7
|
+
parserOptions: {
|
|
8
|
+
ecmaVersion: 'latest'
|
|
9
|
+
}
|
|
10
|
+
}
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parserOptions: {
|
|
3
|
+
ecmaVersion: 6,
|
|
4
|
+
parser: 'babel-eslint',
|
|
5
|
+
sourceType: 'module'
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
'plugin:vue/recommended',
|
|
9
|
+
'prettier',
|
|
10
|
+
'prettier/vue',
|
|
11
|
+
'plugin:prettier/recommended',
|
|
12
|
+
'plugin:storybook/recommended'
|
|
13
|
+
],
|
|
14
|
+
plugins: ['prettier'],
|
|
15
|
+
rules: {
|
|
16
|
+
'vue/component-name-in-template-casing': [
|
|
17
|
+
'error',
|
|
18
|
+
'kebab-case',
|
|
19
|
+
{
|
|
20
|
+
registeredComponentsOnly: true,
|
|
21
|
+
ignores: []
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
package/.prettierrc
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
|
|
2
|
+
const config = {
|
|
3
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.js'],
|
|
4
|
+
addons: [
|
|
5
|
+
'@storybook/addon-links',
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'@storybook/addon-a11y'
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: '@storybook/vue3-vite',
|
|
12
|
+
options: {}
|
|
13
|
+
},
|
|
14
|
+
docs: {
|
|
15
|
+
autodocs: 'tag'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default config
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @type { import('@storybook/vue3').Preview } */
|
|
2
|
+
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
|
|
3
|
+
import 'bootstrap/dist/css/bootstrap.min.css'
|
|
4
|
+
import './../src/assets/styles/stylesheet.scss'
|
|
5
|
+
import { setup } from '@storybook/vue3'
|
|
6
|
+
|
|
7
|
+
setup((app) => {
|
|
8
|
+
app.component('NuxtLink', {
|
|
9
|
+
props: {
|
|
10
|
+
to: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
template: '<a target="_blank" :href="`https://ws-ui.wsvdigital.com.au${this.to}`"><slot></slot></a>'
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const preview = {
|
|
20
|
+
parameters: {
|
|
21
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
22
|
+
controls: {
|
|
23
|
+
matchers: {
|
|
24
|
+
color: /(background|color)$/i,
|
|
25
|
+
date: /Date$/i
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
viewport: {
|
|
29
|
+
viewports: INITIAL_VIEWPORTS
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default preview
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 WorkSafe Victoria
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# WorkSafe Component Library SB7 (for Storybook 7)
|
|
2
|
+
|
|
3
|
+
This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the common components used on the [WorkSafe Victoria](https://www.worksafe.vic.gov.au) public website.
|
|
4
|
+
|
|
5
|
+
## Minimum Requirements
|
|
6
|
+
|
|
7
|
+
1. Yarn -> Latest (Needed for workspaces)
|
|
8
|
+
2. Node -> latest version 18.19.0
|
|
9
|
+
3. VSCode preferred
|
|
10
|
+
4. ESLint should be installed globally (npm install -g eslint)
|
|
11
|
+
5. Vue Dev tools plugin for Chrome / Firefox
|
|
12
|
+
6. Bootstrap-Vue-Next required (npm i bootstrap-vue-next)
|
|
13
|
+
7. Accessibility Add-on (yarn add @storybook/addon-a11y --dev)
|
|
14
|
+
8. Vite SVG Loader (npm install vite-svg-loader --save-dev)
|
|
15
|
+
|
|
16
|
+
## Fresh Install
|
|
17
|
+
|
|
18
|
+
git clone <this-repo>
|
|
19
|
+
chmod +x bin/clean.sh
|
|
20
|
+
yarn reinstall
|
|
21
|
+
|
|
22
|
+
## Run Dev
|
|
23
|
+
|
|
24
|
+
yarn storybook
|
|
25
|
+
|
|
26
|
+
## Build
|
|
27
|
+
|
|
28
|
+
yarn build-storybook
|
|
29
|
+
|
|
30
|
+
## Deploy
|
|
31
|
+
|
|
32
|
+
chmod +x bin/deploy.sh
|
|
33
|
+
yarn deploy
|
|
34
|
+
|
|
35
|
+
## Release - Dry run
|
|
36
|
+
|
|
37
|
+
yarn dryrun
|
|
38
|
+
|
|
39
|
+
## Release
|
|
40
|
+
|
|
41
|
+
yarn release
|
|
42
|
+
|
|
43
|
+
### Usage Instructions - Yarn - recommended
|
|
44
|
+
|
|
45
|
+
yarn add @worksafevictoria/wcl
|
|
46
|
+
|
|
47
|
+
### Usage Instructions - npm
|
|
48
|
+
|
|
49
|
+
npm i @worksafevictoria/wcl
|
|
50
|
+
|
|
51
|
+
### Nuxt - if you have errors after importing
|
|
52
|
+
|
|
53
|
+
# nuxt.config.js
|
|
54
|
+
|
|
55
|
+
build {
|
|
56
|
+
transpile: ['@worksafevictoria/wcl', 'xxx', 'xxx', 'xxx']
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
#### Import example
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<container>
|
|
63
|
+
<row>
|
|
64
|
+
<column :md="6">
|
|
65
|
+
<cta-button @clicked="$emit('nextScreen')">Start</cta-button>
|
|
66
|
+
</column>
|
|
67
|
+
</row>
|
|
68
|
+
</container>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import { Container, Column, Row, CtaButton } from '@worksafevictoria/wcl'
|
|
73
|
+
export default {
|
|
74
|
+
components: { Container, Column, Row, CtaButton }
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style lang="scss" scoped>
|
|
79
|
+
@import './styles';
|
|
80
|
+
</style>
|
|
81
|
+
|
|
82
|
+
## Deployment Process - Beta
|
|
83
|
+
|
|
84
|
+
<ol>
|
|
85
|
+
<li>Checkout beta</li>
|
|
86
|
+
<li>Create a fresh branch from beta <code>feat/JIRA-ID</code></li>
|
|
87
|
+
<li>....Add changes....</li>
|
|
88
|
+
<li>After commits are added to this branch merge <code>beta</code> into <code>feat/JIRA-ID</code></li>
|
|
89
|
+
</li>
|
|
90
|
+
<li><code>yarn test</code></li>
|
|
91
|
+
<li>Create Pull Request from <code>feat/JIRA-ID</code> to <code>beta</code></li>
|
|
92
|
+
<li>Request code review from fellow FE Developers </li>
|
|
93
|
+
<li>Merge <code>feat/JIRA-ID</code> into <code>Beta</code> </li>
|
|
94
|
+
</ol>
|
|
95
|
+
|
|
96
|
+
## Deployment Process - Hotfix
|
|
97
|
+
|
|
98
|
+
<ol>
|
|
99
|
+
<li>Checkout release</li>
|
|
100
|
+
<li>Create a fresh branch from release <code>hotfix/JIRA-ID</code></li>
|
|
101
|
+
<li>....Add changes....</li>
|
|
102
|
+
<li>After commits are added to this branch merge <code>release</code> into <code>feat/JIRA-ID</code></li>
|
|
103
|
+
</li>
|
|
104
|
+
<li><code>yarn test</code></li>
|
|
105
|
+
<li>Create Pull Request from <code>feat/JIRA-ID</code> to <code>release</code></li>
|
|
106
|
+
<li>Request code review from fellow FE Developers </li>
|
|
107
|
+
<li>Merge <code>feat/JIRA-ID</code> into <code>release</code></li>
|
|
108
|
+
<li>Approve and release npm deployment from the release pipeline</li>
|
|
109
|
+
<li>Manually add your changes to <code>beta</code> using the steps for "Deployment Process - Beta"</li>
|
|
110
|
+
</ol>
|
|
111
|
+
|
|
112
|
+
## Deployment Process - Release
|
|
113
|
+
|
|
114
|
+
<ol>
|
|
115
|
+
<li>Create Pull Request from <code>beta</code> to <code>release</code></li>
|
|
116
|
+
<li>Request code review from <code>@worksafedigital</code></li>
|
|
117
|
+
<li>Merge <code>feat/JIRA-ID</code> into <code>release</code></li>
|
|
118
|
+
<li>Approve and release npm deployment from the release pipeline</li>
|
|
119
|
+
</ol>
|
|
120
|
+
|
|
121
|
+
------------------------------------------------------------------------------------------------
|
|
122
|
+
## Instructions linked to Vue 3/Storybook 7 template
|
|
123
|
+
## Recommended IDE Setup
|
|
124
|
+
|
|
125
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
126
|
+
|
|
127
|
+
## Customize configuration
|
|
128
|
+
|
|
129
|
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
130
|
+
|
|
131
|
+
## Project Setup
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
npm install
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Compile and Hot-Reload for Development
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
npm run dev
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Compile and Minify for Production
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
npm run build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
npm run test:unit
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
npm run lint
|
|
159
|
+
```
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: ['@babel/preset-env'],
|
|
3
|
+
plugins: [
|
|
4
|
+
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
|
|
5
|
+
['@babel/plugin-proposal-private-methods', { loose: true }],
|
|
6
|
+
['@babel/plugin-proposal-class-properties', { loose: true }]
|
|
7
|
+
]
|
|
8
|
+
}
|
package/bin/clean.sh
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
#****************************
|
|
4
|
+
# WSV Website Fresh Installer
|
|
5
|
+
#****************************
|
|
6
|
+
|
|
7
|
+
cd $(dirname $0)
|
|
8
|
+
|
|
9
|
+
spinner() {
|
|
10
|
+
local i sp n
|
|
11
|
+
sp='/-\|'
|
|
12
|
+
n=${#sp}
|
|
13
|
+
echo ""
|
|
14
|
+
echo ""
|
|
15
|
+
echo ""
|
|
16
|
+
while sleep 0.1; do
|
|
17
|
+
printf "%s\b" "${sp:i++%n:1}"
|
|
18
|
+
done
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
spinner &
|
|
22
|
+
|
|
23
|
+
echo ""
|
|
24
|
+
echo \#*****************************
|
|
25
|
+
echo \# WSV Websites Fresh Installer
|
|
26
|
+
echo \#*****************************
|
|
27
|
+
echo ""
|
|
28
|
+
|
|
29
|
+
echo Deleting yarn.lock
|
|
30
|
+
rm -rf ../yarn.lock
|
|
31
|
+
echo Done
|
|
32
|
+
echo ""
|
|
33
|
+
|
|
34
|
+
echo Deleting yarn-error.log
|
|
35
|
+
rm -rf ../yarn-error.log
|
|
36
|
+
echo Done
|
|
37
|
+
echo ""
|
|
38
|
+
|
|
39
|
+
echo Deleting node_modules
|
|
40
|
+
rm -rf ../node_modules
|
|
41
|
+
echo Done
|
|
42
|
+
echo ""
|
|
43
|
+
|
|
44
|
+
echo Deleting storybook-static
|
|
45
|
+
rm -rf ../storybook-static
|
|
46
|
+
echo Done
|
|
47
|
+
echo ""
|
|
48
|
+
|
|
49
|
+
echo Running yarn
|
|
50
|
+
echo Happy fixing! \#devLife
|
|
51
|
+
echo ""
|
|
52
|
+
kill "$!" # kill the spinner
|
package/bin/deploy.sh
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
echo ""
|
|
4
|
+
echo \#*****************************
|
|
5
|
+
echo \# WCL Storybook Deployer
|
|
6
|
+
echo \#*****************************
|
|
7
|
+
echo ""
|
|
8
|
+
|
|
9
|
+
# Reset Dir
|
|
10
|
+
cd $(dirname $0)
|
|
11
|
+
|
|
12
|
+
# Clean
|
|
13
|
+
rm -rf ../storybook-static
|
|
14
|
+
|
|
15
|
+
# Build
|
|
16
|
+
cd ..
|
|
17
|
+
yarn build
|
|
18
|
+
|
|
19
|
+
# Add CNAME to build
|
|
20
|
+
cd storybook-static
|
|
21
|
+
echo "ws-ui-sb7.wsvdigital.com.au" > ../storybook-static/CNAME
|
|
22
|
+
|
|
23
|
+
# Deploy to GH-Pages
|
|
24
|
+
cd ..
|
|
25
|
+
node node_modules/gh-pages/bin/gh-pages.js -d storybook-static
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Build Validation for Pull Requests
|
|
2
|
+
|
|
3
|
+
This YAML code is used to set up a build validation process for pull requests. It will run a series of tasks to ensure that the code is valid and ready to be merged.
|
|
4
|
+
|
|
5
|
+
## Variables
|
|
6
|
+
|
|
7
|
+
The following variables are used in this YAML code:
|
|
8
|
+
|
|
9
|
+
- `group`: This is the group that the project belongs to. In this case, it is the Public Websites - Front End group.
|
|
10
|
+
|
|
11
|
+
## Resources
|
|
12
|
+
|
|
13
|
+
The following resources are used in this YAML code:
|
|
14
|
+
|
|
15
|
+
- `repository`: This is the repository that the code will be pulled from. In this case, it is the same repository that the code is being pushed to.
|
|
16
|
+
- `type`: This is the type of repository that the code will be pulled from. In this case, it is a git repository.
|
|
17
|
+
- `ref`: This is the reference that the code will be pulled from. In this case, it is the beta branch.
|
|
18
|
+
|
|
19
|
+
## Jobs
|
|
20
|
+
|
|
21
|
+
The following jobs are used in this YAML code:
|
|
22
|
+
|
|
23
|
+
- `Build_Test_Dryrun`: This job will run a series of tasks to build, test, and perform a dry run of the code.
|
|
24
|
+
- `vmImage`: This is the virtual machine image that will be used to run the tasks. In this case, it is an Ubuntu-latest image.
|
|
25
|
+
- `checkout`: This task will check out the code from the repository.
|
|
26
|
+
- `NodeTool`: This task will use Node 16.x.
|
|
27
|
+
- `CmdLine`: This task will install the dependencies, build the code, and run the unit tests.
|
|
28
|
+
- `script`: This task will perform a dry run of the code.
|
|
29
|
+
|
|
30
|
+
## Environment Variables
|
|
31
|
+
|
|
32
|
+
The following environment variables are used in this YAML code:
|
|
33
|
+
|
|
34
|
+
- `GITHUB_TOKEN`: This is the GitHub token used to authenticate the user.
|
|
35
|
+
- `NPM_TOKEN`: This is the NPM token used to authenticate the user.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
########################################################
|
|
2
|
+
# Author: Yavisht Katgara
|
|
3
|
+
# Email: yavisht_katgara@worksafe.vic.gov.au
|
|
4
|
+
# Project: Worksafe Public Website - Front End
|
|
5
|
+
# Description: Build Validation for Pull Requests
|
|
6
|
+
########################################################
|
|
7
|
+
|
|
8
|
+
variables:
|
|
9
|
+
- group: Public Websites - Front End
|
|
10
|
+
resources:
|
|
11
|
+
repositories:
|
|
12
|
+
- repository: self
|
|
13
|
+
type: git
|
|
14
|
+
ref: refs/heads/beta
|
|
15
|
+
jobs:
|
|
16
|
+
- job: Build_Test_Dryrun
|
|
17
|
+
displayName: Build - Test - DryRun
|
|
18
|
+
pool:
|
|
19
|
+
vmImage: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- checkout: self
|
|
22
|
+
fetchTags: true
|
|
23
|
+
- task: NodeTool@0
|
|
24
|
+
displayName: Use Node 18.x
|
|
25
|
+
inputs:
|
|
26
|
+
versionSpec: 18.x
|
|
27
|
+
- task: CmdLine@2
|
|
28
|
+
displayName: Install
|
|
29
|
+
inputs:
|
|
30
|
+
script: |
|
|
31
|
+
set -e
|
|
32
|
+
npm i -g husky
|
|
33
|
+
npm i -g pinst
|
|
34
|
+
yarn install
|
|
35
|
+
- task: CmdLine@2
|
|
36
|
+
displayName: Build
|
|
37
|
+
inputs:
|
|
38
|
+
script: yarn build
|
|
39
|
+
- task: CmdLine@2
|
|
40
|
+
displayName: Unit Test
|
|
41
|
+
inputs:
|
|
42
|
+
script: yarn test
|
|
43
|
+
- script: 'npm run dryrun'
|
|
44
|
+
displayName: 'Perform Dry Run'
|
|
45
|
+
env:
|
|
46
|
+
GITHUB_TOKEN: $(GH_TOKEN)
|
|
47
|
+
NPM_TOKEN: $(NPM_TOKEN)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# NPM Publish Beta Pipeline
|
|
2
|
+
|
|
3
|
+
This YAML code is used to publish a beta release of the Worksafe Component Library to NPM and deploy the Storybook website to GitHub Pages.
|
|
4
|
+
|
|
5
|
+
## Variables
|
|
6
|
+
|
|
7
|
+
The following variables are used in this YAML code:
|
|
8
|
+
|
|
9
|
+
- `group`: Public Websites - Front End
|
|
10
|
+
|
|
11
|
+
## Resources
|
|
12
|
+
|
|
13
|
+
The following resources are used in this YAML code:
|
|
14
|
+
|
|
15
|
+
- `repository`: self
|
|
16
|
+
- `type`: git
|
|
17
|
+
- `ref`: refs/heads/beta
|
|
18
|
+
|
|
19
|
+
## Stages
|
|
20
|
+
|
|
21
|
+
The following stages are used in this YAML code:
|
|
22
|
+
|
|
23
|
+
### Publish to NPM - Beta
|
|
24
|
+
|
|
25
|
+
This stage is used to publish the beta release to NPM. It includes the following steps:
|
|
26
|
+
|
|
27
|
+
- Checkout the repository
|
|
28
|
+
- Use Node 18.x
|
|
29
|
+
- Run `npm i -g pinst` and `npx semantic-release` to publish the beta release
|
|
30
|
+
|
|
31
|
+
### Publish Storybook
|
|
32
|
+
|
|
33
|
+
This stage is used to deploy the Storybook website to GitHub Pages. It includes the following steps:
|
|
34
|
+
|
|
35
|
+
- Checkout the repository
|
|
36
|
+
- Use Node 16.x
|
|
37
|
+
- Setup the Git repository
|
|
38
|
+
- Install dependencies
|
|
39
|
+
- Deploy to GitHub Pages
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# NPM Publish Release Pipeline
|
|
2
|
+
|
|
3
|
+
This YAML code is used to publish a beta release of the Worksafe Component Library to NPM @latest
|
|
4
|
+
|
|
5
|
+
## Variables
|
|
6
|
+
|
|
7
|
+
The following variables are used in this YAML code:
|
|
8
|
+
|
|
9
|
+
- `group`: Public Websites - Front End
|
|
10
|
+
|
|
11
|
+
## Resources
|
|
12
|
+
|
|
13
|
+
The following resources are used in this YAML code:
|
|
14
|
+
|
|
15
|
+
- `repository`: self
|
|
16
|
+
- `type`: git
|
|
17
|
+
- `ref`: refs/heads/beta
|
|
18
|
+
|
|
19
|
+
## Stages
|
|
20
|
+
|
|
21
|
+
The following stages are used in this YAML code:
|
|
22
|
+
|
|
23
|
+
### Publish to NPM - Beta
|
|
24
|
+
|
|
25
|
+
This stage is used to publish the beta release to NPM. It includes the following steps:
|
|
26
|
+
|
|
27
|
+
- Checkout the repository
|
|
28
|
+
- Use Node 18.x
|
|
29
|
+
- Run `npm i -g pinst` and `npx semantic-release` to publish the beta release
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#######################################################
|
|
2
|
+
# Author: Yavisht Katgara
|
|
3
|
+
# Email: yavisht_katgara@worksafe.vic.gov.au
|
|
4
|
+
# Project: Worksafe Public Website - Front End
|
|
5
|
+
# Description: Publish beta release to NPM
|
|
6
|
+
#######################################################
|
|
7
|
+
|
|
8
|
+
variables:
|
|
9
|
+
- group: Public Websites - Front End
|
|
10
|
+
resources:
|
|
11
|
+
repositories:
|
|
12
|
+
- repository: self
|
|
13
|
+
type: git
|
|
14
|
+
ref: refs/heads/beta
|
|
15
|
+
stages:
|
|
16
|
+
- stage: publish_npm_beta
|
|
17
|
+
jobs:
|
|
18
|
+
- deployment: publish_to_npm_beta
|
|
19
|
+
displayName: Publish to NPM - Beta
|
|
20
|
+
environment: Public Websites - Front End
|
|
21
|
+
strategy:
|
|
22
|
+
runOnce:
|
|
23
|
+
deploy:
|
|
24
|
+
steps:
|
|
25
|
+
- checkout: self
|
|
26
|
+
- task: NodeTool@0
|
|
27
|
+
displayName: Use Node 20.x
|
|
28
|
+
inputs:
|
|
29
|
+
versionSpec: 20.x
|
|
30
|
+
|
|
31
|
+
- script: |
|
|
32
|
+
set -e
|
|
33
|
+
npm i -g husky
|
|
34
|
+
npm i -g pinst
|
|
35
|
+
npx semantic-release
|
|
36
|
+
displayName: 'NPM Publish Beta Release'
|
|
37
|
+
env:
|
|
38
|
+
GITHUB_TOKEN: $(GH_TOKEN)
|
|
39
|
+
NPM_TOKEN: $(NPM_TOKEN)
|
|
40
|
+
|
|
41
|
+
- stage: publish_storybook
|
|
42
|
+
jobs:
|
|
43
|
+
- job: publish_storybook_website
|
|
44
|
+
displayName: Publish Storybook
|
|
45
|
+
steps:
|
|
46
|
+
- checkout: self
|
|
47
|
+
- task: NodeTool@0
|
|
48
|
+
displayName: Use Node 18.x
|
|
49
|
+
inputs:
|
|
50
|
+
versionSpec: 18.x
|
|
51
|
+
|
|
52
|
+
- task: CmdLine@2
|
|
53
|
+
displayName: Setup Git Repo
|
|
54
|
+
inputs:
|
|
55
|
+
script: |
|
|
56
|
+
git remote remove origin
|
|
57
|
+
git config --global user.email "webupdates@worksafe.vic.gov.au"
|
|
58
|
+
git config --global user.name "worksafedigital"
|
|
59
|
+
git remote add origin https://$(GH_TOKEN)@github.com/WorkSafeVictoria/wsv-websites-wcl-sb7
|
|
60
|
+
git fetch origin
|
|
61
|
+
- task: CmdLine@2
|
|
62
|
+
displayName: Install dependencies
|
|
63
|
+
inputs:
|
|
64
|
+
script: 'yarn'
|
|
65
|
+
|
|
66
|
+
- task: CmdLine@2
|
|
67
|
+
displayName: Deploy to GitHub Pages
|
|
68
|
+
inputs:
|
|
69
|
+
script: 'yarn deploy'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#######################################################
|
|
2
|
+
# Author: Yavisht Katgara
|
|
3
|
+
# Email: yavisht_katgara@worksafe.vic.gov.au
|
|
4
|
+
# Project: Worksafe Public Website - Front End
|
|
5
|
+
# Description: Publish latest release to NPM
|
|
6
|
+
#######################################################
|
|
7
|
+
|
|
8
|
+
variables:
|
|
9
|
+
- group: Public Websites - Front End
|
|
10
|
+
resources:
|
|
11
|
+
repositories:
|
|
12
|
+
- repository: self
|
|
13
|
+
type: git
|
|
14
|
+
ref: refs/heads/master
|
|
15
|
+
stages:
|
|
16
|
+
- stage: publish_npm_beta
|
|
17
|
+
jobs:
|
|
18
|
+
- deployment: publish_to_npm_master
|
|
19
|
+
displayName: Publish to NPM - Master
|
|
20
|
+
environment: Public Websites - Front End
|
|
21
|
+
strategy:
|
|
22
|
+
runOnce:
|
|
23
|
+
deploy:
|
|
24
|
+
steps:
|
|
25
|
+
- checkout: self
|
|
26
|
+
- task: NodeTool@0
|
|
27
|
+
displayName: Use Node 20.x
|
|
28
|
+
inputs:
|
|
29
|
+
versionSpec: 20.x
|
|
30
|
+
|
|
31
|
+
- script: |
|
|
32
|
+
set -e
|
|
33
|
+
npm i -g husky
|
|
34
|
+
npm i -g pinst
|
|
35
|
+
npx semantic-release
|
|
36
|
+
displayName: 'NPM Publish Master Release'
|
|
37
|
+
env:
|
|
38
|
+
GITHUB_TOKEN: $(GH_TOKEN)
|
|
39
|
+
NPM_TOKEN: $(NPM_TOKEN)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: ['@commitlint/config-conventional'] }
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<link rel="icon" href="/favicon.ico">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Vite App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|