diff --git a/.github/workflows/components.yml b/.github/workflows/components.yml deleted file mode 100644 index c3ad6d0856..0000000000 --- a/.github/workflows/components.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: UI Libraries -on: - push: - paths: - - '.github/workflows/components.yml' - - 'packages/ripple-storybook/**' - - 'packages/ripple-ui-core/**' - - 'packages/ripple-ui-forms/**' - - 'pnpm-lock.yaml' -jobs: - Storybook: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.10.0 - - name: Install Dependencies - run: pnpm install --frozen-lockfile - - name: Install Playwright Browsers - run: pnpm exec playwright install - - name: Build Storybook - run: pnpm build:storybook - - name: Run Storybook tests - run: pnpm test:storybook-ci - - name: Publish to Chromatic - uses: chromaui/action@v1 - with: - workingDir: packages/ripple-storybook - storybookBuildDir: 'storybook-static' - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - skip: 'gh-readonly-queue/**' - exitOnceUploaded: true - Component-Core: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v3 - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - with: - version: 10.10.0 - run_install: true - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - name: Cypress component tests - uses: cypress-io/github-action@v6 - with: - working-directory: packages/ripple-ui-core - install: false - component: true - Component-Forms: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v3 - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - with: - version: 10.10.0 - run_install: true - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - - name: Cypress component tests - uses: cypress-io/github-action@v6 - with: - working-directory: packages/ripple-ui-forms - install: false - component: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 414322ecf6..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Docs -on: - push: - paths: - - '.github/workflows/docs.yml' - - 'docs' - - 'packages/ripple-ui-core/**' - - 'packages/ripple-ui-forms/**' - - 'pnpm-lock.yaml' -jobs: - Docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.10.0 - run_install: false - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - name: Install Dependencies - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: pnpm install --frozen-lockfile - - name: Build docs - run: pnpm run build:docs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3fb3c8027c..b5e0f9473e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,14 @@ jobs: - name: Install Node uses: actions/setup-node@v4 with: + always-auth: true + registry-url: https://npm.pkg.github.com/ node-version: 20 - cache: 'pnpm' + scope: "@dpc-sdp" + cache: "pnpm" - name: Install Dependencies run: pnpm install --frozen-lockfile + env: + NODE_AUTH_TOKEN: ${{secrets.GPR_NPM_INSTALL_TOKEN}} - run: pnpm run lint - run: pnpm run test:unit diff --git a/.github/workflows/nuxt.yml b/.github/workflows/nuxt.yml index 2b95d212ac..65f096c14e 100644 --- a/.github/workflows/nuxt.yml +++ b/.github/workflows/nuxt.yml @@ -2,78 +2,47 @@ name: Nuxt on: push: paths: - - '.github/workflows/nuxt.yml' - - 'examples/nuxt-app/**' - - 'packages/**' - - 'pnpm-lock.yaml' - - '!packages/ripple-storybook/**' + - ".github/workflows/nuxt.yml" + - "examples/nuxt-app/**" + - "packages/**" + - "pnpm-lock.yaml" jobs: - TestNuxt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.10.0 - run_install: false - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - name: Install Dependencies - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: pnpm install --frozen-lockfile - - - name: Build Example Nuxt app - run: pnpm -F nuxt-app build - - # CLI tool is needed for mocks in perf test - # - name: Build CLI tool - # run: pnpm -F nuxt-ripple-cli build - - # - run: npm install ./packages/nuxt-ripple-cli --global - # Run lighthouse test against nuxt-app example - # TODO Turn lighthouse back on after unlighthouse is patched - # - name: Run lighthouse baseline test on nuxt-app - # run: pnpm -F nuxt-app lighthouse:ci - # run Cypress tests in example nuxt-app, record to Cypress cloud Integration: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - + - uses: actions/checkout@v4 - name: Install pnpm uses: pnpm/action-setup@v3 with: version: 10.10.0 + run_install: false - name: Install Node uses: actions/setup-node@v4 with: + always-auth: true + registry-url: https://npm.pkg.github.com/ node-version: 20 - cache: 'pnpm' + scope: "@dpc-sdp" + cache: "pnpm" - name: Install Dependencies env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + NODE_AUTH_TOKEN: ${{secrets.GPR_NPM_INSTALL_TOKEN}} run: pnpm install --frozen-lockfile - - name: Cypress Integration (e2e) tests uses: cypress-io/github-action@v6 env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - TZ: 'Australia/Melbourne' - NUXT_PUBLIC_TIDE_BASE_URL: 'https://test.base.url' - NUXT_PUBLIC_SITE_URL: 'https://test.url' - NUXT_PUBLIC_TIDE_SITE: 'TEST_SITE' - NUXT_PUBLIC_API_URL: 'http://localhost:3001' - NUXT_PUBLIC_TIDE_APP_SEARCH_ENGINE_NAME: 'TEST_ENGINE' - NUXT_PUBLIC_TIDE_ELASTICSEARCH_HOST: 'TEST_HOST' - API_PORT: '3001' - LOG_LEVEL: 'debug' + TZ: "Australia/Melbourne" + NUXT_PUBLIC_TIDE_BASE_URL: "https://test.base.url" + NUXT_PUBLIC_SITE_URL: "https://test.url" + NUXT_PUBLIC_TIDE_SITE: "TEST_SITE" + NUXT_PUBLIC_API_URL: "http://localhost:3001" + NUXT_PUBLIC_TIDE_APP_SEARCH_ENGINE_NAME: "TEST_ENGINE" + NUXT_PUBLIC_TIDE_ELASTICSEARCH_HOST: "TEST_HOST" + API_PORT: "3001" + LOG_LEVEL: "debug" # DEBUG: '@cypress/github-action' with: record: true @@ -81,4 +50,4 @@ jobs: install: false build: pnpm build start: pnpm start - wait-on: 'http://localhost:3000/assets/fonts/VIC-Regular.woff2' + wait-on: "http://localhost:3000/assets/fonts/VIC-Regular.woff2" diff --git a/.github/workflows/publish-canary.yml b/.github/workflows/publish-canary.yml index 86b18add8a..18ad49772e 100644 --- a/.github/workflows/publish-canary.yml +++ b/.github/workflows/publish-canary.yml @@ -22,14 +22,16 @@ jobs: - name: Install Node uses: actions/setup-node@v4 with: - registry-url: 'https://npm.pkg.github.com/' + always-auth: true + registry-url: https://npm.pkg.github.com/ node-version: 20 - cache: 'pnpm' - scope: '@dpc-sdp' + scope: "@dpc-sdp" + cache: "pnpm" - name: Install Dependencies env: CYPRESS_INSTALL_BINARY: 0 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + NODE_AUTH_TOKEN: ${{secrets.GPR_NPM_INSTALL_TOKEN}} run: pnpm install --frozen-lockfile - name: Publish canary build to @next tag env: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 541e42677e..ca83b5ba38 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,14 +20,16 @@ jobs: - name: Install Node uses: actions/setup-node@v4 with: - registry-url: 'https://npm.pkg.github.com/' + always-auth: true + registry-url: https://npm.pkg.github.com/ node-version: 20 - cache: 'pnpm' - scope: '@dpc-sdp' + scope: "@dpc-sdp" + cache: "pnpm" - name: Install Dependencies env: CYPRESS_INSTALL_BINARY: 0 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + NODE_AUTH_TOKEN: ${{secrets.GPR_NPM_INSTALL_TOKEN}} run: pnpm install --frozen-lockfile - name: Bump versions for proper release diff --git a/.github/workflows/vue.yml b/.github/workflows/vue.yml deleted file mode 100644 index 0b21ece458..0000000000 --- a/.github/workflows/vue.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Vue -on: - push: - paths: - - '.github/workflows/vue.yml' - - 'examples/vue-app/**' - - 'packages/ripple-ui-core/**' - - 'packages/ripple-ui-forms/**' - - 'pnpm-lock.yaml' -jobs: - Examples: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.10.0 - run_install: false - - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - - name: Install Dependencies - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: pnpm install --frozen-lockfile - - - name: Build Example Vue app - run: pnpm -F vue-app build diff --git a/.github/workflows/webcomponents.yml b/.github/workflows/webcomponents.yml deleted file mode 100644 index 5810397ba6..0000000000 --- a/.github/workflows/webcomponents.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Webcomponents -on: - push: - paths: - - '.github/workflows/webcomponents.yml' - - 'examples/webcomponents/**' - - 'packages/ripple-ui-core/**' - - 'packages/ripple-ui-forms/**' - - 'pnpm-lock.yaml' -jobs: - Examples: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.10.0 - run_install: false - - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - - name: Install Dependencies - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: pnpm install --frozen-lockfile - - - name: Build Example Webcomponents app - run: pnpm -F webcomponents build diff --git a/.npmrc b/.npmrc index 7be624790c..fdf1096e4a 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ +@dpc-sdp:registry=https://npm.pkg.github.com shamefully-hoist=true shell-emulator=true auto-install-peers=true diff --git a/.stylelintignore b/.stylelintignore index 8f0fb58636..a063906089 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -2,7 +2,3 @@ **/dist **/public **/src/assets -**/src/styles/_vars.css -**/.storybook/storybook.css -**/storybook-static -**/stories/components/**/*.vue diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 98eef18171..0000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -public/storybook/* -.data/ diff --git a/docs/.stylelintrc.json b/docs/.stylelintrc.json deleted file mode 100644 index efec90d05a..0000000000 --- a/docs/.stylelintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["@dpc-sdp/stylelint-config-ripple"], - "rules": { - "selector-class-pattern": ".+", - "custom-property-pattern": ".+" - } -} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index 9b5836191b..0000000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,448 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.1.0-alpha.76](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.75...v2.1.0-alpha.76) (2023-02-08) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.71](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.70...v2.1.0-alpha.71) (2023-01-31) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.70](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.69...v2.1.0-alpha.70) (2023-01-30) - - -### Bug Fixes - -* **docs:** remove render on empty ([2560fcb](https://github.com/dpc-sdp/ripple-framework/commit/2560fcba74e0bee266790258d9e77ef08d79a470)) - - -### Features - -* **docs:** :bug: fix props table generation ([f542b48](https://github.com/dpc-sdp/ripple-framework/commit/f542b481c63d10f1048f1fe642d506fe238d13ea)) - - - - - -# [2.1.0-alpha.69](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.68...v2.1.0-alpha.69) (2023-01-29) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.67](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.66...v2.1.0-alpha.67) (2023-01-27) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.65](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.64...v2.1.0-alpha.65) (2023-01-25) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.64](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.63...v2.1.0-alpha.64) (2023-01-24) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.63](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.62...v2.1.0-alpha.63) (2023-01-24) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.57](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.56...v2.1.0-alpha.57) (2023-01-09) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.56](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.55...v2.1.0-alpha.56) (2023-01-06) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.55](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.54...v2.1.0-alpha.55) (2023-01-04) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.54](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.53...v2.1.0-alpha.54) (2023-01-03) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.53](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.52...v2.1.0-alpha.53) (2022-12-30) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.52](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.51...v2.1.0-alpha.52) (2022-12-22) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.51](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.50...v2.1.0-alpha.51) (2022-12-22) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.50](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.49...v2.1.0-alpha.50) (2022-12-21) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.45](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.44...v2.1.0-alpha.45) (2022-12-19) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.44](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.43...v2.1.0-alpha.44) (2022-12-18) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.43](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.42...v2.1.0-alpha.43) (2022-12-15) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.40](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.39...v2.1.0-alpha.40) (2022-12-15) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.36](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.35...v2.1.0-alpha.36) (2022-12-14) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.35](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.34...v2.1.0-alpha.35) (2022-12-14) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.34](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.33...v2.1.0-alpha.34) (2022-12-13) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.31](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.30...v2.1.0-alpha.31) (2022-12-09) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.30](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.29...v2.1.0-alpha.30) (2022-12-07) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.29](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.28...v2.1.0-alpha.29) (2022-12-07) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.28](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2022-12-07) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.27](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2022-12-06) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.26](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2022-12-06) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.24](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2022-12-02) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.23](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.22...v2.1.0-alpha.23) (2022-12-02) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.20](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2022-11-29) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.19](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.18...v2.1.0-alpha.19) (2022-11-28) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.18](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.17...v2.1.0-alpha.18) (2022-11-28) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.16](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.15...v2.1.0-alpha.16) (2022-11-25) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.15](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.14...v2.1.0-alpha.15) (2022-11-23) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.14](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.13...v2.1.0-alpha.14) (2022-11-21) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.13](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.12...v2.1.0-alpha.13) (2022-11-21) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.12](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.11...v2.1.0-alpha.12) (2022-11-18) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.11](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.10...v2.1.0-alpha.11) (2022-11-16) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.10](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2022-11-16) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.9](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2022-11-14) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.8](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2022-11-09) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.6](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2022-11-09) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.5](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2022-11-09) - -**Note:** Version bump only for package docs - - - - - -# [2.1.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2022-11-08) - -**Note:** Version bump only for package docs - - - - - -# 2.1.0-alpha.0 (2022-11-08) - - -### Features - -* **@dpc-sdp/ripple-tide-landing-page:** :sparkles: adds landing page content type components ([4396276](https://github.com/dpc-sdp/ripple-framework/commit/43962765528ee23ca904ae5c3f2d07180c1b853c)) -* **@dpc-sdp/ripple-ui-core:** :construction: proof of concept for formkit forms ([2484620](https://github.com/dpc-sdp/ripple-framework/commit/2484620f91dd8fd3573d546adf1bff290130d3f5)) -* **@dpc-sdp/ripple-ui-core:** :sparkles: adds Alert ([876fd36](https://github.com/dpc-sdp/ripple-framework/commit/876fd36469656e9894969c12b8ebd39829821e09)) -* **@dpc-sdp/ripple-ui-core:** Remove height/width from svg, 'use' icon for blockquote, use :where for zero specificity on rpl-content elements, update icon output paths, add basic svg docs ([28a2165](https://github.com/dpc-sdp/ripple-framework/commit/28a216541201c884337654001656e71ee1b503ee)) -* **@dpc-sdp/ripple-ui-forms:** :building_construction: move storybook to project root, add forms ([578f8c9](https://github.com/dpc-sdp/ripple-framework/commit/578f8c92904e5f05f24ec1d8cb0646af13a32a43)) - - -### Reverts - -* **docs:** :fire: remove unused token table components ([f2dbc15](https://github.com/dpc-sdp/ripple-framework/commit/f2dbc15178a8b1f5d44e157a71fa8b44f98d0b72)) - - - - - -## [2.0.1-alpha.4](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.3...v2.0.1-alpha.4) (2022-11-06) - -**Note:** Version bump only for package docs - -## [2.0.1-alpha.3](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.2...v2.0.1-alpha.3) (2022-11-04) - -**Note:** Version bump only for package docs - -## [2.0.1-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.1...v2.0.1-alpha.2) (2022-11-04) - -**Note:** Version bump only for package docs - -## 2.0.1-alpha.0 (2022-11-04) - -### Features - -- **@dpc-sdp/ripple-tide-landing-page:** :sparkles: adds landing page content type components ([4396276](https://github.com/dpc-sdp/ripple-framework/commit/43962765528ee23ca904ae5c3f2d07180c1b853c)) -- **@dpc-sdp/ripple-ui-core:** :construction: proof of concept for formkit forms ([2484620](https://github.com/dpc-sdp/ripple-framework/commit/2484620f91dd8fd3573d546adf1bff290130d3f5)) -- **@dpc-sdp/ripple-ui-core:** :sparkles: adds Alert ([876fd36](https://github.com/dpc-sdp/ripple-framework/commit/876fd36469656e9894969c12b8ebd39829821e09)) -- **@dpc-sdp/ripple-ui-core:** Remove height/width from svg, 'use' icon for blockquote, use :where for zero specificity on rpl-content elements, update icon output paths, add basic svg docs ([28a2165](https://github.com/dpc-sdp/ripple-framework/commit/28a216541201c884337654001656e71ee1b503ee)) -- **@dpc-sdp/ripple-ui-forms:** :building_construction: move storybook to project root, add forms ([578f8c9](https://github.com/dpc-sdp/ripple-framework/commit/578f8c92904e5f05f24ec1d8cb0646af13a32a43)) - -### Reverts - -- **docs:** :fire: remove unused token table components ([f2dbc15](https://github.com/dpc-sdp/ripple-framework/commit/f2dbc15178a8b1f5d44e157a71fa8b44f98d0b72)) - -# [2.0.0-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2022-11-04) - -**Note:** Version bump only for package docs - -# [2.0.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2022-11-04) - -**Note:** Version bump only for package docs - -# 2.0.0-alpha.0 (2022-11-04) - -### Features - -- **@dpc-sdp/ripple-tide-landing-page:** :sparkles: adds landing page content type components ([4396276](https://github.com/dpc-sdp/ripple-framework/commit/43962765528ee23ca904ae5c3f2d07180c1b853c)) -- **@dpc-sdp/ripple-ui-core:** :construction: proof of concept for formkit forms ([2484620](https://github.com/dpc-sdp/ripple-framework/commit/2484620f91dd8fd3573d546adf1bff290130d3f5)) -- **@dpc-sdp/ripple-ui-core:** :sparkles: adds Alert ([876fd36](https://github.com/dpc-sdp/ripple-framework/commit/876fd36469656e9894969c12b8ebd39829821e09)) -- **@dpc-sdp/ripple-ui-core:** Remove height/width from svg, 'use' icon for blockquote, use :where for zero specificity on rpl-content elements, update icon output paths, add basic svg docs ([28a2165](https://github.com/dpc-sdp/ripple-framework/commit/28a216541201c884337654001656e71ee1b503ee)) -- **@dpc-sdp/ripple-ui-forms:** :building_construction: move storybook to project root, add forms ([578f8c9](https://github.com/dpc-sdp/ripple-framework/commit/578f8c92904e5f05f24ec1d8cb0646af13a32a43)) - -### Reverts - -- **docs:** :fire: remove unused token table components ([f2dbc15](https://github.com/dpc-sdp/ripple-framework/commit/f2dbc15178a8b1f5d44e157a71fa8b44f98d0b72)) diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 324fa0d4e9..0000000000 --- a/docs/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Ripple documentation website - diff --git a/docs/app.config.ts b/docs/app.config.ts deleted file mode 100644 index a599ea315c..0000000000 --- a/docs/app.config.ts +++ /dev/null @@ -1,25 +0,0 @@ -import pkg from './package.json' -export default defineAppConfig({ - title: 'Ripple Design System', - subheader: `Ripple is the design system for Victorian government digital products`, - sections: { - 'design-system': { - title: 'Ripple Design System', - color: 'var(--rpl-clr-primary)', - neutralFooter: false - }, - framework: { - title: 'Ripple Framework', - color: 'var(--rpl-clr-dark)', - neutralFooter: true - } - }, - version: pkg.version, - description: - 'Make your service consistent with vic.gov.au digital branding. Learn from the research and experience of other service teams and avoid repeating work that’s already been done.', - socials: { - github: 'dpc-sdp/ripple-framework' - }, - storybookBaseUrl: '/storybook', - hideModulesSection: false -}) diff --git a/docs/app.vue b/docs/app.vue deleted file mode 100644 index 4c13fb24fa..0000000000 --- a/docs/app.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/docs/components/app/AppFooter.vue b/docs/components/app/AppFooter.vue deleted file mode 100644 index d81aa93060..0000000000 --- a/docs/components/app/AppFooter.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/docs/components/app/AppLayout.vue b/docs/components/app/AppLayout.vue deleted file mode 100644 index 924a523f77..0000000000 --- a/docs/components/app/AppLayout.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/docs/components/app/AppLoadingBar.vue b/docs/components/app/AppLoadingBar.vue deleted file mode 100644 index 5931a570d4..0000000000 --- a/docs/components/app/AppLoadingBar.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - diff --git a/docs/components/app/AppNavbar.vue b/docs/components/app/AppNavbar.vue deleted file mode 100644 index dc9e9c3e14..0000000000 --- a/docs/components/app/AppNavbar.vue +++ /dev/null @@ -1,206 +0,0 @@ - - - - - diff --git a/docs/components/app/AppSidebarLayout.vue b/docs/components/app/AppSidebarLayout.vue deleted file mode 100644 index 22b80aca02..0000000000 --- a/docs/components/app/AppSidebarLayout.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsAlert.vue b/docs/components/content/DocsAlert.vue deleted file mode 100644 index 746d445d4f..0000000000 --- a/docs/components/content/DocsAlert.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/docs/components/content/DocsCard.vue b/docs/components/content/DocsCard.vue deleted file mode 100644 index 77f6df3868..0000000000 --- a/docs/components/content/DocsCard.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/docs/components/content/DocsCardGrid.vue b/docs/components/content/DocsCardGrid.vue deleted file mode 100644 index aa458ebc8f..0000000000 --- a/docs/components/content/DocsCardGrid.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/docs/components/content/DocsColourTable.vue b/docs/components/content/DocsColourTable.vue deleted file mode 100644 index d218fd6405..0000000000 --- a/docs/components/content/DocsColourTable.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsContent.global.vue b/docs/components/content/DocsContent.global.vue deleted file mode 100644 index 57c7453656..0000000000 --- a/docs/components/content/DocsContent.global.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/docs/components/content/DocsContentNavigation.vue b/docs/components/content/DocsContentNavigation.vue deleted file mode 100644 index e743659620..0000000000 --- a/docs/components/content/DocsContentNavigation.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsExample.vue b/docs/components/content/DocsExample.vue deleted file mode 100644 index 1cf99a17d7..0000000000 --- a/docs/components/content/DocsExample.vue +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - diff --git a/docs/components/content/DocsGradientTable.vue b/docs/components/content/DocsGradientTable.vue deleted file mode 100644 index acb2abc211..0000000000 --- a/docs/components/content/DocsGradientTable.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsGrid.vue b/docs/components/content/DocsGrid.vue deleted file mode 100644 index a41af47241..0000000000 --- a/docs/components/content/DocsGrid.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/docs/components/content/DocsHeroHeader.vue b/docs/components/content/DocsHeroHeader.vue deleted file mode 100644 index a17fe75368..0000000000 --- a/docs/components/content/DocsHeroHeader.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsHomeSection.vue b/docs/components/content/DocsHomeSection.vue deleted file mode 100644 index 458b4fe561..0000000000 --- a/docs/components/content/DocsHomeSection.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsIcon.vue b/docs/components/content/DocsIcon.vue deleted file mode 100644 index 1bff390fb0..0000000000 --- a/docs/components/content/DocsIcon.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/docs/components/content/DocsIconSizingTable.vue b/docs/components/content/DocsIconSizingTable.vue deleted file mode 100644 index 6895ba4858..0000000000 --- a/docs/components/content/DocsIconSizingTable.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/docs/components/content/DocsIconTable.vue b/docs/components/content/DocsIconTable.vue deleted file mode 100644 index 51c35ab69c..0000000000 --- a/docs/components/content/DocsIconTable.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsImageExample.vue b/docs/components/content/DocsImageExample.vue deleted file mode 100644 index ee7380693f..0000000000 --- a/docs/components/content/DocsImageExample.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsLayerStyleTable.vue b/docs/components/content/DocsLayerStyleTable.vue deleted file mode 100644 index c91e5fd389..0000000000 --- a/docs/components/content/DocsLayerStyleTable.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsLink.vue b/docs/components/content/DocsLink.vue deleted file mode 100644 index ccd82aa844..0000000000 --- a/docs/components/content/DocsLink.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsModuleInfo.vue b/docs/components/content/DocsModuleInfo.vue deleted file mode 100644 index bf2da9527a..0000000000 --- a/docs/components/content/DocsModuleInfo.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsModuleNavigation.vue b/docs/components/content/DocsModuleNavigation.vue deleted file mode 100644 index e3a147cfda..0000000000 --- a/docs/components/content/DocsModuleNavigation.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsNavLink.vue b/docs/components/content/DocsNavLink.vue deleted file mode 100644 index bb2fc5c9cd..0000000000 --- a/docs/components/content/DocsNavLink.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsPageHeader.vue b/docs/components/content/DocsPageHeader.vue deleted file mode 100644 index a80e75f7c9..0000000000 --- a/docs/components/content/DocsPageHeader.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsSwatch.vue b/docs/components/content/DocsSwatch.vue deleted file mode 100644 index 04717e2bf5..0000000000 --- a/docs/components/content/DocsSwatch.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsThemeChooser.vue b/docs/components/content/DocsThemeChooser.vue deleted file mode 100644 index 3d03ac21f4..0000000000 --- a/docs/components/content/DocsThemeChooser.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsTypeClassTable.vue b/docs/components/content/DocsTypeClassTable.vue deleted file mode 100644 index fc30e5edbd..0000000000 --- a/docs/components/content/DocsTypeClassTable.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsTypeTable.vue b/docs/components/content/DocsTypeTable.vue deleted file mode 100644 index 931778ea9d..0000000000 --- a/docs/components/content/DocsTypeTable.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/docs/components/content/DocsWhatsNew.vue b/docs/components/content/DocsWhatsNew.vue deleted file mode 100644 index 30cf05d28a..0000000000 --- a/docs/components/content/DocsWhatsNew.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/docs/components/content/Prose/ProseA.vue b/docs/components/content/Prose/ProseA.vue deleted file mode 100644 index a5ffd9621b..0000000000 --- a/docs/components/content/Prose/ProseA.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/docs/components/content/Prose/ProseBlockquote.vue b/docs/components/content/Prose/ProseBlockquote.vue deleted file mode 100644 index ed44f18bf7..0000000000 --- a/docs/components/content/Prose/ProseBlockquote.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/docs/components/content/Prose/ProseCode.vue b/docs/components/content/Prose/ProseCode.vue deleted file mode 100644 index 5cb4d0a6e8..0000000000 --- a/docs/components/content/Prose/ProseCode.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/docs/components/content/Prose/ProseH2.vue b/docs/components/content/Prose/ProseH2.vue deleted file mode 100644 index 4467c30c5d..0000000000 --- a/docs/components/content/Prose/ProseH2.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/docs/components/content/Prose/ProseH3.vue b/docs/components/content/Prose/ProseH3.vue deleted file mode 100644 index f72a49ec98..0000000000 --- a/docs/components/content/Prose/ProseH3.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/docs/components/content/Prose/ProseH4.vue b/docs/components/content/Prose/ProseH4.vue deleted file mode 100644 index 2db4c94bf0..0000000000 --- a/docs/components/content/Prose/ProseH4.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/docs/components/content/Prose/ProseHr.vue b/docs/components/content/Prose/ProseHr.vue deleted file mode 100644 index 57bbcef6cb..0000000000 --- a/docs/components/content/Prose/ProseHr.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/docs/components/content/Prose/ProsePre.vue b/docs/components/content/Prose/ProsePre.vue deleted file mode 100644 index 56c3027c42..0000000000 --- a/docs/components/content/Prose/ProsePre.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - diff --git a/docs/components/content/Prose/ProseTable.vue b/docs/components/content/Prose/ProseTable.vue deleted file mode 100644 index e9b9ae7002..0000000000 --- a/docs/components/content/Prose/ProseTable.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/docs/composables/useDocsNavigation.ts b/docs/composables/useDocsNavigation.ts deleted file mode 100644 index cfb579799e..0000000000 --- a/docs/composables/useDocsNavigation.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { ContentNavigationItem } from '@nuxt/content' -import { IRplVerticalNavItem } from '~~/../packages/ripple-ui-core/src/components/vertical-nav/constants' - -export const useDocsNavigation = async ( - slug: string[] -): Promise => { - const route = useRoute() - - const routePath = computed(() => { - return route.path.replace(/\/$/, '') - }) - - const isActive = (nuxtNavItem: ContentNavigationItem) => { - if (nuxtNavItem.children && nuxtNavItem.children.length) { - return routePath.value.startsWith(nuxtNavItem.path) - } - - return routePath.value === nuxtNavItem.path - } - - const transformToRplNavFormat = ( - nuxtNavItem: ContentNavigationItem - ): IRplVerticalNavItem => { - return { - id: nuxtNavItem.path, - text: nuxtNavItem.title, - url: nuxtNavItem.path, - active: isActive(nuxtNavItem), - items: nuxtNavItem.children - ? nuxtNavItem.children - .filter((child) => child.path !== nuxtNavItem.path) - .map(transformToRplNavFormat) - : undefined - } - } - - const { data: nav } = await useAsyncData( - `navigation-${slug.join('-')}`, - () => { - const query = queryCollectionNavigation('content') - if (!import.meta.dev) { - query.where('published', '=', true) - } - return query - }, - { - transform: (data) => { - return data.find((item) => item.path === `/${slug.join('/')}`) - } - } - ) - - return (nav.value?.children || []).map(transformToRplNavFormat) -} - -export default useDocsNavigation diff --git a/docs/composables/useModulesNavigation.ts b/docs/composables/useModulesNavigation.ts deleted file mode 100644 index ae8528ba05..0000000000 --- a/docs/composables/useModulesNavigation.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { IRplVerticalNavItem } from '~~/../packages/ripple-ui-core/src/components/vertical-nav/constants' - -export const useModulesNavigation = async (): Promise< - IRplVerticalNavItem[] | [] -> => { - const route = useRoute() - - const { data: nav } = await useAsyncData('modules-navigation', () => { - return queryCollection('modules').all() - }) - - return (nav.value || []).map( - (item): IRplVerticalNavItem => ({ - id: item.id, - text: item.name, - url: item.meta.path?.replace(/\/module$/, ''), - active: item.meta.path?.startsWith(route.path) - }) - ) -} - -export default useModulesNavigation diff --git a/docs/content.config.ts b/docs/content.config.ts deleted file mode 100644 index 15817b5b19..0000000000 --- a/docs/content.config.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { defineContentConfig, defineCollection, z } from '@nuxt/content' - -export default defineContentConfig({ - collections: { - content: defineCollection({ - type: 'page', - source: { - include: '**/*.md', - exclude: ['**/_*/**'] - }, - schema: z.object({ - published: z.boolean().default(true), - path: z.string(), - title: z.string(), - layout: z.string(), - description: z.string(), - icon: z.string().optional(), - label: z.string().optional(), - content: z.record(z.any()).optional(), - links: z - .array( - z.object({ - text: z.string(), - url: z.string().url() - }) - ) - .optional(), - seo: z.object({ - title: z.string().optional(), - description: z.string().optional(), - meta: z.array(z.record(z.string(), z.any())).optional(), - link: z.array(z.record(z.string(), z.any())).optional() - }) - }) - }), - modules: defineCollection({ - type: 'data', - source: 'framework/**/@dpc-sdp-*/module.json', - schema: z.object({ - name: z.string(), - description: z.string(), - packageName: z.string(), - sourceUrl: z.string().url(), - issuesUrl: z.string().url(), - contributor: z.object({ - name: z.string(), - url: z.string().url() - }), - meta: z.object({ - title: z.string(), - path: z.string() - }) - }) - }) - } -}) diff --git a/docs/content/1.index.md b/docs/content/1.index.md deleted file mode 100644 index 3a275ce04e..0000000000 --- a/docs/content/1.index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Ripple Design System -description: 'Ripple is the design system for Victorian government digital products' -icon: carbon:home -layout: home -content: - primaryCTA: - title: For Designers - description: Information for designers using Ripple to create brand Victoria compliant digital experiences. - image: - src: /assets/img/for-designers.png - alt: 'Graphical display of web components' - url: /design-system/design/getting-started - secondaryCTA: - title: For Developers - description: How to get started implementing Ripple UI components in digital products. - image: - src: /assets/img/for-developers.png - alt: 'Graphical display of HTML tags' - url: /design-system/develop/getting-started - quickLink1: - title: About Ripple - description: Ripple is a system of reusable styles, components, patterns and tools for creating Victorian government digital experiences. - url: /design-system/about/what-is-ripple - quickLink2: - title: Who should use it - description: Ripple is built by government for government to deliver services Victorians trust and rely on. - url: /design-system/about/whos-it-for - quickLink3: - title: Design principles - description: The guiding principles that are the foundation of the Ripple Design System. - url: /design-system/design/our-design-principles - framework: - title: Ripple framework - description: Ripple framework contains the tools for building SDP sites using Ripple design system components. - url: /framework ---- diff --git a/docs/content/design-system/1.about/1.what-is-ripple.md b/docs/content/design-system/1.about/1.what-is-ripple.md deleted file mode 100644 index 5393ac5e29..0000000000 --- a/docs/content/design-system/1.about/1.what-is-ripple.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: What is Ripple? -description: Ripple is the digital design system of the Victorian government -layout: page ---- - -Ripple is a system of reusable styles, components, patterns and tools for building brand Victoria digital products. - -Developed by the Single Digital Presence (SDP) team in the Department of Government Services, Ripple: -- makes it easier for citizens to **find**, **understand** and **use** government information -- makes creating Brand Victoria approved content, assets and sites easy -- increases delivery speed for digital products and services. - -Over 50 government websites use Ripple, including our main [vic.gov.au](https://www.vic.gov.au) platform. These sites attract millions of views per month. - - -![Screenshots of websites using SDP, vic.gov.au, police.vic.gov.au, health.vic.gov.au, legislation.vic.gov.au](/assets/img/sites.png){.docs-center-img} - -## Why use Ripple? - -### Ripple solves the hard problems so you don’t have to - -We spent the past 5 years refining Ripple based on user feedback to ensure it: -- meets the publishing needs of government users -- makes it easier for citizens to interact with government services. - -Ripple users can be confident their site’s design and development is based on industry standards and best practices for: -- accessibility -- SEO -- security -- performance. - -Users can easily navigate sites regardless of technical ability, location or device. - -Designers and developers can create consistent digital experiences across Victorian Government sites. - -### Ripple gives you efficient and reusable digital resources - -Ripple promotes efficiency and reuse by providing reusable styles, components and patterns. - -It provides a set of standards to manage design at scale, to: -- reduce redundancy -- create a shared language -- provide visual consistency. - -Developer contributions can be shared across projects, adding value to all government departments. This results in reduced project development time and expense. - -### Ripple is by government, for government - -The Ripple Design System has been made open-source to foster collaboration across government. By making the system open-source, departments and agencies can help improve the citizen experience across government. Ripple has been developed by government, for government and retains all intellectual property and expertise. - -## Who can use Ripple? - -Ripple is open to all departments or agencies that use Victorian Government branding. Visit the [Who's it for?](/design-system/about/whos-it-for) page for more information. - -Ripple is a modular system, allowing it to be used separately from our other SDP products, Tide and Bay. Visit the [Usage](/design-system/develop/usage) page for more information. - - -## How do I find out more? - -If you are a Victorian Government department or agency wanting to use Ripple in a Brand Victoria digital product (or a vendor supporting them), please visit [https://www.vic.gov.au/work-sdp](https://www.vic.gov.au/work-sdp) or contact digital@dpc.vic.gov.au. - -To find out more about the Single Digital Presence program, please visit [https://www.vic.gov.au/single-digital-presence](https://www.vic.gov.au/single-digital-presence). diff --git a/docs/content/design-system/1.about/2.whos-it-for.md b/docs/content/design-system/1.about/2.whos-it-for.md deleted file mode 100644 index b7d4081997..0000000000 --- a/docs/content/design-system/1.about/2.whos-it-for.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Who's it for? -description: Built by government, for government. -layout: page ---- - -## Who can use Ripple? - -Ripple is available to all departments and agencies that use Victorian Government branding. -- **Designers** can easily and quickly create wireframes, high-fidelity designs and prototypes. -- **Developers** can access technical specifications to create pixel-perfect code. -- **Content creators** can design page concepts, knowing their layouts will accurately reflect the finished product. -- **Product owners** and stakeholders can review designs and provide feedback. - -## What should I use Ripple for? - -Ripple is designed to make websites that give Victorian citizens official information about their government. It is mainly used by Victorian Government departments and agencies to build websites using the [Single Digital Presence (SDP)](https://www.vic.gov.au/single-digital-presence) platform. - -Ripple makes it easy to share government information with all Victorians in a clear, concise and accessible way. - -Since it is only used to build government websites, Ripple has been designed to support Brand Victoria digital products. This opinionated design means Ripple automatically guides you to create a digital experience for citizens that is in line with Brand Victoria’s look, feel and vision. - -It also means Ripple is not a general purpose design system for use outside of Brand Victoria. - -> Ripple is for Victorian Government branded products only. Only use it to create communications that are approved to use the Victorian Government brand. - -## How do I use Ripple? - -Ripple is a modular design system. This means Ripple lets you easily change and expand your website’s layout and content. - -It also means you can use different parts of the Ripple Design System, like components or styles, separately. Departments that don’t use the SDP platform can still use Ripple in their own digital products. You can do this by: -- building your own components -- referencing the Ripple styles -- importing the Ripple components. - -Visit the [Usage](/design-system/develop/usage) page for instructions. diff --git a/docs/content/design-system/1.about/3.getting-support.md b/docs/content/design-system/1.about/3.getting-support.md deleted file mode 100644 index d636337e43..0000000000 --- a/docs/content/design-system/1.about/3.getting-support.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Support -description: How to get help -layout: page ---- - -The [Ripple design system](https://www.vic.gov.au/ripple-design-system) is maintained by the [Single Digital Presence (SDP)](https://www.vic.gov.au/single-digital-presence) team at the Victorian Department of Government Services. - -You can reach out to us via the following channels: - -### For technical and project support - -- join the discussion on [GitHub](https://github.com/dpc-sdp/ripple-framework/discussions) -- log a request through our [helpdesk](https://digital-vic.atlassian.net/servicedesk/customer/portals) -- sign up to the [SDP Slack](https://vic-sdp.slack.com) (Open to projects with an MoU for application support) - -## Design enquiries - -Email: design@dpc.vic.gov.au - -## General enquiries - -[Raise a request](https://digital-vic.atlassian.net/servicedesk/customer/portal/14/group/113/create/497) diff --git a/docs/content/design-system/1.about/4.contributing.md b/docs/content/design-system/1.about/4.contributing.md deleted file mode 100644 index 74d126b50e..0000000000 --- a/docs/content/design-system/1.about/4.contributing.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Contributing -description: Found an issue? -layout: page ---- - -The [Ripple design system](https://www.vic.gov.au/ripple-design-system) and [Ripple framework](/framework) are open source and released under an Apache 2.0 License. - -Ripple is maintained by the [Single Digital Presence (SDP)](https://www.vic.gov.au/single-digital-presence) team at the Victorian Department of Government Services. -If you are a Victorian Government department or agency (or a vendor supporting them) and wish to suggest improvements to Ripple that would benefit the project there are several options outlined below. - -To propose a change, you will need to have a free GitHub account. Please see the [GitHub docs](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account) to create one if you haven't already. - - -## Submit a bug report - -If you have encountered an issue that you think is a bug, help us fix it for everyone! To log a bug report please do the following: - -- Check existing the [discussions](https://github.com/dpc-sdp/ripple-framework/discussions) and [issues](https://github.com/dpc-sdp/ripple-framework/issues) to see if the issue has already been discussed. -- Fill out the [bug report issue template](https://github.com/dpc-sdp/ripple-framework/issues/new?assignees=dylankelly&labels=bug&template=bug_report.yml&title=[BUG]) - - -## Documentation changes - -Seen an issue with this documentation site? You can either describe it in an issue so the dev team can review it, or propose an edit directly by creating a Pull request with the proposed change. - -### To create an issue: - -To log a docs site issue please do the following - -- Log in to GitHub -- [Log an issue on the GitHub Repository](https://github.com/dpc-sdp/ripple-framework/issues/new?assignees=dylankelly&labels=docs&template=docs.yml&title=[DOCS]) -- Fill in the form, providing as much detail as possible - - -### To propose an edit directly - -See the [GitHub docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for more information about creating a pull request. - -- Log in to GitHub -- Click the "Propose a change to this page on GitHub" link at the bottom of each content page -- Make a change to the markdown in the editor. See https://www.markdownguide.org/ for information on syntax -- Describe the change in the commit message -- Create a new pull request from the "forked" version of the repository -- This pull request will be reviewed by the SDP development team and we may ask for changes or revisions. -- If the Pull Request is approved it will be merged and included in the next Ripple release. - -## Propose a new feature - -If you have a proposal for a new feature to the Ripple design system please see https://www.vic.gov.au/ripple-design-system#enquiries-and-support - -For development partners wishing to propose a new feature to Ripple Framework please do the following: - -- Check existing the [discussions](https://github.com/dpc-sdp/ripple-framework/discussions/categories/feature-proposals-rfc) and [issues](https://github.com/dpc-sdp/ripple-framework/issues) to see if the the proposal has already been discussed. The discussion board is a great place to bring up new ideas for discussion without having to write up a full proposal. -- If you are confident that the feature is something worth progressing, please fill out the [New feature proposal](https://github.com/dpc-sdp/ripple-framework/issues/new?assignees=dylankelly&labels=bug&template=feature-request.yml&title=[PROPOSAL]) diff --git a/docs/content/design-system/2.design/1.getting-started.md b/docs/content/design-system/2.design/1.getting-started.md deleted file mode 100644 index c4bb21e25d..0000000000 --- a/docs/content/design-system/2.design/1.getting-started.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Getting started -description: -layout: page ---- - -Ripple is the design system for Victorian Government digital products. The Ripple Design System makes websites and other digital products look and feel like part of the vic.gov.au brand. - -The Ripple Design System creates an accessible and consistent visual user interface across all our digital products. This helps citizens trust they are visiting an official source of Victorian Government information. - -It also provides a single source of truth when choosing styles, components and patterns for Single Digital Presence (SDP) websites. - -The Ripple Design System offers tools users can apply, adapt and expand to create a vic.gov.au-branded digital experience. These include: - -- **styles** - foundations of colour, typography, spacing, motion and graphic devices that communicate the Victorian Government’s visual identity -- **components** - customisable parts (including base components) that give a website its functionality and, when combined with styles, user interface -- **guidance** - detailed instructions for designers and and developers on using Ripple 2.0 styles, components and other Ripple tools to create consistent digital experiences. - -## First steps - -Some key areas of the Ripple Design System that will help you create your digital product. - -- [Design tokens](/design-system/design/design-tokens) -- [Sign up for access to the Ripple 2.0 Figma file](https://www.vic.gov.au/ripple-design-system#request-access-to-the-design-system) -- [Theming](/design-system/design/theming-guidance-for-designers) - -## The Ripple 2.0 Figma file - -Ripple 2.0 Design System is available in [Figma](https://www.figma.com/). It contains all the design assets needed to design, prototype and share. - -Only use the Figma file in conjunction with the Ripple 2.0 guidance about the component or style you are using. Read the guidance to understand the usage and behaviour of styles and components. - -**To create quality user experiences, do not use the Figma file in isolation.** This is important because the Ripple Design System provides more than a website’s appearance. It encompasses developer, user experience, inclusive design and other human-centred design considerations. For example, Ripple automatically ensures accessible colour pairings, cross-browser functionality and consistent error messaging. Using the Figma file without Ripple guidance will confuse users and degrade your site’s accessibility and functionality. - -### Figma file access - -1. **Sign up to Figma** - - Create a free [Figma Starter account](https://www.figma.com/pricing/). - -2. **Install Ripple font** - - Ripple uses the VIC font family. - - [Download and install VIC](https://www.vic.gov.au/brand-victoria-fonts) to use this typeface in Figma. - -3. **Request access to Ripple Figma file** - - Ripple has been built as a Figma project. - - [Request access to the Ripple 2.0 Design System](https://www.vic.gov.au/ripple-design-system#request-access-to-the-design-system). - - You will receive access to the Ripple Design System Figma file. - -4. **Add Ripple to your Figma account** - - Add the Ripple 2.0 Design System Figma file to your Figma account. - -5. **Set up Asset Library** - - In your Figma account, go to the Getting Started page. - - Follow these instructions to set up the Asset Library. diff --git a/docs/content/design-system/2.design/2.our-design-principles.md b/docs/content/design-system/2.design/2.our-design-principles.md deleted file mode 100644 index c077e04af7..0000000000 --- a/docs/content/design-system/2.design/2.our-design-principles.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Our design principles -description: There are 4 design principles that are the foundation of the Ripple Design System. -layout: page -label: Core ---- - -There are 4 design principles that underpin the Ripple Design System: - -- Inclusive. -- Efficient. -- Flexible. -- Easy. - -The Ripple Design System uses these principles when making design decisions. - -## Inclusive - -- Accessibility is top priority. -- Collaborative in design. -- Transparent documentation. -- Friendly, helpful and trustworthy. - -Include all users, abilities and backgrounds in the process and design intent. - -Support best practices, provide guidance and build trust with the community. - -## Efficient - -- Less is more. -- Clean and clear. -- Considered. -- Economic design. - -Think holistically to create considered sustainable outcomes that make sense to all users. - -Increase efficiencies while reducing complexities and risks. - -## Flexible - -- Responsive to data. -- Responsive to sub-brands. -- Considers context. -- Iterative improvements. - -Use meaningful evidence to improve impact and add value. - -Find improvement opportunities that elevate the experience for multiple contexts and end users. - -## Easy - -Easy to: -- contribute to -- learn and understand -- create and recreate -- find information. - -Consider the needs and experiences of end users of Victorian digital products. - -Make the Ripple experience easy to use. Create experiences and contribute to the design system with end users in mind. diff --git a/docs/content/design-system/2.design/3.design-tokens.md b/docs/content/design-system/2.design/3.design-tokens.md deleted file mode 100644 index 78dbdaa916..0000000000 --- a/docs/content/design-system/2.design/3.design-tokens.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Design tokens -description: Design tokens store our design decisions in the Ripple Design System. They are the single source of truth. -layout: page -label: Core ---- - -## What is a Design token? - -Design tokens store our design decisions that, together, make up the Ripple Design System’s visual style. - -Tokens apply values in a consistent, reusable and scalable way. They ensure the same style values are used across design files and code. - -By storing design decisions, they replace the need to use static values (for example, hex code values for colour). - -Ripple Design System has tokens for: - -- colour -- typography -- spacing -- elevation -- borders -- motion values. - -## Why use design tokens? - -Using design tokens keeps your UI consistent across different platforms. - -Design tokens are the single source of truth. You can use them across designs and code. - -Since design tokens let you make value changes at scale, design language changes are easier to make. - -Design tokens aren't hard-coded. Avoiding hard-coded values in your design system makes it easier to build, maintain and scale products. - -## Ripple design tokens - -A Ripple token has 2 parts: - -- a token name, such as **rpl-clr-primary** -- an associated value, such as **#0052C2**. - -The token's value can be one of several things: colour, a typeface, a measurement or even another token. - -## How to read Ripple design token names - -Knowing how to read a token name helps you find the right token faster. - -### Parts of design token names - -1. **rpl**: design system -2. **clr** (colour) or **type** (typography) or **sp** (spacing) for example: token type -3. **primary-accessible** (a descriptive name) or **3** (a number), for example: see below - -### Examples - -- **rpl-clr-primary-accessible** -- **rpl-sp-4** - -### Steps and explanations - -1. Start all design tokens with the system name: **rpl** is for Ripple. -2. Then, place an abbreviation for the token type: **clr** is for colour; type is for typography; **sp** is for spacing. -3. End the token name with a descriptive name or number to show the token’s role relative to other Ripple design tokens. For example, **primary-accessible** in rpl-clr-type-primary-accessible shows this is a colour token that applies one of Ripple’s primary colours (from the colour palette available in Ripple Design System) and is suitable for accessible content. **4** in rpl-sp-4 shows this is a spacing token where 4 is the fourth spacing step (16x), in size order, from the spacing options available in the Ripple Design System. - -## Best practices - -- Choose tokens based on meaning rather than appearance only -- Choose the token with the most specific meaning that is available and applies to your content’s role on the site -- Do not choose tokens based only how the end result looks on your site -- For example, for a heading, it is important to choose rpl-type-h3 (heading token) instead of a rpl-type-p-large (type token), even though the end result looks similar -- For example, if your content needs to be accessible and a certain colour, you should pick rpl-clr-type-primary-accessible instead of rpl-clr-primary -- Don't pick a token just because the colours seem to match - this can break the consistency across other themes and confuse the user’s experience -- If you do choose tokens based on appearance only, updates to themes, colours, or other features will not apply properly or consistently later - -## Why are tokens important for design? - -### Purpose-driven - -Tokens can be created with a specific purpose or goal in mind. For example, improve accessibility, enhance visual consistency or make it easier to update and maintain a website or app. - -Since tokens are purpose-driven, designers and developers can make system-wide updates focused on achieving specific purposes. For example, systematically apply a high-contrast colour scheme for improved visibility, or change the type scale. - -### Single source of truth - -Design tokens are like reusable building blocks. They give a design system a single source of truth for making changes to the way a website looks and works. - -Having a single source of truth lets a design system implement features like global theming, responsive design and user customisation. - -### System-wide updates - -They let developers and designers change system-wide themes and contexts, using only a single update. - -Design tokens prevent or reduce the need to find and replace thousands of instances of hard-coded values in the code. - -## For developers - -For information for developers using tokens to theme Ripple components see the [theming guide](/design-system/develop/theming) diff --git a/docs/content/design-system/2.design/4.theming-guidance-for-designers.md b/docs/content/design-system/2.design/4.theming-guidance-for-designers.md deleted file mode 100644 index 99af6ce831..0000000000 --- a/docs/content/design-system/2.design/4.theming-guidance-for-designers.md +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: Theming guidance for designers -description: -layout: page -label: Core ---- - -Jump to: -- [Create a custom theme](/design-system/design/theming-guidance-for-designers/#create-a-custom-theme). -- [Component-specific theming](/design-system/design/theming-guidance-for-designers/#component-specific-theming). -- [Theme accessibility](/design-system/design/theming-guidance-for-designers/#theme-accessibility). -- [Automatic colour token logic](/design-system/design/theming-guidance-for-designers/#automatic-colour-token-logic). - ---- - -Ripple 2.0 has been designed with in-built custom theming capabilities. Theming can be applied if your site requires department or entity branding and has been approved to use theming. Please note it is recommend you utilise the brand equity of vic.gov.au where possible and only theme your site if needed and approved. Please contact the SDP team for more information on approvals for theming. - -Ripple uses primary and accent colours, an optional gradient, a link colour and a focus state colour. You can read more about their roles and uses in the colour documentation. - -When theming your site, its styles and components will re-theme automatically. This has been done through the use of design tokens. Design tokens represent repeated design decisions that make up a design system's visual style. Tokens replace static values, such as hex codes for colour. The token informs how colour is used and inherited to ensure a consistent and accessible user experience. - -We’ve designed a colour testing process so the selected colours will pass the accessibility contrast ratios. It classifies the selected colours into a ‘light’ or ‘dark’ category. The colour system will then automatically provide accessible colour contrast. - -We have aimed to conform to the Web Content Accessibility Guideline (WCAG) requirements, but we recommend you perform your own accessibility checks where possible to ensure the guidelines are being met. - -To learn more about if your site should be themed, please contact the Single Digital Presence (SDP) team. - ---- - -## Create a custom theme -Ripple has been designed with a primary and accent colour. These inform the colour framework. - -A link colour, focus colour and optional gradient are also required when theming. - -The primary, accent and focus colours can be either light or dark: -- 'Light' means the colour is WCAG 2.1 AA compliant with dark type (rpl-clr-dark / #1A1A1A). -- ‘Dark’ means the colour is WCAG 2.1 AA compliant with light type (rpl-clr-light / #FFFFFF). - -To classify your colour as light or dark, we recommend the use [WebAim Colour Contrast Checker](https://webaim.org/resources/contrastchecker/) or the [Figma plugin, A11y - Colour Contrast Checker](https://www.figma.com/community/plugin/733159460536249875) to see if the colour is accessible with the Ripple 2.0 dark or light type colours listed above. - -Classifying colours as either ‘dark’ or ‘light’ informs the implementation of other colour tokens, aiming to conform to WCAG 2.1 AA colour contrast requirements. - -It is recommended that the primary colour is always visually darker than the accent and is visually different at glance. This will ensure your users are quickly and easily directed to the most important areas of a web page. - -Guidance for creating your own theme can be found on the Theming page of the [Ripple 2.0 Design System Figma file](https://www.figma.com/file/mgPlLh5IFKAkDoSID9Vpi1/Ripple-2.0?type=design&node-id=9557%3A70609&t=dK1cmsWLfSmpr9Ff-1). - -If you don’t have access, you can [request access to view the Ripple 2.0 Design System](https://www.vic.gov.au/ripple-design-system). - ---- - -## Component-specific theming -The Ripple 2.0 Design System has components that allow for specific theming. This is optional and if not used, components will adopt the default framework styling. Component-specific theming is defined at a site level, and will affect all instances of the component. - -There are 2 options for component-specific styling: -- neutral -- custom. - -### Neutral -Neutral can be applied to the following components: -- buttons -- header (only reverse and image variants) -- footer. - -The colour of neutral component variants cannot be changed. Neutral components have predefined neutral styling and cannot be edited or customised. - -### Custom -Custom component theming can only be applied to the footer. - -The footer has been created with component-specific design tokens. It is recommended custom theming is only done if required. - -To learn more about custom styling please see the Theming page of the [Ripple 2.0 Design System Figma file](https://www.figma.com/file/mgPlLh5IFKAkDoSID9Vpi1/Ripple-2.0?type=design&node-id=9557%3A70609&t=dK1cmsWLfSmpr9Ff-1). - ---- - -## Theme accessibility -Ripple 2.0 has been designed with the aim to conform to WCAG 2.1 AA standards (below). For websites built on the SDP platform, it is mandatory to meet WCAG 2.1 AA level standards. These accessibility standards are also strongly recommended for all Victorian Government communications built using the Ripple design system (see: [Brand Victoria guidelines](https://www.vic.gov.au/brand-victoria-guidelines-logos) for more information). - -Colour contrast is the amount of perceived difference between 2 colours. This is represented as a ratio. A high ratio indicates greater difference between colours and therefore higher contrast. - -Colour contrast impacts the readability of your content. It is important for users with low vision or a colour vision deficiency. - ->[1.4.3 Contrast Minimum (Level AA)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) ->The visual presentation of [text](https://www.w3.org/TR/WCAG21/#dfn-text) and [images of text](https://www.w3.org/TR/WCAG21/#dfn-images-of-text) has a [contrast ratio](https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio) of at least 4.5:1, except for the following: -> ->[Large-scale](https://www.w3.org/TR/WCAG21/#dfn-large-scale) text and images of large-scale text have a contrast ratio of at least 3:1; -> ->Text or images of text that are part of an inactive [user interface component](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components), that are [pure decoration](https://www.w3.org/TR/WCAG21/#dfn-pure-decoration), that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement. -> ->Text that is part of a logo or brand name has no contrast requirement. - -### Accessibility testing requirements -When testing, websites on the SDP platform are required to meet AA standards. Your website must meet a [minimum contrast ratio of 4:5:1](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) for normal text contrast, 3:1 for large text and non-text elements must be met. - -Links are required to meet a ratio of 4.5:1 colour contrast. - -In the Ripple 2.0 Design System the primary, accent and focus colours are tested against: -- dark type / rpl-clr-dark / #1A1A1A -- light type / rpl-clr-light / #FFFFFF. - -The link colour is tested against 3 colours: -- light type / rpl-clr-light / #FFFFFF -- rpl-clr-neutral-100 / #F5F5F5 -- rpl-clr-accent-alt / #E6F5FD (example hex only). - -Colour vision deficiency: it is recommended to also test your colour palette for colour blindness. Some colours can appear similar to people with colour vision deficiency. We recommend using the [Figma plugin 'Color Blind'](https://www.figma.com/community/plugin/733343906244951586). - ---- - -## Colour token automatic logic -Below is a full list of colour tokens required to theme the Ripple 2.0 Design System. - -Aiming to meet WCAG 2.1 AA colour contrast requirements, some token values are automatic based on their use in the system. This ensures all text-based content meets colour contrast accessibility requirements. -For example, if the primary colour is classified as dark: -- rpl-clr-type-primary-contrast will automatically be rpl-clr-light -- rpl-clr-type-primary-accessible will automatically be rpl-clr-primary. - -### Core - -| Token | Custom / Automatic | -|-----------------------------|----------------------------------------| -| rpl-clr-primary | Custom | -| rpl-clr-primary-alt | Custom | -| rpl-clr-primary-alpha | Automatic (based on ‘rlp-clr-primary') | -| rpl-clr-accent | Custom | -| rpl-clr-accent-alt | Custom | -| rpl-clr-focus | Custom | -| rpl-clr-link | Custom | -| rpl-clr-gradient-horizontal | Custom | -| rpl-clr-gradient-vertical | Custom | - -### Typography colour tokens - -| Token | Custom / Automatic | -|-------------------------------------|--------------------------------------------------------------| -| rpl-clr-type-primary-contrast | Automatic (based on ‘rlp-clr-primary’ contrast requirements) | -| rpl-clr-type-primary-contrast-alpha | Automatic (based on ‘rlp-clr-type-primary-contrast') | -| rpl-clr-type-accent-contrast | Automatic (based on ‘rlp-clr-accent’ contrast requirements) | -| rpl-clr-type-primary-accessible | Automatic (based on ‘rlp-clr-primary’ contrast requirements) | -| rpl-clr-type-primary-alt-accessible | Automatic (based on ‘rlp-clr-primary’ contrast requirements) | -| rpl-clr-type-focus-contrast | Automatic (based on ‘rlp-clr-focus’ contrast requirements) | - -### Footer-specific (optional) -See: [component-specific theming](/design-system/design/theming-guidance-for-designers/#component-specific-theming). - -| Token | Custom / Automatic | -|--------------------------------|-------------------------------------------------------------| -| rpl-clr-footer | Custom or automatic | -| rpl-clr-footer-alt | Custom or automatic | -| rpl-clr-footer-contrast | Automatic (based on ‘rlp-clr-footer’ contrast requirements) | -| rpl-clr-type-footer-accessible | Automatic (based on ‘rlp-clr-footer’ contrast requirements) | - ---- - -## Automatic Colour Token Logic -Based on the colour contrast requirements for the primary, accent and focus colours, some tokens are automatic to aim to conform to WCAG 2.0 AA colour contrast accessibility. -- ‘Light’ means the colour (for example, primary) is AA compliant with dark type (rpl-clr-dark / #1A1A1A). -- ‘Dark’ means the colour (for example, primary) is AA compliant with light type (rpl-clr-light / #FFFFFF). - -### Primary, Access, Focus and Link - -#### Primary - -| Token | Colour ‘Dark’ | Colour 'Light | -|-------------------------------------|----------------------------------------------|----------------------------------------------| -| rpl-clr-primary-alpha | rpl-clr-primary at 50% opacity | rpl-clr-primary at 50% opacity | -| rpl-clr-type-primary-contrast | rpl-clr-light | rpl-clr-dark | -| rpl-clr-type-primary-contrast-alpha | rpl-clr-type-primary-contrast at 75% opacity | rpl-clr-type-primary-contrast at 75% opacity | -| rpl-clr-type-primary-accessible | rpl-clr-primary | rpl-clr-dark | -| rpl-clr-type-primary-alt-accessible | rlpl-clr-primary-alt | rpl-clr-dark | - -#### Accent - -| Token | Colour ‘Dark’ | Colour 'Light | -|------------------------------|---------------|---------------| -| rpl-clr-type-accent-contrast | rpl-clr-light | rpl-clr-dark | - -#### Focus - -| Token | Colour ‘Dark’ | Colour 'Light | -|-----------------------------|---------------|---------------| -| rpl-clr-type-focus-contrast | rpl-clr-light | rpl-clr-dark | - -#### Link - -| Token | Colour ‘Dark’ | Colour 'Light | -|--------------|---------------------|----------------------| -| | _If Primary ‘Dark’_ | _If Primary ‘Light’_ | -| rpl-clr-link | rpl-clr-primary | Custom | - -### Gradient -Including a gradient is optional for theming. - -If a gradient is not used, 'rpl-clr-accent' will be used in its place. - -#### Gradient - -| Token | Gradient | Accent | -|-----------------------------|--------------------------------|----------------| -| rpl-clr-gradient-horizontal | rpl-clr-gradient (90 degrees) | rpl-clr-accent | -| rpl-clr-gradient-vertical | rpl-clr-gradient (180 degrees) | rpl-clr-accent | diff --git a/docs/content/design-system/3.develop/1.getting-started.md b/docs/content/design-system/3.develop/1.getting-started.md deleted file mode 100644 index a453ad0701..0000000000 --- a/docs/content/design-system/3.develop/1.getting-started.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Getting started -description: Information for developers using the Ripple 2 UI libraries -layout: page -links: - - text: Github - url: https://github.com/dpc-sdp/ripple-framework - - text: Storybook - url: /storybook ---- - - - -This section contains information about the Ripple user interface libraries. These libraries are a collection of UI components which implement the Ripple Design System. The components are written in Vue and are split accross two packages: -- `ripple-ui-core`: A collection of common UI components used in SDP sites. For example buttons, cards, icons and typography. -- `ripple-ui-forms`: A collection of form inputs and support for building complex forms via [Formkit](https://formkit.com/) - - -> **These docs are for Ripple 2** -> -> Ripple 2 is a complete rebuild. If you are looking for information about the previous version of Ripple please visit the [original Ripple GitHub repo](https://github.com/dpc-sdp/ripple). - -> **Are you developing a site on the SDP platform?** -> -> This section is about the Ripple UI component libraries, and there is a lot more to developing a site on the Single Digital Presence (SDP) stack that is not covered here. -> -> For information about using Ripple in SDP sites, visit the [Ripple Framework for SDP documentation](/framework) - -## Accessing the Source code - -Ripple 2 is an open source project and the source code can be found in the [ripple-framework monorepo on Github](https://github.com/dpc-sdp/ripple-framework). - -This monorepo contains a lot more than just the UI libraries so we've provided direct links to packages below: -- [View `ripple-ui-core` on Github](https://github.com/dpc-sdp/ripple-framework/tree/develop/packages/ripple-ui-core) -- [View `ripple-ui-forms` on Github](https://github.com/dpc-sdp/ripple-framework/tree/develop/packages/ripple-ui-forms) - -## Viewing examples in Storybook - -The Ripple Storybook has information about props and slots that each Vue component supports. [View the Ripple storybook](/storybook) to start exploring the available components. - -Most of the examples found on this documentation site link directly examples in storybook. - ---- - - -## Usage - - -See the [usage](/design-system/develop/usage) guide for information about getting started with the different ways of implementing Ripple. - diff --git a/docs/content/design-system/3.develop/2.contributing.md b/docs/content/design-system/3.develop/2.contributing.md deleted file mode 100644 index 7f325a7aca..0000000000 --- a/docs/content/design-system/3.develop/2.contributing.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Contributing -description: Information for developers wishing to contribute to the Ripple 2 UI libraries -layout: page ---- - -> When contributing or participating in discussions, ensure that you are following our [contributor code of conduct](https://github.com/dpc-sdp/ripple-framework/blob/develop/CODE_OF_CONDUCT.md) - -## Report an issue - -If you find an issue in Ripple, you can create an issue in github here https://github.com/dpc-sdp/ripple-framework/issues. Make sure to follow the template provided and provide plenty of detail so that your issue has a better chance of being fixed. - -Ripple is an open source project, so PRs are always welcomed if you've already found a fix for the issue. - -## Join the discussion - -Do you have an idea for a new component or feature? Use the [Discussions](https://github.com/dpc-sdp/ripple-framework/discussions) feature in Ripple Github repo to start the conversation. - -## Writing code - -If you are ready to write some code in the Ripple git repo, please see the [Contributing guide](https://github.com/dpc-sdp/ripple-framework/blob/develop/CONTRIBUTING.md) in Github. - diff --git a/docs/content/design-system/3.develop/2.theming.md b/docs/content/design-system/3.develop/2.theming.md deleted file mode 100644 index 3bca77cdc0..0000000000 --- a/docs/content/design-system/3.develop/2.theming.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Theme and brand application -description: Information for developers using Ripple 2 UI libraries -layout: page ---- - -Ripple allows for customisation of it's components to allow application of Victorian government departments and agencies brand and identity within a common framework. For guidance on how to theme Ripple in an accessible and consistent way, see the [theming guidance for designers](/design-system/design/theming-guidance-for-designers) - - -## CSS Variables - -Ripple is fully theme-able using [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties), this allows runtime customisation of site variables within all modern browsers. CSS variables form the API for allowing customisation of SDP sites by setting base tokens for your site. - -## Example - -To override theme values, simply set the CSS variable at `:root` or an element that wraps elements you want to theme. - -```css -:root { - --rpl-clr-primary: #6B19A3; -} -``` - -See the [colour](/design-system/styles/colour) page for a list of theme-able colours. - -## Assets - -Alongside the inclusion of site logos, Ripple also uses graphic devices in several key components that allow for customising to apply brand. - -See the following components for guidance on providing graphic elements to theme your site: - -- [Logos](/design-system/styles/logo) -- [Header](/design-system/components/header) - -## Brand application in SDP sites - -See the [SDP Ripple framework](/framework) section for more information on customising SDP websites and applying brand. diff --git a/docs/content/design-system/3.develop/3.usage.md b/docs/content/design-system/3.develop/3.usage.md deleted file mode 100644 index d75fbb0fa0..0000000000 --- a/docs/content/design-system/3.develop/3.usage.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Usage -description: Ripple components can be used in several different ways depending on your project needs. -layout: page -links: - - text: Github - url: https://github.com/dpc-sdp/ripple-framework - - text: Storybook - url: /storybook ---- - - -## Using Ripple UI components - -Whilst Ripple is built to implement sites using a framework built on Vue JS and Nuxt, its modular architecture allows adopting different parts depending on your requirements. - -![ripple is made up of Figma design, CSS styles, Vue JS components and Nuxt JS Sites](/assets/img/modules/rpl-modules.png) - -Ripple UI libraries are usable in the following contexts: - - - -| Library | CSS styles | Vue Components | Ripple Framework (Nuxt) | Web components | -| --------------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------- | -| Ripple UI Core | supported | supported |supported | Partial support | -| Ripple UI Forms | supported | supported |supported | not supported | - -### Using in an SDP website - -> If you are using Ripple 2 to build a site on the SDP platform, the UI libraries will be included automatically when scaffolding your project. -> -> For documentation on using Ripple with Nuxt in SDP sites, visit the [Ripple Framework documentation](/framework) - -### Github Packages - -Ripple 2 is hosted publicly on Github Packages (ghcr) under the **@dpc/sdp** namespace, please read these [setup instructions for accessing Github Packages](/design-system/develop/usage/access-to-github-packages). diff --git a/docs/content/design-system/3.develop/4.usage/1.access-to-github-packages.md b/docs/content/design-system/3.develop/4.usage/1.access-to-github-packages.md deleted file mode 100644 index d206afdf0b..0000000000 --- a/docs/content/design-system/3.develop/4.usage/1.access-to-github-packages.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Access to Github Packages -description: How to access and use repos hosted on Github Packages. -layout: page ---- - -NPM allows the use of multiple repo hosts, as long as they can be identified by namespace. - -Ripple 2 is hosted publicly on Github Packages (ghcr) under the **@dpc/sdp** namespace, so a few steps need to be followed access these packages, while also co-existing with the npm ecosystem. - -First, create a Personal Access Token on Github: - -1. Visit https://github.com/settings/tokens and select **Generate new token** > **Generate new token (classic)** - -::DocsImageExample ---- -src: /img/generate.jpg -alt: "Screenshot of a clicked button (title Generate new token) that has opened a drop-down menu with two options: fine-grained and classic" -style: "width:360px" ---- -:: - -2. Fill in the **Note** and choose an **Expiration** - the 30 day default is generally fine, you'll receive a reminder to regenerate the token just before expiry - -::DocsImageExample ---- -src: /img/token.jpg -alt: "Screenshot of personal access token setup form, with 'Note' filled in as 'public ghcr access' and 'Expiration' set to default of 30 days" -style: "width:505px" ---- -:: - -3. Set the scope to only allow `read:packages`, and **Generate** token - -::DocsImageExample ---- -src: /img/permissions.jpg -alt: "Screenshot of scope, with only read:packages selected" -style: "width:827px" ---- -:: - -4. Store the resulting token somewhere secure, and add it to either a user `.npmrc` (recommended) or the project-level `.npmrc` (the url on line 2 below is protocol-less, not a comment): - -``` -@dpc-sdp:registry=https://npm.pkg.github.com -//npm.pkg.github.com/:_authToken= -``` diff --git a/docs/content/design-system/3.develop/4.usage/2.vue.md b/docs/content/design-system/3.develop/4.usage/2.vue.md deleted file mode 100644 index 3a15c56986..0000000000 --- a/docs/content/design-system/3.develop/4.usage/2.vue.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Vue -description: How to use Ripple components with Vue. -layout: page ---- - -First, set up [access to Github Packages](access-to-github-packages). - -Next, install Ripple UI in your project: - -`npm install @dpc-sdp/ripple-ui-core --save` - -In order for the styles to appear correctly, you will need to import them. Do this at the root of your project (usually in your app.vue or index.js file): - -```js -import '@dpc-sdp/ripple-ui-core/style'; -import '@dpc-sdp/ripple-ui-core/style/components'; -``` - -To use a component, import it from `@dpc-sdp/ripple-ui-core/vue`, note the addition of `/vue`. - -```js - - - -``` - -Please see this [example app](https://github.com/dpc-sdp/ripple-vue-example) for a basic demonstration of how to use Ripple components in a Vue app. diff --git a/docs/content/design-system/3.develop/4.usage/3.nuxt.md b/docs/content/design-system/3.develop/4.usage/3.nuxt.md deleted file mode 100644 index 69b2335f65..0000000000 --- a/docs/content/design-system/3.develop/4.usage/3.nuxt.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Nuxt -description: How to use Ripple components with Nuxt in a non-SDP context. -layout: page ---- - -First, set up [access to Github Packages](access-to-github-packages). - -Next, install Ripple UI in your project: - -`npm install @dpc-sdp/ripple-ui-core --save` - -Ripple UI exports a nuxt module that you can add to your nuxt config, note the addition of `/nuxt`: - -```js -export default defineNuxtConfig({ - modules: [ - '@dpc-sdp/ripple-ui-core/nuxt' - ] -}) -``` - -In order for the styles to appear correctly, you will need to import them. Do this at the root of your project (usually in your app.vue file): - -```js -import '@dpc-sdp/ripple-ui-core/style'; -import '@dpc-sdp/ripple-ui-core/style/components'; -``` - -There is no need to import the components as they will be registered globally by the nuxt module - -```js - -``` - -Even if you are not using SDP, the [Ripple Framework documentation](/framework) is a good starting point for any Nuxt development using Ripple. diff --git a/docs/content/design-system/3.develop/4.usage/4.webcomponents.md b/docs/content/design-system/3.develop/4.usage/4.webcomponents.md deleted file mode 100644 index 4cdc5d8189..0000000000 --- a/docs/content/design-system/3.develop/4.usage/4.webcomponents.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Web components -description: How to use the web component exports with other front-end systems. -layout: page ---- - -> Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML. -> -> Web components are based on existing web standards. Features to support web components are currently being added to the HTML and DOM specs, letting web developers easily extend HTML with new elements with encapsulated styling and custom behavior. -> https://www.webcomponents.org/ - - - - -Ripple exports a limited set of components as standard browser native web components. The advantage of using Web components is they can be dropped straight into conventional webpages and any CMS without a javascript build pipeline, such as Squiz Matrix and Salesforce. - -Support for this output target is currently experimental, if you think you have a use case for using Web components in your project please add a comment [here](https://github.com/dpc-sdp/ripple-framework/discussions/658). - -As with the other methods, set up [access to Github Packages](access-to-github-packages) and then install Ripple UI in your project: - -`npm install @dpc-sdp/ripple-ui-core --save` - -A basic example of how to use the web component exports can be found under [examples/webcomponents](https://github.com/dpc-sdp/ripple-framework/tree/develop/examples/webcomponents) in the ripple-framework monorepo. diff --git a/docs/content/design-system/3.develop/4.usage/5.css-only.md b/docs/content/design-system/3.develop/4.usage/5.css-only.md deleted file mode 100644 index 1a8a8c501f..0000000000 --- a/docs/content/design-system/3.develop/4.usage/5.css-only.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Styles only -description: Using the design system styles without a front-end framework. -layout: page ---- - -Ripple UI core exports it's CSS stylesheets directly. If you have a use case where you can't use any of the other outputs, you can use our styles directly and provide your own markup based upon the rendered examples in Storybook. - -First, set up [access to Github Packages](access-to-github-packages). - -Next, install Ripple UI in your project: - -`npm install @dpc-sdp/ripple-ui-core --save` - -You can import CSS styles from the ripple-ui-core package. - -```js -import '@dpc-sdp/ripple-ui-core/style'; -import '@dpc-sdp/ripple-ui-core/style/components'; -``` - -We recommend that you lock the version of `@dpc-sdp/ripple-ui-core` so that any future changes of styles without changes to markup do not break your application. diff --git a/docs/content/design-system/4.styles/colour.md b/docs/content/design-system/4.styles/colour.md deleted file mode 100644 index 0fd1134692..0000000000 --- a/docs/content/design-system/4.styles/colour.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Colour -description: 'Colour plays an important role in creating a consistent and strong visual digital products and services.' -layout: page -label: Core ---- - -You want users to recognise your brand. A well-designed colour palette can help you create a consistent look and feel. - -The default colours, made up of two blues, reflect vic.gov.au branding. This strengthens the association with the Victorian Government. - -The design system contains a colour framework. You can change it if your site requires department or entity branding. - -We've designed and tested colour pairings that already pass accessibility contrast ratios. However, we recommend you perform your own checks to ensure you're meeting WCAG requirements. - -If you change your core brand colours, your styles and components will re-theme automatically using the design system's colour framework. - -For more guidance on theming options, see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming/). - ->**You don’t need to use hex colours in code.** -> ->By using CSS variables, any branding or theming changes will automatically reflect in your product. See CSS variables below, or see the theming documentation. - -## Core palette - -The core palette includes primary and secondary colours. - -- The ‘Primary’ colour is for key visual elements and components. They form the foundation of the colour palette. -- The ‘Accent’ colour is an accent to help highlight key components or pieces of information. It's used in combination with the primary colour to create a more dynamic and engaging visual experience. - -### Primary - -::DocsColourTable ---- -colours: - - clr.primary ---- -:: - -### Accent - -::DocsColourTable ---- -colours: - - clr.accent ---- -:: - -## Neutral palette - -The Neutral palette is on a colour scale of white to black. - -The 10 steps represent this scale based on our requirements. - -Neutral colours are consistent throughout the design system. They are for: -- text colours -- borders -- other elements, like a neutral background. - -::DocsColourTable ---- -colours: - - clr.neutral ---- -:: - -::DocsColourTable ---- -colours: - - clr.light - - clr.dark ---- -:: - -## Typography colours - -Type colours have a ratio of at least 4.5:1 (or 3:1 for text larger than 18 point). This was selected to try and conform to the Web Content Accessibility Guidelines (WCAG 2.1). - -Interaction colours are in addition to the core colour palette. This guarantees accessible text. - -::DocsColourTable ---- -colours: - - clr.type.default - - clr.type.light - - clr.type.primary.contrast - - clr.type.accent.contrast ---- -:: - -::DocsColourTable ---- -colours: - - clr.link - - clr.link-visited - - clr.focus ---- -:: - -## Gradients - -Gradients bring attention to components or information. Only use them on occasion. - -All gradients should appear from dark to light in their usage. - -::DocsGradientTable -:: - -## Sematics - -Semantic colours add meaning to element. They provide contextual or transactional feedback to the user. We have four semantic uses: - -- Information -- Success -- Warning -- Error - -Avoid using them outside of their semantic meaning. - -These colours help signal to users the meaning of some components. For example, for alerts or error messages. - -::DocsColourTable ---- -colours: - - clr.information - - clr.success - - clr.warning - - clr.error ---- -:: - -## Focus - -See [focus state](/design-system/styles/focus-state) for guidance. - -::DocsColourTable ---- -colours: - - clr.focus ---- -:: - -## Theming - -To create your own theme, see theming guidance for designers or developers. diff --git a/docs/content/design-system/4.styles/focus-state.md b/docs/content/design-system/4.styles/focus-state.md deleted file mode 100644 index 7aac0df7c9..0000000000 --- a/docs/content/design-system/4.styles/focus-state.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Focus state -description: 'Focus states show when a user has highlighted an element, using an input method such as a keyboard or voice.' -layout: page -label: Core ---- - -Some users use keyboards or other devices to navigate through a page by jumping from one interactive element to the next. Focus states help users understand which element is currently selected and ready for interaction. - -Focus states are orange and neutral-800, aiming to conform to the WCAG 2.1 Level AA [non-text contrast](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html) on any background colour. - -We have chosen this orange colour as it is a direct opposite of our primary colour. This allows all colourblind users to see a visual difference. Focus state styling also removes any border radius to create a bigger visual difference to surrounding elements. - -### Inline style -The inline focus state helps links stand out from the rest of the content on a page. When a link receives focus, it will underline and change background colour. Other components and elements that look like links use the inline style. - -::DocsImageExample ---- -src: /assets/img/focus-inline-focus.png -alt: An example of focus state colour contrast ---- -.rpl-u-focusable-inline -:: - -### Block style -The block style completely highlights a section or whole component with the focus state. For example, when a button receives focus, a border is added to the bottom of the container and the background colour will change. - -::DocsImageExample ---- -src: /assets/img/focus-block-focus.png -alt: Focus Link Visual Block Sample ---- -.rpl-u-focusable-block -:: - -### Outline focus state style -The outline styles are for when form inputs are focused. When a form field receives focus, it adds a border. If the element already has a border, the border gets thicker. - -::DocsImageExample ---- -src: /assets/img/focus-outline-focus.png -alt: Focus Link Visual Outline Focus Sample ---- -.rpl-u-focusable-outline -:: - -### Modified focus states for components -The alert component has a modified focus state colour. This is consistent across all alert variants. It meets colour contrast requirements on all semantic colours, including danger and warning. - -The modified styling uses a white background in place of the orange, still with the dark content and border. - -::DocsImageExample ---- -src: /assets/img/focus-alert-focus.png -alt: Component Modified Focus State Sample ---- -:: - -### CSS Variables -The focus state has three CSS Variables. - -| Swatch | Element | Value | CSS Variable | -|-------------------------------|------------------------|---------|------------------------| -| :DocsSwatch{colour="#FF9E1B"} | Background Fill | #FF9E1B | rpl-clr-focus | -| :DocsSwatch{colour="#1A1A1A"} | Content / Text / Icons | #1A1A1A | rpl-clr-focus-contrast | -| :DocsSwatch{colour="#1A1A1A"} | Bottom Border | #1A1A1A | rpl-clr-dark | - -### Theming -For advice on focus state theming, see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming/). diff --git a/docs/content/design-system/4.styles/grid.md b/docs/content/design-system/4.styles/grid.md deleted file mode 100644 index 2fbe03b40e..0000000000 --- a/docs/content/design-system/4.styles/grid.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Grid -description: 'With up to 12 columns, you can build grids with responsive layouts across different breakpoints.' -layout: page -label: Core ---- - -Grids are a crucial component of any design system. They provide a framework for arranging content in an appealing and structured manner. - -We've designed the grid for a high degree of flexibility and responsiveness. - -## Breakpoints -Ripple has 5 breakpoints. These ensure content is at an optimal layout for readability and accessibility. - -| Breakpoint | Width | Active content area | -|------------|--------------|---------------------| -| XS | <575px | 288 – 543px | -| S | 576 – 767px | 544 – 735px | -| M | 768 – 991px | 736 – 927px | -| L | 992 – 1199px | 864 – 1071px | -| XL | 1200px + | 1040px | - -## Grids -The grid is made up of three elements: columns, gutters, and margins. - -![Visual of basic grid / column / gutter / margin anatomy](/assets/img/Grid-Grid-Anatomy.png) - -| Breakpoint | Margins | Gutter | Column type / width | -|----------------------|---------|---------|---------------------| -| XS • <575px | 16px | 16px | Fluid | -| S • 576 – 767px | 16px | 16px | Fluid | -| M • 768 – 991px | 32px | 24px | Fluid | -| L • 992 – 1199px | 64px | 24px | Fluid | -| XL • 1200px + | 80px | 28px | Fixed / 61px | - -## Usage -Use the grid system to structure your content. - -Most vic.gov.au pages follow a ‘two-thirds and one-third’ layout. But, the grid system allows for more combinations if needed. - -Your main content should always be in a two-thirds column. This is even if you’re not using a corresponding one-third column for secondary content. - -### Column layouts - -| Column Span | Layout | Breakpoint | -|-------------|-------------|---------------------| -| 12 | Full | XS • S • M • L • XL | -| 6 | Half | XS • S • M • L • XL | -| 7 | Two thirds | M • L • XL | -| 4 | One third | M • L • XL | -| 3 | One quarter | L • XL | diff --git a/docs/content/design-system/4.styles/icons.md b/docs/content/design-system/4.styles/icons.md deleted file mode 100644 index 2765d9c23a..0000000000 --- a/docs/content/design-system/4.styles/icons.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Icons -description: 'Use icons to illustrate actions and interactions, communicate statuses, and draw attention to important information.' -layout: page -label: Core ---- - -Icons are a visual representation of an action, idea, or object. They provide a quick and easy way to communicate information. They can also enhance the usability of a design. - -Use the Ripple Design System's icon set for a consistent user experience and a cohesive look and feel. - -You can add icons to components or pair them with text. Icons should have a clear relationship with their corresponding text or action. This keeps them accessible to users with visual impairments or disabilities. - -Avoid using icons alone, as one user may interpret them differently to another. - -## Icon Library - -#### Alerts - -::DocsIconTable ---- -group: alert ---- -:: - -#### Social - -::DocsIconTable ---- -group: social ---- -:: - -#### Standard - -::DocsIconTable ---- -group: standard ---- -:: - -> **Accessibility tip** -> -> If you're using an icon by itself, ensure it's using the right label for screen readers. -> -> If you're using an icon and text, ensure only the text gets read out. - -## Application -### Sizing -The Ripple Design System displays icons at four sizes (12px, 16px, 24px, 32px) depending on their type, use and screen size. - -::DocsIconSizingTable ---- -sizes: - - xs : 12px - - s : 16px - - m : 24px - - l : 32px ---- -:: - -### Spacing -Ensure you use the right amount of space around an icon to allow for legibility. At the least, icons must have clear space of 50% of the height/width of the icon. - -![Visual of min space](/assets/img/Icon-Clear-space.png) - -## Accessibility -For accessibility, ensure you: -- wrap icons within their interactive component -- specify if an icon is decorative and informative by assigning the property in code -- use descriptive and meaningful titles for informative icons -- use icons to represent the same action or idea. - -## Styling -### Colour -If a background changes the colour of the text (for example, a button) the icon should take on the same colour as the text. - -::DocsExample ---- -id: core-navigation-button--default-elevated ---- -:: - -Icons used to represent a state should use the correct colour. For example, an icon used in a success notification should use rpl-clr-success. - -::DocsExample ---- -id: forms-form-alert--success ---- -:: diff --git a/docs/content/design-system/4.styles/layer-styles.md b/docs/content/design-system/4.styles/layer-styles.md deleted file mode 100644 index 6e8960a839..0000000000 --- a/docs/content/design-system/4.styles/layer-styles.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Layer styles -description: -layout: page -label: Core ---- - -## Border -Borders create separation between elements and aid hierarchy and navigation. They are a solid border on one or more sides of an object or container. - -Depending on where a border is being used, it can appear in 4 different thicknesses, 1px, 2px, 4px or 8px. - -You can use a border to: -- separate or segment blocks or sections of content -- highlight important elements such as featured content or a call to action -- aid information hierarchy -- support navigational structure -- highlight an active navigation item. - -::DocsLayerStyleTable ---- -type: border ---- -:: - -### Usage -Find examples of borders that add visual consistency on the [in-page navigation](/design-system/components/in-page-navigation), [cards](/design-system/components/card) and [contact us](/design-system/components/contact-us) pages. - -Borders can also segment content (like on banners). - -::DocsExample ---- -id: core-navigation-in-page-navigation--in-page-navigation -hideCode: true ---- -:: - ---- - -## Border Radius -Border radius allows you to add rounded corners to elements such as a button or container. Border radius can create a more user-friendly and approachable look and feel. - -We've defined a set of radius values for use. - -::DocsLayerStyleTable ---- -type: border.radius ---- -:: - -### Usage -Border radius is on containers such as buttons, cards and form inputs. - -::DocsExample ---- -id: core-navigation-button--default-filled -hideCode: true ---- -:: - -> When a container has a defined border radius, but is in focus, discard the border radius. -> -> A 0px value is applied for consistency and clarity. - ---- - -## Elevation -Elevation adds depth to components. - -Depth is depicted by placing elements at various points along the positive z-axis extending towards the viewer. - -::DocsLayerStyleTable ---- -type: elevation ---- -:: - -### Usage -Elevation is on components such as cards, button (elevated variant only) and breadcrumbs. - -Elevation helps components to stand out. You can use them to flag interactivity, such as when a user hovers over a card or when a modal is open. - -::DocsExample ---- -id: core-navigation-breadcrumbs--default-story -hideCode: true ---- -:: diff --git a/docs/content/design-system/4.styles/layout.md b/docs/content/design-system/4.styles/layout.md deleted file mode 100644 index 8cb3fac1a5..0000000000 --- a/docs/content/design-system/4.styles/layout.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Layout -description: 'Layouts are common page composition patterns that offer ways of structuring components and content.' -layout: page -label: Core ---- - -Always design for small screens first. - -For most types of pages, use either a ‘two-thirds’ or a ‘two-thirds and one-third’ layout. Doing this reduces long lines of text that can make a page hard to read on desktop devices. This approach should limit lines of text to 75 characters. - -You should never assume what devices people are using. This is why you should design for different screen sizes instead of specific devices. - -## Page layouts - -There are 2 standard page layouts: - -- Full width. -- Two column - right side. - -### Full width - -Displays the main content area the full width of the container. - -![Sample visual of full width layout](/assets/img/layout-full-width.png) - -### Two column - -Displays a right hand sidebar that stacks on <991px breakpoints. The main content area is always visible. - -![Sample visual of two column layout](/assets/img/layout-two-column.png) - -## White Space - -Use adequate white space in the layout to separate elements and create a sense of hierarchy. This helps to make elements on the page easier to distinguish and understand, and creates visual harmony. - -### Page Section Spacing - -Spacing is used between the ‘above’, ‘body’ and ‘below’ content sections. - -For both XS and S breakpoints, section spacing is added between the body section and sidebar section when in use. - -![Sample visual of page section layout spacing](/assets/img/layout-page-spacing.png) - -| Breakpoint | Value | CSS Variable | -|-------------|-------|--------------| -| XS • <576px | 32px | rpl-sp-8 | -| S • 576-767px | 32px | rpl-sp-8 | -| M • 768-991px | 48px | rpl-sp-10 | -| L • 992-1199px | 64px | rpl-sp-12 | -| XL • 1200px+ | 80px | rpl-sp-13 | - -### Content Layout Spacing - -We define spacing between components and elements at a breakpoint level. This compliments the grid and applied layout. - -![Sample visual of content layout spacing](/assets/img/layout-content-spacing.png) - -| Breakpoint | Value | CSS Variable | Sidebar Value | Sidebar CSS Variable | -|-------------|-------|-------------|-------|--------------| -| XS • <576px | 16px | rpl-sp-4 | 24px | rpl-sp-6 | -| S • 576-767px | 16px | rpl-sp-4 | 24px | rpl-sp-6 | -| M • 768-991px | 24px | rpl-sp-6 | 24px | rpl-sp-6 | -| L • 992-1199px | 32px | rpl-sp-8 | 32px | rpl-sp-8 | -| XL • 1200px+ | 40px | rpl-sp-9 | 40px | rpl-sp-9 | diff --git a/docs/content/design-system/4.styles/logo.md b/docs/content/design-system/4.styles/logo.md deleted file mode 100644 index 47508454ef..0000000000 --- a/docs/content/design-system/4.styles/logo.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Logo -description: 'The visual representation of vic.gov.au and the Victorian Government.' -layout: page ---- - -## vic.gov.au logo - -The vic.gov.au logo is the primary logo used in the design system. - -::DocsImageExample ---- -src: /assets/img/Logo-vicgov.png -alt: vic.gov.au logo ---- -[Download logo](https://www.vic.gov.au/brand-victoria-using-our-logos) -:: - -### Clear space - -The clear space for the vic.gov.au logo is 100% of the height of the ‘V’ across all applications. - -![Clear space visual](/assets/img/Logo-vicgov-Clear-Space.png) - -### Co-branding - -Where the vic.gov.au logo appears next to another logo, it should be: - -- centred vertically -- separated by a minimum distance of 16px -- separated by a divider line. - -![Co-branded visual](/assets/img/Logo-vicgov-cobrand.png) - -### Sizing - -The vic.gov.au logo should be 16px in height on all screens. - ->**No modification** -> ->Don't change the logo. This includes changing its colour, adding effects, or altering its shape. -> ->This helps to maintain the integrity and consistency of the logo. - -### Accessibility - -Always add alternative text to the logo. This is for screen reader users. - ---- - -## Victoria State Government logo - -The Victorian State Government logo is the secondary logo used in the design system. It’s used in the footer. - -::DocsImageExample ---- -src: /assets/img/Logo-StateGov.png -alt: Victoria State Government logo ---- -[Download logo](https://www.vic.gov.au/brand-victoria-using-our-logos) -:: - -### Clear space - -The clear space for the Victorian State Government logo is at least 20% the height. - -![Clear space visual](/assets/img/Logo-StateGovClearSpace.png) - -### Co-branding -Where the Victorian State Government logo appears next to another logo, it should be: - -- centred vertically -- separated by a distance of at least 50% the height of the Victorian State Government logo. - -![Co-branded visual](/assets/img/Logo-StateGov-cobrand.png) - -### Sizing - -The Victorian State Government logo should be 42px in height on all screens. - -Use the Victorian State Government logo where size permits. But, at times, we need to use a smaller logo depending on the application: - -- VIC only logo (favicons only). - -We've designed these logos to ensure accessibility and clarity at all sizes. - ---- - -## Co-branding logo - -See [primary navigation](/design-system/components/primary-navigation) and [footer](/design-system/components/footer) for size requirements. diff --git a/docs/content/design-system/4.styles/motion.md b/docs/content/design-system/4.styles/motion.md deleted file mode 100644 index 5dbf39f2ee..0000000000 --- a/docs/content/design-system/4.styles/motion.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Motion -description: 'Motion gradually changes an element from one state to another. It can also indicate an interaction.' -layout: page -label: Core ---- - -Use motion with a purpose in mind. This could be to draw attention to important elements or to provide feedback to users. - -## Usage - -Each animation needs at least these four parts: - -- Trigger — what causes the animation to happen (gestures, time, etc.). -- Duration — how long should the transition take. -- Easing — how an element transitions. -- Property — the characteristic of the element transitioning (position, opacity, scale, etc.). - -## Duration (speed) - -The duration of motion should be consistent throughout. Use: - -- shorter durations for more subtle motions -- longer durations for more significant or complex motions. - -A general rule of thumb is: - -- 0.06-0.2s for simple interface movements -- up to 0.5s for more complex or larger movements. - -| Time | Value | CSS Variable | -|-------------|-------|--------------| -| 60 milliseconds | 60ms | rpl-motion-speed-1 | -| 80 milliseconds | 80ms | rpl-motion-speed-2 | -| 120 milliseconds | 120ms | rpl-motion-speed-3 | -| 160 milliseconds | 160ms | rpl-motion-speed-4 | -| 200 milliseconds | 200ms | rpl-motion-speed-5 | -| 240 milliseconds | 240ms | rpl-motion-speed-6 | -| 300 milliseconds | 300ms | rpl-motion-speed-7 | -| 360 milliseconds | 360ms | rpl-motion-speed-8 | -| 420 milliseconds | 420ms | rpl-motion-speed-9 | -| 500 milliseconds | 500ms | rpl-motion-speed-10 | - -## Easing - -Easing is the rate the motion accelerates or decelerates. It can range from linear to highly exaggerated. The chosen easing should match the desired tone and feeling of the motion. - -Currently, Ripple uses default easing values. We use the default names for this reason to reduce clutter in the code. - -Definitions: - -- Ease-in: slow at the beginning, fast/abrupt at the end. -- Ease-out: fast/abrupt at the beginning, slow at the end. - -When to use: - -- Ease-in: when things are moving *out.* -- Ease-out: when things are moving *in.* diff --git a/docs/content/design-system/4.styles/spacing.md b/docs/content/design-system/4.styles/spacing.md deleted file mode 100644 index 9bbff7802a..0000000000 --- a/docs/content/design-system/4.styles/spacing.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Spacing -description: 'In components and layout, a defined set of spacing units provides good alignment and consistent spacing relationships.' -layout: page -label: Core ---- - -We use a spacing system in a 4-pixel grid. - -It helps to create a visual hierarchy and organises page content. - -The 4px framework creates consistent spacing relationships and alignment across breakpoints. This is crucial for good UI design. - -| Size | CSS Variable | -|-------|--------------| -| 4px | rpl-sp-1 | -| 8px | rpl-sp-2 | -| 12px | rpl-sp-3 | -| 16px | rpl-sp-4 | -| 20px | rpl-sp-5 | -| 24px | rpl-sp-6 | -| 28px | rpl-sp-7 | -| 32px | rpl-sp-8 | -| 40px | rpl-sp-9 | -| 48px | rpl-sp-10 | -| 56px | rpl-sp-11 | -| 64px | rpl-sp-12 | -| 80px | rpl-sp-13 | -| 120px | rpl-sp-14 | - -Spacing should be proportional to the size and importance of the elements on the page. For example, larger elements may need more space to balance their visual weight. - -Consider spacing in responsive design to ensure that the spacing remains consistent and proportionate on different screen sizes and devices. - -For page level, component and content spacing see [layout](/design-system/styles/layout). diff --git a/docs/content/design-system/4.styles/typography.md b/docs/content/design-system/4.styles/typography.md deleted file mode 100644 index 3469a27585..0000000000 --- a/docs/content/design-system/4.styles/typography.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: Typography -description: 'Type styles are used to present content clearly.' -layout: page -label: Core ---- - -## Font - -'VIC' is the brand font to be used across all Victorian Government communications. This creates a distinct but consistent look and feel. - -It is free to download from [vic.gov.au](https://www.vic.gov.au/brand-victoria-fonts). - -Only use VIC font. The Ripple Design System only uses ‘Regular’ and ‘Bold’ weights of VIC font. - -As VIC is a custom font, it's recommended to use Web Safe Font as a fallback when declaring your font stack. The preferred fallback font for the Ripple Design System is Arial. - -| Font Family | Value | CSS Variable | -|-------------|-----------------------------------|----------------------| -| VIC | VIC, Arial, Helvetica, sans-serif | rpl-type-font-family | - - -## Type Styles - -In the Ripple Design System there are two type sets, one for fixed use and one for fluid (responsive) use: - -- The fixed type set uses fixed sizes. This means they use the <991 fluid styles, but do not respond. -- The fluid type set has two fixed sizes. These both respond at certain breakpoints for larger or smaller styles. - -### Headings - -Headings have both fluid and fixed sets. Headings are bold by default for emphasis and to create contrast. - -#### Fluid - -::DocsTypeClassTable ---- -type: - - style : - - Heading 1 - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1 - - style : - - Heading 1 Highlight - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1-highlight - - style : - - Heading 2 - - values : - - Font size: 24px / 32px - - Line height: 32px / 40px - - Letter spacing: 1.6% / 1.4% - - Font weight: Bold (700) - - rpl-type-h2 - - style : - - Heading 3 - - values : - - Font size: 20px / 24px - - Line height: 28px / 32px - - Letter spacing: 1.8% / 1.6% - - Font weight: Bold (700) - - rpl-type-h3 - - style : - - Heading 3 Highlight - - values : - - Font size: 20px / 24px - - Line height: 28px / 32px - - Letter spacing: 1.8% / 1.6% - - Font weight: Bold (700) - - rpl-type-h3-highlight - - style : - - Heading 4 - - values : - - Font size: 16px / 20px - - Line height: 24px / 28px - - Letter spacing: 1.92% / 1.8% - - Font weight: Bold (700) - - rpl-type-h4 ---- -:: - - -#### Fixed - -::DocsTypeClassTable ---- -type: - - style : - - Heading 1 Fixed - - values : - - Font size: 32px - - Line height: 36px - - Letter spacing: 1.4% - - Font weight: Bold (700) - - rpl-type-h1-fixed - - style : - - Heading 1 Highlight Fixed - - values : - - Font size: 32px - - Line height: 44px - - Letter spacing: 1.4% - - Font weight: Bold (700) - - rpl-type-h1-highlight-fixed - - style : - - Heading 2 Fixed - - values : - - Font size: 24px - - Line height: 32px - - Letter spacing: 1.6% - - Font weight: Bold (700) - - rpl-type-h2-fixed - - style : - - Heading 3 Fixed - - values : - - Font size: 20px - - Line height: 28px - - Letter spacing: 1.8% - - Font weight: Bold (700) - - rpl-type-h3-fixed - - style : - - Heading 3 Highlight Fixed - - values : - - Font size: 20px - - Line height: 28px - - Letter spacing: 1.8% - - Font weight: Bold (700) - - rpl-type-h3-highlight-fixed - - style : - - Heading 4 Fixed - - values : - - Font size: 16px - - Line height: 24px - - Letter spacing: 1.92% - - Font weight: Bold (700) - - rpl-type-h4-fixed ---- -:: - -### Paragraph - -The default paragraph font size is 16px on all screens. - -The majority of your body copy should use the standard 16px paragraph size. - -::DocsTypeClassTable ---- -type: - - style : - - Paragraph Large - - values : - - Font size: 20px / 24px - - Line height: 28px / 32px - - Letter Spacing: 1.8% / 1.6% - - rpl-type-p-large - - style : - - Paragraph Large Fixed - - values : - - Font size: 20px - - Line height: 28px - - Letter Spacing: 1.8% - - rpl-type-p-large-fixed - - style : - - Paragraph Large Highlight - - values : - - Font size: 20px / 24px - - Line height: 28px / 32px - - Letter Spacing: 1.8% / 1.6% - - rpl-type-p-large-highlight - - style : - - Paragraph - - values : - - Font size: 16px - - Line height: 24px - - Letter spacing: 1.92% - - rpl-type-p - - style : - - Paragraph Small - - values : - - Font size: 14px - - Line height: 20px - - Letter spacing: 1.92% - - rpl-type-p-small ---- -:: - -### Lists - -Use lists to make blocks of text easier to read, and to break information into manageable chunks. - -List styles are based on rpl-type-p with extra spacing. - -| Margin Top | Paragraph Spacing | Item Spacing | Indent Amount | -|-------------|-----------------------------------|----------------------|----------------------| -| rpl-sp-4 | rpl-sp-2 | rpl-sp-2 | rpl-sp-9 | - -#### Unordered Lists - -Introduce bulleted lists with a lead-in line ending in a colon. Start each item with a lowercase letter, and do not use a full stop at the end. - -Unordered lists allow for two nested levels which are styled as: - -- level 1 - bullet -- level 2 - dash - -::DocsImageExample ---- -src: /assets/img/unordered-list.png -alt: An example of an unordered list ---- -:: - -#### Ordered Lists - -Use numbered lists instead of bulleted lists when the order of the items is relevant. - -You do not need to use a lead-in line for numbered lists. Items in a numbered list should end in a full stop because each should be a complete sentence. - -Ordered lists allow for three nested levels which are styled as - -- level 1 - numbers -- level 2 - alphabet -- level 3 - roman numerals. - -::DocsImageExample ---- -src: /assets/img/ordered-list.png -alt: An example of an ordered list ---- -:: - -### Text Alignment -You should usually left-align body copy that’s read left to right. Right-aligned body copy can be hard for users to find and read when they magnify their screen. - -Do not ‘justify’ blocks of body copy so that they’re aligned to both the left and right margins. Doing this creates wider spaces between words, which can make the text hard to read. - -### Font weight -You can use bold to emphasise particular words in a transaction. Use it to highlight critical information that users need to refer to or you’ve seen them miss. - -Try to avoid bold. Overuse will make it difficult for users to know which parts of your content they need to pay the most attention to. - -::DocsImageExample ---- -src: /assets/img/font-weight.png -alt: Acomparison between regular text and bold text ---- -:: - -### Links - -Links are blue and underlined by default. If your link is at the end of a sentence or paragraph, make sure that the linked text does not include the full stop. - -::DocsImageExample ---- -src: /assets/img/link.png -alt: A visual example of a link within regular text ---- -:: - ---- - -## List of variables - -All values are stored as variables nested in the type variable. - -### Type size - -::DocsTypeTable ---- -type: size ---- -:: - -### Line Height - -::DocsTypeTable ---- -type: lh ---- -:: - -### Letter Spacing - -::DocsTypeTable ---- -type: ls ---- -:: - -### Font Weights - -::DocsTypeTable ---- -type: weight ---- -:: - -### List Styling - -| Style | Level 1 | Level 2 | Level 3 | -|-------------|-----------------------------------|----------------------|----------------------| -| Unordered list | • (filled circle) | - (dash) | | -| Ordered List | 1. (numbers) | a. (letters) | i. (roman numerals) | diff --git a/docs/content/design-system/5.components/accordion.md b/docs/content/design-system/5.components/accordion.md deleted file mode 100644 index 67c073afd1..0000000000 --- a/docs/content/design-system/5.components/accordion.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Accordion -description: The Accordion component is a panel designed to save space by hiding and revealing content as required. -layout: page -label: Core ---- - -## Usage -Use accordions only if it will benefit the user. You should have evidence of this. - -Using accordions will allow users to: -- view related sections of content quickly -- choose which content isn’t relevant to them by showing or hiding sections. - -Always test accordions with users first. Depending on what the user needs, hiding content could present problems. - -::DocsExample ---- -id: core-containers-accordion--accordion ---- -:: - -### When and how to use -- Fill the entire width of the content area. -- Embed into the body content area of any landing page. -- Use the 'numbered' variant when a sequential order is important. -- Include links and format text in accordions, as required. -- Use to conceal content that may only apply to specific users who can choose to show or hide content. -- Make sure accordion headings are descriptive and succinct. - -### When and how not to use -- Never use a single accordion. -- Avoid putting all page content into accordions. -- Don't use accordions for important information all users need to read. -- Putting accordions in accordions can confuse the user. -- Don't use an accordion if doing so will slow the page load time. -- Don't disable sections. - -### Collapse all/Expand all -Being able to collapse or expand all lets users open or close all accordions with one click. This reduces the amount of clicks required to reach their content. - -Don't use this feature to help users find information. Expanding all accordions at once could defeat the purpose of having them. If a user has to do this, consider more descriptive titles. - -The other option is to remove the accordions and display the content without them. - ---- - -## Variants -The accordion has 2 variants: -- default -- numbered. - -### Default - -::DocsExample ---- -id: core-containers-accordion--accordion ---- -:: - -### Numbered -Use the numbered variant when it is important the content is read in sequential order. - -::DocsExample ---- -id: core-containers-accordion--accordion-numbered ---- -:: - ---- - -## Theming -Accordions use colour to: -- represent interactions such as hover and active states -- give prominence to the active displayed content section. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-accordion--accordion - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/acknowledgment.md b/docs/content/design-system/5.components/acknowledgment.md deleted file mode 100644 index c7397b9750..0000000000 --- a/docs/content/design-system/5.components/acknowledgment.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Acknowledgement -description: The Acknowledgement component pays respect to the First Peoples of Victoria. -layout: page -label: Core ---- - -## Usage - -The Acknowledgement of Traditional Owners message: - -- displays alongside the Aboriginal and Torres Strait Islander flags -- is used in the footer. - -::DocsExample ---- -id: core-containers-acknowledgement--acknowledgement ---- -:: - -### When and how to use -- Use this component to display the Acknowledgement of Traditional Owners message. - -### When and how not to use -Do not change the: - -- Aboriginal and Torres Strait Islander flags -- Acknowledgement of Traditional Owners wording. diff --git a/docs/content/design-system/5.components/alert.md b/docs/content/design-system/5.components/alert.md deleted file mode 100644 index dd1df55713..0000000000 --- a/docs/content/design-system/5.components/alert.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Alert -description: The Alert component display required actions or important messages to users. -layout: page -label: Core ---- - -## Usage - -Alerts attract a user's attention with important messages or required actions. They appear at the top of pages. - -Alerts are: - -- intrusive by design -- created on purpose -- dismissible by a user -- not triggered by user action or back-end event. - -Alerts sit flush at the top of pages above the header. Users can still interact with the page below an alert. - -::DocsExample ---- -id: core-containers-alert--information ---- -:: - -### When and how to use -- Only use an alert if its message or action applies to an entire product or site. -- Write the alert in plain language that's clean and concise to minimise a user's cognitive load. -- If the user needs more information or to complete an action, use link text for the call to action. -- Place the alert at the top of the screen before the header. -- Only use the critical alert setting for messages or actions that warrant it. -- Limit actions to one per alert banner. - -### When and how not to use -- Don’t use an alert if its message applies only to that feature or page. -- Alerts shouldn't cover other components, only pushing down page content. -- Don't use alerts for actions initiated by the user or backend. - ---- - -## Variants - -An alert’s styling is according to its meaning and uses semantic colours. - -Alert colours include: - -- grey for general information -- orange for a minor warning -- red for a critical error or expected dangerous event. - -### Information - -- To communicate general information to users. - -::DocsExample ---- -id: core-containers-alert--information ---- -:: - -### Warning - -- To communicate a minor warnings to users. - -::DocsExample ---- -id: core-containers-alert--warning ---- -:: - -### Critical - -- To communicate a critical error has occurred or dangerous event is expected to users. - -::DocsExample ---- -id: core-containers-alert--danger ---- -:: - ---- - -## Alert ordering - -So that users view alerts in order of importance, they appear in priority order: - -1. Critical. -1. Warning. -1. Information. - -::DocsExample ---- -id: core-containers-alert--stacked ---- -:: diff --git a/docs/content/design-system/5.components/block-quote.md b/docs/content/design-system/5.components/block-quote.md deleted file mode 100644 index 44b2adac82..0000000000 --- a/docs/content/design-system/5.components/block-quote.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Block quote -description: The Block quote component adds emphasis to a quote. -layout: page -label: Core ---- - -## Usage - -Use block quotes to emphasise: - -- important information -- excerpts from a source. - -::DocsExample ---- -id: core-containers-content--blockquote ---- -:: - -### When and how to use - -- Only use text in block quotes. -- Always put all the quoted text inside opening and closing quotation marks (' '). -- Include optional author metadata. -- You can feature more than one quote by a single author. -- Only use in content sections. - -### When and how not to use - -- Do not repeat metadata across different quotes. - ---- - -## Theming - -The block quote uses colour to add subtle visual prominence. - - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-content--blockquote - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/breadcrumb.md b/docs/content/design-system/5.components/breadcrumb.md deleted file mode 100644 index 26144ce6a8..0000000000 --- a/docs/content/design-system/5.components/breadcrumb.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Breadcrumb -description: The Breadcrumb component shows a user their location on a website. This allows quick navigation between page levels. -layout: page -label: Core ---- - -## Usage - -Use breadcrumbs to help users understand where they are within a website’s structure. A breadcrumb shows as a series of links and icons in a line. - -A breadcrumb displays the parent page, icons and the current page. - -- Parent page: this links to the page above the current page in the information architecture. -- Icons: chevrons (v-shaped icons) sitting between the parent and current pages are designed to visualise site hierarchy. -- Current page: this is the page the user is currently on. - -::DocsExample ---- -id: core-navigation-breadcrumbs--default-story ---- -:: - -### When and how to use -- Display the breadcrumb at the top left of a page, below the main navigation but above the page title. -- Always start the breadcrumb with the parent page. -- Always end the breadcrumb with the current page. -- Truncate longer names if you've reached the maximum amount of links. - -### When and how not to use -- The breadcrumb does not replace primary navigation. -- Do not use the breadcrumb to show progress through a linear journey. - ---- - -## How the Breadcrumb works - -On devices with a page resolution under 768px, the breadcrumb displays the parent link only. - ---- - -## Theming - -The Breadcrumb uses colour to: - -- represent possible interactions -- interactive states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-breadcrumbs--default-story - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/button.md b/docs/content/design-system/5.components/button.md deleted file mode 100644 index 1e26caa85c..0000000000 --- a/docs/content/design-system/5.components/button.md +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: Button -description: The Button component helps a user to carry out an action. -layout: page -label: Core ---- - -## Usage - -Use a button to indicate an action a user can take and to let them start carrying it out. Button labels say what action will occur when the user interacts with it. - -Only use a button when the page has a call to action. Don't use buttons when sending users to other locations on the page or to other pages or sites. - -::DocsExample ---- -id: core-navigation-button--default-filled ---- -:: - -### When and how to use - -- Highlight a key call to action. -- So long as it also helps users carry out its identified action, a button can link to internal and external pages. -- Add to any basic content component. -- Use verbs in the button label, for example, 'Submit now', 'Cancel booking', etc. - -### When not to use - -- Limit primary buttons to one per page. -- Don't use more than 4 words in the button label. -- Avoid using inactive buttons. - -> Limit using buttons to one per page. The more you use them, the less a user will notice them. - ---- - -## Variants - -Buttons are styled for their specific purposes. Button variants include: - -- filled -- outlined -- white -- elevated -- destructive. - -### Filled - -- Use the filled variant for primary actions, known as calls to action. -- Use the primary colour. -- Don't use more than one filled button per page. - - A page should only have one call to action, otherwise they lose impact. - - Having more than one also results in a dilemma of choice for the user. - -::DocsExample ---- -id: core-navigation-button--default-filled ---- -:: - -### Outlined - -- The outlined variant is for secondary actions. -- Like the filled variant, don't use more than one outlined button. - - If you find you're adding lots of secondary buttons, you may need to simplify your content. - -::DocsExample ---- -id: core-navigation-button--default-outlined ---- -:: - -### White - -- The white variant is for tertiary actions when an action is less prominent. - - It should be obvious that it is lower priority than primary or secondary buttons. -- The white variant is styled with an underline by default, to align with links. - - This helps meet accessibility requirements and is consistent with other link types. - -::DocsExample ---- -id: core-navigation-button--default-white ---- -:: - -### Elevated - -- The elevated variant acts as a 'back-to-the-top' button. -- We've added elevation to show the where the button will sit as a 'layer' on the page (its CSS z-index value). - -::DocsExample ---- -id: core-navigation-button--default-elevated ---- -:: - -### Destructive - -- Use the destructive variant for destructive actions, such as permanently deleting information, across the site. -- The destructive variant has a semantic meaning and uses semantic colour. -- Destructive buttons only work if not used often. -- It’s uncommon for most sites to need one. -- Only use the destructive variant if an action has destructive consequences because they are not easy to undo. - -> Never rely on colour only to communicate a serious action. For example, don't rely on red only as a warning to the user. Some users cannot see all colours and will miss meaning. What will happen when the user clicks the button must be obvious from context button text. - -::DocsExample ---- -id: core-navigation-button--default-destructive ---- -:: - ---- - -### Loading spinner - -Loading spinners are used to indicate to users that an action is being processed. Spinners animate as soon as the user initiates an action and disappear once content shows. - -A user may double-click a button because: - -- their main operating system uses double click -- they have a slow connection which results in delayed action feedback -- they click the button by accident due to motor impairments like hand tremors. - -Clicking a button twice can mean the information gets sent 2 times. - -Try to show the user that their click has worked. For example, show a loading spinner once they've clicked. - -When a button is in the loading state, the button label is hidden and a spinner is shown in its place. The button will keep the same width it had when the text was visible. - -::DocsExample ---- -id: core-navigation-button--busy-state ---- -:: - ---- - -## Theming - -Buttons can be themed in the following 2 ways: -- site colour palette -- neutral colour palette. - -### Site theme - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-button--default-filled - --- - :: - ::DocsExample - --- - id: core-navigation-button--default-outlined - --- - :: - ::DocsExample - --- - id: core-navigation-button--default-elevated - --- - :: -:: - -To create your own theme see [theming guidance for designers](https:www.vic.gov.au) or [theming guidance for developers](https:www.vic.gov.au). - -### Neutral theme - -Implemented at a site level, the neutral buttons have predefined neutral colour values. You are unable to edit or customise these colours. - -There is no filled button variant available if you use the neutral theme. Buttons will automatically display as the next level down of button styling. For example, you'll use the outlined button variant for the neutral theme. - -#### Outlined - -::DocsExample ---- -id: core-navigation-button--neutral-outlined ---- -:: - -#### White - -::DocsExample ---- -id: core-navigation-button--neutral-white ---- -:: - - -#### Elevated - -::DocsExample ---- -id: core-navigation-button--neutral-elevated ---- -:: - ---- - -## Rationale - -To enhance visual weight and aim to confirm with [WCAG 2.0 Criterion 1.4.1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-without-color.html), Ripple buttons use underlined text by default on white buttons. - -This underline shows users there is an interaction that they can perform. - -> 1.4.1 Use of Color: Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A) diff --git a/docs/content/design-system/5.components/call-to-action.md b/docs/content/design-system/5.components/call-to-action.md deleted file mode 100644 index 0d1f961c6a..0000000000 --- a/docs/content/design-system/5.components/call-to-action.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Call to action -description: The Call to action component is a card promoting a specific piece of content and featuring a button highlighting the call to action. -layout: page -label: Core ---- - -## Usage -Use the call to action card to give a brief summary of content or a task. The call to action card features a button highlighting the call to action. - -Use it to give your call to action more visual prominence. The call to action card can guide users to perform a preferred action. - -::DocsExample ---- -id: core-navigation-card--call-to-action ---- -:: - -### When and how to use -- Use clear and concise content. -- Ensure content is relevant to the action or destination. -- Embed in any body content area of a content page. -- Use with a relevant image or graphic. - -### When and how not to use -- Don’t use without an image or graphic. -- Don’t overload it with content. -- Don’t use when a large amount of text is needed for more context. -- Don’t use other interactive elements, like links. - ---- - -## Theming -The call to action card adopts its theming from your button component’s settings. - -If you choose neutral button for your site, the call to action card will display buttons in the neutral theme. - - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-card--call-to-action - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/callout.md b/docs/content/design-system/5.components/callout.md deleted file mode 100644 index e82146de55..0000000000 --- a/docs/content/design-system/5.components/callout.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Callout -description: The Callout component is a text excerpt that draws attention to specific or important content. -layout: page -label: Core ---- - -## Usage -Use callouts to: -- draw a user's attention -- add emphasis to the content -- provide a user with more information. - -A callout repeats and highlights content already on the page. Use callouts sparingly. To maintain effectiveness, consider weaving this information into the page's main content. - -::DocsExample ---- -id: core-containers-content--callout ---- -:: - -### When and how to use -- Highlight important information vital to the user. -- Place a callout in a prominent position on the page. -- Use with text only. - -### When and how not to use -- Only feature one callout per page. -- Use no more than 2 paragraphs per callout. -- Don't put the callout at the bottom of the page. - ---- - -## Variants -To allow for different levels of emphasis, a callout has 2 styles: -- accent -- neutral. - -### Accent -Use the accent variant to add a high level of emphasis to the selected content. The callout accent can adopt any WYSIWYG type styles you choose. - -::DocsExample ---- -id: core-containers-content--callout ---- -:: - -### Neutral -Use the neutral variant to give content a medium level of emphasis. The neutral callout uses a predefined type style that you cannot change. - -::DocsExample ---- -id: core-containers-content--callout-neutral ---- -:: - ---- - -## Theming -The accent variant uses the site accent colour to: -- add visual prominence to the content -- aid hierarchy in the content area. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-content--callout - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). - ---- - -## Rationale -To enhance visual weight and aim to conform with [WCAG2.0 Criterion 1.4.1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-without-color.html), Ripple callouts use: -- a thick left-hand border -- background colours -- padding. - -> 1.4.1 Use of Color: Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A) diff --git a/docs/content/design-system/5.components/campaign-banner.md b/docs/content/design-system/5.components/campaign-banner.md deleted file mode 100644 index 4eb662d8b8..0000000000 --- a/docs/content/design-system/5.components/campaign-banner.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Campaign banner -description: The Campaign banner component draws a user's attention to promoted content. -layout: page -label: Core ---- - -## Usage -Use campaign banners to promote content. They include a feature image and have an optional call to action. - -The banner has a headline and short summary text. These point users to promoted content and guide them to a call to action contained in a button. - -Campaign banners can be used at the top or bottom of a page, under the header or above the footer. - -::DocsExample ---- -id: core-navigation-campaign-banner--primary-image ---- -:: - -### When and how to use -- Promote a campaign or related page content. -- Add an optional image. -- Use with an optional call to action. - -### When and how not to use -- Don’t overload with content. -- Don’t use an unrelated image. - ---- - -## Variants -The campaign banner has 2 variants: -- featured, which appears at the top of the page, below the header -- image inset, which appears at the bottom of the page above the footer. - -### Featured -A featured campaign banner goes at the top of the page underneath the header. When on larger screens, the image is cropped in a shape and can overlap the component above (the header). - -There is an option to include metadata for the image if required. - -::DocsExample ---- -id: core-navigation-campaign-banner--primary-image ---- -:: - -### Image inset -The image inset variant sits above the footer at the bottom of the page. This should be used for less prominent campaigns. For featured campaigns, we recommend using the featured variant at the top of the page. - -::DocsExample ---- -id: core-navigation-campaign-banner--secondary-image ---- -:: - ---- - -## Theming -The campaign banner adopts its theming from the button component. - -If you choose the neutral button variant for your site, the campaign banner will display buttons in the neutral theme. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-campaign-banner--primary-image - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/card.md b/docs/content/design-system/5.components/card.md deleted file mode 100644 index e30845cf8e..0000000000 --- a/docs/content/design-system/5.components/card.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Card -description: The Card component shows content about another page, event or topic. They help users find relevant information. -layout: page -label: Core ---- - -## Usage -Use cards to help users find the right information quickly. - -They can combine a variety of content, including text, media and links. - -Cards are best used on a landing page to highlight any related pages, events or ongoing campaigns. - -Ensure headings are direct and summaries are concise. - -::DocsExample ---- -id: core-navigation-card--promo -argsString: 'graphicElement:None' ---- -:: - -### How this component works -Cards can be made up of: -- metadata, to show supplementary data to give the user more information (for example, date, topic, status, etc.) -- headline, to provide a snapshot of the content -- summary, to provide further details -- visual elements, to provide visual prominence. - -You only need a headline and a summary for a card. All other elements are optional and will depend on a user's needs. - -#### Metadata -All cards have optional metadata. Use metadata to display a combination of: -- topic/tag - categories for when a user needs to group content (for example, departments, agencies, services, etc.) -- date - how old the content is, for when this information is important to the user -- status - where a component or action is sitting within a process. - -#### Visual elements -Visual elements in cards allow for different content to stand out. They can also provide additional context. - -Elements that can provide visual prominence include: -- an image -- a highlight border -- a blocked headline type. - -Use visual elements carefully. Only use a visual element if it: -- is meaningful to the user journey -- supports what is already in the content -- can help the user differentiate content from other content -- can be easily identified -- is informative and not only decorative. - -### When and how to use -- Group together cards with similar content. -- Use only a single style of card within a set of cards. -- Keep the content clear and concise. -- Only use one piece of information per card. - -### When and how not to use -- Don't mix different card variants in a group. -- Never use a single card only. -- Never repeat content in a group of cards. -- Don't overload cards with content. -- Don't include other interactive elements, like links, inside the card. - ---- - -## Variants -A card has 2 main variants and is styled for its purpose. -- Promotion Cards, which is used to highlight important content. -- Navigation Cards, which is used for larger groups of content. - -### Promotion cards -Promotion cards provide an eye-catching way to promote links to other pages on your site (or external sites). - -Promotion cards stack in a grid when used in a collection. - -Promotion cards have 4 variants: -- standard -- highlight -- image full bleed -- avatar. - -#### Standard -::DocsExample ---- -id: core-navigation-card--promo -argsString: 'graphicElement:None' ---- -:: - -#### Highlight -The highlight variant gives the card more visual prominence. Use this to guide users to the content. - -::DocsExample ---- -id: core-navigation-card--promo -theme: 'docsTheme2' -argsString: 'graphicElement:Highlight' ---- -:: - -#### Image full bleed -The image full bleed variant gives the option to add a relevant image to grab the user’s attention. - -::DocsExample ---- -id: core-navigation-card--promo ---- -:: - -#### Avatar -::DocsExample ---- -id: core-navigation-card--avatar ---- -:: - -### Navigation cards -Navigation cards are useful for displaying and breaking down large groups of content options. - -On landing pages, they are used to highlight all the different sections of that site. - -Navigation cards fill the full width of the content area. They will always stack vertically. - -There are 3 variants of navigation cards: -- standard -- image inset -- heading highlight. - -#### Standard -::DocsExample ---- -id: core-navigation-card--nav -argsString: 'graphicElement:None' ---- -:: - -#### Image inset -A related image can increase a card's visual prominence. - -::DocsExample ---- -id: core-navigation-card--nav ---- -:: - -#### Heading highlight -To draw attention to the heading and highlight the content, use a heading highlight. - -::DocsExample ---- -id: core-navigation-card--nav -argsString: 'graphicElement:Heading+highlighted' ---- -:: - ---- - -## Theming -Cards use colour for: -- interaction states -- adding visual prominence to some elements. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-card--promo - argsString: 'graphicElement:Highlight' - --- - :: - ::DocsExample - --- - id: core-navigation-card--nav - argsString: 'graphicElement:Heading+highlighted' - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/carousel.md b/docs/content/design-system/5.components/carousel.md deleted file mode 100644 index b7b6faea7a..0000000000 --- a/docs/content/design-system/5.components/carousel.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Carousel -description: The Carousel component is a set of related cards that users can side-scroll through. -layout: page -label: Core ---- - -## Usage -Use a carousel to let users browse through a set of up to 9 cards with pagination controls. - -The content in the carousel should be related in some way. This helps users to find related and relevant content. - -::DocsExample ---- -id: core-containers-card-carousel--breakpoints ---- -:: - -### When and how to use -- Use a combination of promotion cards. -- Use when wanting to display a collection of cards with related content. -- Add to any page type. -- Include with an accompanying title to give context to users. - -### When and how not to use -- Don’t use more than 9 cards or fewer than 3. -- Don't use with navigation or other card types. - ---- - -## Theming -The carousel adopts its theming from the card and pagination components. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-card-carousel--breakpoints - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/category-grid.md b/docs/content/design-system/5.components/category-grid.md deleted file mode 100644 index 8b766d85a3..0000000000 --- a/docs/content/design-system/5.components/category-grid.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Category grid -description: The Category grid component shows multiple cards laid out in a grid, allowing users to browse a collection of categories. -layout: page -label: Core ---- - -## Usage - -Use a category grid to help users browse a range of categories and content. Each card in a collection acts as a link to more information. - -A category grid uses the text link style to indicate clickable elements. An accompanying media item, such as an icon or pictogram, is used to support the content for each category. - -The media item you choose must be directly relevant to the card’s content, to support and reinforce the user’s understanding. The icon or pictogram should clearly show the difference in topics and should be easily identifiable. - -::DocsExample ---- -id: core-navigation-card--category-grid ---- -:: - -### When and how to use - -- Use as a collection of cards only. -- Include clear and concise content. -- Use with icons or pictograms. -- Be careful not to include too many cards. -- Always use unique media items per card. - -### When and how not to use - -- Don’t use a single card only. -- Don’t repeat content in the same a group of cards. -- Don’t overload with content. -- Don’t include with other interactive elements like links. -- Don’t use without a media item. -- Don’t use on pages with a sidebar. - ---- - -## Theming - -The category grid uses colour to indicate interaction states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-card--category-grid - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/checkbox.md b/docs/content/design-system/5.components/checkbox.md deleted file mode 100644 index a8ca0bcbf0..0000000000 --- a/docs/content/design-system/5.components/checkbox.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: Checkbox -description: The Checkbox component lets users select one or more options from a list. -layout: page -label: Core ---- - -## Usage -Use checkboxes to allow users to: -- select one or more list options -- toggle one option on or off. - -Don't use a checkbox if only one option is available or if you expect the user to only select one option. For this, use the radio button component instead. - -::DocsExample ---- -id: forms-checkbox-group--default-variant ---- -:: - -### How this component works -Use checkboxes with a: -- form label -- optional requirement label -- optional hint text -- checkbox label. - -Checkboxes should always have a form and checkbox label. - -#### Single checkbox -A single checkbox confirms a user's selection or preference. Examples include when a user is agreeing to terms and conditions or registering for a the only available option presented. - -#### Checkbox group -Checkbox groups provide a list of available items for the user to choose from. Always tell the user how many options they can select. - -Always give checkbox groups a clear and descriptive label. The label should say what the options represent and should help the user to choose one. Doing so ensures good accessibility, as screen readers read each option's label. - -Not all users will know the visual difference between a checkbox and a radio button. You can could add extra instructions to guide users, for example, ‘Select up to 3 options’. - -### When and how to use -- Use checkboxes for lists with more than one selectable option. -- Use hints to inform users that more than one option can be selected, for example, 'Select all that apply'. -- Always position checkboxes to the left of their labels because this makes them easier to find, especially if using a screen magnifier. -- Ensure you list the options in a logical and unbiased manner. It could be helpful to users if you order them from most common to least common. - -### When and how not to use -- Don't use checkboxes for a single selectable list option, use radio buttons for this. -- Don't pre-select checkboxes because users may not realise they submitted the wrong answer or missed a question. - ---- - -## Variants -Checkboxes have 2 variants: -- default, used on white backgrounds -- reverse, used on neutral backgrounds. - -### Default -::DocsExample ---- -id: forms-checkbox-group--default-variant ---- -:: - -### Reverse -Use the reverse variant when the chip appears on the primary colour. - -::DocsExample ---- -id: forms-checkbox-group--reverse-variant ---- -:: - -### Error -All form inputs share error state styling. - -Make sure errors follow error message guidance. Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -**Error: nothing is selected and the question has options in it** - -Structure this message to help the user to choose which options apply to them. -- Error message: ‘Select if \[options\]’. -- Example: ‘Select if you like summer, winter, autumn, and/or spring'. - -**Error: nothing is selected and the question does not have options in it** - -Structure this message to help the user to choose which options apply to them. -- Error message: ‘Select \[options\]’. -- Example: 'Select your favourite season'. - -::DocsExample ---- -id: forms-checkbox-group--invalid ---- -:: - - ---- - -## Theming -A checkbox uses colour for interactive states. - -A checkbox in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of a checkbox remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-checkbox-group--default-variant - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/chip.md b/docs/content/design-system/5.components/chip.md deleted file mode 100644 index 586f8e0b60..0000000000 --- a/docs/content/design-system/5.components/chip.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Chip -description: The Chip component is an interactive element to draw a user’s user attention to a category. -layout: page -label: Core ---- - -## Usage -Use chips to represent options in a specific context. They are unlike buttons, which are persistent across contexts. - -A chip labels or draws attention to categorised content. Chips can be interactive and help users navigate to relevant content easily. - -When displaying multiple chips together, place them in a row. - -::DocsExample ---- -id: core-navigation-chip--default-story ---- -:: - -### When and how to use -- Include keywords. -- Use on any content page. -- Link through to the topic page. - -### When and how not to use -- Don’t include punctuation. -- Don’t use as a heading. -- Don’t include more than 4 words. -- Don’t use without an interaction or link. - ---- - -## Chips or buttons? -While chips and buttons both prompt calls to action, they are different. - -Multiple chips should all sit together. Buttons should sit separately from each other. - -Chips react to their context, but buttons are fixed and remain static. - -Chips convey forking paths in a user experience, while buttons show a linear step. - ---- - -## Variants -The chip has a default and reverse variant, allowing flexible use across a range of backgrounds. - -### Default -::DocsExample ---- -id: core-navigation-chip--default-story ---- -:: - -### Reverse -Use the reverse variant when the chip appears on the primary colour. - -::DocsExample ---- -id: core-navigation-chip--reversed ---- -:: - ---- - -## Theming -The chip uses the primary and primary-accessible colour tokens. This is to meet colour contrast requirements when theming. - -If the site primary colour is ‘light’, the chip content will display in the type-default colour. The border will always take on the site primary colour. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-chip--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/contact-us.md b/docs/content/design-system/5.components/contact-us.md deleted file mode 100644 index c540803b0c..0000000000 --- a/docs/content/design-system/5.components/contact-us.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Contact us -description: The Contact us component is a list of contact details and links to help the user get in touch with you. -layout: page -label: Core ---- - -## Usage -Use the contact us component to show the user multiple pieces of contact information or actions. The details should be related to the page content and a single point of contact. - -Contact us details can include a: -- contact person -- address -- phone number -- social media account. - -::DocsExample ---- -id: core-containers-contact-us--contact-us ---- -:: - -### When and how to use -- Provide users with additional contact details relevant to the page. -- Display any combination of physical and postal addresses, phone numbers, email addresses and common social media accounts. -- Display in the sidebar of the page. - -### When and how not to use -- If you add social media accounts to the contact us component, don’t add the social share component. -- Never use unrelated contact details or social media accounts. - ---- - -## Theming -Contact us uses colour for: -- visual prominence for key information -- link icons. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-contact-us--contact-us - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/date-input.md b/docs/content/design-system/5.components/date-input.md deleted file mode 100644 index f931f56cad..0000000000 --- a/docs/content/design-system/5.components/date-input.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: Date input -description: The Date input component helps users enter a date. -layout: page -label: Core ---- - -## Usage -Use date input to let users to enter a date they already know, or a date they can enter without needing a calendar. - -Date input has 3 fields: day, month and year. - -Don’t set this component to automatically tab between these fields. This can be confusing and jarring for the user. - -::DocsExample ---- -id: forms-date-input--default-story ---- -:: - -### How to use this component -You must use a form label with a date input. - -You can use an date input with: -- requirement label -- hint text -- placeholder text. - -#### Avoid placeholder text -Avoid using placeholder text where possible. It disappears when a user starts typing. Not all screen readers will read out placeholder text. Its colour often lacks the contrast needed for accessible content when using some browser default styling. - -If placeholder text can’t be avoided, don’t use it to replace a label or hint text. Don’t use it to show an example or to include any critical information. - -#### Hint text -Hint text can be used to tell the user what, or how, to successfully complete a date input. - -For example, hint text can include specific formatting examples or requirements. - -Only use hint text where it’s needed. Don’t use it just to keep the layout consistent with other fields in the form. - -### When and how to use -- Always use date inputs with a label. -- Write short and concise labels. -- Use hint text to show the expected date format, for example, ‘07 11 2022’. - -### When and how not to use -- If it’s not likely users will know the exact date, don’t use date input. -- Don’t use without a form label or hint text specifying the expected date format. -- Avoid placeholder text because it can cause accessibility issues. -- Don’t disable copy and paste. -- Don’t use placeholder text to give instructions or important examples. -- Don’t write ambiguous error messages only stating what's wrong - explain how the user can fix it. - ---- - -## Variants -The date input has 2 variants: -- default, used on white backgrounds -- reverse, used on neutral backgrounds. - -### Default -::DocsExample ---- -id: forms-date-input--default-story ---- -:: - -### Reverse - -::DocsExample ---- -id: forms-date-input--reverse ---- -:: - -### Error -All form inputs share error state styling. - -Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -When creating an error message for a date input, use the wording below. - -**Error: whole date field is empty** -- Highlight area: entire date input. -- Error message: ‘Enter \[the missing information\]'. -- Example: ‘Enter your dog’s birthday'. - -**Error: some of date field is empty or incomplete** -- Highlight area: relevant day, month and/or year fields. -- Error message: ‘\[Information requested\] must include a \[name of empty or incomplete field\]’. -- Example: ‘Your dog’s birthday must include a month'. - -**Error: impossible date entered** -- Highlight area: relevant day, month and/or year fields. -- Error message: ‘\[Information requested\] must be a real date’. -- Example: ‘Your dog’s birthday must be a real date'. - -**Error: future date given when past date needed** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be in the past’. -- Example: ‘Your dog’s first playdate must be in the past'. - -**Error: future date given when today or past date needed** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be today or in the past’. -- Example: ‘Your dog’s first beach visit must be today or in the past'. - -**Error: past date given when future date needed** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be in the future’. -- Example: ‘Your dog’s next raincoat purchase must be in the future'. - -**Error: past date given when today or future date needed** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be today or in the future’. -- Example: ‘Your dog’s next zoomies must be today or in the future'. - -**Error: date is not on or after another particular date** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be the same as or after \[particular date and optional description\]’. -- Example: ‘Your dog’s next holiday must be on or after 2 April 2027 when you go on a roadtrip'. - -**Error: date is not after another particular date** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be after \[particular date and optional description\]’. -- Example: ‘Your dog’s next blow-dry must be after 2 April 2026 when the groomer returns'. - -**Error: date is not the same as or before another particular date** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be on or before \[particular date and optional description\]’. -- Example: ‘Your dog’s next hike must be on or before 2 January 2025'. - -**Error: date is not before another particular date** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be before \[particular date and optional description\]’. -- Example: ‘Your dog’s next movie and pizza night must before 2 August 2027'. - -**Error: date is not between 2 other dates** -- Highlight area: entire date input. -- Error message: ‘\[Information requested\] must be between \[earliest date\] and \[latest date and optional description\]’. -- Example: ‘Your dog’s next cuddles must be between 2 September 2026 and 3 September 2026'. - -**Error: date uses known characters that aren’t allowed** -- Highlight area: relevant day, month and/or year fields. -- Error message: ‘The date must not include \[characters\]'. -- Example: ‘The date must not include + & ~'. - -**Error: date uses unknown characters that aren’t allowed** -- Highlight area: relevant day, month and/or year fields. -- Error message: ‘The date must only include numbers'. - -::DocsExample ---- -id: forms-date-input--invalid ---- -:: - ---- - -## Theming -Date input uses colour to show interactive states. A date input field in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of a date input field remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-date-input--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/detail-list.md b/docs/content/design-system/5.components/detail-list.md deleted file mode 100644 index 76338849f6..0000000000 --- a/docs/content/design-system/5.components/detail-list.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Detail list -description: The Detail list component shows a list of key information to users. -layout: page -label: Core ---- - -## Usage - -Use the detail list to display a list with labels. This surfaces (retrieves and displays) and highlights key information to users. - -Each row of the detail list comprises a: -- label, a descriptive or informative label for your content, for example, 'Location' -- content, the piece of information itself, for example, 'East Gippsland'. - -The detail list is used to display: -- metadata, for example, ‘Published date' (which shows as '22 March 2023’) -- status, for example of a program or grant. - -Only use the detail list for simple information. For data or complex information, consider using a table. - -::DocsExample ---- -id: core-containers-description-list--with-link ---- -:: - -### When and how to use -- Use single words only for the label. -- Include a link if you need to. -- Keep the summary content and labels clear and concise. -- Align all summary content to the longest label. - -### When and how not to use -- Don't use labels for unrelated summary content. -- Don't use it to surface information that is not important to users. -- Don't use with complex or long form content. - ---- - -## Theming - -When a link is present, the detail list uses the link colour for interaction states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-description-list--with-link - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/dropdown.md b/docs/content/design-system/5.components/dropdown.md deleted file mode 100644 index 69de25a6c9..0000000000 --- a/docs/content/design-system/5.components/dropdown.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -title: Dropdown -description: The Dropdown component lets users see a list of available options and then select one or more options. -layout: page -label: Core ---- - -## Usage -Use this component to let users select one or more items from a dropdown list of available items. - -It can be helpful when users need to choose from 6 or more options. It can also be used when listing all options in checkboxes or radio buttons is not viable. - -Dropdowns should only be used as a last resort. For example, to find a compromise between usability and keeping the layout compact and clear. - -Many users find dropdowns hard to use. Dropdowns hide content by default and create user confusion, cross-device issues and limited accessibility. Use radio buttons, checkboxes or input fields for most small lists instead. - -A compromise might be needed for a long list of options (for example, all dog breeds). Or, when option description lengths vary or wrap over multiple lines. These situations also confuse users by creating layout issues for checkboxes, input fields or radio buttons. - -A dropdown is often called a 'select'. - -::DocsExample ---- -id: forms-dropdown--single-select-many-items ---- -:: - -### How this component works -You must use a form label with a dropdown. - -You can use a dropdown with: -- requirement label -- hint text -- placeholder text. - -#### Single select -A single select dropdown is used when users can select only a single option. - -#### Multi select -If using a multi select dropdown, always tell the user how many menu options they can select. Add extra instructions in the hint text to guide them. For example, 'Select up to 3 options'. - -Even though users can choose multiple items in a multi select dropdown, they often find this confusing. checkboxes could be better. - -#### Hint text -Hint text can be used to tell the user what, or how, to successfully complete a dropdown. - -For example, hint text can include: -- an overall description of the dropdown -- hints for what kind of information needs to be input -- specific formatting examples or requirements. - -Only use hint text where it’s needed. Don’t repeat the label. Don’t use it just to keep the layout consistent with other fields in the form. - -#### Placeholder text -Avoid using placeholder text where possible. It disappears when a user starts typing. Not all screen readers will read out placeholder text. Its colour often lacks the contrast needed for accessible content when using some browser default styling. - -If placeholder text can’t be avoided, don’t use it to replace a label or hint text. Don’t use it to show an example or to include any critical information. Placeholder text for the dropdown trigger must clearly tell the user its purpose. - -#### Selected value -The selected value shows the option a user has selected. - -#### Text overflow -When the field label and menu text are too long for the available horizontal space, they wrap to form another line. - -The field text itself truncates at the end, but the text can be shown in full in the menu. - -#### Menu height -The dropdown menu has a maximum height of 288px or 6 single text-line options. - -We recommend starting a scroll at the sixth option in the menu list. This may vary based on your specific use case. - -### When and how to use -- Use as a last resort component. -- A label must be used with a dropdown. -- Ensure dropdown item descriptions are short and concise. -- Use when listing between 6 and (if possible) 15 items, if checkboxes or radio buttons can’t be used. - -### When and how not to use -- Never set the form to submit when a dropdown item is selected. -- Don’t write long menu option descriptions. -- Descriptions should not wrap over a single line. -- Icons or decorative images should never be used in dropdowns. -- Do not use a dropdown for listings less than 6 options, consider using radio buttons or checkboxes. -- Do not use a dropdown without a label as it confuses users and is not accessible. - ---- - -## Variants -Dropdown has 2 main variants: -- single select -- multi select. - -Both variants have default and reverse sub-variants. - -### Single select -A single select dropdown is used when users can select only a single option. - -#### Making a selection -- Placeholder text is shown by default in the field when the dropdown is closed. -- Interacting with a closed field opens a menu of options. -- The dropdown closes when an option is chosen. -- The selection option replaces the placeholder text, but also remains in place if the menus is opened. -- The selected option then has a tick to the left of the option in the open menu, to remind the user of the selected value. - -#### Default -::DocsExample ---- -id: forms-dropdown--single-select-many-items ---- -:: - -#### Reverse -::DocsExample ---- -id: forms-dropdown--reverse-variant ---- -:: - -### Multi select -Users can choose multiple items in a list or to filter information. - -If using a multi select dropdown, always tell the user how many menu options they can select. - -Add extra instructions in the hint text to guide them. For example, 'Select up to 3 options'. - -#### Making a selection -- Placeholder text is shown by default in the field when the dropdown is closed. -- When the menu is opened, each option shows a checkbox input to the left of its text. -- When options are being selected, the menu stays open. -- The selected options replaces the placeholder text. When selected options extend beyond the width of the field, the values truncate. A ‘+#’ appears to the right of the field, to show how many unseen options (#) are selected. -- As multiple selections are possible, the user needs to interact outside the dropdown, or on the field, to close the menu. - -#### Default - -::DocsExample ---- -id: forms-dropdown--multi-select-many-items ---- -:: - -#### Reverse - -::DocsExample ---- -id: forms-dropdown--reverse-variant -argsString: 'multiple:true' ---- -:: - -### Error -All form inputs share error state styling. - -Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -When creating an error message for a dropdown, use the wording below. - -**If nothing is selected and the question has options in it** - -Structure this message to help the user to choose which options apply to them. -- Error message: ‘Select if \[options\]’. -- Example: ‘Select if you like summer, winter, autumn, and/or spring.' - -**If nothing is selected and the question does not have options in it** - -Structure this message to help the user to choose which options apply to them. -- Error message: ‘Select [options]’. -- Example: 'Select your favourite season'. - -::DocsExample ---- -id: forms-dropdown--error ---- -:: - ---- - -## Theming -Dropdown uses colour for: -- interactive states -- icons. - -A dropdown in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of a dropdown remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-dropdown--multi-select-many-items - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/file.md b/docs/content/design-system/5.components/file.md deleted file mode 100644 index 4418b7bca2..0000000000 --- a/docs/content/design-system/5.components/file.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: File -description: The File component shows a link, with additional metadata, and lets a user download a file attachment. -layout: page -label: Core ---- - -## Usage -Use the File component to let users download an attachment. It is accompanied by an optional description so you can give the user more information. - -File is made up of: - -- the file name -- metadata including file type and size -- a document description. - -::DocsExample ---- -id: core-containers-file--with-caption ---- -:: - -### When and how to use - -- Use on any page type. -- Include in page content areas only. -- Add an optional description. -- Add optional updated data if it’s relevant to users. -- Always include metadata. - -### When and how not to use - -- Don’t use with a non-descriptive file name. - ---- - -## Theming - -File uses colour for: - -- indicating to users that they may have an action to complete -- interactive states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-file--default-story - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/footer.md b/docs/content/design-system/5.components/footer.md deleted file mode 100644 index f8edf98a27..0000000000 --- a/docs/content/design-system/5.components/footer.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Footer -description: The Footer component helps help users find information at the bottom of a page. -layout: page -label: Core ---- - -## Usage - -Use footers to help users find what they need after scrolling to the bottom of a page. Footers provide supplementary information such as: - -- copyright -- contact information -- links to other pages within the website -- social media links. - -The footer must be used at the bottom of every page. It is separate from the primary navigation but is relevant to the entire site. - -::DocsExample ---- -id: core-navigation-footer--default-story ---- -:: - -### How this component works - -The footer is made up of: -- optional section links, which help avoid dead ends by giving users a way to continue their journey through: - - additional links (internal and external) - - bypassing main navigation -- optional social links, which can be used to link to social media accounts -- core site links, which must always be used and include the privacy statement, contact information and terms of use -- a copyright statement, which clarifies who owns the copyright and is specific to your agency or department (add the State Government of Victoria logo to vic.gov.au services, for sitewide consistency) -- an Acknowledgement of Traditional Owners message (an acknowledgement component). - -### When and how to use -- Use with an optional supporting logo relevant to the site content. -- Use a consistently-themed footer across all pages of your site. -- Use the optional neutral theme. -- Use with an optional image credit for the header image. - -### When and how not to use -- Don’t alter the required links in the core section of the footer. -- Don’t change the text in the acknowledgement component. -- Don’t use with links that are not relevant to your organisation. - ---- - -## Theming - -You can theme the footer in 3 ways: -- site colour palette -- neutral colour palette -- custom colour palette (see [theming guidance for designers]()). - -### Site colour palette - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-footer--default-story - --- - :: -:: - -### Neutral colour palette - -Implemented at a site level, the footer has predefined neutral colour values. You are unable to edit or customise these colours. - -::DocsExample ---- -id: core-navigation-footer--neutral ---- -:: - -### Custom colour palette - -The footer has its own colour tokens. Because of this, it's possible to apply a custom theme to your footer. - -This is only recommended as a last resort. - -See [component specific theming guidance for designers](). - -::DocsExample ---- -id: core-navigation-footer--default-story -theme: 'docsTheme3' ---- -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/form-alert.md b/docs/content/design-system/5.components/form-alert.md deleted file mode 100644 index d8c1f5d359..0000000000 --- a/docs/content/design-system/5.components/form-alert.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Form alert -description: The Form alert component shows the user the outcome of a form submission or validation. -layout: page -label: Core ---- - -## Usage -Use a form alert to tell the user if a form has been submitted, or if there were errors in the form that prevented submission. - -The form alert appears at the top of the form and the user is automatically scrolled to it on submission. - -There are 2 types of alerts: -- success -- error. - -::DocsExample ---- -id: forms-form-alert--error ---- -:: - -### When and how to use -- Show the validation outcome of a form submission. -- If successful, use with relevant success message. -- Write error messages for the alert summary exactly the same way they are worded for inline error messages (next to the inputs with the errors). -- Include a custom error summary if required. -- Make your error messages clear and concise. - -### When and how not to use -- Do not use the form alert without providing a summary of errors (if a submission is invalid). -- Do not restyle with other colours or icons. - ---- - -## Variants -Form alert has 2 variants: -- success -- error. - -### Success -Success alerts tell users their form submissions worked. They are always static and stay until a user moves away from that page or view. - -To help screen reader and other users notice it, ensure that on submission the focus is moved to the alert. - -::DocsExample ---- -id: forms-form-alert--success ---- -:: - -### Error -If one or more form validation errors occur, they must always be presented using: -- the error summary alert -- individual error messages next to each form field with an error (inline). - -Make your error messages clear and concise. - -Error summary alerts tell the user everything they need to fix before they can submit the form. This goes above the form. - -Inline error messages show a user where the errors happened. - -On submission of the form, you must: -- move the keyboard focus to the error summary -- include the heading ‘There is a problem’ in the error summary -- link to all answers with validation errors -- write error messages for the summary alert exactly the same way they are worded for inline error messages. - -As well as showing an error summary, follow the validation pattern. For example, add, ‘Error: ’ to the start of the page \ so screen readers read it out as soon as possible. - -#### Linking from the error summary to each answer -Each error must be linked in the error summary to the form field (answer) causing it. - -For questions where the user could choose one or more options as an answer, link to the first radio or checkbox field instead. - -::DocsExample ---- -id: forms-form-alert--error ---- -:: - -#### Error messages -Specific error messages must be provided for specific error states. Style your error messages as directed by the ‘Error’ section on the pages for the following form components: -- [input field](/design-system/components/input-field) -- [text area](/design-system/components/text-area) -- [date input](/design-system/components/date-input) -- [checkbox](/design-system/components/checkbox) -- [radio button](/design-system/components/radio-button) -- [dropdown](/design-system/components/dropdown). diff --git a/docs/content/design-system/5.components/form.md b/docs/content/design-system/5.components/form.md deleted file mode 100644 index 03ac3816a9..0000000000 --- a/docs/content/design-system/5.components/form.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Form -description: The Form component guides users to give information and consists of a group of related inputs or controls. -layout: page -label: Core ---- - -## Usage -Use a form and its form input components to capture data from users. A form consists of a group of related inputs or controls. - -Common form components include the: -- [input field component](/design-system/components/input-field) -- [text area component](/design-system/components/text-area) -- [date input component](/design-system/components/date-input) -- [radio button component](/design-system/components/radio-button) -- [checkbox component](/design-system/components/checkbox) -- [dropdown component](/design-system/components/dropdown). - -An input field) is for short (single-line) text entry. A text area is for longer text. - -Other input types let a user select from predefined options. Use a radio button when a user needs to make only one selection. Use a checkbox for multiple selections. - -Group related form components in logical chunks (fieldsets). A single form can have multiple fieldsets. For example, a fieldset with several input fields for an address, plus a fieldset with a date input and radio button for delivery preferences. - -The user can submit a form when all fields are valid (see [form alert](/design-system/components/form-alert/)). - -::DocsExample ---- -id: forms-form--default-story ---- -:: - -### How this component works -#### Layout -Use one form column to enable fast field comprehension. Users cannot scan easily if more columns are used. - -Group related form components into logical chunks (fieldsets). This helps users understand the information they need to give. - -#### Labels -Each input must have a label. - -Use short, descriptive labels. This helps users quickly understand the information needed. It makes the content accessible, as a screen reader will read out these labels. - -Put a label above its component (top-aligned). Labels will then be consistently aligned left, with small spaces between inputs. This helps users scan and fill the form. - -Placeholder text should not be used as a label. - -#### Requirement - optional vs. mandatory - -Mark an input as ‘required’ if you do not want the form submission to work unless the user gives that information. - -Most fields on a simple form will be required. - -Where possible, don’t include a large number of optional fields. - -#### Hint text -Hint text can be used to tell the user what, or how, to successfully complete an input or text field. - -For example, hint text can include: -- an overall description of the input field -- hints for what kind of information needs to be input -- specific formatting examples or requirements. - -Only use hint text where it’s needed. Don’t repeat the label. Don’t use it just to keep the layout consistent with other fields in the form. - -#### Placeholder text -[See accessibility](/design-system/components/form/#accessibility) (below). - -#### Error messages -All form inputs share error state styling. When creating an error message, it must follow the guidance from the individual form component’s page. - -Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. See the individual form component pages for suggested error messages. - -#### Buttons -Button labels should say what the button will do when a user interacts with it. - -Ensure the main action button tells the user when the form is being submitted (see [button loading spinner](/design-system/components/button/#loading-spinner)). - -To avoid confusing users about how to submit the form, use only one main action button. Do not use a reset button. - -#### Validation -Form alert is used to tell the user the outcome of the form validation. - -If the form has been submitted successfully, the success alert will replace the form. - -If the form has errors, the error alert will be placed at the top of the form, with an error summary and anchor links to all inputs that returned errors and require user actions. - -#### Accessibility -All fields need a visible, accessible label. (Search fields are sometimes an exception to this.) - -On devices such as mobiles, display the keyboard required for the input. For example, a number keyboard for a date input. - -Never disable a submit button. Allow the user to submit the form and then display the error message. Use form alert to display the validation outcome. - -Avoid using placeholder text where possible. It disappears when a user starts typing. Not all screen readers will read out placeholder text. Its colour often lacks the contrast needed for accessible content when using some browser default styling. - -If placeholder text can’t be avoided, don’t use it to replace a label or hint text. Don’t use it to show an example or to include any critical information. - -Use autocomplete to reduce typing for users. - -### When and how to use -- Keep to one column. -- Use top-align labels. -- Always mark form fields as ‘required’ or ‘optional’. -- Make calls to action descriptive - state the intent of the action. -- Write short, clear headings and form input labels. -- Use hint text (instead of labels) to explain any specifications. -- Use field length input constraints - for fields with a defined character count like phone numbers and postcodes. -- Write clear error messages inline, in error summaries and in form alerts by specifying what went wrong, where and how to fix them. - -### When and how not to use -- Don’t create a form without a submit button. -- Don't use an input or control without a form label. -- Avoid using all caps. - ---- - -## Theming -Forms use colour for: -- interactive states -- icons. - -A form component in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of that form and its components remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-form--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/header.md b/docs/content/design-system/5.components/header.md deleted file mode 100644 index 9c5584ec29..0000000000 --- a/docs/content/design-system/5.components/header.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Header -description: The Header component introduces the purpose and content of a page. -layout: page -label: Core ---- - -## Usage - -Use headers to inform the user of what is on the page. The header must be placed at the top of a page above the main body content and styled as an H1-level heading. - -Headers include optional content such as introduction text, journey links, a call to action and an introduction banner. - -Headers should feature a primary message and/or call to action. They can be accompanied by supporting content such as images or corner graphics. - -The header can also support a campaign logo if required. This will display above the page title. - -::DocsExample ---- -id: core-containers-header--default-journey-links ---- -:: - -### When and how to use -- Keep the header simple and concise. -- Use clear calls to action that align with the message or task. -- Only use images that add value to the content and support the message. -- Include with featured links and buttons to help users perform key tasks. -- Include an optional campaign logo. - -### When and how not to use -- Don’t use a mix of reverse and default page title and introduction text styling. -- Don’t include the same links in the main and introduction banners. -- Don’t use with more than 6 journey links. -- Don’t overload with content. - ---- - -## Variants - -The header has 3 variants: - -- default -- reverse -- image. - -The default and reverse variants can be used with journey links or a call to action. These guide users to perform tasks or navigate to related information. - -They can display corner images to enhance brand recognition and visual prominence. They can also display a supporting campaign logo if required. - -The image variant displays a full background image with reverse blocked text. It only supports a page title and introduction text. - -All variants can be used with the introduction banner. - -### Default - -::DocsExample ---- -id: core-containers-header--default-story ---- -:: - -::DocsExample ---- -id: core-containers-header--default-call-to-action ---- -:: - -### Reverse - -The reverse variant uses reversed blocked type for the title and introduction text. This adds visual prominence to the banner and its information. - -::DocsExample ---- -id: core-containers-header--reverse-journey-links ---- -:: - -::DocsExample ---- -id: core-containers-header--reverse-call-to-action ---- -:: - -### Image - -An image can be added as a full background image. The title and introduction copy will always display as the reversed blocked type. - -Images should not be stretched or too low in resolution. They should also not be complex or include text. - -::DocsExample ---- -id: core-containers-header--image-reverse ---- -:: - -### Introduction banner - -The introduction banner: -- can be used to add content and journey links under the page title and introduction section in the main header banner -- has an optional icon and journey links -- should contain content relating to the content in the main header. - -::DocsExample ---- -id: core-containers-header--intro-with-links ---- -:: - ---- - -## Interaction with other components - -When using a featured campaign banner with an image, the image can overlap the header, depending on the amount of content. By default, this will hide the header's bottom corner shape. - -The bottom corner shape won't hide if an introduction banner is between the header and campaign banner. - -::DocsImageExample ---- -src: /assets/img/campaign-banner-behaviour.png -alt: 'A demonstration of the interaction between the Header component and the campaign banner, the campaign banner image slightly overlaps the header.' ---- -:: - ---- - -## Theming - -Headers can be themed in 2 ways: - -- site colour palette -- neutral colour palette. - -It will also adopt theming from the button component when displaying the call to action. - -If you choose neutral button for your site, the header will display buttons in the neutral theme. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-header--default-call-to-action - --- - :: - ::DocsExample - --- - id: core-containers-header--reverse-journey-links - --- - :: - ::DocsExample - --- - id: core-containers-header--intro-with-links - --- - :: -:: - -### Neutral theme - -Implemented at a site level, headers can have a neutral theme option. This option is only applicable to the reverse blocked type. Neutral headers have predefined neutral colour values that must be used and cannot be edited or customised. - -::DocsExample ---- -id: core-containers-header--image-neutral ---- -:: - -To create your own theme see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/in-page-navigation.md b/docs/content/design-system/5.components/in-page-navigation.md deleted file mode 100644 index 771ce0e77e..0000000000 --- a/docs/content/design-system/5.components/in-page-navigation.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: In-page navigation -description: The In-page navigation component sits above a page’s main content and shows a set of links. -layout: page -label: Core ---- - -## Usage - -Use in-page navigation to make scanning and navigating within a single page quicker for users. This component shows links to headings that are on the current page. It sits at the top of the page. - -Use in-page navigation for longer content pages. It acts as a table of contents, providing users with a summary and quick navigation across the page. - -The left-hand highlight bar: - -- separates the component from the page content -- groups the navigation. - -::DocsExample ---- -id: core-navigation-in-page-navigation ---- -:: - -### When and how to use -- In-page Navigation is ideal for pages with a lot of content. This will help users find their relevant content. -- Use headings throughout your content, such as headings level 2 (H2) and 3 (H3). You can use these as navigation links at the start of the page, like a table of contents. -- Use subheadings as indented navigation links from the page. - -### When and how not to use -- Don't link to other pages, including on external sites. -- Never use colons in the heading. -- Don't use it if you have less than 2 navigation links. -- Don't use it with component headings, such as accordion item headings. - ---- - -## Theming - -Ripple’s theming applies colour to in-page navigation so that the user understands: -- its links and navigation heading relate to each other -- they are deliberately separated from the main content. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-in-page-navigation - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/input-field.md b/docs/content/design-system/5.components/input-field.md deleted file mode 100644 index 79c225b080..0000000000 --- a/docs/content/design-system/5.components/input-field.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: Input field -description: The Input field component lets users input a short amount of text. -layout: page -label: Core ---- - -## Usage -Use input fields to let users enter, select and search for text. They are normally found in a form but can also be part of a modal or search. - -Use an input field for users to enter text shorter than a single line. - -Input fields can have multiple input types, depending on the need and use case. They have a text input type by default. - -Input fields can be used for entering: -- text: basic text or search terms -- phone: a telephone number -- email: an email address -- passwords: a user's input is obscured with a dot (' • '), asterisk (' * ') or other symbol as they type. - -Don’t use an input field if the user’s text needs to be more than one line long: use a text area component instead. - -::DocsExample ---- -id: forms-input--default-story ---- -:: - -### How this component works -Set the width of the input field to show the amount of information needed from the user. For example, use smaller widths for postcodes than for emails. - -You must use a form label with an input field. - -You can use an input field with: -- requirement label -- hint text -- placeholder text -- prefix or suffix text -- prefix or suffix icon. - -#### Avoid placeholder text -Avoid using placeholder text where possible. It disappears when a user starts typing. Not all screen readers will read out placeholder text. Its colour often lacks the contrast needed for accessible content when using some browser default styling. - -If placeholder text can’t be avoided, don’t use it to replace a label or hint text. Don’t use it to show an example or to include any critical information. - -#### Hint text -Hint text can be used to tell the user what, or how, to successfully complete an input field. - -For example, hint text can include: -- an overall description of the input field -- hints for what kind of information needs to be input -- specific formatting examples or requirements. - -Only use hint text where it’s needed. Don’t repeat the label. Don’t use it just to keep the layout consistent with other fields in the form. - -#### Prefix and suffixes -Use prefixes and suffixes to help users enter things like currencies and measurements. - -Prefixes and suffixes help when there’s a commonly understood symbol or abbreviation for the type of information needed. - -Don’t rely on prefixes or suffixes alone. Screen readers will not read them out. - -If you need a specific type of information, say so in the input label and hint text. For example, ‘Cost, in dollars’ in the input label and ‘$’ in the prefix. - -### When and how to use -- Always use a label for input fields. -- Use hint text to specify helpful information such as: - - expected number format, for example ‘Must be 6 to 8 digits long’ - - minimum and maximum number values, for example ‘Minimum of # and maximum of #’. -- Use the prefix to indicate measurements and categories like currency, for example, '$'. -- Use the prefix together with hint text to reinforce what the input needs to be, for example 'Cost, in dollars'. - -### When and how not to use -- Never use an input field without a label. -- Avoid placeholder text because it can cause accessibility issues. -- Don’t disable copy and paste. -- Don’t set a minimum or maximum input limit without explicitly saying this in the hint text. -- Don’t use placeholder text to give instructions. -- Don’t write ambiguous error messages only stating what's wrong, explain how the user can fix it. - ---- - -## Variants -The input field has 2 variants: -- default, used on white backgrounds -- reverse, used on neutral backgrounds. - -### Default - -::DocsExample ---- -id: forms-input--default-story ---- -:: - -### Reverse - -::DocsExample ---- -id: forms-input--reverse ---- -:: - -### Error -All form inputs share error state styling. - -Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -When creating an error message for an input field, use the wording below. - -**Error: empty input** -- Error message: ‘Enter \[the missing information\]'. -- Example: 'Enter your name'. - -**Error: input is too long** -- Error message: ‘\[The input\] must be \[number\] characters or less'. -- Example: 'Delivery address must be 56 characters or less'. - -**Error: input is too short** -- Error message: ‘\[The input\] must be \[number\] characters or more'. -- Example: 'Previous employer must be 3 characters or more'. - -**Error: input is too long or too short** -- Error message: ‘\[The input\] must be between \[number\] and \[number\] characters'. -- Example: 'Justification must be between 3 and 56 characters'. - -**Error: input uses known characters that aren’t allowed** -- Error message: ‘\[The input\] must not include \[characters\]'. -- Example: ‘Reasons must not include + & ~'. - -**Error: input uses unknown characters that aren’t allowed** -- Error message: ‘\[The input\] must only include \[list of allowed characters\]'. -- Example: ‘Explanations must only include letters, numbers and commas'. - ---- - -## Theming -Input field uses colour for: -- interactive states -- icons. - -An input field in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of an input field remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-input--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/key-dates.md b/docs/content/design-system/5.components/key-dates.md deleted file mode 100644 index 91172097da..0000000000 --- a/docs/content/design-system/5.components/key-dates.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Key dates -description: The Key dates component shows users a card promoting key dates or events. -layout: page -label: Core ---- - -## Usage - -Use key dates to provide a card with brief summaries of up to 2 events or key dates with a call to action. - -::DocsExample ---- -id: core-navigation-card--key-dates ---- -:: - -### When and how to use - -- Use only on landing pages. -- Include in a grid of promo cards. -- Only use once per page. -- Use clear and concise content. -- Only use as the last card in the grid. -- Include a summary. - -### When and how not to use - -- Don’t use with navigation cards. -- Don’t use the key dates card by itself. -- Don’t overload with content. -- Don’t use with other interactive elements like links. -- Don’t use it to replace a call to action. - ---- - -## Theming - -The key date card uses colour to: - -- add visual prominence to key information -- indicate an interaction to users. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-card--key-dates - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/media-embed.md b/docs/content/design-system/5.components/media-embed.md deleted file mode 100644 index 706951700b..0000000000 --- a/docs/content/design-system/5.components/media-embed.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: Media embed -description: The Media embed component shows an image or video within the page content, with optional text to give context. -layout: page -label: Core ---- - -## Usage - -Use media embed to add visual elements including images, videos, graphs, infographics, maps and charts to your page content. - -Use the optional text to combine the visual element with text, so that the user understands the visual element’s context. Optional text should always be used for complex media like graphs and charts with supporting data. - -Media can be an image or video. Images can display as small, medium or large. - -When using the complex media variant, media displays at either a max width or height. This ensures it always displays the full image. - -See [media](/design-system/components/media) for information relating to file type, ratios and focal point. - -::DocsExample ---- -id: core-containers-media-embed--image-landscape ---- -:: - -### When and how to use -- Use it with videos, images or complex images. -- Add data when using the complex image variant. -- Ensure the media is the right size so that it displays without error. -- Only add it to the content section of a page. -- Add an optional image caption and metadata. -- Always include alt text. - -### When and how not to use -- Don't include media unrelated to the page. -- Avoid adding interactive elements, like links, to the caption or metadata sections. -- Never use a video without closed captions and a transcript. - ---- - -## Variants - -Media embed has 3 variants: -- image -- video -- complex media. - -Depending on the variant used, you can display: -- a caption -- metadata -- a transcript link -- accompanying data. - -### Image - -The image variant has 4 display options: - -- landscape / 16:9 ratio -- portrait / 3:4 ratio -- square / 1:1 ratio -- avatar / circle. - -You can display portrait, landscape and square as small, medium or large. Avatar only displays in small or medium. - -The media gets cropped to fill the selected ratio. Make sure the media's focal point is best placed to accurately represent the media item. - -#### Landscape - -::DocsExample ---- -id: core-containers-media-embed--image-landscape ---- -:: - -#### Portrait - -::DocsExample ---- -id: core-containers-media-embed--image-portrait ---- -:: - -#### Square - -::DocsExample ---- -id: core-containers-media-embed--image-square ---- -:: - -#### Avatar - -::DocsExample ---- -id: core-containers-media-embed--image-avatar ---- -:: - -### Video - -Videos will always display at a 16:9 ratio. - -A 'view transcript' link displays by default. Videos must have both closed captions and a transcript. - -Include a supporting caption to give extra context to the user. - -::DocsExample ---- -id: core-containers-media-embed--video ---- -:: - -### Complex media - -Complex media items contain detail. They include: - -- infographics -- graphs -- flowchart -- maps. - -You can support media by including: - -- optional supporting data such as content or tables -- a view fullscreen link -- a download media link. - -Optional supporting data displays in a dropdown list. Use the type of content that will best communicate your supporting data to the user. For example, some information is conveyed better by a table, rather than plain text. - -Complex media will always display the full image. The media item will display at a predefined max height or width. - -When the media is fullscreen, it displays in the media fullscreen component. - -::DocsExample ---- -id: core-containers-media-embed--complex-image ---- -:: - ---- - -## Theming - -Media embed uses colour for: - -- icons -- interactive states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-media-embed--complex-image - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/media-fullscreen.md b/docs/content/design-system/5.components/media-fullscreen.md deleted file mode 100644 index c7c57c1c96..0000000000 --- a/docs/content/design-system/5.components/media-fullscreen.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Media fullscreen -description: The Media fullscreen component is an icon, with text instructions, beneath your media items for users to interact with so they can view one or more related media items in fullscreen. -layout: page -label: Core ---- - -## Usage - -Use media fullscreen to give users the option to toggle a fullscreen view of some media items. Media fullscreen can display media and content from your page’s media embed and media gallery components. It always displays the full media item, regardless of its ratio. The item fills the width or height of the available area. - -Fullscreen view includes the media item's title and caption. - -Media fullscreen takes over the viewport completely. A transparent background helps users to know they are still on the page. When a user closes fullscreen view, they return to that same item in the gallery. - -See [media](/design-system/components/media) for information relating to file type, ratios and focal point. - -::DocsExample ---- -id: core-containers-media-gallery--default-story ---- -:: - -### When and how to use - -- Always display the media item max height or width of the content area. -- Always include a title for the media item. -- Always include alt text. -- Display the media title and caption if used in the base component. -- Use when you need to display a media item fullscreen. - -### When and how not to use - -- Don't use with items that aren't media. -- Don't use with a completely opaque background. -- Don't use pagination for one media item only. -- Don't crop or hide the media item. - ---- - -## Theming - -Media fullscreen adopts its theming from the pagination component. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-media-gallery--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/media-gallery.md b/docs/content/design-system/5.components/media-gallery.md deleted file mode 100644 index 55892c0848..0000000000 --- a/docs/content/design-system/5.components/media-gallery.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Media gallery -description: The Media gallery component is a series of images users can side-scroll through. -layout: page -label: Core ---- - -## Usage - -Use a media gallery to collate a series of related images into a gallery. Media gallery allows users to scroll through related images. It's best used for displaying images. - -Media gallery combines images and text to give users context within the content. - -Media items inside a media gallery will display as either landscape or portrait, at predefined ratios. - -See [media](/design-system/components/media) for information relating to file type, ratios and focal point. - -::DocsExample ---- -id: core-containers-media-gallery--default-story ---- -:: - -### When and how to use -- Include related images only. -- Use at least 2 images. -- Always use a media title. -- Include an optional caption to help users understand images' context and relevance to the page content. -- Use on any page type. - -### When and how not to use -- Don't use for decorative purposes. -- Don't use sensory images. -- Don't use for a single image, instead use the media embed component. -- Don't use with media unrelated to page content. - ---- - -## Theming - -Media embed uses colour for: - -- icons -- indicating an interaction to users -- interactive states. - -It also adopts its theming from the pagination component. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-media-gallery--default-story - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/media.md b/docs/content/design-system/5.components/media.md deleted file mode 100644 index d82979a967..0000000000 --- a/docs/content/design-system/5.components/media.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Media -description: The Media component is a container that houses media items to use in other components on a page. -layout: page -label: Core ---- - -## Usage - -Use media to communicate and differentiate specific information through visuals. - -Media items sit within other components such as cards, or a media gallery. - -Use images if they help users complete a task. Images can make it easier for some people to understand information. - -Use media to combine visual elements with text. This gives your content context and alignment. - -::DocsExample ---- -id: core-containers-image--image ---- -:: - -### When and how to use -- Always get copyright for all media used. -- Nest media in other components. -- Choose diverse images that reflect and support the diversity of Victoria. -- Only media that's relevant to the content. -- Always include alt text for each media item. -- Use appropriate resolution for the content. -- Always include a transcription for all audio content. - -### When and how not to use -- Don't use a media item without alt text. -- Don't use video content without captions. -- Don't crop an image without a clear focal point. - ---- - -## Variants - -The ratios you can use for media include: - -- 1:1 -- 4:3 -- 16:9 -- 21:9 -- 3:1 -- avatar (circle). - -### Copyright requirements - -You must get permission (a licence) to use copyright material. This includes images and text. - -Some images are available under an open access licence, such as [Creative Commons](https://au.creativecommons.net/). Alt text is also licensed under copyright. - -### File resolution - -Image resolution must be appropriate for the content. - -Don’t embed images with a large file size into content that you will publish online, such as PDFs or webpages. Optimise and compress all image files so they make it quicker for the user to access the information. - -Design for mobile devices first. An image will scale to the device people view it on. Check that it’s easy to read on a mobile phone screen and a desktop before you publish it. - -### Focal point - -Always ensure that images work on all screen sizes. Select the focal point of the image to best position images in any area. - -Consider cropping smaller images more to keep the impact of the original image. - -### Media types - -Multiple types of media can are supported and used to add meaning to content. These include: - -- photographs -- decorative images -- charts -- graphs -- maps -- illustrations or drawings -- icons -- video -- audio. - -Make sure you use the correct media type for the content it is supporting. - -### File types - -There are many image file types. Seek specialist advice to optimise an image file as a vector or raster file format. - -The following file types are recommended: -- photographs - - jpeg - - png -- icons - - svg - - png -- charts/graphs - - svg - - png -- video - - mp4 -- audio - - wav. - -### Alternative text - -All images, except purely decorative images, need a text alternative (alt text). Without this, your page will not address [WCAG 2.0 Criterion 1.1.1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/text-equiv-all.html) or conform with WCAG 2.0 or 2.1 AA standards. WCAG 2.0 AA standards are the minimum accessibility standards for all Victorian Government communications under the [Brand Victoria guidelines](https://www.vic.gov.au/brand-victoria-guidelines-logos). - -The [Web Accessibility initiative alt decision tree](https://www.w3.org/WAI/tutorials/images/decision-tree/) also guides you on whether your image needs alt text or not. - -For purely descriptive images, the alt text attribute instead reads: alt=””. - -#### What alt text does - -Alt text gives users who use screen readers (or devices that are not loading, or displaying, images) the information an image is meant to convey because: -- a screen reader can read the alt text aloud -- alt text is shown in the place of ‘broken’ or unloaded images on the page. - - -#### How to write alt text - -Alt text must serve the equivalent purpose of the image itself, by: -- being short but specific (for example, ‘a Harry Potter novel’ rather than ‘a novel’) -- explaining the image’s function in the context of the page or content section (for example, ‘Search’ rather than ‘Magnifying glass’) -- using normal punctuation that helps users understand the text -- including the image text in the alt text (for images with text). - -For more guidance on writing alt text, refer to [Alt text, captions and titles for images](https://www.stylemanual.gov.au/content-types/images/alt-text-captions-and-titles-images) in the Australian Government Style Manual. diff --git a/docs/content/design-system/5.components/option-button.md b/docs/content/design-system/5.components/option-button.md deleted file mode 100644 index 2500aef636..0000000000 --- a/docs/content/design-system/5.components/option-button.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Option button -description: The Option button component is a set of buttons to help users filter content. -layout: page -label: Core ---- - -## Usage - -Use option buttons to show a set of options a user can choose from to filter content or results. - -The option button component contains labels showing a user how the filter will work. - -::DocsExample ---- -id: forms-option-buttons--squares ---- -:: - -### How this component works - -You must use a form label with option buttons. The form label explains what happens when a user chooses an option. For example, ‘Filter by starting letter’. - -Always use descriptive labels for individual option buttons. Labels should help users choose, and say the category of content or results each option will show. This makes the content accessible, as screen readers will read out each label. - -Never preselect an option button on default. Users might miss that a filter has been automatically applied. - -### When and how to use - -- Help users filter content or results. -- Use short labels only. -- Order labels in alphabetical order to help users scan quickly. -- Add an ‘apply filter’ button if the option button will be used together with other form elements. - -### When and how not to use - -- Don’t use for a call to action. -- Don’t use with long content. -- Never use without a form label. -- Never preselect an individual option button. - ---- - -## Variants - -Option buttons have 2 variants: - -- default -- custom. - -### Default - -Default uses the alphabet as a filter in the option buttons. - -::DocsExample ---- -id: forms-option-buttons--squares ---- -:: - -### Custom - -The custom variant lets you create your own button labels as a filter. - -These labels must clearly tell the user what filter will be applied. - -::DocsExample ---- -id: forms-option-buttons--fluid-widths ---- -:: - ---- - -## Theming - -Option buttons use colour to show interactive states. An option button in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of that option button remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-option-buttons--squares - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale - -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/page-action.md b/docs/content/design-system/5.components/page-action.md deleted file mode 100644 index 0f9f9f1a6a..0000000000 --- a/docs/content/design-system/5.components/page-action.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Page action -description: The Page action component presents a collection of links that offer users a choice of actions, such as printing or downloading a document. -layout: page -label: Core ---- - -## Usage - -Use the Page action component to let users print or download pages and content. - -Page action presents as a collection of links giving users a choice of actions at a page level. This includes printing or downloading a document. - -The component displays a combination of page-level actions. - -- Print page: prints the page a user is on. -- Print full document: prints all pages in a publication or document, not only the page the user is on. -- Download document: downloads a copy of the content that the page editor uploaded. You can add more than one document to the page action component. The documents should only be what's already on the page. Don't add new or extra content. - -Never use page actions for anything other than the above. Don't use it for links. - -The print action prints the full document (section), not just the page the user is on. The document action downloads a document that has been uploaded in the content management system. - -::DocsExample ---- -id: core-containers-page-action--default-story ---- -:: - -### When and how to use - -- Only use in a page's sidebar section. -- Use as the first component in the sidebar, above the vertical navigation. -- Use with or without one or more documents. -- Include metadata with uploaded documents. - -### When and how not to use - -- Don't use: - - in the content area of a page - - with a document that has content different to the page's content - - for any other user actions. - ---- - -## Theming - -Page action uses colour for: - -- icons, to indicate a possible action to users -- interactive states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-page-action--default-story - --- - :: -:: - -To create your own theme, see [theming guidance for designers](https://www.vic.gov.au) or [theming guidance for developers](https://www.vic.gov.au). diff --git a/docs/content/design-system/5.components/pagination.md b/docs/content/design-system/5.components/pagination.md deleted file mode 100644 index 29451664bb..0000000000 --- a/docs/content/design-system/5.components/pagination.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: Pagination -description: The Pagination component divides your content across more than one page into smaller lists to help users navigate forward and backwards. -layout: page -label: Core ---- - -## Usage - -Use pagination to help users navigate forwards and backwards through your content. - -Pagination breaks down content, making it more concise and less overwhelming. It does this by dividing your content across more than one page and into smaller lists. This makes it easier for users to find what they need. - -Examples include: - -- search results or guidance divided into multiple website pages -- a collection of cards or media items. - -Pagination helps users to identify: - -- how many pages or items they can navigate through -- where the page or item they are viewing sits in the order of other pages or items -- how they can immediately navigate to other pages or items. - -Pagination sits at the bottom of each page. It's a quick and easy way for users to move between each page. - -Use pagination if your list has 10 or more results. - -Pagination identifies the page each result sits on. This makes it convenient for users to find again. - -::DocsExample ---- -id: core-navigation-page-links--page-links ---- -:: - -### When and how to use - -- Stack standard pagination variant links vertically. -- Only use standard and complex variants at the bottom of the body content area. -- Use the simple variant nested in components, for example, the [media gallery](/design-system/components/media-gallery) or [carousel](/design-system/components/carousel). -- Use ellipses to replace any skipped pages. -- Use pagination to avoid an infinite scroll of results, which can be a problem for keyboard users. - -### When and how not to use - -- Don't use pagination for one page only. -- Only choose one pagination variant, never mix or combine them. -- Always put the user first, so don't break up content if it reduces usability or performance. -- Don’t use for linear user journeys such as form completion. - ---- - -## Variants - -Pagination has 3 main variants: - -- simple, for a small number of items or used in other components -- standard, to navigate through a small number of pages -- complex, when there is a large number of pages to navigate through. - -### Simple - -The simple variant is for navigating through a small number of items. Use it to nest pagination in other components, like media gallery, media fullscreen and carousel. - -::DocsExample ---- -id: core-navigation-pagination--simple-tally ---- -:: - -### Standard - -The standard variant is for navigating through a small number of pages. It has 2 options for label display: - -- page titles. -- page numbers. - -You can use page titles to give more context. - -When stacking the links, do it vertically. This helps screen magnifier users when they have zoomed in to better read the content. - -Never show the previous page link on the first page because it will confuse the user. The same goes for the next page link on the final page. - -#### Page Title - -::DocsExample ---- -id: core-navigation-page-links--page-links ---- -:: - -#### Page Number - -::DocsExample ---- -id: core-navigation-page-links--example-count ---- -:: - -### Complex - -The complex variant lets users navigate through a large number of pages. It's ideal for a long list of search results. - -The user can interact with the next and back controls to move forward and backward through the pages. The user can navigate straight to a page by selecting its specific page number. - -There are 3 pages that should always remain highlighted: - -- The first page. -- The current page. -- The last page. - -Never show the previous page link on the first page because it will confuse the user. The same goes for the next page link on the final page. - -Display page numbers for the: - -- current page on all screen sizes -- previous and next pages on smaller screen sizes -- page immediately before and after the current page on larger screen sizes -- first and final pages on all screen sizes. - -::DocsExample ---- -id: core-navigation-pagination--complex ---- -:: - ---- - -## Theming - -Pagination uses colour for: - -- icons -- interactive states - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-page-links--page-links - --- - :: - ::DocsExample - --- - id: core-navigation-pagination--complex - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/primary-navigation.md b/docs/content/design-system/5.components/primary-navigation.md deleted file mode 100644 index fdb965e0ae..0000000000 --- a/docs/content/design-system/5.components/primary-navigation.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: Primary navigation -description: The Primary navigation component appears as a menu sitting at the top of the page and contains links to site’s content pages. -layout: page -label: Core ---- - -## Usage - -Use primary navigation to help users get to where they need to go. It shows links to key areas of the website and guides users to the content they are looking for. The main way users journey through your site should be through primary navigation. - -Use primary navigation to let users identify where they are. It helps users know their current page location within the overall site. - -The primary navigation contains: -- a site logo -- navigation links -- optional search link. - -The navigation and search links expand to either a fullscreen menu or search bar. - -The primary navigation always sits at the top of the page. It displays above all page content and components. - -::DocsExample ---- -id: core-navigation-primary-nav--default-story ---- -:: - -### How this component works -#### Logo -The logo lets users instantly recognise which organisation or entity owns the current page. When users interact with the logo, it should direct them to the site’s homepage. - -Within the primary navigation component, the logo is centred vertically. - -#### Co-branding logos -Primary navigation allows for co-branding when required. The maximum size a co-branded logo can appear is 40h x 140w pixels. - -See [logo](/design-system/styles/logo) for guidance and requirements including co-branding. - -#### Navigation links -The primary navigation displays the top level of the site’s information architecture (IA). When the link has child pages, a chevron (a v-shaped arrow icon) displays next to the top page name. When clicked, this opens the mega menu and displays the child pages. - -When there are no child pages, there is no chevron and it takes users to the page. - -#### Mega menu -The mega menu gives users access to pages deeper in the site. Use it if your site or service has more than one level of navigation. If a mega menu item has a chevron, users can expand it to display its child pages. - -#### Search menu -The menu can display a search bar to provide users the option to perform a site search. - -#### Smaller devices -The primary navigation adapts to small devices. The breakpoint for displaying the collapsed menu is 992px. - -On smaller devices primary navigation shows as a dropdown showing only one labelled menu item. It contains more levels of navigation options, which remain hidden until the single dropdown is interacted with and opens. - -To aim to conform with [WCAG2.0 Criterion 1.1.1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/text-equiv.html), and for increased consistency across screens sizes, the primary navigation: -- uses the menu label and a chevron -- doesn't use the 3 bar, or 'hamburger', menu icon. - -> 1.1.1 Non-text Content: All non-text content that is presented to the user has a text alternative that serves the equivalent purpose. - -#### Responsive behaviour -Primary navigation supports only a small number of items. This is because it is a horizontal list. - -Take this into account when defining your site's IA. - -A maximum number of links can display before the navigation bar will respond to the collapsed menu display. - -When used with a single logo: -- 992-1199px breakpoint can display 6 links (including search) -- 1200+ breakpoint can display 7 links (including search). - -When used with a co-branded logo: -- 992-1199px breakpoint can display 5 links (including search) -- 1200+ breakpoint can display 6 links (including search). - -When using the collapsed menu in the navigation bar, the mega menu will also display the mobile (collapsed) version. - -#### Scroll behaviour -The primary navigation has show and hide behaviour on user scroll. -- Scroll down: the primary navigation hides from view. -- Scroll up: the primary navigation shows at the top of the viewport. - -#### Interaction with other components -When a site has a quick exit button (a button component that uses the destructive variant), it sits underneath the primary navigation. If the user opens the mega menu or search menu, the quick exit button moves inside the menu container. So the quick exit action will always be available to users. - ---- - -### When and how to use -- Use across all pages of your site. -- Use descriptive, recognisable link labels. -- Display links in priority order: move from left (for most-used links) to right (for least-used links). -- Base your navigation's structure on user research. -- Structure navigation to prioritise tasks and information your research says users need the most. -- Use with optional user action, such as login, if required. - -### When and how not to use -- Don’t label links with jargon or unfamiliar terms. -- Don't use more than 150 characters per menu item. -- Hover should never be used to expand dropdown lists as it is not reliably accessible or responsive. -- An organisational structure should not be used as a navigation stucture. ---- - -## Theming -Primary navigation uses colour for: -- visual prominence and brand recognition -- interactive states. - -Primary navigation also adopts its theming from the search bar component. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-primary-nav--default-story - --- - :: -:: - ---- - -## Accessibility -To aim to conform with [WCAG2.2 Criterion 2.5.8](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum), the primary navigation bar uses the space either side of menu items. This allows for increased touch targets and the use of the block focus state styling. - -> 2.5.8 Target Size (Minimum) The size of the [target](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum#dfn-target) for [pointer inputs](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum#dfn-pointer-input) is at least 24 by 24 [CSS pixels](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum#dfn-css-pixel), diff --git a/docs/content/design-system/5.components/profile.md b/docs/content/design-system/5.components/profile.md deleted file mode 100644 index 0fe9ed6cc4..0000000000 --- a/docs/content/design-system/5.components/profile.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Profile -description: The Profile component shows an avatar (image) on your page, with supporting text to display key information. -layout: page -label: Core ---- - -## Usage - -Use profile to highlight key information to users by showing an avatar image with summary content. This highlights key information to users. - -Each row of content includes a: - -- label -- summary. - -It's used to display key information, including: - -- name -- date -- category. - -Only use the profile component for displaying simple information. For data or complex information, consider using a table. - -::DocsExample ---- -id: core-containers-profile--default-story ---- -:: - -### When and how to use - -- Keep label as short as possible (under 2 words, like a name). -- Keep all content clear and concise. -- Display at the top of profile pages. -- Always add alt text to the image. -- Only use an image that's relevant to the summary. - -### When and how not to use - -- Never use a label that doesn't match the summary. -- Don't use unimportant, complex or longform content. -- Don't include punctuation. -- Never use full URLs in the label or summary. diff --git a/docs/content/design-system/5.components/radio-button.md b/docs/content/design-system/5.components/radio-button.md deleted file mode 100644 index 94991e7b44..0000000000 --- a/docs/content/design-system/5.components/radio-button.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Radio button -description: The Radio button component shows a list of options, with a radio (round) button to the left of each option’s description. -layout: page -label: Core ---- - -## Usage - -Use radio buttons to let users select one option from a list. - -They help users make a single selection from a list of available items. - -Never use radio buttons if a user may select multiple options. Use a checkbox component instead. - -::DocsExample ---- -id: forms-radio-group--default-variant ---- -:: - -### How this component works - -Use radio buttons with: -- form label -- radio label -- optional requirement label -- optional hint text. - -Radio buttons should always have a form and radio label. - -Always use a descriptive label for groups of radio buttons. The label should say what the options represent and should help the user to choose one. Doing so ensures good accessibility, as screen readers read each option's label. - -Not all users will know the visual difference between a radio button and a checkbox. You could add extra instructions to guide then, like 'select one option’. - -### When and how to use -- Use if only one options needs selecting from a list. -- Use the reverse variant on grey backgrounds. -- Always write clear and concise radio label descriptions. -- Ensure you list options in a logical and unbiased manner. -- If unsure about the list order, place from most common, to least common. -- Use hints to tell users they can only select one option. -- Always put the radio button on the left side of its label description to allow users, particularly those using screen magnifiers, to find labels. - -### When and how not to use -- Don't use for lists with more than one possible option. Use checkboxes for these. -- Don't use a radio group with an horizontal alignment for displaying more than 2 options. -- Don't list all possible options. Add an option for 'other'. - ---- - -## Variants - -Radio buttons have 2 variants: -- default, used on white backgrounds -- reverse, used on neutral backgrounds. - -### Default - -::DocsExample ---- -id: forms-radio-group--default-variant ---- -:: - -### Reverse - -::DocsExample ---- -id: forms-radio-group--reverse-variant ---- -:: - -### Error - -All form inputs share error state styling. Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -When creating an error message for radio buttons, use the wording below. - -**Error: invalid response to a yes/no question** - -Structure this message to help the user understand why they would say yes. -- Error message: ‘Select yes if \[the information is true\]’. -- Example: 'Select yes if you drive a car'. - -**Error: invalid response to a choice (other than yes/no) from 2 options** - -Structure this message to help the user choose the option that applies to them. -- Error message: ‘Select if \[the choice you are asking the user to make\].' -- Example: ‘Select if you drive a car or truck’. - -**Error: invalid response to a choice from 3 or more options** - -Structure this message to help the user to choose a single option from 3 or more options. -- Error message: ‘Select the \[singular piece of information you are seeking from the user\].' -- Example: ‘Select the day of the week you drive the most.' - -::DocsExample ---- -id: forms-radio-group--default-variant ---- -:: - ---- - -## Theming - -Radio buttons use colour for interactive states. - -A radio button component in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of that radio button remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-radio-group--default-variant - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/related-links.md b/docs/content/design-system/5.components/related-links.md deleted file mode 100644 index 073d3a05f1..0000000000 --- a/docs/content/design-system/5.components/related-links.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Related links -description: The Related links component is a list of links to help users discover related content. -layout: page -label: Core ---- - -## Usage - -Use related links to present a user with a list of links. They can use these to explore content related to the current page or context, or to the next best action. - -Use if you’re presenting the user with related information or actions to help them deep dive into content. - -Don't use related links for linking to unrelated content. - -::DocsExample ---- -id: core-navigation-related-links--related-links ---- -:: - -### When and how to use - -- Use to help users discover related content. -- Only use in the sidebar section pages. -- Use at least 2 links. -- Use no more than 8 links. -- Keep description clear, concise and specific to each link. - -### When and how not to use - -- Don't add unrelated links. -- Don't overload each link with too many words. -- Don't use punctuation. -- Don't link to documents or videos - instead, embed them. -- Don't include other interactive elements, like buttons. diff --git a/docs/content/design-system/5.components/results-listing.md b/docs/content/design-system/5.components/results-listing.md deleted file mode 100644 index d426b7b532..0000000000 --- a/docs/content/design-system/5.components/results-listing.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Results listing -description: The Results listing component shows a list of search result items, with each item displaying key information relevant to that search. -layout: page -label: Core ---- - -## Usage - -Use a results listing to display content results, like search results or news items. It surfaces (retrieves and shows) important information to the user. - -A results listing shows multiple results items, each with their own: -- title, telling the user the name of the result -- summary, summing up the result’s content for the user -- URL, telling the user the website address for the result -- featured content, visually highlighting key content from the result -- topic/category, putting the result into its context within a broader page or site -- date, showing a result’s published (simple variant) or updated (default variant) date -- keyword term bold styling, showing the search term(s) in bold in the result displayed. - -When displaying the results listing, consider a user's needs. Only display what will help them to make an informed decision. - -::DocsExample ---- -id: core-navigation-result-listing--default-story ---- -:: - -### When and how to use -- Put the search term in bold. -- Test results so they are correct and relevant to the search term. -- Keep descriptions under 150 words. -- Display up to 10 results. - -### When and how not to use -- Don't display the result title only. -- Don’t make only the title interactive, ensure the entire result is interactive. -- Don't use both updated date and published date, choose one only. -- Don't display more than 10 results. - ---- - -## Variants - -A result listing's 2 main variants are: -- default -- simple. - -### Default - -The default results listing has the option of surfacing key information when required. - -Key information can include: - -- audience -- status -- grants metadata such as grant value. - -The default variant users the updated date by default. - -::DocsExample ---- -id: core-navigation-result-listing--with-details ---- -:: - -### Simple - -The simple variant displays the page title with accompanying metadata. - -It uses the published date by default, which is automatically pulled in from the metadata. - -We recommend using this variant when displaying simple results, like news items. - -::DocsExample ---- -id: core-navigation-result-listing--with-meta ---- -:: - ---- - -## Theming - -Results listing uses colour for: - -- icons -- indicating to the user there is an interaction possible -- interactive states. - -When displaying key information such as status, the icon should adopt the relevant semantic colour. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-result-listing--with-details - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/search-bar.md b/docs/content/design-system/5.components/search-bar.md deleted file mode 100644 index a072f994b5..0000000000 --- a/docs/content/design-system/5.components/search-bar.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: Search bar -description: The Search bar shows a text input field with a search button to let users enter keywords and search content on the website. -layout: page -label: Core ---- - -## Usage - -Use the search bar to help users find what they are looking for. - -Users often rely on search to find the information they need. You can use it as an alternative to on-page navigation. - -Users will use keywords in the search bar, often using different words or phrases. Search is especially helpful for users when navigating site that have many pages. - -The search bar includes: - -- text - placeholder and input text -- search button label -- search button icon -- optional predictive list - present suggested keywords to the user -- optional refine search link - expand to present advanced filters to the user. - -::DocsExample ---- -id: core-navigation-search-bar--default-story ---- -:: - -### How this component works - -#### Input text -Include short, descriptive placeholder text. This tells the user what they can search for. - -The text the user inputs replaces the placeholder text. - -#### Search button -The search button contains a button label and search icon. - -Smaller devices show a responsive variant with: -- only a search icon -- no button label. - -This gives the user more space to write search text. Users know that a magnifying glass represents a search function. - -The word ‘Search’ must appear in the alt text for screen readers. - -The button type should be a submit button. This lets a user conduct a search: -- using the enter/return key -- using fewer keystrokes -- by choosing a suggestion (if applicable) -- that afterwards, still displays the search keyword. - -#### Predictive keyword list - -Useful suggestions let users find what they need with less effort. They also reduce spelling errors and typing. - -Use a short, ordered list of no more than 10 keyword suggestions. - -They should appear after only a few keystrokes. - -Let the user scroll through keyword suggestions using keyboard navigation, with the Esc key to exit. - -Scrolling ‘down’ past the last suggestion should loop the user back to the first one. Scrolling ‘up’ before the first suggestion should loop the user to the last (bottom) one. - -### When and how to use - -- Use the search bar to let users search your site (site search). -- Use default search field on white page background. -- Use reverse search field on grey background. -- Use menu variant in the mega menu only. -- Use only default and reverse variants with predictive list suggestions. -- Even if it's hidden from view, always use a form label for screen readers. -- Keep placeholder text concise and descriptive. - -### When and how not to use - -- Don't use default or reverse variants in the mega menu. -- Don't use filters or refine search with the menu variant. -- Don't use multiline search inputs. -- Revised search shouldn't be by default. -- Don't use with the refine search link if no filters are available. - ---- - -## Variants - -The 3 search variants include: - -- default -- reverse -- menu. - -### Default - -This is standard search. The button initiates search based on the text input. - -::DocsExample ---- -id: core-navigation-search-bar--default-story ---- -:: - -### Reverse - -Use the reverse variant when on a neutral background and you can't use the default variant. - -::DocsExample ---- -id: core-navigation-search-bar--reverse ---- -:: - -### Menu - -Use this in the mega menu. See [Primary Navigation](/design-system/components/primary-navigation) for more information. - -::DocsExample ---- -id: core-navigation-search-bar--menu ---- -:: - -### Input - -::DocsExample ---- -id: core-navigation-search-bar--input ---- -:: - ---- - -## Theming - -The search bar uses colour for: - -- indicating an action to users -- interaction states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-search-bar--default-story - --- - :: - ::DocsExample - --- - id: core-navigation-search-bar--menu - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/skip-link.md b/docs/content/design-system/5.components/skip-link.md deleted file mode 100644 index 48b9838179..0000000000 --- a/docs/content/design-system/5.components/skip-link.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Skip link -description: The Skip link component makes your page more accessible and easier to navigate, by helping keyboard users skip to the main content on a page. -layout: page -label: Core ---- - -## Usage - -Use skip links to let users: -- navigate quickly through links and form elements -- navigate your page when interacting only through the keyboard -- let users navigate directly to the main page content. - -Skip links bypass the primary navigation links (the top horizontal menu items appearing on every page). - -Until the user activates it through a keyboard press, a skip link won’t display. - -When visible, it's always the first item on a page and pushes down all page content. - -::DocsExample ---- -id: core-layout-skip-links--stand-alone ---- -:: - -### When and how to use -- It must be on every page. -- When visible, it must be the first element on the page. - -### When and how not to use -- Only use at the top of the page. -- Don't edit the styling. -- Don't overlay page content. It must push down the page content. - ---- - -## Theming - -The skip link uses the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with a skip link. This could be jarring or confusing to users. - -::DocsThemeChooser - ::DocsExample - --- - id: core-layout-skip-links--stand-alone - --- - :: -:: - -To create your own theme, see [theming guidance for designers]() or [theming guidance for developers](). diff --git a/docs/content/design-system/5.components/social-share.md b/docs/content/design-system/5.components/social-share.md deleted file mode 100644 index f68cf07526..0000000000 --- a/docs/content/design-system/5.components/social-share.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Social share -description: The Social share component shows a list of links to help users to share pages to social media. -layout: page -label: Core ---- - -## Usage - -Use social share to let users share pages to their own social media channels. - -It uses the social media icons to: - -- provide extra context -- distinguish between the different social media channels. - -The link labels should clearly indicate the platform the user is sharing the page to. - -::DocsExample ---- -id: core-navigation-social-share--social-share ---- -:: - -### When and how to use - -- Use it to enable users to share pages to social media. -- Place in sidebar section of pages. -- Link labels should be the social media platform name. - -### When and how not to use - -- Don't use for links to sites that aren't social media channels. -- Avoid placing in a page's body section. -- Don't use with labels that aren't social media platform names. - ---- - -## Theming - -Social share uses colour for: - -- indicating an action to users -- icons. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-social-share--social-share - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/statistics-grid.md b/docs/content/design-system/5.components/statistics-grid.md deleted file mode 100644 index ae91420284..0000000000 --- a/docs/content/design-system/5.components/statistics-grid.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Statistics grid -description: The Statistics grid component shows a summary of 2 to 8 key statistics in a grid layout. -layout: page -label: Core ---- - -## Usage - -Use the statistics grid to present a user with multiple pieces of key information. This can help the user to determine if a page is relevant to them or not. - -Each cell features: - -- a key statistic -- content to give the statistic context. - -A statistics grid can act as a summary to help users view multiple related pieces of content. - -::DocsExample ---- -id: core-containers-stats-grid--on-light ---- -:: - -### When and how to use - -- Use text or numbers in the content. -- Give a high-level summary of key information. -- The grid will always span the full available width. -- Place in the body section of pages. - -### When and how not to use - -- Don't use with under 2 or over 8 statistics. -- Don't overload with content. -- Don't use when you need a large amount of text for context. -- Don't use images or graphics. -- Don't add links. - ---- - -## Variants - -The statistic grid has 2 variants: - -- default, for white backgrounds -- reverse, for neutral backgrounds. - -### Default - -::DocsExample ---- -id: core-containers-stats-grid--on-light ---- -:: - -### Reverse - -::DocsExample ---- -id: core-containers-stats-grid--on-dark ---- -:: diff --git a/docs/content/design-system/5.components/table.md b/docs/content/design-system/5.components/table.md deleted file mode 100644 index ef769a6b63..0000000000 --- a/docs/content/design-system/5.components/table.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Table -description: The Table component makes it easier for users to scan and compare data and content. -layout: page -label: Core ---- - -## Usage -A table is a systematic grid of data or content. They display in rows and columns to let users scan, analyse and compare information. - -Users tend to read tables one row or column at a time. So, it's important that content is simple and logical. - -A table can include a combination of: -- row and/or column headings that help users know what the rows and columns represent -- body rows that display data or content -- a table caption describing its content and helping users find, navigate and understand its information -- a table footer that provides additional details, if required -- an expandable section with expandable rows, which can show extra related or supplementary information or data. - -::DocsExample ---- -id: core-containers-data-table--structured-content ---- -:: - -### How this component works -Table content should be left-aligned because we read from left to right. However, tables with financial figures should have columns that contain numerals set to right-aligned. - -Only left-align numbers that are arbitrary identifiers, known as 'nominal numbers'. These are numbers you cannot compare or combine arithmetically. These can include postal codes, IP addresses, or phone numbers. Column headers follow the alignment of the data. - -The data table uses a zebra-stripe styling which alternates table row colours. This makes it easier for the user to scan horizontal information. - -Don't include too many columns as it's easier for users to scan down a list than to scroll across a page. So, consider more rows before more columns. - -Tables can respond differently based on how your website is built. Where tables do not respond, they will display with a horizontal scroll bar to view all the content. Where tables do respond on smaller screens, tables will stack vertically. - -The complex variant has the option of expandable extra information in nested rows. This is shown by a dropdown toggle. - -### When and how to use -- Add a caption or footer, if required. -- Use for complex content and data sets. -- Align numbers to the right (except nominal numbers). -- Align headers according to their column data. - -### When and how not to use -- Don't repeat the same content in both the caption and summary. -- Don't use with long form content. Cell content should be brief and scannable. -- Don't use without zebra-stripe styling.. -- Don't centre-align content. - ---- - -## Variants -Table has 2 variants: -- simple, best used for simple data. -- complex, best used for complex data. - -### Simple - -::DocsExample ---- -id: core-containers-content--table-scrollable ---- -:: - -### Complex -The complex variant is best used to display complex data sets. - -::DocsExample ---- -id: core-containers-data-table--structured-content ---- -:: - ---- - -## Theming -Table data uses colour to indicate an action to the user. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-data-table--custom-content - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/tabs.md b/docs/content/design-system/5.components/tabs.md deleted file mode 100644 index ca78ced6e5..0000000000 --- a/docs/content/design-system/5.components/tabs.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Tabs -description: The Tab component lets you organise related content so that users can switch between related information on the same page. -layout: page -label: Core ---- - -## Usage - -Use tabs to let users stay on the same page, but access more content. - -Only one tab is active at a time. Tabs help users navigate between, and display and hide, relevant content on your page so long as: -- you can split, categorise and clearly label the content -- there is a section more relevant for most users, which is placed first -- seeing the all sections at the same time is not needed -- you have a minimum of 2 tabs. - -Use tabs to organise content so a user doesn't have to navigate away to complete their task. Tabs are useful for maps or dashboards. - -Never use tabs if your content is sequential. Use it to present related content together, as a group. - -Tabs include: - -- labels -- an optional icon. - -Icons tell the user the category of content under a tab. Keep icons simple and easily understood, and reinforce the label. - -::DocsExample ---- -id: core-navigation-tabs--default-story ---- -:: - -### When and how to use - -- Order your tabs according to importance. -- Labels should clearly and succinctly describe the content within the tab. -- Only use tabs to group content that all sits at the same level of hierarchy. -- Limit labels to one word and ensure they are unique. - -### When and how not to use - -- Never use tabs within tabs. -- Don't display disabled tabs. -- Don't display more than one row of tabs when using the horizontal variant. -- Don't use tabs for important information, since a user will choose which tab to open, so they may not see some content. -- Don't use if your content is short, instead use lists or paragraph text. -- Tabs are not a substitute for primary navigation, so never use tabs as primary navigation. -- Don't use tabs to tell the user about their progress through a page or content. -- Don’t use tabs when the user needs to compare information, since only one tab is visible at a time. - ---- - -## Variants - -Tabs have 2 display variants: -- default -- vertical. - -### Default - -The default variant sets the tab group bottom border to span the full available content width. - -::DocsExample ---- -id: core-navigation-tabs--default-story ---- -:: - -### Vertical - -The vertical variant sets the tab group left border to span the height of the tab group. - -::DocsExample ---- -id: core-navigation-tabs--vertical ---- -:: - ---- - -## Theming - -Tabs use colour to represent interaction states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-tabs--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/tag.md b/docs/content/design-system/5.components/tag.md deleted file mode 100644 index e2666f609e..0000000000 --- a/docs/content/design-system/5.components/tag.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Tag -description: The Tag component adds, and draws attention to, a category name for your content. -layout: page -label: Core ---- - -## Usage -Use tags to help categorise content. Tags help users to scan and find content that's relevant to them. - -Content can have more than one category or theme. Using the tag component helps indicate this to the user. - -When naming tags, use a noun or adjective. Don't use verbs as a user may confuse the tag with an action. - -::DocsExample ---- -id: core-containers-tag--neutral ---- -:: - -### When and how to use -- Use keywords. -- Use to draw attention to a category of content or information. -- Use nouns or adjectives. - -### When and how not to use -- Don't use punctuation. -- Don't overuse tags. -- Don't use icons in the tags. -- Don't use as a heading. -- Don't use more than 2 words. -- Don't use as a link or action. - ---- - -## Variants -Tags have 2 variants: -- default, for use on neutral backgrounds -- neutral, for use on white backgrounds. - -### Default -::DocsExample ---- -id: core-containers-tag--default-story ---- -:: - -### Neutral -Use the reverse variant when the chip appears on the primary colour. - -::DocsExample ---- -id: core-containers-tag--neutral ---- -:: - -### Dark - -::DocsExample ---- -id: core-containers-tag--dark ---- -:: diff --git a/docs/content/design-system/5.components/text-area.md b/docs/content/design-system/5.components/text-area.md deleted file mode 100644 index 1976d30b3a..0000000000 --- a/docs/content/design-system/5.components/text-area.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -title: Text area -description: The Text area component lets users select one option from a list. -layout: page -label: Core ---- - -## Usage - -Use text area so users can enter multiple lines of text. - -Text area is used when information longer than a single line of text is needed or expected. For example, comments fields. - -Text areas can be resized and can be used with a character counter. - -Don’t use text area for succinct responses such as email addresses or names. In this case, you should use the input field component. - -::DocsExample ---- -id: forms-textarea--default-story ---- -:: - -### How this component works - -You must use a form label with a text area component. - -You can use text area with: - -- requirement label -- hint text -- metadata -- placeholder text. - -Guide users about the amount of text wanted. Set the text area to match the amount preferred. It has no maximum height, but has a minimum height of 96px. - -#### Resize handle - -Users can change the text area height (but not width) with the resize handle. They can also scroll within the container. - -#### Avoid placeholder text - -Avoid using placeholder text where possible. It disappears when a user starts typing. Not all screen readers will read out placeholder text. Its colour often lacks the contrast needed for accessible content when using some browser default styling. - -If placeholder text can’t be avoided, don’t use it to replace a label or hint text. Don’t use it to show an example or to include any critical information. - -#### Hint text - -Hint text can be used to tell the user what, or how, to successfully complete a text area. - -For example, hint text can include: - -- an overall description of the text area -- hints for what kind of information needs to be input -- specific formatting examples or requirements. - -Only use hint text where it’s needed. Don’t repeat the label. Don’t use it just to keep the layout consistent with other fields in the form. - -#### Character count - -A character count can sit below the text area field. It tells users the maximum characters and their input’s current count. - -Users can enter more characters than the maximum. The character count then says they’ve entered too many characters before they submit the text area. The user can copy or reduce their full answer. - -Even though there is a live character count, normal error responses (below) must appear if a user tries to submit a text area with too many characters. - -Only use character count when there is a good reason. For example, legal reasons, technical reasons or evidence users will give more text than needed. - -### When and how to use - -- Always use a label for text areas. -- Use hint text to specify helpful information such as specific formatting or information requirements. -- Specify character counts when required. - -### When and how not to use - -- Never use without a label -- Avoid placeholder text because it can cause accessibility issues. -- Don’t disable copy and paste. -- Don’t set a minimum or maximum input limit without explicitly saying this in the character count. -- Do not use hint text if it isn’t relevant or meaningful to the user. -- Don’t use placeholder text to give instructions. -- Don’t write ambiguous error messages only stating what's wrong - explain how the user can fix it. - ---- - -## Variants - -The text area has 2 variants: - -- default, used on white backgrounds -- reverse, used on neutral backgrounds. - -### Default - -::DocsExample ---- -id: forms-textarea--default-story ---- -:: - -### Reverse - -::DocsExample ---- -id: forms-textarea--reverse ---- -:: - -### Error - -All form inputs share error state styling. - -Always have specific error messages for specific errors. Users need to understand why their input or selection was not valid. - -When creating an error message for an input field, use the wording below. - -**Error: empty input** - -- Error message: ‘Enter \[the missing information\]'. -- Example: 'Enter your name'. - -**Error: input is too long** - -- Error message: ‘\[The input\] must be \[number\] characters or less'. -- Example: 'Delivery address must be 56 characters or less'. - -**Error: input is too short** - -- Error message: ‘\[The input\] must be \[number\] characters or more'. -- Example: 'Previous employer must be 3 characters or more'. - -**Error: input is too long or to short** - -- Error message: ‘\[The input\] must be between \[number\] and \[number\] characters'. -- Example: 'Justification must be between 3 and 56 characters'. - -**Error: input uses known characters that aren’t allowed** - -- Error message: ‘\[The input\] must not include \[characters\]'. -- Example: ‘Reasons must not include + & ~'. - -**Error: input uses unknown characters that aren’t allowed** - -- Error message: ‘\[The input\] must only include \[list of allowed characters\]'. -- Example: ‘Explanations must only include letters, numbers and commas'. - -::DocsExample ---- -id: forms-textarea--error ---- -:: - ---- - -## Theming - -Text area uses colour to show interactive states. A text area field in an active state will adopt the same colour as the overall site’s focus state colour. This means a user’s experience of a text area remains consistent while it transitions from a focus to an active state. - -::DocsThemeChooser - ::DocsExample - --- - id: forms-textarea--default-story - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale - -The active and focus states both use the site’s focus state colour. This creates a seamless user experience. If we used a different colour, keyboard users would have colour changes between focusing on and interacting with an input field. This could be jarring or confusing to users. - -This occurs across all form and input elements, for a consistent experience. diff --git a/docs/content/design-system/5.components/timeline.md b/docs/content/design-system/5.components/timeline.md deleted file mode 100644 index 35f7d0d431..0000000000 --- a/docs/content/design-system/5.components/timeline.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Timeline -description: The Timeline component contains blocks of content displayed in a linear order. -layout: page -label: Core ---- - -## Usage -A timeline displays a visual journey of short blocks of content in a linear order. Each block can be actionable for users to navigate through to related content. - -A timeline can include a combination of: -- heading -- subheading -- summary -- image. - -Use timelines to show a clear and sequential order of information. This assists users in linking pieces of information together. - -Some examples include: -- dates -- steps -- stages -- events -- actions -- outcomes. - -The timeline component is ordered from top to bottom. - -Use between 3 to 8 discrete sections of content, so the user is not overwhelmed. - - -::DocsExample ---- -id: core-containers-timeline--default-story ---- -:: - -### When and how to use -- Always include a title for the entire timeline. -- Add a heading, subheading, short summary and optional image for each block. -- Only include 3 to 8 blocks per timeline. -- Add a link if you're providing more details on another page. - -### When and how not to use -- Don't add fewer than 3 or more than 8 blocks. -- Don't use without a heading for each block. -- Never include unrelated content. -- Don't use if content doesn't flow in a sequential or linear order. Consider bullets points instead. - ---- - -## Variants -Timeline has 2 variants: -- default -- progressive. - -### Default -This is for steps or stages along a process. Use the default timeline when progress is not relevant to the user. - -::DocsExample ---- -id: core-containers-timeline--default-story ---- -:: - -### Progressive -Use the progressive variant to show the progress or status of the content to the user. - -::DocsExample ---- -id: core-containers-timeline--progressive-active-2 ---- -:: - ---- - -## Theming -Timeline uses colour to: -- show progress -- highlight interactive states. - -::DocsThemeChooser - ::DocsExample - --- - id: core-containers-timeline--progressive-active-2 - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). diff --git a/docs/content/design-system/5.components/vertical-navigation.md b/docs/content/design-system/5.components/vertical-navigation.md deleted file mode 100644 index 0fb97eb285..0000000000 --- a/docs/content/design-system/5.components/vertical-navigation.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Vertical navigation -description: The Vertical navigation component displays a list of links to help users navigate a section of related pages. -layout: page -label: Core ---- - -## Usage -Use vertical navigation to help users navigate a section of related pages. - -Use vertical navigation to: -- let users find and navigate to relevant information -- show the user where, within your site’s content hierarchy, the page they are viewing is located -- show 4 nested content sections (parent sections) and a heading for the names of each section. - -Vertical navigation is placed next to your page’s body content. - -A chevron (v-shaped icon) next to each parent section lets users expand that parent section. This reveals the names of content pages falling within the parent section (child pages). Child page links are hidden by default. - -The chevron flips up and parent sections stay expanded until the user interacts with the chevron to hide the child pages. This helps the user find what they need and minimises visual clutter. - -::DocsExample ---- -id: core-navigation-vertical-navigation--vertical-navigation ---- -:: - -### When and how to use -- Use in a page's sidebar. -- Always keep the navigation links short. You can use a shorter version of the page title. -- Display up to 4 levels of navigation. -- Add a link for the section's 'home' page. -- Use with at least 4 links. - -### When and how not to use -- Don't embed on a page that doesn't have a sidebar. -- Don't add more than 4 child levels. Users will not see the indents, so navigation will become confusing. -- Don't use on a site with fewer than 5 pages. -- Don’t use with icons. -- Never use it to link to other sites. - ---- - -## Theming -Vertical navigation uses colour and active state focus to highlight the current page the user is on. - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-vertical-navigation--vertical-navigation - --- - :: -:: - -To create your own theme see [theming guidance for designers](/design-system/design/theming-guidance-for-designers) or [theming guidance for developers](/design-system/develop/theming). - ---- - -## Rationale -To show the user which page in the vertical navigation they are currently on, the active state is used. This displays as an underline in addition to colour, to aim to conform with the [Web Content Accessibility Guidelines 2.0 Success Criterion 1.4.1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-without-color.html). - -> **[1.4.1](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-without-color) Use of Color:** Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. diff --git a/docs/content/design-system/_markdown-reference-file.md b/docs/content/design-system/_markdown-reference-file.md deleted file mode 100644 index f5979e081d..0000000000 --- a/docs/content/design-system/_markdown-reference-file.md +++ /dev/null @@ -1,704 +0,0 @@ ---- -title: Markdown Kitchen Sink (DEV ONLY) -description: This is an example page to demonstrate and document the markdown features available in the docs site -published: false -layout: page -links: - - text: Vic gov - url: https://www.vic.gov.au/ - - text: Single Digital Presence - url: https://www.vic.gov.au/single-digital-presence ---- - -> For a more detailed markdown editing guide, see here https://www.markdownguide.org/basic-syntax/ - -## Front matter - -Front matter sits at the very top of a markdown file and contains metadata about a page. In our case, it contains things like the page title and description. - -Here is the frontmatter for the page you are currently reading. - -```md ---- -title: Kitchen sink -description: Here's everything -layout: page -links: - - text: Vic gov - url: https://www.vic.gov.au/ - - text: Single Digital Presence - url: https://www.vic.gov.au/single-digital-presence ---- -``` - ---- - -## Headings - -Headings are added using hash marks before text. The number of hash marks specifies the heading level (e.g. '##' = H2). Please don't use H1s in markdown, these are reserved for the page title, which is set in the front matter. - -### Example - -```md -## Heading level 2 - -### Heading level 3 - -#### Heading level 4 - -##### Heading level 5 - -###### Heading level 6 -``` - -## Heading level 2 - -### Heading level 3 - -#### Heading level 4 - -##### Heading level 5 - -###### Heading level 6 - ---- - -## Paragraph text - -Paragraphs are simply text seperated by an empty line. - -```md -This is a paragraph - -This is another paragraph -``` - -This is a paragraph - -This is another paragraph - ---- - -## Emphasis - -### Italics - -```md -Here is *italic text* - -Here is also _italic text_ -``` - -Here is *italic text* - -Here is also _italic text_ - -### Bold - -```md -Here is **bold text** - -Here is also __bold text__ -``` - -Here is **bold text** - -Here is also __bold text__ - -### Strikethrough - -```md -Here is ~~strikethrough text~~ -``` - -Here is ~~strikethrough text~~ - ---- - -## Horizontal Rules - -You can add a horizontal rule by using at least three of either `_`, `-` or `*`. - -```md -These are all equivalent: ---- -___ -*** - -So are these: ------- -______ -****** - -But these won't work: --- -__ -** -``` - ---- - -## Blockquotes - -Blockquotes are added with a `>` before the text. - -```md -> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -``` - -> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - ---- - -## Lists - -### Unordered - -Unordered lists are created by starting a line with `+`, `-`, or `*`. Nested lists can be achieved through indentation, with **2 spaces** for each additional level. - -```md -* Fruit - * Berries - - Strawberry - - Blueberry - * Classics - - Apple - - Banana -* Vegetables - + Broccoli -``` - -* Fruit - * Berries - - Strawberry - - Blueberry - * Classics - - Apple - - Banana -* Vegetables - + Broccoli - -### Ordered - -Ordered lists are created by starting a line with a number and period (e.g. `1.`). Nested lists can be achieved through indentation, with **4 spaces** (different to the unordered list) for each additional level. - -You can use any numbers, but it's more convenient to just use `1.` for each item, the numbering will work automatically. - -```md -This works: - -1. Lorem ipsum dolor sit amet - 1. Lorem at massa - 2. Adipiscing -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa - -But just do this, it's the same thing: - -1. Lorem ipsum dolor sit amet - 1. Lorem at massa - 1. Adipiscing -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -``` - -1. Lorem ipsum dolor sit amet - 1. Lorem at massa - 2. Adipiscing -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa - -#### Starting point - -You can start the list at any number like this: - -```md -64. foo -1. bar -1. blah -``` - -64. foo -1. bar -1. blah - ---- - -## Links - -Hyperlinks can be added with the following syntax, the link text goes in the square brackets, followed by the url in round brackets. - -```md -Visit the [Victorian government website](https://www.vic.gov.au/) -``` - -Visit the [Victorian government website](https://www.vic.gov.au/) - -Alternatively, if you don't need different link text you can just write the url directly - -```md -Here is the link to vic gov https://www.vic.gov.au/. -``` - -Here is the link to vic gov https://www.vic.gov.au/. - ---- - -## Code - -Here's some `code inline` in context. - -Here's some `const codeInline: string = 'highlighted code inline'`{lang="ts"} in context. - -Indented code - - // Some comments - line 1 of code - line 2 of code - line 3 of code - - -Block code "fences" - -``` -Sample text here... -``` - -Syntax highlighting - -``` js -var foo = function (bar) { - return bar++; -}; - -console.log(foo(5)); -``` - ---- - -## Tables - -Tables can be added using a special format. More info here: - -- [Github markdown tables guide](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables) - -An example of a simple table - -```md -| Name | Description | -| ------ | ---------------------------- | -| Banana | Yellow, elongated, edible. | -| Apple | 84% water, 15% carbohydrates | -``` - -| Name | Description | -| ------ | ---------------------------- | -| Banana | Yellow, elongated, edible. | -| Apple | 84% water, 15% carbohydrates | - ---- - -## Images - -Images can be added like this: - -```md -![Nils Olav - This is the alt text](/assets/img/temp/Nils_Olav_wide.jpg) -``` - -![Nils Olav - This is the alt text](/assets/img/temp/Nils_Olav_wide.jpg) - -By Lee Carson on Flickr - Nils Olav on Flickr, CC BY-SA 2.0, https://commons.wikimedia.org/w/index.php?curid=5080064 - ---- - -## Custom components - -### DocsExample - -The `DocsExample` will display an component example from storybook, you will need to give it the id of the story you want to display. - -```md -::DocsExample ---- -id: core-navigation-button--default-filled ---- -:: -``` - -::DocsExample ---- -id: core-navigation-button--default-filled ---- -:: - -There are additional options you can use for this component: - -```md -::DocsExample ---- -id: core-navigation-button--default-filled -withPadding: false -hideNewTab: false -hideCode: true ---- -:: -``` - -::DocsExample ---- -id: core-navigation-button--default-filled -withPadding: true -hideNewTab: false -hideCode: true ---- -:: - -You can add toggle values in storybook and copy the the value of the args parameter in the URL to the `argsString` option in the `DocsExample` - -![Storybook controls](/assets/img/temp/storybook-toggles.png) - -![Browser url bar](/assets/img/temp/url-args.png) - -```md -::DocsExample ---- -id: core-navigation-pagination--complex -argsString: 'totalPages:50;currentPage:30;showTally:true' ---- -:: -``` - -::DocsExample ---- -id: core-navigation-pagination--complex -argsString: 'totalPages:50;currentPage:30;showTally:true' ---- -:: - -You can also the theme and whether or not neutral buttons should be used. - -```md -::DocsExample ---- -id: core-navigation-button--default-filled -theme: 'light' ---- -:: - -::DocsExample ---- -id: core-navigation-card--call-to-action -useNeutralButtons: true ---- -:: -``` - -::DocsExample ---- -id: core-navigation-button--default-filled -theme: 'docsTheme3' ---- -:: - -::DocsExample ---- -id: core-navigation-card--call-to-action -useNeutralButtons: true ---- -:: - -### DocsThemeChooser - -You can wrap `DocsExample` components with a `DocsThemeChooser` component. This will allow the user to choose which theme the examples inside the theme chooser will display with. - -```md -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-button--default-filled - --- - :: - ::DocsExample - --- - id: core-navigation-button--default-outlined - --- - :: -:: -``` - -::DocsThemeChooser - ::DocsExample - --- - id: core-navigation-button--default-filled - --- - :: - ::DocsExample - --- - id: core-navigation-button--default-outlined - --- - :: -:: - -### DocsImageExample - -The `DocsImageExample` will display an image in a way this is visually similar to the component examples, you will need to give it the url (src) of the image, the alt text (alt) and an optional caption. - -```md -::DocsImageExample ---- -src: /assets/img/InlineLink-Focus.png -alt: An example of focus state colour contrast ---- -Here's the **rich** text `caption` -:: -``` - -::DocsImageExample ---- -src: /assets/img/InlineLink-Focus.png -alt: An example of focus state colour contrast ---- -Here's the **rich** text `caption` -:: - -Example without caption: - -```md -::DocsImageExample ---- -src: /assets/img/InlineLink-Focus.png -alt: An example of focus state colour contrast ---- -:: -``` - -::DocsImageExample ---- -src: /assets/img/InlineLink-Focus.png -alt: An example of focus state colour contrast ---- -:: - -### DocsCard && DocsCardGrid - -Cards can also be added. Ensure that you wrap them with DocsCardGrid so that they are layout out correctly. DocsCard use the 'promo' type card under the hood. - -```md -::DocsCardGrid - ::DocsCard - --- - title: Button - url: /design-system/components/button - --- - Here's the summary text - :: - - ::DocsCard - --- - title: Vic gov - url: https://www.vic.gov.au/ - --- - Here's the summary text - :: - - ::DocsCard - --- - title: Framework - url: /framework - --- - Here's the summary text - :: -:: -``` - -::DocsCardGrid - ::DocsCard - --- - title: Button - url: /design-system/components/button - --- - Here's the summary text - :: - - ::DocsCard - --- - title: Vic gov - url: https://www.vic.gov.au/ - --- - Here's the summary text - :: - - ::DocsCard - --- - title: Framework - url: /framework - --- - Here's the summary text - :: -:: - -### DocsColourTable - -The `DocsColourTable` will display a table of themed colours, you just need to specify which colours to show. -This can be either direct colours like `clr.type.primary.contrast`, colour groups like `clr.type.primary` or a mix of both. - -```md - -::DocsColourTable ---- -colours: - - clr.primary - - clr.link ---- -:: -``` - -::DocsColourTable ---- -colours: - - clr.primary - - clr.link ---- -:: - -### DocsGradientTable - -The `DocsGradientTable` will display the themed horizontal and vertical gradients. - -```md -::DocsGradientTable -::: -``` - -::DocsGradientTable -:: - - -### DocsIconTable - -The `DocsIconsTable` will display a table of icons, you just need to specify which icon group to show, this will be either `alert`, `social` or `standard`. - -```md -::DocsIconTable ---- -group: alert ---- -:: -``` - -::DocsIconTable ---- -group: alert ---- -:: - -### DocsIconSizingTable - -The `DocsIconSizingTable` will display a table of icons with a preview of the icon at the specified size. - -```md -::DocsIconSizingTable ---- -sizes: -- s : 16px -- m : 24px -- l : 32px ---- -:: -``` - -::DocsIconSizingTable ---- -sizes: -- s : 16px -- m : 24px -- l : 32px ---- -:: - -### DocsLayerStyleTable - -The `DocsLayerStyleTable` will display a table of layer styles with a preview of that style in action, you just need to specify the type of style to show, this will be either `border`, `border.radius` or `elevation`. - -```md -::DocsLayerStyleTable ---- -type: border.radius ---- -:: -``` - -::DocsLayerStyleTable ---- -type: border.radius ---- -:: - -### DocsTypeTable - -The `DocsTypeTable` will display a table of type styles, you just need to specify the type of type style to show. This will be either `weight`, `size`, `lh` or `ls`. - -```md -::DocsTypeTable ---- -type: size ---- -:: -``` - -::DocsTypeTable ---- -type: size ---- -:: - -### DocsTypeClassTable - -The `DocsTypeClassTable` will display a table of type styles, with a preview of that style in action. - -```md -::DocsTypeClassTable ---- -type: -- style : - - Heading 1 - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1 -- style : - - Heading 1 Highlight - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1-highlight ---- -:: -``` - -::DocsTypeClassTable ---- -type: -- style : - - Heading 1 - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1 -- style : - - Heading 1 Highlight - - values : - - Font size: 32px / 56px - - Line height: 36px / 60px - - Letter spacing: 1.4% / 0.8% - - Font weight: Bold (700) - - rpl-type-h1-highlight ---- -:: diff --git a/docs/content/framework/1.index.md b/docs/content/framework/1.index.md deleted file mode 100644 index 8c8f6953a9..0000000000 --- a/docs/content/framework/1.index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Ripple Framework -description: Ripple framework contains the tools for building SDP sites using the Ripple design system components. -layout: page ---- - -![Ripple Framework](/assets/img/ripple-header.png){style="margin-top: -20px; padding-bottom: 50px; "} - - -## What is it? - -The Ripple design system consists of the design elements and components used to build _any_ web application using the Victorian government brand. Ripple _framework_ is a collection of [Nuxt 3](/framework/key-concepts/nuxt) modules and [layers](/framework/key-concepts/nuxt-layers) primarily used to create headless SDP websites using the Tide Drupal CMS. - - -![ripple is made up of Figma design, CSS styles, Vue JS components and Nuxt JS Sites](/assets/img/modules/rpl-modules.png){.rpl-u-padding-t-4} - - -## Who's it for? - -Whilst the Ripple UI components can be used in non SDP projects, Ripple framework assumes a Tide Drupal backend in most cases. - -Using the Ripple framework, developers are able to build headless frontend websites that derive content from the Tide Drupal CMS via it's JSON API. - -### SDP architecture - -![SDP Architecture](/assets/img/modules/sdp-architecture.png){.rpl-u-padding-12} - - -To find out more about Single Digital Presence please visit https://www.vic.gov.au/single-digital-presence - - diff --git a/docs/content/framework/2.key-concepts/1.nuxt.md b/docs/content/framework/2.key-concepts/1.nuxt.md deleted file mode 100644 index 23be42927a..0000000000 --- a/docs/content/framework/2.key-concepts/1.nuxt.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Nuxt -description: Nuxt is the framework used in Ripple to deliver headless SDP websites that connect to Tide Drupal backends for content. -layout: page -links: - - text: Nuxt documentation - url: https://nuxt.com/ ---- - - -Nuxt is a framework for building web applications that can be rendered both server side using Node.js and client side with Vue.js components. Nuxt is the framework used in Ripple to deliver headless SDP websites that connect to Tide Drupal backends for content. - -> **"Nuxt is a fantastic choice for teams building a production-grade product on the web. It aims to bake in performance best practices while maintaining excellent Vue.js DX"** -> -> Addy Osmani - Chief Engineer of Chrome - - -It is recommended that developers new to Ripple familiarise themselves with Nuxt by reading the documentation site, in particular, the following sections: - -- [Introduction · Get Started with Nuxt ](https://nuxt.com/docs/getting-started/introduction) -- [Vue.js Development · Nuxt Concepts](https://nuxt.com/docs/guide/concepts/vuejs-development) -- [ Server Engine · Nuxt Concepts ](https://nuxt.com/docs/guide/concepts/server-engine) -- [.nuxt/ · Nuxt Directory Structure](https://nuxt.com/docs/guide/directory-structure/nuxt) -- [Authoring Nuxt Layers · Nuxt Advanced](https://nuxt.com/docs/guide/going-further/layers) - - -For support and help working with Nuxt please see https://nuxt.com/docs/community/getting-help and https://nuxt.com/support/solutions - -There are a number of recommended resources for learning Nuxt 3 including: - -- [https://masteringnuxt.com/nuxt3](https://masteringnuxt.com/nuxt3) -- [https://frontendmasters.com/courses/nuxt/](https://frontendmasters.com/courses/nuxt/) -- [https://www.youtube.com/watch?v=ww94Jvi8JJo](https://www.youtube.com/watch?v=ww94Jvi8JJo) - - - diff --git a/docs/content/framework/2.key-concepts/2.nuxt-layers.md b/docs/content/framework/2.key-concepts/2.nuxt-layers.md deleted file mode 100644 index 09eba1bbfd..0000000000 --- a/docs/content/framework/2.key-concepts/2.nuxt-layers.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Layers -description: Nuxt layers are used to encapsulate Ripple functionality to share and reuse -layout: page -links: - - text: Nuxt layers documentation - url: https://nuxt.com/docs/getting-started/layers ---- - - -[Nuxt](1.nuxt.md) 3 provides a way to encapsulate part of a Nuxt project into what they call a Layer. - -> Nuxt layers are a powerful feature that you can use to share and reuse partial Nuxt applications within a monorepo, or from a git repository or npm package. The layers structure is almost identical to a standard Nuxt application, which makes them easy to author and maintain. -> - - - -In Ripple 2, we utilise Nuxt Layers extensively to share isolated features between SDP sites. A good example is a content type. Using a Nuxt Layer we are able to add the components, API endpoints, composables, etc needed to implement the feature, without having the overhead of a Nuxt Module. - -A great feature of Nuxt Layers is that you can reference them from any public or private Git repo in addition to publishing via an NPM module. - -Below is a diagram showing how Ripple 2 features are distributed through Nuxt layers and used within projects. - -![Ripple layers architecture diagram. Shows how modules can be shared between projects](/assets/img/modules/layers.png) diff --git a/docs/content/framework/2.key-concepts/3.API-endpoints.md b/docs/content/framework/2.key-concepts/3.API-endpoints.md deleted file mode 100644 index ddba65da89..0000000000 --- a/docs/content/framework/2.key-concepts/3.API-endpoints.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: API endpoints -description: Ripple creates an API that handles the translation of Drupal data into exactly whats needed on the page. -layout: page -links: - - text: Nuxt API routes documentation - url: https://nuxt.com/docs/guide/directory-structure/server#api-routes ---- - -In Ripple 2 we use API routes to create a [backend for frontend](https://medium.com/mobilepeople/backend-for-frontend-pattern-why-you-need-to-know-it-46f94ce420b0) API that handles communicating with the Drupal Tide JSON API and maps the response to only what is required to render the page in Ripple. - -![API routes diagram](/assets/img/modules/api-routes.png) - -## Nitro server routes - -Nuxt 3 introduces the concept of [server API routes](https://nuxt.com/docs/guide/directory-structure/server#api-routes) powered by the [Nitro rendering engine](https://nitro.unjs.io/) and [H3](https://github.com/unjs/h3) server. - -Nitro is the server layer that creates API routes in a Nuxt application. Nitro plugins run at build time and we use them to add the mapping needed to tell Ripple-tide-api package how to respond to a Drupal JSON API request for a content type node - -## Ripple Tide API - -Ripple Tide API is the module that handles communication with Tide Drupal JSON API. It provides a wrapper service for API calls to Tide and provides an interface for adding mapping functions which transform the response from Drupal into only what's needed for rendering the website. This makes creating pages easier and improves performance by moving all data transformation into the server bundle where it can be easily cached. - -![API routes diagram](/assets/img/modules/ripple-tide-api.png) - - diff --git a/docs/content/framework/2.key-concepts/4.content-types.md b/docs/content/framework/2.key-concepts/4.content-types.md deleted file mode 100644 index e6c8a9ca18..0000000000 --- a/docs/content/framework/2.key-concepts/4.content-types.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Content types -description: Implementing content type specific page layouts -layout: page -links: - - text: Drupal content types - url: https://www.drupal.org/docs/7/understanding-drupal/content-types ---- - -Content types are a Drupal concept that allow for modelling content using fields to describe the data structure. See the [Drupal documentation](https://www.drupal.org/docs/7/understanding-drupal/content-types) for more details. - -## Ripple content types - -As SDP is a [headless CMS using a decoupled architecture](https://salsa.digital/insights/dissecting-the-single-digital-presence-platform) once we have modelled content in Tide, we need a way to render it into a template that can be delivered to end users. Ripple content types allow you to support custom templates for new content types. - -Ripple content types consist of the following parts: - -### API Mapping - -See [API Endpoints](/framework/key-concepts/api-endpoints) for more information the Tide API translation layer. For each content type we supply a function that maps the Tide Drupal API response into more concise fields that match the data needed for - -### Template - -To render the page using Ripple UI components, we need to create a Vue component that is passed the data from the API request and, using Ripple UI components, creates a layout that matches your intended design. - - -> See the [Content type guide](/framework/guides/creating-content-types) for more information on creating new content types. - - -## Core content types - -In Tide we have a number of content types which are part of the core distribution and are initially included in SDP sites - -- Landing page -- Event -- Grant -- News -- Publication (page) -- Alert - diff --git a/docs/content/framework/2.key-concepts/5.dynamic-components.md b/docs/content/framework/2.key-concepts/5.dynamic-components.md deleted file mode 100644 index 8e4984114a..0000000000 --- a/docs/content/framework/2.key-concepts/5.dynamic-components.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Dynamic components -description: -layout: page ---- - -Dynamic components are a concept in Ripple that is closely tied to the concept of 'Paragraphs' in Drupal. See the [Drupal documentation for Paragraphs](https://www.drupal.org/project/paragraphs). - -Dynamic components/paragraphs can be added to pages in drupal (see [Key concepts - content types](https://www.drupal.org/project/paragraphs)). - -In Ripple the raw paragraphs from the Drupal JSON API and 'mapped' to a Vue component, along with the props required for that component to render. This Vue component, along with the associated mapping is what is referred to as the 'Dynamic component'. - -![Illustration of hows how dynamic components are mapped from drupal paragraphs to vue components](/assets/img/modules/dynamic-components.png) diff --git a/docs/content/framework/3.guides/1.migrating.md b/docs/content/framework/3.guides/1.migrating.md deleted file mode 100644 index 09137e992c..0000000000 --- a/docs/content/framework/3.guides/1.migrating.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Migrating from Ripple 1.x -description: This guide is intended to outline the process of updating SDP sites using Ripple 1.x to Ripple 2. It is intended for developers tasked with porting Ripple 1 sites and features to Ripple 2. -layout: page ---- - - -## Background - -Ripple 2 is a complete rewrite of both the design system and the Nuxt modules used to create SDP sites with it. It is a breaking change with the processes used to create sites and functionality used in Ripple 1. This was required due to the following reasons: - -- Latest versions of Vue and Nuxt 3 introducing breaking changes -- Deprecation of IE11 support allowing us to support modern browser features -- Opportunity to adopt best practices such as Typescript and modern CSS -- Build up of technical and design debt -- Improvements to the design allowing better theming and accessibility - -> Due to breaking changes between versions 2 and 3 of both Vue and Nuxt there is no automated way to upgrade Ripple components and sites. -> _Custom functionality built on Ripple 1 will need to be rewritten to use Ripple 2 API’s and design._ - -## Migrating your site - -If your site is supported by the SDP team for upgrades, the initial site upgrade will be handled by the SDP team. The process will be as follows: - -- a new empty V2 branch will be created in the site repository -- a fresh install of Ripple 2 will be added to the site -- all required environment variables will be added to the project to connect the site to the Tide content backend -- the V2 branch will be setup to be served from behind the Section.io CDN - -The migration of the following will be out of scope for sites without an MoU for SDP support: - -- Custom content types -- Custom user facing components -- Custom pages -- Extensive theme customisation outside of those documented in the theming guide - -## Migrating features from Ripple 1.x - -Please review the following concepts before proceeding: - -- [Content types](/framework/key-concepts/content-types) -- [API mapping](/framework/key-concepts/api-endpoints) -- [Dynamic components](/framework/key-concepts/dynamic-components) - -### Content types - -Content types in Tide allow for defining custom fields that can be returned via the Drupal JSON API. Because SDP sites are headless, we need to tell Ripple how to render each custom content type on the front end. - -In Ripple 1.x, each content type was added through the convention of adding a folder named tide and each content type as a subfolder. See [Ripple 1 example](https://github.com/dpc-sdp/ripple/tree/develop/examples/basic-examples/tide/modules/example-content-type). -The mapping of the tide API response was done through [tide.config.js](https://github.com/dpc-sdp/ripple/blob/develop/packages/ripple-nuxt-tide/modules/news/tide.config.j). The JSON API response was returned in its entirety and mapping the Drupal fields to Ripple components was done through the Page component. - -> In Ripple 2.x we move the mapping of data to the Nuxt server layer. This allows us to only return the necessary data needed to the end user, reducing the JSON payload from Drupal. - -For more information on creating new content types see the guide on [creating content types](4.creating-content-types.md) - -### Dynamic components - -Tide CMS makes use of [Drupal paragraphs](https://www.drupal.org/project/paragraphs) to structure content types to allow content creators flexibility when composing content. Creating new paragraph types that can be reused for the landing page content or across others is a common customisation task. - -In Ripple 1, new paragraph support was added through custom mappings [See Ripple 1](https://github.com/dpc-sdp/ripple/blob/develop/examples/basic-examples/tide/modules/example-override-mapping/tide.config.js) - -In Ripple 2, we need to add similar support - See [Guide to creating dynamic components](5.dynamic-components.md) - -### Search listing pages - -> This feature is still in Beta, please see the [feature proposal](https://github.com/dpc-sdp/ripple-framework/discussions/660) for more information. - -Listing pages are pages that contain dynamic lists of links to other pages. These are typically used to generate index pages when there are large amounts of similar items. See https://www.vic.gov.au/grants, https://www.vic.gov.au/victorian-honour-roll-of-women for example. - -In Ripple 1 there was no dedicated content type for creating listing pages and hence these pages were usually created as static pages in the frontend. - -In Ripple 2 we intend to move to a standard content type that allows configuring the search experience from the backend. Please see the [feature proposal](https://github.com/dpc-sdp/ripple-framework/discussions/660) for more info. diff --git a/docs/content/framework/3.guides/2.new-sites.md b/docs/content/framework/3.guides/2.new-sites.md deleted file mode 100644 index ddd63b44e4..0000000000 --- a/docs/content/framework/3.guides/2.new-sites.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Setting up a new site -description: A guide to setting up new SDP frontend sites using Ripple framework. -layout: page ---- - - -Setting up new sites with Ripple 2 is made easy with our CLI tool and provisioning process. Before you do so though please ensure you have got in touch with the SDP engagement manager (digital@dpc.vic.gov.au) prior and have submitted a support request to the Digital Victoria Help Centre https://digital-vic.atlassian.net/servicedesk/customer/portals - -## Requirements - -When onboarding a new project to SDP the following will be provisioned for you: - -- Git repo created -- Required platform files added to repo, required Dockerfile, etc -- Bay hosting environment configured -- Section.io CDN setup and configured -- Environment variables set to your project specific requirements - -## Local development dependencies - -Please make sure you have the following dependencies installed before proceeding. Typically local development is not performed through a docker container on the front end. - -- Node version 16.11.0 or greater (We recommend installing Node through Node Version Manager - See https://github.com/nvm-sh/nvm for install guide) -- NPM version 8.1.0 or greater - -Please see the `engines` key in `package.json` for most accurate versions. - -## Installing Ripple - -> For SDP sites, this will also be applied. However, if you wish to create a local install of Ripple outside of a project see below. - -Installing Ripple is easy with the included CLI tool: - -``` -npx @dpc-sdp/nuxt-ripple-cli init site ~/path/to/site --name "My Site" -``` - -This will copy the required files needed to setup your site into `~/path/to/site` - -``` -cd ~/path/to/site && npm install -``` - -This will install all dependencies with NPM, you can then run the development server with - -``` -npm run dev -``` - diff --git a/docs/content/framework/3.guides/3.brand-application.md b/docs/content/framework/3.guides/3.brand-application.md deleted file mode 100644 index 519d045618..0000000000 --- a/docs/content/framework/3.guides/3.brand-application.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Applying theme and brand -description: A guide to applying theme and brand assets to Ripple sites. -layout: page ---- - -Theming with brand colours is embedded deeply into Ripple, using [design tokens](https://amzn.github.io/style-dictionary/#/tokens). Global and component styles are built on a base level of tokens, that can be adjusted at a _site_ level by modifying a few key properties. - -## Token naming - -Ripple uses a naming scheme for tokens, and the CSS custom properties are derived with this pattern: - -``` ---rpl(-)-(-) -``` - -Some example props: - -``` ---rpl-clr-primary ---rpl-clr-success-light ---rpl-type-size-5 ---rpl-sp-3 ---rpl-border-4 -``` - -And a worked example: - -```css -.example-block { - border-color: var(--rpl-clr-primary); - border-style: solid; - border-width: var(--rpl-border-4); - color: var(--rpl-clr-primary); - padding: var(--rpl-sp-3); -} -``` - -## Theme properties - -The minimum set of required properties are listed below: - -``` ---rpl-clr-primary ---rpl-clr-footer-alt ---rpl-clr-link ---rpl-clr-type-primary-accessible ---rpl-clr-primary-alt ---rpl-clr-type-primary-alt-accessible ---rpl-clr-footer ---rpl-clr-type-footer-accessible ---rpl-clr-primary-alpha ---rpl-clr-accent ---rpl-clr-accent-alt ---rpl-clr-focus ---rpl-clr-gradient-horizontal ---rpl-clr-gradient-vertical -``` - -## SDP - -In SDP, the theme is managed in the back-end system via the Site Taxonomy. Site entries have a collection of key-value _site theme values_, and also _site feature flag values_ to define site-specific settings, e.g. - -``` -Key -rpl-clr-primary -Value -#1c4f9c - -Key -footerTheme -Value -neutral -``` - -Both these collections are exposed to the front-end through the Site API, and can immediately update production sites without requiring a code change or deployment. - -## Secondary logo - -The secondary logo is also content managed, and can be set on the same Site Taxonomy page in the back-end under _Logo_. - -## app.config - -Theme and feature flag properties may also be defined in the Nuxt `app.config.ts` for the site. This matches the naming used in the Site API (note the difference in `--` for theme, since these are Javascript config props, not CSS custom props): - -```js -export default defineAppConfig({ - ripple: { - featureFlags: {}, - theme: { - 'rpl-clr-primary': '#6B19A3', - 'rpl-clr-footer-alt': '#6B19A3', - 'rpl-clr-link': '#6B19A3', - 'rpl-clr-type-primary-accessible': '#6B19A3', - 'rpl-clr-primary-alt': '#3F006B', - 'rpl-clr-type-primary-alt-accessible': '#3F006B', - 'rpl-clr-footer': '#3F006B', - 'rpl-clr-type-footer-accessible': '#3F006B', - 'rpl-clr-primary-alpha': 'rgba(107, 25, 163, 0.5)', - 'rpl-clr-accent': '#6DDD97', - 'rpl-clr-accent-alt': '#EAFAF0', - 'rpl-clr-focus': '#9DEF65', - 'rpl-clr-gradient-horizontal': 'linear-gradient(90deg, #382484 0%, #5A0099 20%, #7623B0 35%, #2E7478 50%, #2FA26F 70%, #2FCE6A 80%)', - 'rpl-clr-gradient-vertical': 'linear-gradient(180deg, #382484 0%, #5A0099 20%, #7623B0 35%, #2E7478 50%, #2FA26F 70%, #2FCE6A 80%)' - } - } -}) -``` - -Note in this example the same value is used in the first four properties (primary branding colour), then the next four (alternate branding colour). Even though they use the same value, these properties must all be defined. The system was set up this way to support accessible _light-on-dark_ and _dark-on-light_ theming options. diff --git a/docs/content/framework/3.guides/4.creating-content-types.md b/docs/content/framework/3.guides/4.creating-content-types.md deleted file mode 100644 index 971726bfed..0000000000 --- a/docs/content/framework/3.guides/4.creating-content-types.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Creating content types -description: How to create new content types for the SDP platform -layout: page ---- - -> See [key concepts - content types](/framework/key-concepts/content-types) for an overview of what content types are and the core content types used within the SDP platform. - -## Anatomy - -Content types are comprised of three main parts: - -- [A mapping object](#the-mapping-object) - maps API data to pass to a Vue component -- [A server plugin](#the-server-plugin) - registers the content type with `@dpc-sdp/ripple-tide-api` -- [And Vue components](#the-vue-component) - takes the mapped data and renders the content type - -## Creating a content type - -The Nuxt Ripple CLI provides a simple way to add new content types, to get started just run the following command: - -``` -npx @dpc-sdp/nuxt-ripple-cli add content-type [DIRECTORY] --name {NAME} --createTests --cypressPath {CYPRESSPATH} -``` - -Where `[DIRECTORY]` is the location to output the content type scaffolding, `{NAME}` is the name of the new content type, and `{CYPRESSPATH}` is the relative path to be used for the cypress tests folder. - -> Using the CLI is the preferred way to create new content types as it will ensure the correct file structure and naming conventions are used. It will also scaffold the mapping object, server plugin, and Vue component for you. - -## The mapping object - -The mapping object is responsible for supplying the data mapping and includes. - -- **Data mapping**: the data mapping is responsible for mapping the Tide API response data (i.e. Drupal JSON) into a clean format that can be used within the Vue component. -- **Includes**: the includes are an array of fields that need to be added to the API request so Drupal knows what referenced entities to include in the API response, for more on Drupal includes see [JSON API includes](https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/includes). - -Below is an example mapping object. - -```ts -import type { IRplTideModuleMapping } from '@dpc-sdp/ripple-tide-api/types' -import { tidePageBaseMapping, tidePageBaseIncludes } from '@dpc-sdp/nuxt-ripple/mapping' -import { getField, getImageFromField } from '@dpc-sdp/ripple-tide-api' - -const tideMyConentTypeModule: IRplTideModuleMapping = { - mapping: { - // The base mapping is used to add common fields - // See the tidePageBaseMapping function for details - ...tidePageBaseMapping({ withTopicTags: true }), - - content: 'field_my_content_type_content', - - // Can be nested as needed - header: { - intro: 'field_landing_page_intro_text', - }, - - // Use a function to transform the data - files: (src) => getField(src, 'field_node_files').map((file) => ({ - name: file.name, - url: file.field_media_file.url - })), - - // Or when using helper functions - image: (src) => getImageFromField(src, 'field_featured_image.field_media_image') - }, - includes: [ - // The base includes are used to include common fields - // See the tidePageBaseIncludes function for details - ...tidePageBaseIncludes({ withTopicTags: true }), - - 'field_featured_image', - 'field_featured_image.field_media_image' - ] -} - -export default tideMyConentTypeModule -``` - -## The server plugin - -The server plugin is responsible for registering the new content type with `@dpc-sdp/ripple-tide-api`, this file needs to live within the `server/plugins` directory of the content type. - -The content type can then be registered by calling the `setContentType` method on the Tide page API. This method takes two arguments, the first is the name of the content type, and the second is the mapping object. If you have used the CLI to create the content type this will already be done for you. - -```ts -import type { NitroApp } from 'nitropack' -import { defineNitroPlugin } from 'nitropack/dist/runtime/plugin' -import tideMyContentTypeModule from '../../mapping' - -export default defineNitroPlugin(async (nitroApp: NitroApp) => { - nitroApp.tide?.pageApi.setContentType('my-content-type', tideMyContentTypeModule) -}) -``` - -## The Vue component - -A Vue component is needed to render the content type. This component will receive a `page` prop, it's this prop that contains the mapped data from the Tide API response. - -> **Important note**: The component needs to be registered globally, this can be done by adding the component to a `/components/global` folder within the content type. Because this is global the name needs to be unique, it must also be prefixed with `Tide` i.e. `TideMyContentType`. - -This component should use the `TideBaseLayout` component to render the shell of the site, from there slots are used to render the content types content in the right locations. If you're using the CLI it will take care of scaffolding a global component that uses `TideBaseLayout` for you. - -Below is an example component using `TideBaseLayout`. - -```vue - - - -``` - -## Using the content type - -Content types are actually [Nuxt layers](https://nuxt.com/docs/getting-started/layers) so these are added in the same way as any other layer through the extends property of the main applications `nuxt.config.ts` file. - -```js -export default defineNuxtConfig({ - extends: [ - '@dpc-sdp/ripple-tide-news', // An npm installed package - 'github:dpc-sdp/ripple-tide-news#1.0.0', // A tagged git repository - './layers/tide-my-content-type', // A local layer - ] -}) -``` diff --git a/docs/content/framework/3.guides/5.creating-new-layers.md b/docs/content/framework/3.guides/5.creating-new-layers.md deleted file mode 100644 index 11349fe304..0000000000 --- a/docs/content/framework/3.guides/5.creating-new-layers.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Creating new layers -description: Implementing custom functionality through layers -layout: page -links: - - text: Nuxt layers documentation - url: https://nuxt.com/docs/getting-started/layers ---- - -Nuxt layers are used to encapsulate Ripple functionality, so it can easily be shared and reused across projects, see [key concepts - layers](/framework/key-concepts/nuxt-layers) for a conceptual overview of what layers are and how they are used within Ripple. - -## Creating a new layer - -The Nuxt Ripple CLI provides a simple way to initialise new layers, to create a new layer just run the following command: - -``` -npx @dpc-sdp/nuxt-ripple-cli init layer [DIRECTORY] --name {NAME} -``` - -Where `[DIRECTORY]` is the location to output the layer scaffolding and `{NAME}` is the name of the new layer. This command will scaffold everything you need to get started developing a new layer. - -## Developing the layer - -Once the layer has been created you can start working with it by running the command below from the new layers directory. This will start a development server and allow you to start working on the layer. - -```bash -npm run dev -``` - -The `playground` folder contains the essentials to get a test Nuxt application up and running, it includes a `app.config.js`, `nuxt.config.js` and `.env` file. The `nuxt.config.js` includes a core set of layers used by Ripple to get a reference sdp site up and running, it also includes the new layer itself. - -> The `playground` folder is a fully functional Nuxt application and can be used to test the new layer in isolation. - -The layers structure is almost identical to a normal Nuxt app, meaning you can utilise the same features and conventions as a standard Nuxt application. i.e. create a `pages` folder for new pages, create a `components` folder for new components, etc. - -Other useful commands: -- `npm run build` to do a production build of the `.preview` application (for testing purposes) -- `npm run lint` to lint the layer code with [eslint](https://eslint.org/) -- `npm run test` to run any unit tests with [jest](https://jestjs.io/) - -## Publishing the layer - -Once the layer is ready to be published it can be published to npm or pushed to a remote git repository, [GitHub](https://github.com/), [GitLab](https://about.gitlab.com/), and [Bitbucket](https://bitbucket.org/) are supported. -For more on publishing to npm see [contributing packages to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry). - -## Using the layer - -Nuxt layers can be added to any Nuxt site by including the layer in the `nuxt.config.js` file under extends. If the layer is published to npm don't forget to `npm install` it first. - -```js -export default defineNuxtConfig({ - extends: [ - '@dpc-sdp/nuxt-ripple', // An npm installed package - 'github:dpc-sdp/ripple-vic-gov-au-custom#1.0.0' // A tagged git repository - ] -}) -``` - -Also, make sure to check the layers documentation for any additional configuration that may be required. - -> To extend from a private repository, you need to add a `GIGET_AUTH=` environment variable, with an auth token from your git provider. - -### Caveats when using layers from a git repository - -If a layer is added via a git repository and that layer has npm dependencies, you will need to manually install them within the Nuxt application utilising the layer. The Nuxt team are looking at auto-installing layer dependencies in the future, see [issue #13367](https://github.com/nuxt/nuxt/issues/13367). - -You will also need to alias the dependencies in the Nuxt application, so they can be resolved to the correct package location. This can be done by adding an `alias` object to the `nuxt.config.js` file. - -```js -export default defineNuxtConfig({ - alias: { - 'date-fns': require.resolve('date-fns') - } -}) -``` diff --git a/docs/content/framework/3.guides/5.dynamic-components.md b/docs/content/framework/3.guides/5.dynamic-components.md deleted file mode 100644 index 9c8d601fe6..0000000000 --- a/docs/content/framework/3.guides/5.dynamic-components.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: Adding a new dynamic component -description: 'Learn how to add a new dynamic page component to a content type' -layout: page ---- - -> See [key concepts - dynamic components](/framework/key-concepts/dynamic-components) for a conceptual overview of what dynamic components are and how they are used within the SDP platform. - -Dynamic components comprise of the following elements: - -- A mapping function that will map the raw drupal api response to a Vue component and the props to pass to that Vue component -- A Vue component that will render the component -- A list of 'includes' to send to Drupal JSON API (See drupal docs for [Includes](https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/includes)) -- A list of content types that the dynamic component can be added to - -Each dynamic component then needs to be registered against the name of the [paragraph](https://www.drupal.org/project/paragraphs) in Drupal. - -## Registering the dynamic component - -Dynamic components need to registered inside a [Nitro Plugins](https://nitro.unjs.io/guide/plugins). Nitro is the server engine used in Nuxt 3. - -Nitro Plugins can be added in the `/server/plugins` folder in your project. - -Use the `setDynamicComponent` method to register your component. - -`setDynamicComponent` takes the following parameters: - -- name of the component in Drupal (paragraph name) -- the mapping function, includes and list of content types - -```ts -// /server/plugins/my-content-type.ts - -export default defineNitroPlugin(async (nitroApp: NitroApp) => { - nitroApp.tide?.pageApi.setDynamicComponent('paragraph--my_dynamic_component', { - mapping: (field) => { ... }, - includes: [ ... ], - contentTypes: [ ... ] - }) -}) -``` - -The individual elements of a dynamic component are covered below. - -## The mapping function - -The mapping function takes the raw response from the drupal JSON API and returns a standard structure that ultimately ties the dynamic component with a Vue component. - -```ts -import { TideDynamicPageComponent } from '@dpc-sdp/ripple-tide-api/types' - -interface IMyDynamicComponentProps { - someProp1: boolean, - someProp2: string -} - -const mappingFunction = (field): TideDynamicPageComponent => { - return { - // This should be the name to the Vue component you created - component: 'MyDynamicComponent', - - // Always include a unique id - id: field.drupal_internal__id.toString(), - - // Some components have titles above them, which you can add here. This is optional - title: field.field_paragraph_title, - - // These props will be passed to `MyDynamicComponent` - props: { - someProp1: false, - someProp2: field.field_paragraph_description - } - } -} -``` - -## The Vue component - -Create a Vue component that will render your dynamic component. - -This component will be rendered each time your component appears on a page and will receive any props that were specified from the mapping function. - -> **Important note**: For this to work, your component needs to be registered globally. The simplest way to do this is to add the component to the `/components/global` folder in your layer. -> -> Because they are global it's also important to choose non generic names so that they don't clash and overwrite other dynamic components - -```ts -// /components/global/MyDynamicComponent.vue - - - - -``` - -## The list of includes - -Each dynamic component should specify an array of 'includes' that it needs in order to function properly. - -```ts -const includes = [ - 'field_landing_page_component.field_paragraph_accordion' -] -``` - -## The list of content types - -Each dynamic component should specify an array of 'content types' that the dynamic component can appear on. - -```ts -const contentTypes = [ - 'landing_page', - 'some_content_type' -] -``` - diff --git a/docs/content/framework/4.core-modules.md b/docs/content/framework/4.core-modules.md deleted file mode 100644 index dbcccdbf8e..0000000000 --- a/docs/content/framework/4.core-modules.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Core modules -description: A listing of all current core Ripple layers and packages -layout: page ---- - -View each package on GitHub package registry for their individual READMEs. - -## Core UI Libraries - -- [`ripple-ui-core`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-ui-core) -- [`ripple-ui-forms`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-ui-forms) -- [`ripple-ui-maps`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-ui-maps) - -## Tide API - -- [`ripple-tide-api`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-api) - -## Nuxt-ripple base layer - -- [`nuxt-ripple`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/nuxt-ripple) - -## Core content types - -All core content types (and content related packages) are added through the `ripple-sdp-core` package - -- [`ripple-sdp-core`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-sdp-core) - -Below are the individual content type packages that are included in `ripple-sdp-core`: - -- [`ripple-tide-search`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-search) -- [`ripple-tide-webform`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-webform) -- [`ripple-tide-topic`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-topic) -- [`ripple-tide-landing-page`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-landing-page) -- [`ripple-tide-event`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-event) -- [`ripple-tide-grant`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-grant) -- [`ripple-tide-media`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-media) -- [`ripple-tide-news`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-news) -- [`ripple-tide-publication`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-tide-publication) - -## Other core modules - -- [`nuxt-ripple-analytics`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/nuxt-ripple-analytics) -- [`nuxt-ripple-preview`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/nuxt-ripple-preview) - -## Scaffolding, testing and supporting packages - -- [`nuxt-ripple-cli`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/nuxt-ripple-cli) -- [`ripple-test-utils`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/ripple-test-utils) -- [`eslint-config-ripple`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/eslint-config-ripple) -- [`stylelint-config-ripple`](https://github.com/dpc-sdp/ripple-framework/pkgs/npm/stylelint-config-ripple) diff --git a/docs/content/framework/_4.modules/0.all-modules.md b/docs/content/framework/_4.modules/0.all-modules.md deleted file mode 100644 index 8f6402387b..0000000000 --- a/docs/content/framework/_4.modules/0.all-modules.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: All modules -description: 'Core modules' -layout: module-listing ---- diff --git a/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/index.md b/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/index.md deleted file mode 100644 index 59a670ef7c..0000000000 --- a/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Nuxt Ripple -description: 'A Nuxt module for integrating Ripple and Tide' -layout: module ---- - -## Overview - -A Nuxt module for integrating Ripple and Tide. diff --git a/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/module.json b/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/module.json deleted file mode 100644 index e08281c168..0000000000 --- a/docs/content/framework/_4.modules/@dpc-sdp-nuxt-ripple/module.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Nuxt Ripple", - "packageName": "@dpc-sdp/nuxt-ripple", - "description": "A Nuxt module for integrating Ripple and Tide", - "sourceUrl": "https://github.com/dpc-sdp/ripple-framework/tree/develop/packages/nuxt-ripple", - "issuesUrl": "https://github.com/dpc-sdp/ripple-framework/issues", - "contributor": { - "name": "SDP", - "url": "https://www.vic.gov.au/single-digital-presence" - } -} diff --git a/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/index.md b/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/index.md deleted file mode 100644 index 1e8ef38b4b..0000000000 --- a/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Ripple Tide Landing Page -description: 'Landing Page content type support.' -layout: module ---- - -## Overview - -Ripple mappings and templates for the Tide Landing Page content type. diff --git a/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/module.json b/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/module.json deleted file mode 100644 index 525cbf0ce8..0000000000 --- a/docs/content/framework/_4.modules/@dpc-sdp-ripple-tide-landing-page/module.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Landing Page", - "packageName": "@dpc-sdp/ripple-tide-landing-page", - "description": "Landing Page content type support.", - "sourceUrl": "https://github.com/dpc-sdp/ripple-framework/tree/develop/packages/ripple-tide-landing-page", - "issuesUrl": "https://github.com/dpc-sdp/ripple-framework/issues", - "contributor": { - "name": "SDP", - "url": "https://www.vic.gov.au/single-digital-presence" - } -} diff --git a/docs/error.vue b/docs/error.vue deleted file mode 100644 index 0f95417500..0000000000 --- a/docs/error.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/docs/layouts/home.vue b/docs/layouts/home.vue deleted file mode 100644 index 76764702ac..0000000000 --- a/docs/layouts/home.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - - - diff --git a/docs/layouts/module-listing.vue b/docs/layouts/module-listing.vue deleted file mode 100644 index cf152f341f..0000000000 --- a/docs/layouts/module-listing.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/docs/layouts/module.vue b/docs/layouts/module.vue deleted file mode 100644 index f2c01d436a..0000000000 --- a/docs/layouts/module.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/docs/layouts/page.vue b/docs/layouts/page.vue deleted file mode 100644 index ae0b13ec0e..0000000000 --- a/docs/layouts/page.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - diff --git a/docs/netlify.toml b/docs/netlify.toml deleted file mode 100644 index d87b6ba1ef..0000000000 --- a/docs/netlify.toml +++ /dev/null @@ -1,7 +0,0 @@ -[build.environment] - NODE_OPTIONS = "--max_old_space_size=4096" -[[plugins]] -package = "@algolia/netlify-plugin-crawler" - [plugins.inputs] - branches = ['main', 'develop', 'feature/docs-site'] - template = "hierarchical" diff --git a/docs/nuxt.config.ts b/docs/nuxt.config.ts deleted file mode 100644 index 3068a4612d..0000000000 --- a/docs/nuxt.config.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { defineNuxtConfig } from 'nuxt/config' -import ViteYaml from '@modyfi/vite-plugin-yaml' - -// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config -export default defineNuxtConfig({ - ssr: true, - css: ['~/public/assets/css/main.css'], - modules: [ - '@dpc-sdp/ripple-ui-core/nuxt', - '@dpc-sdp/ripple-ui-forms/nuxt', - '@nuxt/content' - ], - // https://content.nuxtjs.org - content: { - build: { - markdown: { - highlight: { - theme: 'github-light', - langs: ['css', 'vue', 'js', 'bash', 'markdown'] - } - } - } - }, - vite: { - plugins: [ViteYaml()] - }, - nitro: { - prerender: { - ignore: ['/storybook'] - }, - preset: 'netlify-static' - }, - // A change in nuxt 3.8.0 means we were getting errors whenever a type was imported without the 'type' keyword - // This is a temporary workaround until we can fix all the types - // TODO: Add 'type' keyword to all type imports - // https://github.com/nuxt/nuxt/releases/tag/v3.8.0 - typescript: { - tsConfig: { - compilerOptions: { - verbatimModuleSyntax: false - } - } - } -}) diff --git a/docs/package.json b/docs/package.json deleted file mode 100644 index 4927dcc71f..0000000000 --- a/docs/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "private": true, - "name": "docs", - "version": "2.1.0-alpha.76", - "scripts": { - "build": "nuxt build", - "build:docs-storybook": "STATIC_BASE_PATH=\"/storybook/\" pnpm -F ripple-storybook static:build --output-dir ../../docs/public/storybook", - "dev": "nuxt dev", - "generate": "pnpm build:docs-storybook && nuxt generate", - "preview": "nuxt preview" - }, - "dependencies": { - "@dpc-sdp/ripple-ui-core": "workspace:*", - "@dpc-sdp/ripple-ui-forms": "workspace:*", - "@dpc-sdp/stylelint-config-ripple": "workspace:*", - "@modyfi/vite-plugin-yaml": "^1.1.1", - "highlight.js": "^11.11.1", - "nuxt": "catalog:" - }, - "devDependencies": { - "@iconify/vue": "^5.0.0", - "@nuxt/content": "^3.6.1" - } -} diff --git a/docs/pages/[...slug].vue b/docs/pages/[...slug].vue deleted file mode 100644 index 2fbacb54eb..0000000000 --- a/docs/pages/[...slug].vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/docs/public/android-chrome-192x192.png b/docs/public/android-chrome-192x192.png deleted file mode 100644 index 5d808774e7..0000000000 Binary files a/docs/public/android-chrome-192x192.png and /dev/null differ diff --git a/docs/public/android-chrome-512x512.png b/docs/public/android-chrome-512x512.png deleted file mode 100644 index eb2cfc3d32..0000000000 Binary files a/docs/public/android-chrome-512x512.png and /dev/null differ diff --git a/docs/public/apple-touch-icon.png b/docs/public/apple-touch-icon.png deleted file mode 100644 index 3f9d432fc2..0000000000 Binary files a/docs/public/apple-touch-icon.png and /dev/null differ diff --git a/docs/public/assets/css/main.css b/docs/public/assets/css/main.css deleted file mode 100644 index 8e858c4c8b..0000000000 --- a/docs/public/assets/css/main.css +++ /dev/null @@ -1,14 +0,0 @@ -/* Minimal reset */ -blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre { - margin: 0 -} - -audio, canvas, embed, iframe, img, object, svg, video { - display: block; - vertical-align: middle -} - -img, video { - height: auto; - max-width: 100% -} diff --git a/docs/public/assets/fonts/VIC-Bold.woff2 b/docs/public/assets/fonts/VIC-Bold.woff2 deleted file mode 100755 index 14b4a0c465..0000000000 Binary files a/docs/public/assets/fonts/VIC-Bold.woff2 and /dev/null differ diff --git a/docs/public/assets/fonts/VIC-Regular.woff2 b/docs/public/assets/fonts/VIC-Regular.woff2 deleted file mode 100755 index 0eb89f6a4a..0000000000 Binary files a/docs/public/assets/fonts/VIC-Regular.woff2 and /dev/null differ diff --git a/docs/public/assets/fonts/VIC-RegularItalic.woff2 b/docs/public/assets/fonts/VIC-RegularItalic.woff2 deleted file mode 100755 index ffe4c42d6d..0000000000 Binary files a/docs/public/assets/fonts/VIC-RegularItalic.woff2 and /dev/null differ diff --git a/docs/public/assets/img/Grid-Grid-Anatomy.png b/docs/public/assets/img/Grid-Grid-Anatomy.png deleted file mode 100644 index ac7afadaca..0000000000 Binary files a/docs/public/assets/img/Grid-Grid-Anatomy.png and /dev/null differ diff --git a/docs/public/assets/img/Icon-Clear-space.png b/docs/public/assets/img/Icon-Clear-space.png deleted file mode 100644 index fd73fe03b4..0000000000 Binary files a/docs/public/assets/img/Icon-Clear-space.png and /dev/null differ diff --git a/docs/public/assets/img/InlineLink-Focus.png b/docs/public/assets/img/InlineLink-Focus.png deleted file mode 100644 index 034efd42ef..0000000000 Binary files a/docs/public/assets/img/InlineLink-Focus.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-StateGov-cobrand.png b/docs/public/assets/img/Logo-StateGov-cobrand.png deleted file mode 100644 index cbc5c57f71..0000000000 Binary files a/docs/public/assets/img/Logo-StateGov-cobrand.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-StateGov.png b/docs/public/assets/img/Logo-StateGov.png deleted file mode 100644 index b60cb742aa..0000000000 Binary files a/docs/public/assets/img/Logo-StateGov.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-StateGovClearSpace.png b/docs/public/assets/img/Logo-StateGovClearSpace.png deleted file mode 100644 index b1d2bea8a2..0000000000 Binary files a/docs/public/assets/img/Logo-StateGovClearSpace.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-vicgov-Clear-Space.png b/docs/public/assets/img/Logo-vicgov-Clear-Space.png deleted file mode 100644 index 80125d6043..0000000000 Binary files a/docs/public/assets/img/Logo-vicgov-Clear-Space.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-vicgov-cobrand.png b/docs/public/assets/img/Logo-vicgov-cobrand.png deleted file mode 100644 index 46fbc211f4..0000000000 Binary files a/docs/public/assets/img/Logo-vicgov-cobrand.png and /dev/null differ diff --git a/docs/public/assets/img/Logo-vicgov.png b/docs/public/assets/img/Logo-vicgov.png deleted file mode 100644 index 90c655c80d..0000000000 Binary files a/docs/public/assets/img/Logo-vicgov.png and /dev/null differ diff --git a/docs/public/assets/img/campaign-banner-behaviour.png b/docs/public/assets/img/campaign-banner-behaviour.png deleted file mode 100644 index b2cf1870bd..0000000000 Binary files a/docs/public/assets/img/campaign-banner-behaviour.png and /dev/null differ diff --git a/docs/public/assets/img/components/accordion.png b/docs/public/assets/img/components/accordion.png deleted file mode 100644 index 710d510504..0000000000 Binary files a/docs/public/assets/img/components/accordion.png and /dev/null differ diff --git a/docs/public/assets/img/components/alert.png b/docs/public/assets/img/components/alert.png deleted file mode 100644 index 11c88744e6..0000000000 Binary files a/docs/public/assets/img/components/alert.png and /dev/null differ diff --git a/docs/public/assets/img/flag-aboriginal.png b/docs/public/assets/img/flag-aboriginal.png deleted file mode 100644 index 438284bfe0..0000000000 Binary files a/docs/public/assets/img/flag-aboriginal.png and /dev/null differ diff --git a/docs/public/assets/img/flag-torres-strait-islander.png b/docs/public/assets/img/flag-torres-strait-islander.png deleted file mode 100644 index 2e1b556130..0000000000 Binary files a/docs/public/assets/img/flag-torres-strait-islander.png and /dev/null differ diff --git a/docs/public/assets/img/flags-acknowledgement.png b/docs/public/assets/img/flags-acknowledgement.png deleted file mode 100644 index 6f8fe0762a..0000000000 Binary files a/docs/public/assets/img/flags-acknowledgement.png and /dev/null differ diff --git a/docs/public/assets/img/focus-alert-focus.png b/docs/public/assets/img/focus-alert-focus.png deleted file mode 100644 index 558469b479..0000000000 Binary files a/docs/public/assets/img/focus-alert-focus.png and /dev/null differ diff --git a/docs/public/assets/img/focus-block-focus.png b/docs/public/assets/img/focus-block-focus.png deleted file mode 100644 index 3ed9b3b364..0000000000 Binary files a/docs/public/assets/img/focus-block-focus.png and /dev/null differ diff --git a/docs/public/assets/img/focus-inline-focus.png b/docs/public/assets/img/focus-inline-focus.png deleted file mode 100644 index 4e37f2abb6..0000000000 Binary files a/docs/public/assets/img/focus-inline-focus.png and /dev/null differ diff --git a/docs/public/assets/img/focus-outline-focus.png b/docs/public/assets/img/focus-outline-focus.png deleted file mode 100644 index 593b9b5173..0000000000 Binary files a/docs/public/assets/img/focus-outline-focus.png and /dev/null differ diff --git a/docs/public/assets/img/font-weight.png b/docs/public/assets/img/font-weight.png deleted file mode 100644 index 02f55389c1..0000000000 Binary files a/docs/public/assets/img/font-weight.png and /dev/null differ diff --git a/docs/public/assets/img/for-designers.png b/docs/public/assets/img/for-designers.png deleted file mode 100644 index 990c9e611b..0000000000 Binary files a/docs/public/assets/img/for-designers.png and /dev/null differ diff --git a/docs/public/assets/img/for-developers.png b/docs/public/assets/img/for-developers.png deleted file mode 100644 index f0ac955e90..0000000000 Binary files a/docs/public/assets/img/for-developers.png and /dev/null differ diff --git a/docs/public/assets/img/hero-graphic.png b/docs/public/assets/img/hero-graphic.png deleted file mode 100644 index 4eae9ae917..0000000000 Binary files a/docs/public/assets/img/hero-graphic.png and /dev/null differ diff --git a/docs/public/assets/img/image-landscape-l.jpg b/docs/public/assets/img/image-landscape-l.jpg deleted file mode 100644 index 338887eac2..0000000000 Binary files a/docs/public/assets/img/image-landscape-l.jpg and /dev/null differ diff --git a/docs/public/assets/img/layout-content-spacing.png b/docs/public/assets/img/layout-content-spacing.png deleted file mode 100644 index 0bfcb8a94c..0000000000 Binary files a/docs/public/assets/img/layout-content-spacing.png and /dev/null differ diff --git a/docs/public/assets/img/layout-full-width.png b/docs/public/assets/img/layout-full-width.png deleted file mode 100644 index a56d8109bb..0000000000 Binary files a/docs/public/assets/img/layout-full-width.png and /dev/null differ diff --git a/docs/public/assets/img/layout-page-spacing.png b/docs/public/assets/img/layout-page-spacing.png deleted file mode 100644 index 1c05861a8b..0000000000 Binary files a/docs/public/assets/img/layout-page-spacing.png and /dev/null differ diff --git a/docs/public/assets/img/layout-two-column.png b/docs/public/assets/img/layout-two-column.png deleted file mode 100644 index d0065ceefd..0000000000 Binary files a/docs/public/assets/img/layout-two-column.png and /dev/null differ diff --git a/docs/public/assets/img/link.png b/docs/public/assets/img/link.png deleted file mode 100644 index 210f7ff6b1..0000000000 Binary files a/docs/public/assets/img/link.png and /dev/null differ diff --git a/docs/public/assets/img/modules/Landing-Page.png b/docs/public/assets/img/modules/Landing-Page.png deleted file mode 100644 index c0a267dbc2..0000000000 Binary files a/docs/public/assets/img/modules/Landing-Page.png and /dev/null differ diff --git a/docs/public/assets/img/modules/api-routes.png b/docs/public/assets/img/modules/api-routes.png deleted file mode 100644 index 15d4dc8aaf..0000000000 Binary files a/docs/public/assets/img/modules/api-routes.png and /dev/null differ diff --git a/docs/public/assets/img/modules/dynamic-components.png b/docs/public/assets/img/modules/dynamic-components.png deleted file mode 100644 index 628046df1a..0000000000 Binary files a/docs/public/assets/img/modules/dynamic-components.png and /dev/null differ diff --git a/docs/public/assets/img/modules/layers.png b/docs/public/assets/img/modules/layers.png deleted file mode 100644 index 6ba5614d96..0000000000 Binary files a/docs/public/assets/img/modules/layers.png and /dev/null differ diff --git a/docs/public/assets/img/modules/ripple-tide-api.png b/docs/public/assets/img/modules/ripple-tide-api.png deleted file mode 100644 index 095e678572..0000000000 Binary files a/docs/public/assets/img/modules/ripple-tide-api.png and /dev/null differ diff --git a/docs/public/assets/img/modules/rpl-modules.png b/docs/public/assets/img/modules/rpl-modules.png deleted file mode 100644 index a8c0a2bfc8..0000000000 Binary files a/docs/public/assets/img/modules/rpl-modules.png and /dev/null differ diff --git a/docs/public/assets/img/modules/sdp-architecture.png b/docs/public/assets/img/modules/sdp-architecture.png deleted file mode 100644 index 30b52e923f..0000000000 Binary files a/docs/public/assets/img/modules/sdp-architecture.png and /dev/null differ diff --git a/docs/public/assets/img/ordered-list.png b/docs/public/assets/img/ordered-list.png deleted file mode 100644 index 5df32c5ec7..0000000000 Binary files a/docs/public/assets/img/ordered-list.png and /dev/null differ diff --git a/docs/public/assets/img/ripple-header-title.png b/docs/public/assets/img/ripple-header-title.png deleted file mode 100644 index 17405790b6..0000000000 Binary files a/docs/public/assets/img/ripple-header-title.png and /dev/null differ diff --git a/docs/public/assets/img/ripple-header.png b/docs/public/assets/img/ripple-header.png deleted file mode 100644 index 1a840c4eba..0000000000 Binary files a/docs/public/assets/img/ripple-header.png and /dev/null differ diff --git a/docs/public/assets/img/ripple-parts.png b/docs/public/assets/img/ripple-parts.png deleted file mode 100644 index 68b7586452..0000000000 Binary files a/docs/public/assets/img/ripple-parts.png and /dev/null differ diff --git a/docs/public/assets/img/sites.png b/docs/public/assets/img/sites.png deleted file mode 100644 index 3223982457..0000000000 Binary files a/docs/public/assets/img/sites.png and /dev/null differ diff --git a/docs/public/assets/img/temp/Nils_Olav_wide.jpg b/docs/public/assets/img/temp/Nils_Olav_wide.jpg deleted file mode 100644 index 69a52de7d5..0000000000 Binary files a/docs/public/assets/img/temp/Nils_Olav_wide.jpg and /dev/null differ diff --git a/docs/public/assets/img/temp/storybook-toggles.png b/docs/public/assets/img/temp/storybook-toggles.png deleted file mode 100644 index c70dd45983..0000000000 Binary files a/docs/public/assets/img/temp/storybook-toggles.png and /dev/null differ diff --git a/docs/public/assets/img/temp/url-args.png b/docs/public/assets/img/temp/url-args.png deleted file mode 100644 index 8be94573e3..0000000000 Binary files a/docs/public/assets/img/temp/url-args.png and /dev/null differ diff --git a/docs/public/assets/img/unordered-list.png b/docs/public/assets/img/unordered-list.png deleted file mode 100644 index 53a5616574..0000000000 Binary files a/docs/public/assets/img/unordered-list.png and /dev/null differ diff --git a/docs/public/assets/img/vic-gov-au-logo.png b/docs/public/assets/img/vic-gov-au-logo.png deleted file mode 100644 index fbb2b8a543..0000000000 Binary files a/docs/public/assets/img/vic-gov-au-logo.png and /dev/null differ diff --git a/docs/public/assets/img/vic-state-gov-logo.png b/docs/public/assets/img/vic-state-gov-logo.png deleted file mode 100644 index 5a50bbf916..0000000000 Binary files a/docs/public/assets/img/vic-state-gov-logo.png and /dev/null differ diff --git a/docs/public/favicon-16x16.png b/docs/public/favicon-16x16.png deleted file mode 100644 index a8bd6a01e8..0000000000 Binary files a/docs/public/favicon-16x16.png and /dev/null differ diff --git a/docs/public/favicon-32x32.png b/docs/public/favicon-32x32.png deleted file mode 100644 index 84976c1ebb..0000000000 Binary files a/docs/public/favicon-32x32.png and /dev/null differ diff --git a/docs/public/favicon.ico b/docs/public/favicon.ico deleted file mode 100644 index 8bd8d5ca39..0000000000 Binary files a/docs/public/favicon.ico and /dev/null differ diff --git a/docs/public/img/generate.jpg b/docs/public/img/generate.jpg deleted file mode 100644 index 73efedb3f4..0000000000 Binary files a/docs/public/img/generate.jpg and /dev/null differ diff --git a/docs/public/img/permissions.jpg b/docs/public/img/permissions.jpg deleted file mode 100644 index c122203d5b..0000000000 Binary files a/docs/public/img/permissions.jpg and /dev/null differ diff --git a/docs/public/img/ripple-logo.png b/docs/public/img/ripple-logo.png deleted file mode 100644 index dee1661fa9..0000000000 Binary files a/docs/public/img/ripple-logo.png and /dev/null differ diff --git a/docs/public/img/token.jpg b/docs/public/img/token.jpg deleted file mode 100644 index 4a8737f5b1..0000000000 Binary files a/docs/public/img/token.jpg and /dev/null differ diff --git a/docs/public/img/vicgovau-logo.svg b/docs/public/img/vicgovau-logo.svg deleted file mode 100755 index 4ae04bbe33..0000000000 --- a/docs/public/img/vicgovau-logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/public/site.webmanifest b/docs/public/site.webmanifest deleted file mode 100644 index 45dc8a2065..0000000000 --- a/docs/public/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/docs/tsconfig.json b/docs/tsconfig.json deleted file mode 100644 index a7bfa186c3..0000000000 --- a/docs/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - // https://v3.nuxtjs.org/concepts/typescript - "extends": "./.nuxt/tsconfig.json" -} diff --git a/docs/utils/colour.ts b/docs/utils/colour.ts deleted file mode 100644 index 17fa392436..0000000000 --- a/docs/utils/colour.ts +++ /dev/null @@ -1,57 +0,0 @@ -import color from '../../packages/ripple-ui-core/src/tokens/settings/color.yaml' -import theme from '../../packages/ripple-ui-core/src/tokens/settings/theme.yaml' - -interface RplColour { - value: string -} - -export function getColourName(name: string): string { - return name.replace('clr', '').replaceAll(/[^a-zA-Z0-9]/g, ' ') -} - -export function getColourToken(name: string): string { - return `rpl.${name}`.replaceAll('._', '').replaceAll('.', '-') -} - -export function getColourByPath(path: string): RplColour | {} { - let found = { ...theme, ...color } - - path.split('.').forEach((bit) => { - found = found?.[bit] - }) - - return found || {} -} - -export function getColourOptions(colour: string[]): object { - return colour.reduce((acc, colour) => { - let option = getColourByPath(colour) - - if (!Object.keys(option).length) return acc - - if (option?.value) { - return { ...acc, [colour]: option } - } - - option = getColourByPath(colour) - - return Object.assign( - acc, - ...Object.keys(option).map((key) => ({ - [`${colour}.${key}`]: option[key] - })) - ) - }, {}) -} - -export function getColourValue(path: RplColour): object { - const cleanPath = path.value.replace('{', '').replace('}', '') - - let colour = getColourByPath(cleanPath) - - if (colour?.value && colour.value.includes('{')) { - colour = getColourValue(colour) - } - - return colour -} diff --git a/examples/nuxt-app/layers/ripple-ui-forms-ext/package.json b/examples/nuxt-app/layers/ripple-ui-forms-ext/package.json index 66243bea10..5b7bc46586 100644 --- a/examples/nuxt-app/layers/ripple-ui-forms-ext/package.json +++ b/examples/nuxt-app/layers/ripple-ui-forms-ext/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@dpc-sdp/ripple-tide-webform": "workspace:*", - "@dpc-sdp/ripple-ui-forms": "workspace:*" + "@dpc-sdp/ripple-ui-forms": "catalog:" } } diff --git a/examples/nuxt-app/package.json b/examples/nuxt-app/package.json index d6d7e88aa7..d449c7311a 100644 --- a/examples/nuxt-app/package.json +++ b/examples/nuxt-app/package.json @@ -25,7 +25,7 @@ "@dpc-sdp/nuxt-ripple-cli": "workspace:*", "@dpc-sdp/nuxt-ripple-preview": "workspace:*", "@dpc-sdp/ripple-sdp-core": "workspace:*", - "@dpc-sdp/ripple-ui-maps": "workspace:*" + "@dpc-sdp/ripple-ui-maps": "catalog:" }, "devDependencies": { "@dpc-sdp/ripple-test-utils": "workspace:*", diff --git a/examples/vue-app/.eslintrc.cjs b/examples/vue-app/.eslintrc.cjs deleted file mode 100644 index a09117b071..0000000000 --- a/examples/vue-app/.eslintrc.cjs +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-env node */ -require('@rushstack/eslint-patch/modern-module-resolution') - -module.exports = { - root: true, - extends: [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/eslint-config-typescript/recommended', - '@vue/eslint-config-prettier' - ], - env: { - 'vue/setup-compiler-macros': true - }, - overrides: [ - { - files: [ - '**/__tests__/*.spec.{js,ts,jsx,tsx}', - 'cypress/integration/**.spec.{js,ts,jsx,tsx}' - ], - extends: ['plugin:cypress/recommended'] - } - ] -} diff --git a/examples/vue-app/.stylelintrc.json b/examples/vue-app/.stylelintrc.json deleted file mode 100644 index 511382b575..0000000000 --- a/examples/vue-app/.stylelintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": ["@dpc-sdp/stylelint-config-ripple"], - "rules": { - "custom-property-pattern": ".+" - } -} diff --git a/examples/vue-app/.vscode/extensions.json b/examples/vue-app/.vscode/extensions.json deleted file mode 100644 index 806eacda61..0000000000 --- a/examples/vue-app/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["johnsoncodehk.volar", "johnsoncodehk.vscode-typescript-vue-plugin"] -} diff --git a/examples/vue-app/CHANGELOG.md b/examples/vue-app/CHANGELOG.md deleted file mode 100644 index d50c8bd660..0000000000 --- a/examples/vue-app/CHANGELOG.md +++ /dev/null @@ -1,408 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.1.0-alpha.76](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.75...v2.1.0-alpha.76) (2023-02-08) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.71](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.70...v2.1.0-alpha.71) (2023-01-31) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.70](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.69...v2.1.0-alpha.70) (2023-01-30) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.69](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.68...v2.1.0-alpha.69) (2023-01-29) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.67](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.66...v2.1.0-alpha.67) (2023-01-27) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.65](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.64...v2.1.0-alpha.65) (2023-01-25) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.64](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.63...v2.1.0-alpha.64) (2023-01-24) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.63](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.62...v2.1.0-alpha.63) (2023-01-24) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.57](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.56...v2.1.0-alpha.57) (2023-01-09) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.56](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.55...v2.1.0-alpha.56) (2023-01-06) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.55](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.54...v2.1.0-alpha.55) (2023-01-04) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.54](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.53...v2.1.0-alpha.54) (2023-01-03) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.53](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.52...v2.1.0-alpha.53) (2022-12-30) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.52](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.51...v2.1.0-alpha.52) (2022-12-22) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.51](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.50...v2.1.0-alpha.51) (2022-12-22) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.50](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.49...v2.1.0-alpha.50) (2022-12-21) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.45](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.44...v2.1.0-alpha.45) (2022-12-19) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.44](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.43...v2.1.0-alpha.44) (2022-12-18) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.43](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.42...v2.1.0-alpha.43) (2022-12-15) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.40](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.39...v2.1.0-alpha.40) (2022-12-15) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.36](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.35...v2.1.0-alpha.36) (2022-12-14) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.35](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.34...v2.1.0-alpha.35) (2022-12-14) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.34](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.33...v2.1.0-alpha.34) (2022-12-13) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.31](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.30...v2.1.0-alpha.31) (2022-12-09) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.30](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.29...v2.1.0-alpha.30) (2022-12-07) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.29](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.28...v2.1.0-alpha.29) (2022-12-07) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.28](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2022-12-07) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.27](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2022-12-06) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.26](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2022-12-06) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.24](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2022-12-02) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.23](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.22...v2.1.0-alpha.23) (2022-12-02) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.20](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2022-11-29) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.19](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.18...v2.1.0-alpha.19) (2022-11-28) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.18](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.17...v2.1.0-alpha.18) (2022-11-28) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.16](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.15...v2.1.0-alpha.16) (2022-11-25) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.15](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.14...v2.1.0-alpha.15) (2022-11-23) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.14](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.13...v2.1.0-alpha.14) (2022-11-21) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.13](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.12...v2.1.0-alpha.13) (2022-11-21) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.12](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.11...v2.1.0-alpha.12) (2022-11-18) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.11](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.10...v2.1.0-alpha.11) (2022-11-16) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.10](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2022-11-16) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.9](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2022-11-14) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.8](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2022-11-09) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.6](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2022-11-09) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.5](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2022-11-09) - -**Note:** Version bump only for package vue-app - - - - - -# [2.1.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2022-11-08) - -**Note:** Version bump only for package vue-app - - - - - -# 2.1.0-alpha.0 (2022-11-08) - -**Note:** Version bump only for package vue-app - - - - - -## [2.0.1-alpha.4](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.3...v2.0.1-alpha.4) (2022-11-06) - -**Note:** Version bump only for package vue-app - -## [2.0.1-alpha.3](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.2...v2.0.1-alpha.3) (2022-11-04) - -**Note:** Version bump only for package vue-app - -## [2.0.1-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.1...v2.0.1-alpha.2) (2022-11-04) - -**Note:** Version bump only for package vue-app - -## 2.0.1-alpha.0 (2022-11-04) - -**Note:** Version bump only for package vue-app - -# [2.0.0-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2022-11-04) - -**Note:** Version bump only for package vue-app - -# [2.0.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2022-11-04) - -**Note:** Version bump only for package vue-app - -# 2.0.0-alpha.0 (2022-11-04) - -**Note:** Version bump only for package vue-app diff --git a/examples/vue-app/cypress.json b/examples/vue-app/cypress.json deleted file mode 100644 index 3d372252f4..0000000000 --- a/examples/vue-app/cypress.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "baseUrl": "http://localhost:5050", - "component": { - "componentFolder": "src", - "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" - } -} diff --git a/examples/vue-app/cypress/fixtures/example.json b/examples/vue-app/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378..0000000000 --- a/examples/vue-app/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/examples/vue-app/cypress/integration/example.spec.ts b/examples/vue-app/cypress/integration/example.spec.ts deleted file mode 100644 index 7a8c909fd8..0000000000 --- a/examples/vue-app/cypress/integration/example.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -// https://docs.cypress.io/api/introduction/api.html - -describe('My First Test', () => { - it('visits the app root url', () => { - cy.visit('/') - cy.contains('h1', 'You did it!') - }) -}) diff --git a/examples/vue-app/cypress/plugins/index.ts b/examples/vue-app/cypress/plugins/index.ts deleted file mode 100644 index 71dd1ac00b..0000000000 --- a/examples/vue-app/cypress/plugins/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-env node */ -// *********************************************************** -// This example plugins/index.ts can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -import { startDevServer } from '@cypress/vite-dev-server' - -export default ((on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config - on('dev-server:start', (options) => { - return startDevServer({ options }) - }) - return config -}) as Cypress.PluginConfig diff --git a/examples/vue-app/cypress/plugins/tsconfig.json b/examples/vue-app/cypress/plugins/tsconfig.json deleted file mode 100644 index b5aedd5332..0000000000 --- a/examples/vue-app/cypress/plugins/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.node.json", - "include": ["./**/*"], - "compilerOptions": { - "module": "CommonJS", - "preserveValueImports": false, - "types": ["node", "cypress/types/cypress"] - } -} diff --git a/examples/vue-app/cypress/support/commands.ts b/examples/vue-app/cypress/support/commands.ts deleted file mode 100644 index 119ab03f7c..0000000000 --- a/examples/vue-app/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/examples/vue-app/cypress/support/index.ts b/examples/vue-app/cypress/support/index.ts deleted file mode 100644 index d68db96df2..0000000000 --- a/examples/vue-app/cypress/support/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/examples/vue-app/cypress/tsconfig.json b/examples/vue-app/cypress/tsconfig.json deleted file mode 100644 index a2dbf9e3f9..0000000000 --- a/examples/vue-app/cypress/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.web.json", - "include": ["./integration/**/*", "./support/**/*"], - "compilerOptions": { - "isolatedModules": false, - "target": "es5", - "lib": ["es5", "dom"], - "types": ["cypress"] - } -} diff --git a/examples/vue-app/env.d.ts b/examples/vue-app/env.d.ts deleted file mode 100644 index 11f02fe2a0..0000000000 --- a/examples/vue-app/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/vue-app/index.html b/examples/vue-app/index.html deleted file mode 100644 index 246e1a2f80..0000000000 --- a/examples/vue-app/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite App - - -
- - - diff --git a/examples/vue-app/package.json b/examples/vue-app/package.json deleted file mode 100644 index 8a3a319599..0000000000 --- a/examples/vue-app/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "private": true, - "name": "vue-app", - "version": "2.1.0-alpha.76", - "license": "Apache-2.0", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview --port 5050", - "test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'", - "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'", - "test:unit": "cypress open-ct", - "test:unit:ci": "cypress run-ct --quiet --reporter spec", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" - }, - "dependencies": { - "@dpc-sdp/ripple-ui-core": "workspace:*", - "@dpc-sdp/stylelint-config-ripple": "workspace:*", - "vue": "^3.4.21", - "vue-router": "^4.1.5" - }, - "devDependencies": { - "@cypress/vite-dev-server": "^5.0.5", - "@cypress/vue": "^5.0.5", - "@rushstack/eslint-patch": "^1.2.0", - "@types/node": "^18.15.10", - "@vitejs/plugin-vue": "5.0.4", - "@vue/eslint-config-prettier": "^9.0.0", - "@vue/eslint-config-typescript": "^11.0.2", - "@vue/tsconfig": "^0.1.3", - "cypress": "catalog:", - "eslint": "^8.36.0", - "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^9.10.0", - "prettier": "^3.3.0", - "typescript": "^5.0.2" - } -} diff --git a/examples/vue-app/public/favicon.ico b/examples/vue-app/public/favicon.ico deleted file mode 100644 index df36fcfb72..0000000000 Binary files a/examples/vue-app/public/favicon.ico and /dev/null differ diff --git a/examples/vue-app/src/App.vue b/examples/vue-app/src/App.vue deleted file mode 100644 index fe1957bdc5..0000000000 --- a/examples/vue-app/src/App.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/examples/vue-app/src/assets/base.css b/examples/vue-app/src/assets/base.css deleted file mode 100644 index 71dc55a3cb..0000000000 --- a/examples/vue-app/src/assets/base.css +++ /dev/null @@ -1,74 +0,0 @@ -/* color palette from */ -:root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; - - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; - - --vt-c-indigo: #2c3e50; - - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); -} - -/* semantic color variables for this project */ -:root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); - - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); - - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); - - --section-gap: 160px; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); - - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); - - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } -} - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - position: relative; - font-weight: normal; -} - -body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: color 0.5s, background-color 0.5s; - line-height: 1.6; - font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/examples/vue-app/src/assets/logo.svg b/examples/vue-app/src/assets/logo.svg deleted file mode 100644 index bc826fed80..0000000000 --- a/examples/vue-app/src/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/vue-app/src/main.ts b/examples/vue-app/src/main.ts deleted file mode 100644 index c8e37b03b9..0000000000 --- a/examples/vue-app/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { createApp } from 'vue' -import App from './App.vue' -import router from './router' - -const app = createApp(App) - -app.use(router) - -app.mount('#app') diff --git a/examples/vue-app/src/router/index.ts b/examples/vue-app/src/router/index.ts deleted file mode 100644 index a49ae507f3..0000000000 --- a/examples/vue-app/src/router/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '../views/HomeView.vue' - -const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: '/', - name: 'home', - component: HomeView - }, - { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') - } - ] -}) - -export default router diff --git a/examples/vue-app/src/views/AboutView.vue b/examples/vue-app/src/views/AboutView.vue deleted file mode 100644 index 4c43b24995..0000000000 --- a/examples/vue-app/src/views/AboutView.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/examples/vue-app/src/views/HomeView.vue b/examples/vue-app/src/views/HomeView.vue deleted file mode 100644 index 13c82711ad..0000000000 --- a/examples/vue-app/src/views/HomeView.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/examples/vue-app/tsconfig.json b/examples/vue-app/tsconfig.json deleted file mode 100644 index d2eb367c4a..0000000000 --- a/examples/vue-app/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.web.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"], - "@dpc-sdp/ripple-core-ui": [ - "./../../packages/ripple-core-ui/dist/rpl-lib-es.js" - ] - } - }, - - "references": [ - { - "path": "./tsconfig.vite-config.json" - } - ] -} diff --git a/examples/vue-app/tsconfig.vite-config.json b/examples/vue-app/tsconfig.vite-config.json deleted file mode 100644 index 93fe5846ea..0000000000 --- a/examples/vue-app/tsconfig.vite-config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.node.json", - "include": ["vite.config.*"], - "compilerOptions": { - "composite": true, - "types": ["node"] - } -} diff --git a/examples/vue-app/vite.config.ts b/examples/vue-app/vite.config.ts deleted file mode 100644 index 28122bf444..0000000000 --- a/examples/vue-app/vite.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import path from 'path' -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue()], - resolve: { - alias: { - '@': path.resolve(__dirname, './src') - } - } -}) diff --git a/examples/webcomponents/CHANGELOG.md b/examples/webcomponents/CHANGELOG.md deleted file mode 100644 index 3d001c1b35..0000000000 --- a/examples/webcomponents/CHANGELOG.md +++ /dev/null @@ -1,415 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.1.0-alpha.76](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.75...v2.1.0-alpha.76) (2023-02-08) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.71](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.70...v2.1.0-alpha.71) (2023-01-31) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.70](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.69...v2.1.0-alpha.70) (2023-01-30) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.69](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.68...v2.1.0-alpha.69) (2023-01-29) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.67](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.66...v2.1.0-alpha.67) (2023-01-27) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.65](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.64...v2.1.0-alpha.65) (2023-01-25) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.64](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.63...v2.1.0-alpha.64) (2023-01-24) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.63](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.62...v2.1.0-alpha.63) (2023-01-24) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.57](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.56...v2.1.0-alpha.57) (2023-01-09) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.56](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.55...v2.1.0-alpha.56) (2023-01-06) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.55](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.54...v2.1.0-alpha.55) (2023-01-04) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.54](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.53...v2.1.0-alpha.54) (2023-01-03) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.53](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.52...v2.1.0-alpha.53) (2022-12-30) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.52](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.51...v2.1.0-alpha.52) (2022-12-22) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.51](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.50...v2.1.0-alpha.51) (2022-12-22) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.50](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.49...v2.1.0-alpha.50) (2022-12-21) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.45](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.44...v2.1.0-alpha.45) (2022-12-19) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.44](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.43...v2.1.0-alpha.44) (2022-12-18) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.43](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.42...v2.1.0-alpha.43) (2022-12-15) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.40](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.39...v2.1.0-alpha.40) (2022-12-15) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.36](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.35...v2.1.0-alpha.36) (2022-12-14) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.35](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.34...v2.1.0-alpha.35) (2022-12-14) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.34](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.33...v2.1.0-alpha.34) (2022-12-13) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.31](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.30...v2.1.0-alpha.31) (2022-12-09) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.30](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.29...v2.1.0-alpha.30) (2022-12-07) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.29](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.28...v2.1.0-alpha.29) (2022-12-07) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.28](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2022-12-07) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.27](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2022-12-06) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.26](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2022-12-06) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.24](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2022-12-02) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.23](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.22...v2.1.0-alpha.23) (2022-12-02) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.20](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2022-11-29) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.19](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.18...v2.1.0-alpha.19) (2022-11-28) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.18](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.17...v2.1.0-alpha.18) (2022-11-28) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.16](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.15...v2.1.0-alpha.16) (2022-11-25) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.15](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.14...v2.1.0-alpha.15) (2022-11-23) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.14](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.13...v2.1.0-alpha.14) (2022-11-21) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.13](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.12...v2.1.0-alpha.13) (2022-11-21) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.12](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.11...v2.1.0-alpha.12) (2022-11-18) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.11](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.10...v2.1.0-alpha.11) (2022-11-16) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.10](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2022-11-16) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.9](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2022-11-14) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.8](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2022-11-09) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.6](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2022-11-09) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.5](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2022-11-09) - -**Note:** Version bump only for package webcomponents - - - - - -# [2.1.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2022-11-08) - -**Note:** Version bump only for package webcomponents - - - - - -# 2.1.0-alpha.0 (2022-11-08) - - -### Bug Fixes - -* **@dpc-sdp/ripple-ui-core:** fix webcomponents style import ([362881b](https://github.com/dpc-sdp/ripple-framework/commit/362881b4533202a7e7babeb7fc25768032cfa530)) - - - - - -## [2.0.1-alpha.4](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.3...v2.0.1-alpha.4) (2022-11-06) - -**Note:** Version bump only for package webcomponents - -## [2.0.1-alpha.3](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.2...v2.0.1-alpha.3) (2022-11-04) - -**Note:** Version bump only for package webcomponents - -## [2.0.1-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.1-alpha.1...v2.0.1-alpha.2) (2022-11-04) - -**Note:** Version bump only for package webcomponents - -## 2.0.1-alpha.0 (2022-11-04) - -### Bug Fixes - -- **@dpc-sdp/ripple-ui-core:** fix webcomponents style import ([362881b](https://github.com/dpc-sdp/ripple-framework/commit/362881b4533202a7e7babeb7fc25768032cfa530)) - -# [2.0.0-alpha.2](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2022-11-04) - -**Note:** Version bump only for package webcomponents - -# [2.0.0-alpha.1](https://github.com/dpc-sdp/ripple-framework/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2022-11-04) - -**Note:** Version bump only for package webcomponents - -# 2.0.0-alpha.0 (2022-11-04) - -### Bug Fixes - -- **@dpc-sdp/ripple-ui-core:** fix webcomponents style import ([362881b](https://github.com/dpc-sdp/ripple-framework/commit/362881b4533202a7e7babeb7fc25768032cfa530)) diff --git a/examples/webcomponents/favicon.svg b/examples/webcomponents/favicon.svg deleted file mode 100644 index de4aeddc12..0000000000 --- a/examples/webcomponents/favicon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/examples/webcomponents/index.html b/examples/webcomponents/index.html deleted file mode 100644 index 5c7e60326f..0000000000 --- a/examples/webcomponents/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Vite App - - -
- -
-

Web components test page

-

- A short paragraph with a - text link in - the middle. -

- Test button -
- - diff --git a/examples/webcomponents/main.js b/examples/webcomponents/main.js deleted file mode 100644 index b3d2a6ad19..0000000000 --- a/examples/webcomponents/main.js +++ /dev/null @@ -1,6 +0,0 @@ -import { registerRplWebComponents } from '@dpc-sdp/ripple-ui-core/webcomponents' -import '@dpc-sdp/ripple-ui-core/style' -import '@dpc-sdp/ripple-ui-core/style/components' - -// Loads all ripple components -registerRplWebComponents() diff --git a/examples/webcomponents/package.json b/examples/webcomponents/package.json deleted file mode 100644 index 9dc6e8a3d1..0000000000 --- a/examples/webcomponents/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "webcomponents", - "private": true, - "license": "Apache-2.0", - "version": "2.1.0-alpha.76", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "@dpc-sdp/ripple-ui-core": "workspace:*" - } -} diff --git a/examples/webcomponents/public/assets/fonts/VIC-Bold.woff2 b/examples/webcomponents/public/assets/fonts/VIC-Bold.woff2 deleted file mode 100755 index 14b4a0c465..0000000000 Binary files a/examples/webcomponents/public/assets/fonts/VIC-Bold.woff2 and /dev/null differ diff --git a/examples/webcomponents/public/assets/fonts/VIC-Regular.woff2 b/examples/webcomponents/public/assets/fonts/VIC-Regular.woff2 deleted file mode 100755 index 0eb89f6a4a..0000000000 Binary files a/examples/webcomponents/public/assets/fonts/VIC-Regular.woff2 and /dev/null differ diff --git a/package.json b/package.json index beff33f282..009b3e2cff 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,11 @@ "repository": "https://github.com/dpc-sdp/ripple-framework", "scripts": { "example": "wrap () { pnpm -F example-\"$*\" dev | cat; }; wrap", - "storybook": "pnpm -F ripple-storybook start", "dev": "pnpm -F nuxt-app dev:mock", "clean": "git clean -dfx && git reset --hard && pnpm", - "build": "pnpm -F !docs -F !ripple-storybook -F !nuxt-app -F !vue-app -F !webcomponents build", - "build:ripple": "pnpm -F \"@dpc-sdp/ripple-ui-*\" -F \"@dpc-sdp/ripple-tide-api\" build", + "build": "pnpm -F !nuxt-app build", + "build:ripple": "pnpm -F \"@dpc-sdp/ripple-tide-api\" build", "build:examples": "pnpm -F \"./examples/**\" build", - "build:docs": "pnpm -F docs build", - "build:storybook": "pnpm -F ripple-storybook static:build", "postinstall": "husky install && pnpm build", "preinstall": "npx only-allow pnpm", "release:prepare": "pnpm release:version && pnpm release:changelog", @@ -23,24 +20,14 @@ "release:publish-alpha": "lerna publish --canary minor --preid alpha --dist-tag alpha --force-publish", "release:publish-next": "lerna publish --canary --preid next.$(git rev-parse --short HEAD) --dist-tag next --force-publish", "release:publish": "lerna publish from-package", - "lint": "eslint . --ext .ts,.vue && stylelint 'packages/ripple-ui-core/**/*.css'", + "lint": "eslint . --ext .ts,.vue", "test:unit": "vitest run", "test:unit-watch": "vitest watch", - "test:components-core": "pnpm -F @dpc-sdp/ripple-ui-core test:components", - "test:components-forms": "pnpm -F @dpc-sdp/ripple-ui-forms test:components", - "test:storybook": "pnpm -F ripple-storybook test", - "test:storybook-ci": "pnpm -F ripple-storybook test:ci", "test:nuxt-app": "pnpm -F nuxt-app test:integration", "ci:nuxt-app": "pnpm -F nuxt-app test:ci", "start:nuxt": "pnpm -F nuxt-app start", - "start:vue": "pnpm -F vue-app start", - "start:wc": "pnpm -F webcomponents start", "dev:nuxt": "pnpm -F nuxt-app dev", - "dev:vue": "pnpm -F vue-app dev", - "dev:wc": "pnpm -F webcomponents dev", - "dev:docs": "pnpm -F docs dev", "cypress": "cypress open --global", - "chromatic": "npx chromatic --storybook-build-dir ./packages/ripple-storybook/storybook-static --storybook-base-dir ./packages/ripple-ui-core --storybook-config-dir ./packages/ripple-ui-core", "generate:component": "nuxt-ripple add component ./packages/ripple-ui-core/src/components" }, "devDependencies": { @@ -52,10 +39,11 @@ "@commitlint/cli": "^17.4.4", "@commitlint/config-conventional": "^17.4.4", "@cypress/vite-dev-server": "^5.0.5", - "@dpc-sdp/eslint-config-ripple": "workspace:*", - "@dpc-sdp/ripple-ui-core": "workspace:*", - "@dpc-sdp/ripple-ui-forms": "workspace:*", - "@dpc-sdp/stylelint-config-ripple": "workspace:*", + "@dpc-sdp/eslint-config-ripple": "catalog:", + "@dpc-sdp/ripple-ui-core": "catalog:", + "@dpc-sdp/ripple-ui-forms": "catalog:", + "@dpc-sdp/ripple-ui-maps": "catalog:", + "@dpc-sdp/stylelint-config-ripple": "catalog:", "@lerna-lite/cli": "^4.1.1", "@lerna-lite/publish": "^4.1.1", "@lerna-lite/version": "^4.1.1", @@ -108,7 +96,6 @@ "@nuxtjs/mdc@<=0.13.2": ">=0.13.3" }, "patchedDependencies": { - "@vitejs/plugin-vue@5.0.4": "patches/@vitejs__plugin-vue@5.0.4.patch", "parse5@7.1.2": "patches/parse5@7.1.2.patch", "parse5-htmlparser2-tree-adapter@7.0.0": "patches/parse5-htmlparser2-tree-adapter@7.0.0.patch", "parse5-parser-stream@7.1.2": "patches/parse5-parser-stream@7.1.2.patch" diff --git a/packages/eslint-config-ripple/CHANGELOG.md b/packages/eslint-config-ripple/CHANGELOG.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/eslint-config-ripple/LICENSE b/packages/eslint-config-ripple/LICENSE deleted file mode 100644 index 6b97259524..0000000000 --- a/packages/eslint-config-ripple/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2018 Software Freedom Conservancy (SFC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/packages/eslint-config-ripple/README.md b/packages/eslint-config-ripple/README.md deleted file mode 100644 index 3213bbdd7f..0000000000 --- a/packages/eslint-config-ripple/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# eslint-config-ripple - -Customised eslint rules for use with Ripple. diff --git a/packages/eslint-config-ripple/index.js b/packages/eslint-config-ripple/index.js deleted file mode 100644 index d7b421cdb0..0000000000 --- a/packages/eslint-config-ripple/index.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - parser: 'vue-eslint-parser', - env: { - browser: true, - node: true, - 'vue/setup-compiler-macros': true - }, - extends: ['@nuxt/eslint-config'], - overrides: [ - { - files: ['*.{vue,ts,js}'], - rules: { - // Override/add rules settings here - 'no-prototype-builtins': 'off', - 'vue/attribute-hyphenation': 'off', - 'vue/first-attribute-linebreak': 'off', - 'vue/max-attributes-per-line': 'off', - 'vue/multi-word-component-names': 'off', - 'vue/no-v-html': 'off', - 'vue/v-on-event-hyphenation': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-explicit-any': 'off', // allow explicit any types for now - '@typescript-eslint/no-unused-vars': [ - 'warn', - { - varsIgnorePattern: 'props' - } - ], - - // Compatibility rules - remove when CI passes - 'no-extra-semi': 'off', - 'prefer-const': 'off', - 'vue/html-closing-bracket-newline': 'off', - 'vue/html-indent': 'off', - 'vue/html-self-closing': 'off', - 'vue/multiline-html-element-content-newline': 'off', - 'vue/singleline-html-element-content-newline': 'off' - } - } - ] -} diff --git a/packages/eslint-config-ripple/package.json b/packages/eslint-config-ripple/package.json deleted file mode 100644 index 1b49801fea..0000000000 --- a/packages/eslint-config-ripple/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@dpc-sdp/eslint-config-ripple", - "description": "ESLint config for Ripple projects", - "version": "2.47.0", - "license": "Apache-2.0", - "repository": "https://github.com/dpc-sdp/ripple-framework", - "main": "index.js", - "exports": { - ".": "./index.js" - }, - "files": [ - "index.js" - ], - "dependencies": { - "@nuxt/eslint-config": "0.1.1", - "@typescript-eslint/eslint-plugin": "^6.2.0", - "@typescript-eslint/parser": "^6.2.0", - "vue-eslint-parser": "^9.3.1" - }, - "devDependencies": { - "eslint": "^8.45.0", - "eslint-junit": "^1.0.1" - }, - "peerDependencies": { - "eslint": "^8.45.0" - } -} diff --git a/packages/nuxt-ripple-analytics/package.json b/packages/nuxt-ripple-analytics/package.json index d434e4b5ca..47c7cae2a7 100644 --- a/packages/nuxt-ripple-analytics/package.json +++ b/packages/nuxt-ripple-analytics/package.json @@ -10,7 +10,7 @@ "./events": "./lib/index.ts" }, "dependencies": { - "@dpc-sdp/ripple-ui-core": "workspace:*", + "@dpc-sdp/ripple-ui-core": "catalog:", "@gtm-support/core": "^2.0.0", "@newrelic/browser-agent": "^1.273.0" }, @@ -25,8 +25,7 @@ "@dpc-sdp/ripple-tide-publication": "workspace:*", "@dpc-sdp/ripple-tide-search": "workspace:*", "@dpc-sdp/ripple-tide-topic": "workspace:*", - "@dpc-sdp/ripple-ui-core": "workspace:*", - "@dpc-sdp/ripple-ui-forms": "workspace:*", + "@dpc-sdp/ripple-ui-forms": "catalog:", "@nuxt/eslint-config": "^0.1.1" } } diff --git a/packages/nuxt-ripple-preview/package.json b/packages/nuxt-ripple-preview/package.json index 39f31ff6b5..cb441779ef 100644 --- a/packages/nuxt-ripple-preview/package.json +++ b/packages/nuxt-ripple-preview/package.json @@ -13,7 +13,7 @@ "dependencies": { "@dpc-sdp/nuxt-ripple": "workspace:*", "@dpc-sdp/ripple-tide-api": "workspace:*", - "@dpc-sdp/ripple-ui-core": "workspace:*", + "@dpc-sdp/ripple-ui-core": "catalog:", "client-oauth2": "^4.3.3", "cookie-signature": "^1.2.1", "nanoid": "^5.1.5" diff --git a/packages/nuxt-ripple/package.json b/packages/nuxt-ripple/package.json index 760479dd86..c7214b3a3f 100644 --- a/packages/nuxt-ripple/package.json +++ b/packages/nuxt-ripple/package.json @@ -14,8 +14,8 @@ }, "dependencies": { "@dpc-sdp/ripple-tide-api": "workspace:*", - "@dpc-sdp/ripple-ui-core": "workspace:*", - "@dpc-sdp/ripple-ui-forms": "workspace:*", + "@dpc-sdp/ripple-ui-core": "catalog:", + "@dpc-sdp/ripple-ui-forms": "catalog:", "@nuxt/image": "^1.9.0", "@nuxtjs/robots": "^3.0.0", "@vueuse/core": "catalog:", diff --git a/packages/ripple-storybook/.storybook/main.ts b/packages/ripple-storybook/.storybook/main.ts deleted file mode 100644 index 87e4c855cc..0000000000 --- a/packages/ripple-storybook/.storybook/main.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { StorybookConfig } from '@storybook/vue3-vite' -import svgLoader from 'vite-svg-loader' -import viteYamlLoader from '@modyfi/vite-plugin-yaml' -import nodeResolve from '@rollup/plugin-node-resolve' -import path from 'path' - -const vitePlugins = [ - viteYamlLoader(), - nodeResolve(), - svgLoader({ - defaultImport: 'raw', - svgoConfig: { - multipass: true, - plugins: [ - { - name: 'preset-default', - params: { - overrides: {} - } - }, - { - name: 'removeAttrs', - params: { - attrs: '(fill|stroke)' - } - }, - { - name: 'removeAttributesBySelector', - params: { - selector: '[style*=fill:#]', - attributes: 'style' - } - } - ] - } - }) -] - -const config: StorybookConfig = { - stories: ['./../../ripple-ui*/!(node_modules)/**/*.stories.@(js|jsx|ts|tsx)'], - addons: ['@storybook/addon-a11y', '@storybook/addon-vitest'], - framework: { - name: '@storybook/vue3-vite', - options: {} - }, - staticDirs: ['./public'], - previewHead: (head) => ` - ${head} - - `, - async viteFinal(config) { - if (process.env.STATIC_BASE_PATH) { - config.base = process.env.STATIC_BASE_PATH - } - - // customize the Vite config here - if (config.plugins) { - config.plugins.push(...vitePlugins) - } - - if (config.resolve) { - config.resolve.alias = { - ...config.resolve.alias, - '~/storybook': path.resolve(__dirname, './') - } - } - - return config - } -} -export default config diff --git a/packages/ripple-storybook/.storybook/manager-head.html b/packages/ripple-storybook/.storybook/manager-head.html deleted file mode 100644 index 2ae04b3798..0000000000 --- a/packages/ripple-storybook/.storybook/manager-head.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/ripple-storybook/.storybook/preview.ts b/packages/ripple-storybook/.storybook/preview.ts deleted file mode 100644 index 8d2a2a090f..0000000000 --- a/packages/ripple-storybook/.storybook/preview.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { setup, type Preview } from '@storybook/vue3' -// @ts-ignore-next-line: Missing declaration -import { registerRplFormPlugin } from '@dpc-sdp/ripple-ui-forms' -import registerRplMapsPlugin from '@dpc-sdp/ripple-ui-maps/plugin' -// Note: rebuild ripple-ui-core after generating sprite to update in storybook -// @ts-ignore-next-line: Vue SFC -import { - RplIconSprite, - RplLink, - RplImg, - RplIcon, - RplButton, - RplContent, - RplTextLink -} from '@dpc-sdp/ripple-ui-core/vue' -import '@dpc-sdp/ripple-ui-core/style' -import themes from './themes.js' -import withBackground from './utils/withBackground' -import { withSource } from './utils/withSource' -// Storybook specific CSS -import './storybook.css' -import withTheme from './utils/withTheme' -import withEventBus from './utils/withEventBus' - -setup((app) => { - // Ripple vue plugins - registerRplFormPlugin(app) - registerRplMapsPlugin(app, {}) - - app.component('RplLink', RplLink) - app.component('RplImg', RplImg) - // Add global components needed for forms - app.component('RplIcon', RplIcon) - app.component('RplButton', RplButton) - app.component('RplContent', RplContent) - app.component('RplTextLink', RplTextLink) -}) - -const preview: Preview = { - parameters: { - actions: { argTypesRegex: '^on[A-Z].*' }, - a11y: { - test: 'error', - options: { - runOnly: { - type: 'tag', - values: ['wcag2a', 'wcag2aa'] - } - } - }, - options: { - storySort: { - order: ['Introduction', 'Base Styles', 'Core', '*', 'WIP'] - } - }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/ - } - }, - backgrounds: { - disable: true - }, - designTokensCss: { - label: 'Themes', - persistData: true, - themes - } - }, - decorators: [ - (story) => ({ - components: { story, RplIconSprite }, - template: '
' - }), - withBackground, - withTheme, - withSource, - withEventBus - ], - globalTypes: { - theme: { - name: 'Theme', - description: 'Ripple theme', - defaultValue: 'default', - toolbar: { - icon: 'paintbrush', - title: 'Theme', - items: Object.entries(themes).map(([themeId, config]) => { - return { - value: themeId, - title: config.label - } - }), - dynamicTitle: true - } - }, - buttonTheme: { - name: 'Button theme', - description: 'Turn on/off neutral themed buttons across all components', - defaultValue: 'default', - toolbar: { - icon: 'button', - title: 'Button theme', - items: [ - { title: 'Default buttons', value: 'default' }, - { title: 'Neutral buttons', value: 'neutral' } - ], - dynamicTitle: true - } - } - } -} - -export default preview diff --git a/packages/ripple-storybook/.storybook/public/android-chrome-192x192.png b/packages/ripple-storybook/.storybook/public/android-chrome-192x192.png deleted file mode 100644 index ede6ee7769..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/android-chrome-192x192.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/android-chrome-512x512.png b/packages/ripple-storybook/.storybook/public/android-chrome-512x512.png deleted file mode 100644 index 7bbac009d5..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/android-chrome-512x512.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/apple-touch-icon.png b/packages/ripple-storybook/.storybook/public/apple-touch-icon.png deleted file mode 100644 index 28bcde2d37..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/apple-touch-icon.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff b/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff deleted file mode 100755 index 9584c05000..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff2 b/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff2 deleted file mode 100755 index 14b4a0c465..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Bold.woff2 and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff b/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff deleted file mode 100755 index c2667ea852..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff2 b/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff2 deleted file mode 100755 index 0eb89f6a4a..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-Regular.woff2 and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-RegularItalic.woff2 b/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-RegularItalic.woff2 deleted file mode 100755 index ffe4c42d6d..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/assets/fonts/VIC-RegularItalic.woff2 and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/favicon-16x16.png b/packages/ripple-storybook/.storybook/public/favicon-16x16.png deleted file mode 100644 index 5c024b9fcf..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/favicon-16x16.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/favicon-32x32.png b/packages/ripple-storybook/.storybook/public/favicon-32x32.png deleted file mode 100644 index 53b566a32d..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/favicon-32x32.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/favicon.ico b/packages/ripple-storybook/.storybook/public/favicon.ico deleted file mode 100644 index 58c6722971..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/favicon.ico and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/hero-corner-bottom.png b/packages/ripple-storybook/.storybook/public/img/hero-corner-bottom.png deleted file mode 100644 index 2d45213589..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/hero-corner-bottom.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/hero-corner-top.png b/packages/ripple-storybook/.storybook/public/img/hero-corner-top.png deleted file mode 100644 index 138e10d1fc..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/hero-corner-top.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/image-dark.jpg b/packages/ripple-storybook/.storybook/public/img/image-dark.jpg deleted file mode 100644 index b97c616eaf..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/image-dark.jpg and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/image-landscape-l.jpg b/packages/ripple-storybook/.storybook/public/img/image-landscape-l.jpg deleted file mode 100644 index 338887eac2..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/image-landscape-l.jpg and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/image-landscape-m.jpg b/packages/ripple-storybook/.storybook/public/img/image-landscape-m.jpg deleted file mode 100644 index 782ec84dfa..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/image-landscape-m.jpg and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/image-landscape-s.jpg b/packages/ripple-storybook/.storybook/public/img/image-landscape-s.jpg deleted file mode 100644 index 0333fd01dd..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/image-landscape-s.jpg and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/image-light.jpg b/packages/ripple-storybook/.storybook/public/img/image-light.jpg deleted file mode 100644 index 5802a9fa91..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/image-light.jpg and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary-print.svg b/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary-print.svg deleted file mode 100755 index 98f9da65c3..0000000000 --- a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary-print.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary.svg b/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary.svg deleted file mode 100755 index 4ae04bbe33..0000000000 --- a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-primary.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary-print.svg b/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary-print.svg deleted file mode 100644 index a7437531fa..0000000000 --- a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary-print.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary.svg b/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary.svg deleted file mode 100644 index d14245d039..0000000000 --- a/packages/ripple-storybook/.storybook/public/img/primary-nav-logo-secondary.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/ripple-storybook/.storybook/public/img/ripple-logo.png b/packages/ripple-storybook/.storybook/public/img/ripple-logo.png deleted file mode 100644 index a0e1772579..0000000000 Binary files a/packages/ripple-storybook/.storybook/public/img/ripple-logo.png and /dev/null differ diff --git a/packages/ripple-storybook/.storybook/public/img/ripple-logo.svg b/packages/ripple-storybook/.storybook/public/img/ripple-logo.svg deleted file mode 100644 index 277aaa7d79..0000000000 --- a/packages/ripple-storybook/.storybook/public/img/ripple-logo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/packages/ripple-storybook/.storybook/public/js/iframeResizer.js b/packages/ripple-storybook/.storybook/public/js/iframeResizer.js deleted file mode 100644 index 77ef21fc18..0000000000 --- a/packages/ripple-storybook/.storybook/public/js/iframeResizer.js +++ /dev/null @@ -1,33 +0,0 @@ -;(function () { - if (typeof window === 'undefined') return - - const searchParams = new URLSearchParams(window.location.search) - - function updateParentHeight() { - const height = document.body.scrollHeight - const isModal = - document.body.classList.contains('rpl-modal-open') || - document.body.classList.contains('rpl-u-viewport-locked') - - if (isModal) return - - window.parent.postMessage( - JSON.stringify({ - id: searchParams.get('id'), - uid: Number(searchParams.get('uid')), - iframeSize: height - }), - '*' - ) - } - - function trackDocumentUpdates() { - const resizeObserver = new ResizeObserver(updateParentHeight) - - resizeObserver.observe(document.body) - } - - window.addEventListener('load', trackDocumentUpdates, { - once: true - }) -})() diff --git a/packages/ripple-storybook/.storybook/public/site.webmanifest b/packages/ripple-storybook/.storybook/public/site.webmanifest deleted file mode 100644 index 45dc8a2065..0000000000 --- a/packages/ripple-storybook/.storybook/public/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/packages/ripple-storybook/.storybook/storybook.css b/packages/ripple-storybook/.storybook/storybook.css deleted file mode 100644 index b1fb3612d1..0000000000 --- a/packages/ripple-storybook/.storybook/storybook.css +++ /dev/null @@ -1,149 +0,0 @@ -@import '@dpc-sdp/ripple-ui-core/style/breakpoints'; - -body { - background: var(--storybook-bg-color, transparent); -} - -#rpl-icon-sprite { - display: none; -} - -.sb-main-padded { - padding: var(--rpl-sp-5) !important; -} - -.rpl-storybook__page { - max-width: 1120px; -} - -.rpl-storybook__page-content { - max-width: var(--rpl-content-max-width); -} - -.rpl-storybook__icon-list { - display: flex; - flex-wrap: wrap; - list-style: none; -} - -.rpl-storybook__icon-item { - display: flex; - flex-wrap: wrap; - flex-direction: column; - justify-content: center; - box-sizing: border-box; - text-align: center; - border: 1px solid #e8ebee; - border-radius: 4px; - padding: 0.5rem; - width: calc(12.5% - 1rem - 2px); - margin: 0.5rem; - margin-top: 0; -} - -.rpl-storybook-form-values { - font-size: 16px; - background: #eee; - padding: 30px; -} - -.sb-flex-container .innerZoomElementWrapper { - display: flex; -} - -.sb-container { - font-size: 1.6rem; -} - -.sb-demo-container { - padding: 2rem; -} - -.sb-demo-container--dark { - background: var(--rpl-clr-primary-alt); - color: var(--rpl-clr-type-light); - - .sb-demo-input { - border-color: var(--rpl-clr-type-primary-contrast); - - &, - &::placeholder { - color: var(--rpl-clr-light); - } - } - - a, - a:visited { - color: var(--rpl-clr-light); - } -} - -.sb-demo-input { - border: var(--rpl-border-1) solid var(--rpl-clr-dark); - background: transparent; - padding: 1rem; - font-size: var(--rpl-type-size-2); -} - -.sb-demo-input--rounded { - border-radius: 20px; -} - -.rpl-storybook__grid { - position: relative; - - /* https://css-tricks.com/building-css-grid-overlay/ */ - --offset: 0; - --max_width: 10000000px; - --columns: 12; - --gutter: var(--rpl-sp-4); - --color: hsla(204, 80%, 72%, 0.1); - --color-text: hsla(204, 80%, 72%, 1); - --repeating-width: calc(100% / var(--columns)); - --column-width: calc((100% / var(--columns)) - var(--gutter)); - --background-width: calc(100% + var(--gutter)); - --background-columns: repeating-linear-gradient( - to right, - var(--color), - var(--color) var(--column-width), - transparent var(--column-width), - transparent var(--repeating-width) - ); - - @media (--rpl-bp-m) { - --gutter: var(--rpl-sp-6); - } - - @media (--rpl-bp-xl) { - --gutter: var(--rpl-sp-7); - } - - &::before { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - margin-right: auto; - margin-left: auto; - width: calc(100% - (2 * var(--offset))); - max-width: var(--max_width); - content: ''; - background-image: var(--background-columns); - background-size: var(--background-width) 100%; - background-position: 0; - z-index: 1000; - pointer-events: none; - } -} - -/* - Add a background colour to the rpl-grid cells so that they are visible while - viewing in storybook. -*/ -.rpl-storybook__grid .rpl-grid div { - background-color: rgba(0, 0, 0, 0.1); - text-align: center; - padding: 20px 0; - font-size: 1.6rem; -} diff --git a/packages/ripple-storybook/.storybook/themes.js b/packages/ripple-storybook/.storybook/themes.js deleted file mode 100644 index e6e8a3aaa0..0000000000 --- a/packages/ripple-storybook/.storybook/themes.js +++ /dev/null @@ -1,86 +0,0 @@ -const themes = { - default: { - label: 'vic.gov.au', - tokens: {} - }, - docsTheme1: { - label: 'Docs Theme 1 (Fruit salad)', - tokens: { - 'rpl-clr-primary': '#fdda24', - 'rpl-clr-primary-alt': '#fef0a7', - 'rpl-clr-primary-alpha': 'rgb(253 218 36 / .5)', - 'rpl-clr-accent': '#ef4a81', - 'rpl-clr-accent-alt': '#fdedf2', - 'rpl-clr-link': '#be3c67', - 'rpl-clr-link-alpha': 'rgb(253 218 36 / .2)', - 'rpl-clr-focus': '#1c3bdd', - 'rpl-clr-type-focus-contrast': 'var(--rpl-clr-light)', - 'rpl-clr-gradient-vertical': - 'linear-gradient(180deg, #EF4A81 0%, #F592B3 40%, #FEE97C 65%, #FDDA24 80%)', - 'rpl-clr-gradient-horizontal': - 'linear-gradient(90deg, #EF4A81 0%, #F592B3 40%, #FEE97C 65%, #FDDA24 80%)', - 'rpl-clr-type-primary-contrast': 'var(--rpl-clr-dark)', - 'rpl-clr-type-primary-contrast-alpha': 'rgb(26 26 26 / 0.75)', - 'rpl-clr-type-accent-contrast': 'var(--rpl-clr-dark)', - 'rpl-clr-type-primary-accessible': 'var(--rpl-clr-type-default)', - 'rpl-clr-type-primary-alt-accessible': 'var(--rpl-clr-type-default)', - 'rpl-clr-footer-alt': 'var(--rpl-clr-primary)', - 'rpl-clr-footer': 'var(--rpl-clr-primary-alt)', - 'rpl-clr-type-footer-accessible': - 'var(--rpl-clr-type-primary-alt-accessible)', - 'rpl-clr-type-footer-contrast': 'var(--rpl-clr-type-primary-contrast)' - } - }, - docsTheme2: { - label: 'Docs Theme 2 (Turtles)', - tokens: { - 'rpl-clr-primary': '#6B19A3', - 'rpl-clr-primary-alt': '#3F006B', - 'rpl-clr-primary-alpha': 'rgba(107 25 163 / 0.5)', - 'rpl-clr-type-primary-accessible': 'var(--rpl-clr-primary)', - 'rpl-clr-type-primary-alt-accessible': 'var(--rpl-clr-primary-alt)', - 'rpl-clr-accent': '#6DDD97', - 'rpl-clr-accent-alt': '#EAFAF0', - 'rpl-clr-link': '#6B19A3', - 'rpl-clr-link-alpha': 'rgba(107 25 163 / 0.2)', - 'rpl-clr-focus': '#9DEF65', - 'rpl-clr-gradient-horizontal': - 'linear-gradient(90deg, #382484 0%, #5A0099 20%, #7623B0 35%, #2E7478 50%, #2FA26F 70%, #2FCE6A 80%)', - 'rpl-clr-gradient-vertical': - 'linear-gradient(180deg, #382484 0%, #5A0099 20%, #7623B0 35%, #2E7478 50%, #2FA26F 70%, #2FCE6A 80%)', - 'rpl-clr-footer-alt': '#6B19A3', - 'rpl-clr-footer': '#3F006B', - 'rpl-clr-type-accent-contrast': 'var(--rpl-clr-dark)' - } - }, - docsTheme3: { - label: 'Docs Theme 3 (Batman)', - tokens: { - 'rpl-clr-primary': '#72A69B', - 'rpl-clr-primary-alt': '#98C2C6', - 'rpl-clr-primary-alpha': 'rgba(114 166 155 / 0.5)', - 'rpl-clr-accent': '#C03F3A', - 'rpl-clr-accent-alt': '#F9ECEB', - 'rpl-clr-link': '#723036', - 'rpl-clr-link-alpha': 'rgba(114 166 155 / 0.2)', - 'rpl-clr-focus': '#8D5964', - 'rpl-clr-type-focus-contrast': 'var(--rpl-clr-light)', - 'rpl-clr-gradient-vertical': - 'linear-gradient(180deg, #723036 6.73%, #C03F3A 20.79%, #E8AC82 35.89%, #98C2C6 59.33%, #72A69B 74.96%)', - 'rpl-clr-gradient-horizontal': - 'linear-gradient(90deg, #723036 6.73%, #C03F3A 20.79%, #E8AC82 35.89%, #98C2C6 59.33%, #72A69B 74.96%)', - 'rpl-clr-type-primary-contrast': 'var(--rpl-clr-dark)', - 'rpl-clr-type-primary-contrast-alpha': 'rgb(26 26 26 / 0.75)', - 'rpl-clr-type-accent-contrast': 'var(--rpl-clr-dark)', - 'rpl-clr-type-primary-accessible': 'var(--rpl-clr-type-default)', - 'rpl-clr-type-primary-alt-accessible': 'var(--rpl-clr-type-default)', - 'rpl-clr-footer-alt': '#E8AC82', - 'rpl-clr-footer': '#D77A56', - 'rpl-clr-type-footer-accessible': - 'var(--rpl-clr-type-primary-alt-accessible)', - 'rpl-clr-type-footer-contrast': 'var(--rpl-clr-type-primary-contrast)' - } - } -} - -export default themes diff --git a/packages/ripple-storybook/.storybook/utils/svgPlaceholder.js b/packages/ripple-storybook/.storybook/utils/svgPlaceholder.js deleted file mode 100644 index 6a7fef7ec8..0000000000 --- a/packages/ripple-storybook/.storybook/utils/svgPlaceholder.js +++ /dev/null @@ -1,25 +0,0 @@ -// Placeholder image -const svgPlaceholder = (data) => { - const svg = ` - - - - - - - ${data.width} x ${data.height} - - - ` - - return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}` -} - -export default svgPlaceholder diff --git a/packages/ripple-storybook/.storybook/utils/withBackground.js b/packages/ripple-storybook/.storybook/utils/withBackground.js deleted file mode 100644 index 15855b2bed..0000000000 --- a/packages/ripple-storybook/.storybook/utils/withBackground.js +++ /dev/null @@ -1,21 +0,0 @@ -const backgrounds = { - light: 'white', - gray: 'var(--rpl-clr-neutral-100)', - reverse: 'var(--rpl-clr-primary-alt)' -} - -// Custom background decorator to replace storybook's background plugin, as -// the default one was messing up the axe test. -const withBackground = (story, {parameters}) => { - document.documentElement.style.setProperty( - '--storybook-bg-color', - backgrounds[parameters.background] || backgrounds.light - ); - - return { - components: { story }, - template: '' - } -} - -export default withBackground diff --git a/packages/ripple-storybook/.storybook/utils/withEventBus.js b/packages/ripple-storybook/.storybook/utils/withEventBus.js deleted file mode 100644 index 9903b8ec46..0000000000 --- a/packages/ripple-storybook/.storybook/utils/withEventBus.js +++ /dev/null @@ -1,14 +0,0 @@ -import { provide } from 'vue' -import { rplEventBus } from '@dpc-sdp/ripple-ui-core' - -export default function withEventBus(story, context) { - return { - components: { story }, - setup() { - provide('$rplEvent', rplEventBus) - }, - template: '' - } -} - -export { rplEventBus } diff --git a/packages/ripple-storybook/.storybook/utils/withSource.js b/packages/ripple-storybook/.storybook/utils/withSource.js deleted file mode 100644 index 1dc2884612..0000000000 --- a/packages/ripple-storybook/.storybook/utils/withSource.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Adds proper support for Vue 3 code snippets in Storybook 9. - */ - -import { addons } from 'storybook/preview-api' -import kebabCase from 'lodash.kebabcase' -import { h, onMounted } from 'vue' - -// this value doesn't seem to be exported by addons-docs -export const SNIPPET_RENDERED = `storybook/docs/snippet-rendered` - -const propToSource = (key, val) => { - const type = typeof val - switch (type) { - case 'function': - return val ? key : '' - case 'boolean': - return val ? key : '' - case 'string': - return `${key}="${val}"` - case 'object': - return `${key}="${JSON.stringify(val, null, 4) - .replace(/"(\w+)"\s*:/g, '$1:') - .replaceAll('"', "'")}"` // here - default: - return `:${key}="${val}"` - } -} - -function templateSourceCode( - templateSource, - args, - argTypes, - replacing = 'v-bind="args"' -) { - const componentArgs = {} - for (const [k, t] of Object.entries(argTypes)) { - const val = args[k] - if ( - typeof val !== 'undefined' && - t.table && - t.table.category === 'props' && - val !== t.defaultValue - ) { - componentArgs[k] = val - } - } - - return templateSource.replace( - replacing, - Object.keys(componentArgs) - .map((key) => ' ' + propToSource(kebabCase(key), args[key])) - .join('') - ) -} - -async function getSnippet(prettier, code, prettierHtml) { - let snippet = '' - - try { - snippet = await prettier.format(``, { - parser: 'vue', - plugins: [prettierHtml], - htmlWhitespaceSensitivity: 'ignore' - }) - } catch (e) { - console.warn('Failed to get snippet', e) - } - - return snippet -} - -export const withSource = (storyFn, context) => { - const story = storyFn(context) - - // this returns a new component that computes the source code when mounted - // and emits an event that is handled by addons-docs - return { - components: { - Story: story - }, - - setup() { - onMounted(async () => { - // set overflow hidden when embedding in the docs site, - // this is to avoid the scrollbar jumping in and out as content expands - const searchParams = new URLSearchParams(window.location.search) - if (searchParams.get('rplDocs')) { - document.body.style.overflow = 'hidden' - } - - try { - let code = '' - const originalStory = context.originalStoryFn(context.args, context) - // get the story source - let src = originalStory?.template - - if (context.parameters?.source) { - // optionally render a parameter as is, i.e., HTML prop - code = context.args[context.parameters?.source] - } else if (src) { - // generate the source code based on the current args - code = templateSourceCode(src, context.args, context.argTypes) - } else { - const rawStory = originalStory() - const propsString = Object.entries(rawStory.props || {}) - .map(([key, val]) => propToSource(kebabCase(key), val)) - .join(' ') - - code = `<${rawStory.type.__name}${propsString ? ' ' + propsString : ''} />` - } - - const channel = addons.getChannel() - - const emitFormattedTemplate = async () => { - const prettier = await import('prettier/standalone') - const prettierHtml = await import('prettier/parser-html') - - const snippet = await getSnippet(prettier, code, prettierHtml) - - // We need to add wrapping template tags to render the actual code snippet otherwise - // certain examples will break, however, we don't want to display the template - // tags in the code example, so we manually remove them here. - const snippetWithoutTemplateTags = snippet - .replace(/^