diff --git a/.github/workflows/actions/build/action.yml b/.github/workflows/actions/build/action.yml index 67ceec05f..f0d820b96 100644 --- a/.github/workflows/actions/build/action.yml +++ b/.github/workflows/actions/build/action.yml @@ -37,8 +37,10 @@ runs: uses: actions/cache/restore@v4 id: cache-build with: - path: dist/ key: build-${{ inputs.ref || github.sha }} + path: | + dist + packages/*/dist - name: Install dependencies only if: ${{ steps.cache-build.outputs.cache-hit == 'true' }} @@ -56,8 +58,10 @@ runs: if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} uses: actions/cache/save@v4 with: - path: dist/ key: build-${{ inputs.ref || github.sha }} + path: | + dist + packages/*/dist - name: Restore branch or SHA if: ${{ !cancelled() && inputs.ref }} diff --git a/.github/workflows/actions/diff/action.yml b/.github/workflows/actions/diff/action.yml index 915e23ee0..4685129ac 100644 --- a/.github/workflows/actions/diff/action.yml +++ b/.github/workflows/actions/diff/action.yml @@ -20,10 +20,15 @@ runs: with: ref: ${{ github.event.pull_request.base.sha }} + - name: Copy base build (legacy) into workspace + if: ${{ hashFiles('dist/app') != '' }} + shell: bash + run: mv dist/app packages/nhsuk-frontend-review/dist + - name: Commit base build for comparison shell: bash run: | - git add --force dist/ + git add --force packages/nhsuk-frontend-review/dist git commit --allow-empty -m "Build output for '${{ github.base_ref }}'" --no-verify - name: Install and build head @@ -32,7 +37,7 @@ runs: - name: Commit head build for comparison shell: bash run: | - git add --force dist/ + git add --force packages/nhsuk-frontend-review/dist git commit --allow-empty -m "Build output for '${{ github.head_ref }}'" --no-verify - name: Check for changes @@ -40,6 +45,6 @@ runs: shell: bash run: | set +e - git diff HEAD^ --exit-code --quiet -- 'dist/**/*' + git diff HEAD^ --exit-code --quiet -- 'packages/nhsuk-frontend-review/dist/**/*' [ $? -eq 0 ] && echo "changes=false" >> "${GITHUB_OUTPUT}" exit 0 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 82d79f34e..db7ecb730 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -67,7 +67,7 @@ jobs: - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v3 with: - path: dist/app + path: packages/nhsuk-frontend-review/dist - name: Deploy to GitHub Pages uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 050738b3f..26d0f5cff 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -57,8 +57,10 @@ jobs: - name: Restore build (from cache) uses: actions/cache/restore@v4 with: - path: dist/ key: build-${{ github.sha }} + path: | + dist + packages/*/dist - name: Setup Node uses: actions/setup-node@v4 @@ -77,6 +79,49 @@ jobs: name: Javascript unit tests coverage path: coverage + package: + name: Package ${{ matrix.conditions }} + runs-on: ubuntu-latest + needs: [build] + + strategy: + fail-fast: false + + matrix: + conditions: + - require + - import + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Restore dependencies (from cache) + uses: actions/cache/restore@v4 + with: + key: npm-install-${{ hashFiles('package-lock.json') }} + path: node_modules + + - name: Restore build (from cache) + uses: actions/cache/restore@v4 + with: + path: dist/ + key: build-${{ github.sha }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: Resolve entry path + run: | + node --eval "console.log(require.resolve('nhsuk-frontend'))" --conditions ${{ matrix.conditions }} + node --eval "console.log(require.resolve('nhsuk-frontend/package.json'))" --conditions ${{ matrix.conditions }} + node --eval "console.log(require.resolve('nhsuk-frontend/packages/nhsuk'))" --conditions ${{ matrix.conditions }} + node --eval "console.log(require.resolve('nhsuk-frontend/packages/nhsuk.js'))" --conditions ${{ matrix.conditions }} + node --eval "console.log(require.resolve('nhsuk-frontend/packages/components/button/button'))" --conditions ${{ matrix.conditions }} + node --eval "console.log(require.resolve('nhsuk-frontend/packages/components/button/button.js'))" --conditions ${{ matrix.conditions }} + regression: name: Visual regression tests runs-on: macos-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf751a5c3..3d6fc3601 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,6 +62,6 @@ jobs: asset_content_type: application/zip - name: Publish npm package - run: npm publish + run: npm publish --workspace nhsuk-frontend env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/sass.yml b/.github/workflows/sass.yml index e81e4f1d1..70bf18507 100644 --- a/.github/workflows/sass.yml +++ b/.github/workflows/sass.yml @@ -7,6 +7,14 @@ jobs: name: Dart Sass ${{ matrix.package-version }} runs-on: ubuntu-latest + env: + RULE_1: '@import "nhsuk";' + RULE_2: '@use "nhsuk" as *;' + RULE_3: '@forward "nhsuk";' + RULE_4: '@forward "node_modules/nhsuk-frontend/src/nhsuk";' + RULE_5: '@forward "node_modules/nhsuk-frontend/src/nhsuk/core/all";' + RULE_6: '@forward "pkg:nhsuk-frontend";' + strategy: fail-fast: false @@ -35,20 +43,35 @@ jobs: - name: Install package run: | + npm install --omit=dev npm install -g sass@${{ matrix.package-version }} sass --version - - name: Check compilation + - name: Create test files run: | mkdir -p .tmp - time sass packages/nhsuk.scss > .tmp/check.css + echo '${{ env.RULE_1 }}' > .tmp/input1.scss + echo '${{ env.RULE_2 }}' > .tmp/input2.scss + echo '${{ env.RULE_3 }}' > .tmp/input3.scss + echo '${{ env.RULE_4 }}' > .tmp/input4.scss + echo '${{ env.RULE_5 }}' > .tmp/input5.scss + echo '${{ env.RULE_6 }}' > .tmp/input6.scss + + - name: Check compilation + run: | + time sass packages/nhsuk-frontend/src/nhsuk/nhsuk.scss > .tmp/check.css --load-path . - name: Check load paths run: | - mkdir -p .tmp - time sh -c 'echo "@import "\""nhsuk"\"";" | sass --stdin --load-path packages > .tmp/check1.css' - time sh -c 'echo "@forward "\""nhsuk"\"";" | sass --stdin --load-path packages > .tmp/check2.css' - time sh -c 'echo "@use "\""nhsuk"\"" as *;" | sass --stdin --load-path packages > .tmp/check3.css' + time sass .tmp/input1.scss > .tmp/check1.css --load-path packages/nhsuk-frontend/src + time sass .tmp/input2.scss > .tmp/check2.css --load-path packages/nhsuk-frontend/src + time sass .tmp/input3.scss > .tmp/check3.css --load-path packages/nhsuk-frontend/src + time sass .tmp/input4.scss > .tmp/check3.css --load-path . + time sass .tmp/input5.scss > .tmp/check3.css --load-path . + + - name: Check package importer + run: | + time sass .tmp/input6.scss > .tmp/check6.css --pkg-importer node # Check output for uncompiled Sass - name: Check output @@ -57,3 +80,6 @@ jobs: ! grep "\$nhsuk-" .tmp/check1.css ! grep "\$nhsuk-" .tmp/check2.css ! grep "\$nhsuk-" .tmp/check3.css + ! grep "\$nhsuk-" .tmp/check4.css + ! grep "\$nhsuk-" .tmp/check5.css + ! grep "\$nhsuk-" .tmp/check6.css diff --git a/README.md b/README.md index 9c6946c25..4ffc31555 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,9 @@ NHS.UK frontend contains the code you need to start building user interfaces for Visit the [NHS digital service manual](https://service-manual.nhs.uk/) for examples of components and guidance for when to use them. If we haven’t yet published guidance on the component you want, please [email us](mailto:service-manual@nhs.net) or get in touch on the [NHS digital service manual Slack workspace](https://join.slack.com/t/nhs-service-manual/shared_invite/enQtNTIyOTEyNjU3NDkyLTk4NDQ3YzkwYzk1Njk5YjAxYTI5YTVkZmUxMGQ0ZjA3NjMyM2ZkNjBlMWMxODVjZjYzNzg1ZmU4MWY1NmE2YzE). -## How to install NHS.UK frontend +## How to install -### 1. Install with package managers - -We recommend that you [install NHS.UK frontend using node package manager (npm)](/docs/installation/installing-with-npm.md). - -### 2. Install by using compiled files - -You can also [install NHS.UK frontend using our compiled files](/docs/installation/installing-compiled.md), if you are not currently using a package manager. +See the [`nhsuk-frontend` README.md](/packages/nhsuk-frontend/README.md) in the packages directory for details. ## Browsers and assistive technology diff --git a/app/_templates/page.njk b/app/_templates/page.njk deleted file mode 100644 index 80a76efb2..000000000 --- a/app/_templates/page.njk +++ /dev/null @@ -1,32 +0,0 @@ -{% from 'components/header/macro.njk' import header %} -{% from 'components/footer/macro.njk' import footer %} -{% from 'components/skip-link/macro.njk' import skipLink %} -{% from 'components/action-link/macro.njk' import actionLink %} -{% from 'components/breadcrumb/macro.njk' import breadcrumb %} -{% from 'components/card/macro.njk' import card %} -{% from 'components/contents-list/macro.njk' import contentsList %} -{% from 'components/details/macro.njk' import details %} -{% from 'components/hero/macro.njk' import hero %} -{% from 'components/do-dont-list/macro.njk' import list %} -{% from 'components/images/macro.njk' import image %} -{% from 'components/inset-text/macro.njk' import insetText %} -{% from 'components/pagination/macro.njk' import pagination %} -{% from 'components/skip-link/macro.njk' import skipLink %} -{% from 'components/tables/macro.njk' import table %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} -{% from 'components/back-link/macro.njk' import backLink %} -{% from 'components/button/macro.njk' import button %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} -{% from 'components/date-input/macro.njk' import dateInput %} -{% from 'components/error-message/macro.njk' import errorMessage %} -{% from 'components/error-summary/macro.njk' import errorSummary %} -{% from 'components/fieldset/macro.njk' import fieldset %} -{% from 'components/hint/macro.njk' import hint %} -{% from 'components/input/macro.njk' import input %} -{% from 'components/label/macro.njk' import label %} -{% from 'components/radios/macro.njk' import radios %} -{% from 'components/select/macro.njk' import select %} -{% from 'components/summary-list/macro.njk' import summaryList %} -{% from 'components/textarea/macro.njk' import textarea %} - -{% extends 'layout.njk' %} diff --git a/docs/contributing/application-architecture.md b/docs/contributing/application-architecture.md index 7d231e5e8..c0a1abfea 100644 --- a/docs/contributing/application-architecture.md +++ b/docs/contributing/application-architecture.md @@ -1,6 +1,6 @@ # Application architecture -The application generates static HTML pages to preview components, with each component having their own page, these files can be found in `app/`. To make changes to components, you will have to edit the individual components files within `packages/`. These are usually the only 2 folders that you will need. +The application generates static HTML pages to preview components, with each component having their own page, these files can be found in `packages/nhsuk-frontend-review/`. To make changes to components, you will have to edit the individual components files within `packages/nhsuk-frontend/`. These are usually the only 2 folders that you will need. --- @@ -8,10 +8,6 @@ The application generates static HTML pages to preview components, with each com GitHub specific files, such templates for pull requests and issues. -- `app/` - - Nunjuck (HTML) files for the component example pages that you see at http://localhost:3000/nhsuk-frontend when running the application locally and on https://nhsuk.github.io/nhsuk-frontend - - `dist/` (Automatically generated) Automatically generated compiled files and build assets for GitHub pages, releases and npm packages. Don't manually edit files in this folder as they will be deleted. @@ -26,7 +22,28 @@ The application generates static HTML pages to preview components, with each com - `packages/` - NHS.UK frontend individual components files, such as all the stylesheet (scss) files, HTML templates (nunjucks), READMEs and assets. + - `nhsuk-frontend-review` + + - `dist/` **contains auto-generated files** + + Builds of nhsuk-frontend-review served by [GitHub Pages](https://pages.github.com). + + - `src/` + + Nunjuck (HTML) files for the component example pages that you see at http://localhost:3000/nhsuk-frontend when running the application locally and on https://nhsuk.github.io/nhsuk-frontend + + - `nhsuk-frontend` + + Package published on npm. + Consume all of nhsuk-frontend through a single package. + + - `dist/` **contains auto-generated files** + + Builds of nhsuk-frontend published and exported from the npm package. + + - `src/` + + NHS.UK frontend individual components files, such as all the stylesheet (scss) files, HTML templates (nunjucks), READMEs and assets. - `shared/` diff --git a/docs/contributing/coding-standards.md b/docs/contributing/coding-standards.md index 52adfa844..9670a6845 100755 --- a/docs/contributing/coding-standards.md +++ b/docs/contributing/coding-standards.md @@ -135,7 +135,7 @@ This enables the NHSUK styles to be used inside other applications, where, for e ```scss div#nhsuk-ers { // ... -@import "node_modules/nhsuk-frontend/packages/core/all"; +@import "node_modules/nhsuk-frontend/src/nhsuk/core/all"; // ... } ``` diff --git a/docs/installation/installing-with-npm.md b/docs/installation/installing-with-npm.md index 5cf7e72bd..01ef36538 100644 --- a/docs/installation/installing-with-npm.md +++ b/docs/installation/installing-with-npm.md @@ -39,17 +39,17 @@ To build the stylesheet you will need a pipeline set up to compile [Sass](https: You need to import the NHS.UK frontend styles into the main Sass file in your project. You should place the below code before your own Sass rules (or Sass imports). ```scss -@import "node_modules/nhsuk-frontend/packages/nhsuk"; +@import "node_modules/nhsuk-frontend"; ``` Alternatively you can import each of the individual components separately, meaning you can import just the components that you are using. ```scss // Core (required) -@import "node_modules/nhsuk-frontend/packages/core/all"; +@import "node_modules/nhsuk-frontend/src/nhsuk/core/all"; // Individual component (optional) -@import "node_modules/nhsuk-frontend/packages/components/action-link/action-link"; +@import "node_modules/nhsuk-frontend/src/nhsuk/components/action-link/action-link"; ``` ## Importing JavaScript @@ -82,30 +82,32 @@ You might wish to copy the file into your project or reference it straight from ``` -### Option 2: Import JavaScript using modules +### Option 2: Import JavaScript using a bundler -If you're using a transpiler or bundler such as [Babel](https://babeljs.io/) or [Webpack](https://webpack.js.org/), you can use the ES6 import syntax to import components via modules into your main Javascript file. +We encourage the use of ECMAScript (ES) modules, but you should check your bundler does not unnecessarily downgrade modern JavaScript for unsupported browsers. + +If you decide to import using a bundler like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/), import and run the `initAll` function to initialise NHS.UK frontend: + +```js +import { initAll } from 'nhsuk-frontend' +initAll() +``` + +#### Initialise individual components + +Rather than using `initAll`, you can initialise individual components used by your service. For example: ```js -// Components -import Checkboxes from 'nhsuk-frontend/packages/components/checkboxes/checkboxes.js'; -import Details from 'nhsuk-frontend/packages/components/details/details.js'; -import ErrorSummary from 'nhsuk-frontend/packages/components/error-summary/error-summary.js'; -import Header from 'nhsuk-frontend/packages/components/header/header.js'; -import Radios from 'nhsuk-frontend/packages/components/radios/radios.js'; -import SkipLink from 'nhsuk-frontend/packages/components/skip-link/skip-link.js'; +import initRadios from 'nhsuk-frontend/src/nhsuk/components/radios/radios.js'; +import initSkipLink from 'nhsuk-frontend/src/nhsuk/components/skip-link/skip-link.js'; // Polyfills -import 'nhsuk-frontend/packages/polyfills.js'; +import 'nhsuk-frontend/src/nhsuk/polyfills.js'; -// Initialize components +// Initialise components document.addEventListener('DOMContentLoaded', () => { - Checkboxes(); - Details(); - ErrorSummary(); - Header(); - Radios(); - SkipLink(); + initRadios(); + initSkipLink(); }); ``` diff --git a/gulpfile.mjs b/gulpfile.mjs index f311813ac..ecef094b5 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -1,6 +1,9 @@ +import { join } from 'path' + import browserSync from 'browser-sync' import gulp from 'gulp' +import * as config from './shared/config/index.mjs' import { buildHTML, validateHTML, @@ -24,11 +27,14 @@ import { compileCSS, minifyCSS } from './shared/tasks/styles.mjs' */ gulp.task('clean', async () => { - return clean(['dist/**/*']) + return clean([join(config.paths.root, 'dist/**/*')]) }) gulp.task('clean:zip', async () => { - return clean(['dist/{assets,css,js}', 'dist/*.zip']) + return clean([ + join(config.paths.root, 'dist/{assets,css,js}'), + join(config.paths.root, 'dist/*.zip') + ]) }) gulp.task('style', gulp.series([compileCSS, minifyCSS])) @@ -47,8 +53,14 @@ gulp.task( gulp.task('watch', () => Promise.all([ - gulp.watch(['packages/**/*.scss'], gulp.series(['style'])), - gulp.watch(['packages/**/*.js'], gulp.series(['script'])) + gulp.watch( + [join(config.paths.pkg, 'src/nhsuk/**/*.scss')], + gulp.series(['style']) + ), + gulp.watch( + [join(config.paths.pkg, 'src/nhsuk/**/*.js')], + gulp.series(['script']) + ) ]) ) @@ -63,11 +75,37 @@ gulp.task( gulp.task('docs:watch', () => Promise.all([ - gulp.watch(['**/*.njk'], buildHTML), - gulp.watch(['dist/**/*.html']).on('change', browserSync.reload), - gulp.watch(['dist/*.min.{css,css.map}'], copyCSS), - gulp.watch(['dist/*.min.{js,js.map}'], copyJS), - gulp.watch(['packages/assets/**/*'], copyBinaryAssets) + /** + * Watch and render Nunjucks + */ + gulp.watch( + [ + join(config.paths.app, 'src/**/*.njk'), + join(config.paths.pkg, 'src/nhsuk/**/*.njk') + ], + buildHTML + ), + + /** + * Watch and reload HTML pages + */ + gulp + .watch([join(config.paths.root, 'dist/**/*.html')]) + .on('change', browserSync.reload), + + /** + * Watch and copy minified CSS and JS + */ + gulp.watch([join(config.paths.root, 'dist/*.min.{css,css.map}')], copyCSS), + gulp.watch([join(config.paths.root, 'dist/*.min.{js,js.map}')], copyJS), + + /** + * Watch and copy assets + */ + gulp.watch( + [join(config.paths.pkg, 'src/nhsuk/assets/**/*')], + copyBinaryAssets + ) ]) ) diff --git a/jest.config.js b/jest.config.js index d1eddd72b..c5771e331 100644 --- a/jest.config.js +++ b/jest.config.js @@ -34,14 +34,20 @@ module.exports = { projects: [ { ...config, - displayName: 'JSDom', + displayName: 'JavaScript unit tests', + testEnvironment: 'node', + testMatch: ['/**/*.unit.test.{js,mjs}'] + }, + { + ...config, + displayName: 'JavaScript behaviour tests', setupFilesAfterEnv: ['/jest.setup.js'], testEnvironment: 'jsdom', testMatch: ['/**/*.jsdom.test.{js,mjs}'] }, { ...config, - displayName: 'Pupppeteer', + displayName: 'JavaScript component tests', setupFilesAfterEnv: ['/jest.setup.js'], testEnvironment: 'jest-environment-puppeteer', testMatch: ['/**/*.puppeteer.test.{js,mjs}'], diff --git a/package-lock.json b/package-lock.json index e7adbc79d..b7def8af4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,15 @@ { - "name": "nhsuk-frontend", + "name": "nhsuk-frontend-repository", "version": "9.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "nhsuk-frontend", - "version": "9.4.1", + "name": "nhsuk-frontend-repository", "license": "MIT", + "workspaces": [ + "packages/*" + ], "devDependencies": { "@babel/core": "^7.26.10", "@babel/preset-env": "^7.26.9", @@ -46,6 +48,7 @@ "html-validate": "^9.5.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", + "jest-environment-node": "^29.7.0", "jest-environment-puppeteer": "^11.0.0", "jest-puppeteer": "^11.0.0", "nunjucks": "^3.2.4", @@ -11544,6 +11547,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -13093,6 +13097,14 @@ "node": ">= 0.4.0" } }, + "node_modules/nhsuk-frontend": { + "resolved": "packages/nhsuk-frontend", + "link": true + }, + "node_modules/nhsuk-frontend-review": { + "resolved": "packages/nhsuk-frontend-review", + "link": true + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -19130,6 +19142,24 @@ "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "packages/nhsuk-frontend": { + "version": "9.4.1", + "license": "MIT", + "devDependencies": { + "@testing-library/dom": "^10.4.0", + "@testing-library/user-event": "^14.6.1", + "puppeteer": "^24.6.0" + }, + "engines": { + "node": "^20.9.0 || ^22.11.0" + } + }, + "packages/nhsuk-frontend-review": { + "license": "MIT", + "engines": { + "node": "^20.9.0 || ^22.11.0" + } } } } diff --git a/package.json b/package.json index 52d9198f0..7b068b7af 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "nhsuk-frontend", - "version": "9.4.1", - "description": "NHS.UK frontend contains the code you need to start building user interfaces for NHS websites and services.", - "engines": { - "node": "^20.9.0 || ^22.11.0" - }, + "name": "nhsuk-frontend-repository", + "private": true, + "description": "Used only for the development of NHS.UK frontend, see `packages/nhsuk-frontend/package.json` for the published `package.json`", + "license": "MIT", + "workspaces": [ + "packages/*" + ], "scripts": { "install:playwright": "playwright install chromium --with-deps --only-shell", "install:puppeteer": "puppeteer browsers install", @@ -68,6 +69,7 @@ "html-validate": "^9.5.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", + "jest-environment-node": "^29.7.0", "jest-environment-puppeteer": "^11.0.0", "jest-puppeteer": "^11.0.0", "nunjucks": "^3.2.4", @@ -86,23 +88,7 @@ "wait-on": "^8.0.3", "webpack-stream": "^7.0.0" }, - "publishConfig": { - "access": "public" - }, - "files": [ - "dist", - "packages", - "!dist/{app,assets,css,js}", - "!dist/*.zip", - "!**/*.test.*" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/nhsuk/nhsuk-frontend.git" - }, - "homepage": "https://nhsuk.github.io/nhsuk-frontend/", - "bugs": { - "url": "https://github.com/nhsuk/nhsuk-frontend/issues" - }, - "license": "MIT" + "engines": { + "node": "^20.9.0 || ^22.11.0" + } } diff --git a/packages/nhsuk-frontend-review/package.json b/packages/nhsuk-frontend-review/package.json new file mode 100644 index 000000000..f60af1402 --- /dev/null +++ b/packages/nhsuk-frontend-review/package.json @@ -0,0 +1,9 @@ +{ + "name": "nhsuk-frontend-review", + "private": true, + "description": "NHS.UK frontend review app", + "license": "MIT", + "engines": { + "node": "^20.9.0 || ^22.11.0" + } +} diff --git a/app/_templates/example.njk b/packages/nhsuk-frontend-review/src/_templates/example.njk similarity index 100% rename from app/_templates/example.njk rename to packages/nhsuk-frontend-review/src/_templates/example.njk diff --git a/app/_templates/layout.njk b/packages/nhsuk-frontend-review/src/_templates/layout.njk similarity index 95% rename from app/_templates/layout.njk rename to packages/nhsuk-frontend-review/src/_templates/layout.njk index 1f84aefef..fc304bcad 100644 --- a/app/_templates/layout.njk +++ b/packages/nhsuk-frontend-review/src/_templates/layout.njk @@ -1,4 +1,4 @@ -{% extends 'template.njk' %} +{% extends 'nhsuk/template.njk' %} {% block pageTitle %}{{ title }} - NHS.UK Frontend{% endblock %} {% block head %} diff --git a/packages/nhsuk-frontend-review/src/_templates/page.njk b/packages/nhsuk-frontend-review/src/_templates/page.njk new file mode 100644 index 000000000..da9d3a81e --- /dev/null +++ b/packages/nhsuk-frontend-review/src/_templates/page.njk @@ -0,0 +1,32 @@ +{% from 'nhsuk/components/header/macro.njk' import header %} +{% from 'nhsuk/components/footer/macro.njk' import footer %} +{% from 'nhsuk/components/skip-link/macro.njk' import skipLink %} +{% from 'nhsuk/components/action-link/macro.njk' import actionLink %} +{% from 'nhsuk/components/breadcrumb/macro.njk' import breadcrumb %} +{% from 'nhsuk/components/card/macro.njk' import card %} +{% from 'nhsuk/components/contents-list/macro.njk' import contentsList %} +{% from 'nhsuk/components/details/macro.njk' import details %} +{% from 'nhsuk/components/hero/macro.njk' import hero %} +{% from 'nhsuk/components/do-dont-list/macro.njk' import list %} +{% from 'nhsuk/components/images/macro.njk' import image %} +{% from 'nhsuk/components/inset-text/macro.njk' import insetText %} +{% from 'nhsuk/components/pagination/macro.njk' import pagination %} +{% from 'nhsuk/components/skip-link/macro.njk' import skipLink %} +{% from 'nhsuk/components/tables/macro.njk' import table %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/back-link/macro.njk' import backLink %} +{% from 'nhsuk/components/button/macro.njk' import button %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/error-message/macro.njk' import errorMessage %} +{% from 'nhsuk/components/error-summary/macro.njk' import errorSummary %} +{% from 'nhsuk/components/fieldset/macro.njk' import fieldset %} +{% from 'nhsuk/components/hint/macro.njk' import hint %} +{% from 'nhsuk/components/input/macro.njk' import input %} +{% from 'nhsuk/components/label/macro.njk' import label %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/select/macro.njk' import select %} +{% from 'nhsuk/components/summary-list/macro.njk' import summaryList %} +{% from 'nhsuk/components/textarea/macro.njk' import textarea %} + +{% extends 'layout.njk' %} diff --git a/app/components/action-link/index.njk b/packages/nhsuk-frontend-review/src/components/action-link/index.njk similarity index 80% rename from app/components/action-link/index.njk rename to packages/nhsuk-frontend-review/src/components/action-link/index.njk index d5599b84c..141ccd6e7 100644 --- a/app/components/action-link/index.njk +++ b/packages/nhsuk-frontend-review/src/components/action-link/index.njk @@ -1,5 +1,5 @@ {% set title = 'Action link' %} -{% from 'components/action-link/macro.njk' import actionLink %} +{% from 'nhsuk/components/action-link/macro.njk' import actionLink %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/all.njk b/packages/nhsuk-frontend-review/src/components/all.njk similarity index 94% rename from app/components/all.njk rename to packages/nhsuk-frontend-review/src/components/all.njk index 063bfddc5..f5ed899a3 100644 --- a/app/components/all.njk +++ b/packages/nhsuk-frontend-review/src/components/all.njk @@ -1,30 +1,30 @@ {% set title = 'Components' %} -{% from 'components/action-link/macro.njk' import actionLink %} -{% from 'components/breadcrumb/macro.njk' import breadcrumb %} -{% from 'components/card/macro.njk' import card %} -{% from 'components/character-count/macro.njk' import characterCount %} -{% from 'components/contents-list/macro.njk' import contentsList %} -{% from 'components/details/macro.njk' import details %} -{% from 'components/header/macro.njk' import header %} -{% from 'components/footer/macro.njk' import footer %} -{% from 'components/do-dont-list/macro.njk' import list %} -{% from 'components/images/macro.njk' import image %} -{% from 'components/inset-text/macro.njk' import insetText %} -{% from 'components/pagination/macro.njk' import pagination %} -{% from 'components/skip-link/macro.njk' import skipLink %} -{% from "components/summary-list/macro.njk" import summaryList %} -{% from 'components/tables/macro.njk' import table %} -{% from 'components/tag/macro.njk' import tag %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} -{% from 'components/back-link/macro.njk' import backLink %} -{% from 'components/button/macro.njk' import button %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} -{% from 'components/date-input/macro.njk' import dateInput %} -{% from 'components/input/macro.njk' import input %} -{% from 'components/radios/macro.njk' import radios %} -{% from 'components/select/macro.njk' import select %} -{% from 'components/textarea/macro.njk' import textarea %} -{% from 'components/tabs/macro.njk' import tabs %} +{% from 'nhsuk/components/action-link/macro.njk' import actionLink %} +{% from 'nhsuk/components/breadcrumb/macro.njk' import breadcrumb %} +{% from 'nhsuk/components/card/macro.njk' import card %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/contents-list/macro.njk' import contentsList %} +{% from 'nhsuk/components/details/macro.njk' import details %} +{% from 'nhsuk/components/header/macro.njk' import header %} +{% from 'nhsuk/components/footer/macro.njk' import footer %} +{% from 'nhsuk/components/do-dont-list/macro.njk' import list %} +{% from 'nhsuk/components/images/macro.njk' import image %} +{% from 'nhsuk/components/inset-text/macro.njk' import insetText %} +{% from 'nhsuk/components/pagination/macro.njk' import pagination %} +{% from 'nhsuk/components/skip-link/macro.njk' import skipLink %} +{% from "nhsuk/components/summary-list/macro.njk" import summaryList %} +{% from 'nhsuk/components/tables/macro.njk' import table %} +{% from 'nhsuk/components/tag/macro.njk' import tag %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/back-link/macro.njk' import backLink %} +{% from 'nhsuk/components/button/macro.njk' import button %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/input/macro.njk' import input %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/select/macro.njk' import select %} +{% from 'nhsuk/components/textarea/macro.njk' import textarea %} +{% from 'nhsuk/components/tabs/macro.njk' import tabs %} {% extends 'page.njk' %} diff --git a/app/components/back-link/button.njk b/packages/nhsuk-frontend-review/src/components/back-link/button.njk similarity index 81% rename from app/components/back-link/button.njk rename to packages/nhsuk-frontend-review/src/components/back-link/button.njk index c55080c2a..d0e1fb38f 100644 --- a/app/components/back-link/button.njk +++ b/packages/nhsuk-frontend-review/src/components/back-link/button.njk @@ -1,5 +1,5 @@ {% set title = 'Back link as a button' %} -{% from 'components/back-link/macro.njk' import backLink %} +{% from 'nhsuk/components/back-link/macro.njk' import backLink %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/back-link/index.njk b/packages/nhsuk-frontend-review/src/components/back-link/index.njk similarity index 80% rename from app/components/back-link/index.njk rename to packages/nhsuk-frontend-review/src/components/back-link/index.njk index 04f8279ce..4553452d0 100644 --- a/app/components/back-link/index.njk +++ b/packages/nhsuk-frontend-review/src/components/back-link/index.njk @@ -1,5 +1,5 @@ {% set title = 'Back link' %} -{% from 'components/back-link/macro.njk' import backLink %} +{% from 'nhsuk/components/back-link/macro.njk' import backLink %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/breadcrumb/index.njk b/packages/nhsuk-frontend-review/src/components/breadcrumb/index.njk similarity index 91% rename from app/components/breadcrumb/index.njk rename to packages/nhsuk-frontend-review/src/components/breadcrumb/index.njk index 800cb2850..7cb964f55 100644 --- a/app/components/breadcrumb/index.njk +++ b/packages/nhsuk-frontend-review/src/components/breadcrumb/index.njk @@ -1,5 +1,5 @@ {% set title = 'Breadcrumb' %} -{% from 'components/breadcrumb/macro.njk' import breadcrumb %} +{% from 'nhsuk/components/breadcrumb/macro.njk' import breadcrumb %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/disabled.njk b/packages/nhsuk-frontend-review/src/components/button/disabled.njk similarity index 93% rename from app/components/button/disabled.njk rename to packages/nhsuk-frontend-review/src/components/button/disabled.njk index 5d8251a23..bab7aa9cf 100644 --- a/app/components/button/disabled.njk +++ b/packages/nhsuk-frontend-review/src/components/button/disabled.njk @@ -1,5 +1,5 @@ {% set title = 'Button disabled' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/index.njk b/packages/nhsuk-frontend-review/src/components/button/index.njk similarity index 80% rename from app/components/button/index.njk rename to packages/nhsuk-frontend-review/src/components/button/index.njk index 1e3bf1fd3..21b7be6b0 100644 --- a/app/components/button/index.njk +++ b/packages/nhsuk-frontend-review/src/components/button/index.njk @@ -1,5 +1,5 @@ {% set title = 'Button' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/link.njk b/packages/nhsuk-frontend-review/src/components/button/link.njk similarity index 82% rename from app/components/button/link.njk rename to packages/nhsuk-frontend-review/src/components/button/link.njk index 7d050f9b5..edee8ea51 100644 --- a/app/components/button/link.njk +++ b/packages/nhsuk-frontend-review/src/components/button/link.njk @@ -1,5 +1,5 @@ {% set title = 'Button as a link' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/prevent-double-click.njk b/packages/nhsuk-frontend-review/src/components/button/prevent-double-click.njk similarity index 83% rename from app/components/button/prevent-double-click.njk rename to packages/nhsuk-frontend-review/src/components/button/prevent-double-click.njk index e5986e60b..681448b1f 100644 --- a/app/components/button/prevent-double-click.njk +++ b/packages/nhsuk-frontend-review/src/components/button/prevent-double-click.njk @@ -1,5 +1,5 @@ {% set title = 'Button - double click prevented ' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/reverse.njk b/packages/nhsuk-frontend-review/src/components/button/reverse.njk similarity index 89% rename from app/components/button/reverse.njk rename to packages/nhsuk-frontend-review/src/components/button/reverse.njk index ba2a85dc5..4ceaf4415 100644 --- a/app/components/button/reverse.njk +++ b/packages/nhsuk-frontend-review/src/components/button/reverse.njk @@ -1,5 +1,5 @@ {% set title = 'Button reverse' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/button/secondary.njk b/packages/nhsuk-frontend-review/src/components/button/secondary.njk similarity index 83% rename from app/components/button/secondary.njk rename to packages/nhsuk-frontend-review/src/components/button/secondary.njk index 0248597b1..3b0c99a52 100644 --- a/app/components/button/secondary.njk +++ b/packages/nhsuk-frontend-review/src/components/button/secondary.njk @@ -1,5 +1,5 @@ {% set title = 'Button secondary' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/button/warning.njk b/packages/nhsuk-frontend-review/src/components/button/warning.njk similarity index 83% rename from app/components/button/warning.njk rename to packages/nhsuk-frontend-review/src/components/button/warning.njk index 352ab9450..7cc3ecb5f 100644 --- a/app/components/button/warning.njk +++ b/packages/nhsuk-frontend-review/src/components/button/warning.njk @@ -1,5 +1,5 @@ {% set title = 'Button warning' %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/basic-card.njk b/packages/nhsuk-frontend-review/src/components/card/basic-card.njk similarity index 89% rename from app/components/card/basic-card.njk rename to packages/nhsuk-frontend-review/src/components/card/basic-card.njk index e3d6d6d5d..3291ab734 100644 --- a/app/components/card/basic-card.njk +++ b/packages/nhsuk-frontend-review/src/components/card/basic-card.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Basic card' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/card-group.njk b/packages/nhsuk-frontend-review/src/components/card/card-group.njk similarity index 98% rename from app/components/card/card-group.njk rename to packages/nhsuk-frontend-review/src/components/card/card-group.njk index 4cc9d7bc5..a898304dd 100644 --- a/app/components/card/card-group.njk +++ b/packages/nhsuk-frontend-review/src/components/card/card-group.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Card group' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/card-primary.njk b/packages/nhsuk-frontend-review/src/components/card/card-primary.njk similarity index 90% rename from app/components/card/card-primary.njk rename to packages/nhsuk-frontend-review/src/components/card/card-primary.njk index c7f56a4fb..c3bedb786 100644 --- a/app/components/card/card-primary.njk +++ b/packages/nhsuk-frontend-review/src/components/card/card-primary.njk @@ -1,5 +1,5 @@ {% set title = 'Card - primary card (with chevron)' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/card-secondary.njk b/packages/nhsuk-frontend-review/src/components/card/card-secondary.njk similarity index 89% rename from app/components/card/card-secondary.njk rename to packages/nhsuk-frontend-review/src/components/card/card-secondary.njk index aa987355b..21c816432 100644 --- a/app/components/card/card-secondary.njk +++ b/packages/nhsuk-frontend-review/src/components/card/card-secondary.njk @@ -1,5 +1,5 @@ {% set title = 'Card - secondary' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/card-with-image.njk b/packages/nhsuk-frontend-review/src/components/card/card-with-image.njk similarity index 90% rename from app/components/card/card-with-image.njk rename to packages/nhsuk-frontend-review/src/components/card/card-with-image.njk index 1e70038b5..ada5a0a9e 100644 --- a/app/components/card/card-with-image.njk +++ b/packages/nhsuk-frontend-review/src/components/card/card-with-image.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Card with an image' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/care-card-emergency.njk b/packages/nhsuk-frontend-review/src/components/card/care-card-emergency.njk similarity index 92% rename from app/components/card/care-card-emergency.njk rename to packages/nhsuk-frontend-review/src/components/card/care-card-emergency.njk index ddfd76460..6ac35b748 100644 --- a/app/components/card/care-card-emergency.njk +++ b/packages/nhsuk-frontend-review/src/components/card/care-card-emergency.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Care card emergency (red and black)' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/care-card-non-urgent.njk b/packages/nhsuk-frontend-review/src/components/card/care-card-non-urgent.njk similarity index 93% rename from app/components/card/care-card-non-urgent.njk rename to packages/nhsuk-frontend-review/src/components/card/care-card-non-urgent.njk index e97bed022..48552d13d 100644 --- a/app/components/card/care-card-non-urgent.njk +++ b/packages/nhsuk-frontend-review/src/components/card/care-card-non-urgent.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Care card non-urgent (blue)' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/care-card-urgent.njk b/packages/nhsuk-frontend-review/src/components/card/care-card-urgent.njk similarity index 93% rename from app/components/card/care-card-urgent.njk rename to packages/nhsuk-frontend-review/src/components/card/care-card-urgent.njk index 79f99d47e..5160251ec 100644 --- a/app/components/card/care-card-urgent.njk +++ b/packages/nhsuk-frontend-review/src/components/card/care-card-urgent.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Care card urgent (red)' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/clickable-card.njk b/packages/nhsuk-frontend-review/src/components/card/clickable-card.njk similarity index 89% rename from app/components/card/clickable-card.njk rename to packages/nhsuk-frontend-review/src/components/card/clickable-card.njk index 814ab36bf..b73f982e6 100644 --- a/app/components/card/clickable-card.njk +++ b/packages/nhsuk-frontend-review/src/components/card/clickable-card.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Clickable card' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/feature-card.njk b/packages/nhsuk-frontend-review/src/components/card/feature-card.njk similarity index 87% rename from app/components/card/feature-card.njk rename to packages/nhsuk-frontend-review/src/components/card/feature-card.njk index 918e436d0..b66e7d9fc 100644 --- a/app/components/card/feature-card.njk +++ b/packages/nhsuk-frontend-review/src/components/card/feature-card.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Feature card' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/card/top-task-card.njk b/packages/nhsuk-frontend-review/src/components/card/top-task-card.njk similarity index 87% rename from app/components/card/top-task-card.njk rename to packages/nhsuk-frontend-review/src/components/card/top-task-card.njk index bee7e2186..a10863fd5 100644 --- a/app/components/card/top-task-card.njk +++ b/packages/nhsuk-frontend-review/src/components/card/top-task-card.njk @@ -1,5 +1,5 @@ {% set title = 'Card - Clickable card' %} -{% from 'components/card/macro.njk' import card %} +{% from 'nhsuk/components/card/macro.njk' import card %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/index.njk b/packages/nhsuk-frontend-review/src/components/character-count/index.njk similarity index 88% rename from app/components/character-count/index.njk rename to packages/nhsuk-frontend-review/src/components/character-count/index.njk index 48fe1d4a3..f29c27957 100644 --- a/app/components/character-count/index.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/index.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - max characters' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/with-default-value-exceeding-limit.njk b/packages/nhsuk-frontend-review/src/components/character-count/with-default-value-exceeding-limit.njk similarity index 89% rename from app/components/character-count/with-default-value-exceeding-limit.njk rename to packages/nhsuk-frontend-review/src/components/character-count/with-default-value-exceeding-limit.njk index 3a313f6b0..339f94e63 100644 --- a/app/components/character-count/with-default-value-exceeding-limit.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/with-default-value-exceeding-limit.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - with default value exceeding limit' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/with-default-value.njk b/packages/nhsuk-frontend-review/src/components/character-count/with-default-value.njk similarity index 88% rename from app/components/character-count/with-default-value.njk rename to packages/nhsuk-frontend-review/src/components/character-count/with-default-value.njk index d9a7eeaf9..a2b5cc984 100644 --- a/app/components/character-count/with-default-value.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/with-default-value.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - with default value exceeding limit' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/with-textarea-maxlength-attribute.njk b/packages/nhsuk-frontend-review/src/components/character-count/with-textarea-maxlength-attribute.njk similarity index 89% rename from app/components/character-count/with-textarea-maxlength-attribute.njk rename to packages/nhsuk-frontend-review/src/components/character-count/with-textarea-maxlength-attribute.njk index 5efb0123d..db63b9dbe 100644 --- a/app/components/character-count/with-textarea-maxlength-attribute.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/with-textarea-maxlength-attribute.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - with maxlength attribute' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/with-threshold.njk b/packages/nhsuk-frontend-review/src/components/character-count/with-threshold.njk similarity index 88% rename from app/components/character-count/with-threshold.njk rename to packages/nhsuk-frontend-review/src/components/character-count/with-threshold.njk index 8501286dd..2ebd52865 100644 --- a/app/components/character-count/with-threshold.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/with-threshold.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - with threshold' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/character-count/with-word-count.njk b/packages/nhsuk-frontend-review/src/components/character-count/with-word-count.njk similarity index 87% rename from app/components/character-count/with-word-count.njk rename to packages/nhsuk-frontend-review/src/components/character-count/with-word-count.njk index 72e28741c..2613e3bd4 100644 --- a/app/components/character-count/with-word-count.njk +++ b/packages/nhsuk-frontend-review/src/components/character-count/with-word-count.njk @@ -1,5 +1,5 @@ {% set title = 'Character Count - max words' %} -{% from 'components/character-count/macro.njk' import characterCount %} +{% from 'nhsuk/components/character-count/macro.njk' import characterCount %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/checkboxes/conditional.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/conditional.njk similarity index 93% rename from app/components/checkboxes/conditional.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/conditional.njk index 1fcf218d2..1a7c088fb 100644 --- a/app/components/checkboxes/conditional.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/conditional.njk @@ -1,6 +1,6 @@ {% set title = 'Checkboxes with conditional content' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% set emailHtml %} diff --git a/app/components/checkboxes/disabled.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/disabled.njk similarity index 90% rename from app/components/checkboxes/disabled.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/disabled.njk index 7e4fef2c9..6eeaae700 100644 --- a/app/components/checkboxes/disabled.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/disabled.njk @@ -1,5 +1,5 @@ {% set title = 'Checkboxes with disabled item' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/checkboxes/error.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/error.njk similarity index 93% rename from app/components/checkboxes/error.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/error.njk index 08a1245a3..5d2ec3d07 100644 --- a/app/components/checkboxes/error.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/error.njk @@ -1,5 +1,5 @@ {% set title = 'Checkboxes with error messages' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/checkboxes/hint.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/hint.njk similarity index 95% rename from app/components/checkboxes/hint.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/hint.njk index 87a9d68d2..489c85d67 100644 --- a/app/components/checkboxes/hint.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/hint.njk @@ -1,5 +1,5 @@ {% set title = 'Checkboxes with hint text' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/checkboxes/index.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/index.njk similarity index 93% rename from app/components/checkboxes/index.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/index.njk index 99893097a..c62b25eda 100644 --- a/app/components/checkboxes/index.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/index.njk @@ -1,5 +1,5 @@ {% set title = 'Checkboxes' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/checkboxes/none-of-the-above.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/none-of-the-above.njk similarity index 94% rename from app/components/checkboxes/none-of-the-above.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/none-of-the-above.njk index c8968184d..95a7617e1 100644 --- a/app/components/checkboxes/none-of-the-above.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/none-of-the-above.njk @@ -1,6 +1,6 @@ {% set title = 'Checkboxes with "none of the above" option' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% set emailHtml %} diff --git a/app/components/checkboxes/page-heading.njk b/packages/nhsuk-frontend-review/src/components/checkboxes/page-heading.njk similarity index 93% rename from app/components/checkboxes/page-heading.njk rename to packages/nhsuk-frontend-review/src/components/checkboxes/page-heading.njk index bb09de44b..fcf4dc9b1 100644 --- a/app/components/checkboxes/page-heading.njk +++ b/packages/nhsuk-frontend-review/src/components/checkboxes/page-heading.njk @@ -1,5 +1,5 @@ {% set title = 'Checkboxes with legend as page heading' %} -{% from 'components/checkboxes/macro.njk' import checkboxes %} +{% from 'nhsuk/components/checkboxes/macro.njk' import checkboxes %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/contents-list/index.njk b/packages/nhsuk-frontend-review/src/components/contents-list/index.njk similarity index 90% rename from app/components/contents-list/index.njk rename to packages/nhsuk-frontend-review/src/components/contents-list/index.njk index c0cfc4658..9c7b001a2 100644 --- a/app/components/contents-list/index.njk +++ b/packages/nhsuk-frontend-review/src/components/contents-list/index.njk @@ -1,5 +1,5 @@ {% set title = 'Contents list' %} -{% from 'components/contents-list/macro.njk' import contentsList %} +{% from 'nhsuk/components/contents-list/macro.njk' import contentsList %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/autocomplete.njk b/packages/nhsuk-frontend-review/src/components/date-input/autocomplete.njk similarity index 93% rename from app/components/date-input/autocomplete.njk rename to packages/nhsuk-frontend-review/src/components/date-input/autocomplete.njk index 974f91608..97200c3ea 100644 --- a/app/components/date-input/autocomplete.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/autocomplete.njk @@ -1,5 +1,5 @@ {% set title = 'Date input with autocomplete attribute' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/error.njk b/packages/nhsuk-frontend-review/src/components/date-input/error.njk similarity index 93% rename from app/components/date-input/error.njk rename to packages/nhsuk-frontend-review/src/components/date-input/error.njk index 43443ec1d..13ff97c0e 100644 --- a/app/components/date-input/error.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/error.njk @@ -1,5 +1,5 @@ {% set title = 'Date input with errors' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/index.njk b/packages/nhsuk-frontend-review/src/components/date-input/index.njk similarity index 87% rename from app/components/date-input/index.njk rename to packages/nhsuk-frontend-review/src/components/date-input/index.njk index a822c2c9d..596ebd6a9 100644 --- a/app/components/date-input/index.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/index.njk @@ -1,5 +1,5 @@ {% set title = 'Date input' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/month-and-year-with-values.njk b/packages/nhsuk-frontend-review/src/components/date-input/month-and-year-with-values.njk similarity index 91% rename from app/components/date-input/month-and-year-with-values.njk rename to packages/nhsuk-frontend-review/src/components/date-input/month-and-year-with-values.njk index f3da474a1..1bd067323 100644 --- a/app/components/date-input/month-and-year-with-values.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/month-and-year-with-values.njk @@ -1,5 +1,5 @@ {% set title = 'Date input' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/multiple-errors.njk b/packages/nhsuk-frontend-review/src/components/date-input/multiple-errors.njk similarity index 93% rename from app/components/date-input/multiple-errors.njk rename to packages/nhsuk-frontend-review/src/components/date-input/multiple-errors.njk index 99480f36c..8d5d487f6 100644 --- a/app/components/date-input/multiple-errors.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/multiple-errors.njk @@ -1,5 +1,5 @@ {% set title = 'Date input with multiple errors' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/date-input/with-values.njk b/packages/nhsuk-frontend-review/src/components/date-input/with-values.njk similarity index 89% rename from app/components/date-input/with-values.njk rename to packages/nhsuk-frontend-review/src/components/date-input/with-values.njk index ca338ce51..e52afb019 100644 --- a/app/components/date-input/with-values.njk +++ b/packages/nhsuk-frontend-review/src/components/date-input/with-values.njk @@ -1,5 +1,5 @@ {% set title = 'Date input' %} -{% from 'components/date-input/macro.njk' import dateInput %} +{% from 'nhsuk/components/date-input/macro.njk' import dateInput %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/details/expander-group.njk b/packages/nhsuk-frontend-review/src/components/details/expander-group.njk similarity index 95% rename from app/components/details/expander-group.njk rename to packages/nhsuk-frontend-review/src/components/details/expander-group.njk index 4383575e6..c4b52922d 100644 --- a/app/components/details/expander-group.njk +++ b/packages/nhsuk-frontend-review/src/components/details/expander-group.njk @@ -1,5 +1,5 @@ {% set title = 'Expander group' %} -{% from 'components/details/macro.njk' import details %} +{% from 'nhsuk/components/details/macro.njk' import details %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/details/expander.njk b/packages/nhsuk-frontend-review/src/components/details/expander.njk similarity index 93% rename from app/components/details/expander.njk rename to packages/nhsuk-frontend-review/src/components/details/expander.njk index 08aa0babb..c10fc3035 100644 --- a/app/components/details/expander.njk +++ b/packages/nhsuk-frontend-review/src/components/details/expander.njk @@ -1,6 +1,6 @@ {% set title = 'Expander' %} -{% from 'components/details/macro.njk' import details %} -{% from 'components/tables/macro.njk' import table %} +{% from 'nhsuk/components/details/macro.njk' import details %} +{% from 'nhsuk/components/tables/macro.njk' import table %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/details/index.njk b/packages/nhsuk-frontend-review/src/components/details/index.njk similarity index 92% rename from app/components/details/index.njk rename to packages/nhsuk-frontend-review/src/components/details/index.njk index d701b1e81..a7007fb1b 100644 --- a/app/components/details/index.njk +++ b/packages/nhsuk-frontend-review/src/components/details/index.njk @@ -1,5 +1,5 @@ {% set title = 'Details' %} -{% from 'components/details/macro.njk' import details %} +{% from 'nhsuk/components/details/macro.njk' import details %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/do-dont-list/index.njk b/packages/nhsuk-frontend-review/src/components/do-dont-list/index.njk similarity index 94% rename from app/components/do-dont-list/index.njk rename to packages/nhsuk-frontend-review/src/components/do-dont-list/index.njk index 52c208e65..9c5d994c9 100644 --- a/app/components/do-dont-list/index.njk +++ b/packages/nhsuk-frontend-review/src/components/do-dont-list/index.njk @@ -1,5 +1,5 @@ {% set title = 'Do and dont list' %} -{% from 'components/do-dont-list/macro.njk' import list %} +{% from 'nhsuk/components/do-dont-list/macro.njk' import list %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/error-message/index.njk b/packages/nhsuk-frontend-review/src/components/error-message/index.njk similarity index 79% rename from app/components/error-message/index.njk rename to packages/nhsuk-frontend-review/src/components/error-message/index.njk index 835e0e59c..e0ac7aeb8 100644 --- a/app/components/error-message/index.njk +++ b/packages/nhsuk-frontend-review/src/components/error-message/index.njk @@ -1,5 +1,5 @@ {% set title = 'Error message' %} -{% from 'components/error-message/macro.njk' import errorMessage %} +{% from 'nhsuk/components/error-message/macro.njk' import errorMessage %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/error-summary/index.njk b/packages/nhsuk-frontend-review/src/components/error-summary/index.njk similarity index 87% rename from app/components/error-summary/index.njk rename to packages/nhsuk-frontend-review/src/components/error-summary/index.njk index b089036bd..e15e02309 100644 --- a/app/components/error-summary/index.njk +++ b/packages/nhsuk-frontend-review/src/components/error-summary/index.njk @@ -1,5 +1,5 @@ {% set title = 'Error summary' %} -{% from 'components/error-summary/macro.njk' import errorSummary %} +{% from 'nhsuk/components/error-summary/macro.njk' import errorSummary %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/error-summary/linking-to-input.njk b/packages/nhsuk-frontend-review/src/components/error-summary/linking-to-input.njk similarity index 93% rename from app/components/error-summary/linking-to-input.njk rename to packages/nhsuk-frontend-review/src/components/error-summary/linking-to-input.njk index f1903fc26..deadb4cc0 100644 --- a/app/components/error-summary/linking-to-input.njk +++ b/packages/nhsuk-frontend-review/src/components/error-summary/linking-to-input.njk @@ -1,6 +1,6 @@ {% set title = 'Error summary' %} -{% from 'components/error-summary/macro.njk' import errorSummary %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/error-summary/macro.njk' import errorSummary %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/error-summary/linking-to-radios.njk b/packages/nhsuk-frontend-review/src/components/error-summary/linking-to-radios.njk similarity index 93% rename from app/components/error-summary/linking-to-radios.njk rename to packages/nhsuk-frontend-review/src/components/error-summary/linking-to-radios.njk index 7ed0674bd..041c67d90 100644 --- a/app/components/error-summary/linking-to-radios.njk +++ b/packages/nhsuk-frontend-review/src/components/error-summary/linking-to-radios.njk @@ -1,6 +1,6 @@ {% set title = 'Error summary' %} -{% from 'components/error-summary/macro.njk' import errorSummary %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/error-summary/macro.njk' import errorSummary %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/fieldset/index.njk b/packages/nhsuk-frontend-review/src/components/fieldset/index.njk similarity index 81% rename from app/components/fieldset/index.njk rename to packages/nhsuk-frontend-review/src/components/fieldset/index.njk index 9e3cfe957..7b12c150a 100644 --- a/app/components/fieldset/index.njk +++ b/packages/nhsuk-frontend-review/src/components/fieldset/index.njk @@ -1,5 +1,5 @@ {% set title = 'Fieldset' %} -{% from 'components/fieldset/macro.njk' import fieldset %} +{% from 'nhsuk/components/fieldset/macro.njk' import fieldset %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/fieldset/page-heading.njk b/packages/nhsuk-frontend-review/src/components/fieldset/page-heading.njk similarity index 85% rename from app/components/fieldset/page-heading.njk rename to packages/nhsuk-frontend-review/src/components/fieldset/page-heading.njk index 7de2091c1..01bb8be45 100644 --- a/app/components/fieldset/page-heading.njk +++ b/packages/nhsuk-frontend-review/src/components/fieldset/page-heading.njk @@ -1,5 +1,5 @@ {% set title = 'Fieldset as page heading' %} -{% from 'components/fieldset/macro.njk' import fieldset %} +{% from 'nhsuk/components/fieldset/macro.njk' import fieldset %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/fieldset/with-inputs.njk b/packages/nhsuk-frontend-review/src/components/fieldset/with-inputs.njk similarity index 88% rename from app/components/fieldset/with-inputs.njk rename to packages/nhsuk-frontend-review/src/components/fieldset/with-inputs.njk index 5d44a0306..bc6da2136 100644 --- a/app/components/fieldset/with-inputs.njk +++ b/packages/nhsuk-frontend-review/src/components/fieldset/with-inputs.njk @@ -1,6 +1,6 @@ {% set title = 'Fieldset with input fields' %} -{% from 'components/input/macro.njk' import input %} -{% from 'components/fieldset/macro.njk' import fieldset %} +{% from 'nhsuk/components/input/macro.njk' import input %} +{% from 'nhsuk/components/fieldset/macro.njk' import fieldset %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/footer/custom-copyright.njk b/packages/nhsuk-frontend-review/src/components/footer/custom-copyright.njk similarity index 90% rename from app/components/footer/custom-copyright.njk rename to packages/nhsuk-frontend-review/src/components/footer/custom-copyright.njk index 82e04787a..fe0ea2bc9 100644 --- a/app/components/footer/custom-copyright.njk +++ b/packages/nhsuk-frontend-review/src/components/footer/custom-copyright.njk @@ -1,5 +1,5 @@ {% set title = 'Footer (custom copyright statement)' %} -{% from 'components/footer/macro.njk' import footer %} +{% from 'nhsuk/components/footer/macro.njk' import footer %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/footer/footer-in-columns.njk b/packages/nhsuk-frontend-review/src/components/footer/footer-in-columns.njk similarity index 96% rename from app/components/footer/footer-in-columns.njk rename to packages/nhsuk-frontend-review/src/components/footer/footer-in-columns.njk index 7c6186706..a68580a18 100644 --- a/app/components/footer/footer-in-columns.njk +++ b/packages/nhsuk-frontend-review/src/components/footer/footer-in-columns.njk @@ -1,5 +1,5 @@ {% set title = 'Footer (columns)' %} -{% from 'components/footer/macro.njk' import footer %} +{% from 'nhsuk/components/footer/macro.njk' import footer %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/footer/index.njk b/packages/nhsuk-frontend-review/src/components/footer/index.njk similarity index 89% rename from app/components/footer/index.njk rename to packages/nhsuk-frontend-review/src/components/footer/index.njk index 483b65533..ed4c68a8f 100644 --- a/app/components/footer/index.njk +++ b/packages/nhsuk-frontend-review/src/components/footer/index.njk @@ -1,5 +1,5 @@ {% set title = 'Footer (default)' %} -{% from 'components/footer/macro.njk' import footer %} +{% from 'nhsuk/components/footer/macro.njk' import footer %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-logo.njk b/packages/nhsuk-frontend-review/src/components/header/header-logo.njk similarity index 75% rename from app/components/header/header-logo.njk rename to packages/nhsuk-frontend-review/src/components/header/header-logo.njk index b0b086623..8eb83575f 100644 --- a/app/components/header/header-logo.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-logo.njk @@ -1,5 +1,5 @@ {% set title = 'Header with logo only' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-navigation.njk b/packages/nhsuk-frontend-review/src/components/header/header-navigation.njk similarity index 94% rename from app/components/header/header-navigation.njk rename to packages/nhsuk-frontend-review/src/components/header/header-navigation.njk index daae074f8..c55bc9251 100644 --- a/app/components/header/header-navigation.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-navigation.njk @@ -1,5 +1,5 @@ {% set title = 'Header with navigation' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-org-white-nav.njk b/packages/nhsuk-frontend-review/src/components/header/header-org-white-nav.njk similarity index 93% rename from app/components/header/header-org-white-nav.njk rename to packages/nhsuk-frontend-review/src/components/header/header-org-white-nav.njk index 9ee052d73..b52b52f09 100644 --- a/app/components/header/header-org-white-nav.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-org-white-nav.njk @@ -1,5 +1,5 @@ {% set title = 'Header organisational with white header and navigation' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-org-white.njk b/packages/nhsuk-frontend-review/src/components/header/header-org-white.njk similarity index 92% rename from app/components/header/header-org-white.njk rename to packages/nhsuk-frontend-review/src/components/header/header-org-white.njk index 8c2e0ff5f..7f932e950 100644 --- a/app/components/header/header-org-white.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-org-white.njk @@ -1,5 +1,5 @@ {% set title = 'Header organisational with white header' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-org.njk b/packages/nhsuk-frontend-review/src/components/header/header-org.njk similarity index 92% rename from app/components/header/header-org.njk rename to packages/nhsuk-frontend-review/src/components/header/header-org.njk index 39ece7185..5833dcd8d 100644 --- a/app/components/header/header-org.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-org.njk @@ -1,5 +1,5 @@ {% set title = 'Header organisational' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-search.njk b/packages/nhsuk-frontend-review/src/components/header/header-search.njk similarity index 93% rename from app/components/header/header-search.njk rename to packages/nhsuk-frontend-review/src/components/header/header-search.njk index b0a141fcc..04533f6b7 100644 --- a/app/components/header/header-search.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-search.njk @@ -1,5 +1,5 @@ {% set title = 'Header with search' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-service-name-with-nav.njk b/packages/nhsuk-frontend-review/src/components/header/header-service-name-with-nav.njk similarity index 92% rename from app/components/header/header-service-name-with-nav.njk rename to packages/nhsuk-frontend-review/src/components/header/header-service-name-with-nav.njk index 5b1ba1e78..554ba89c8 100644 --- a/app/components/header/header-service-name-with-nav.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-service-name-with-nav.njk @@ -1,5 +1,5 @@ {% set title = 'Header with a service name, search and navigation' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-service-name.njk b/packages/nhsuk-frontend-review/src/components/header/header-service-name.njk similarity index 75% rename from app/components/header/header-service-name.njk rename to packages/nhsuk-frontend-review/src/components/header/header-service-name.njk index e8b5ee02d..3841780df 100644 --- a/app/components/header/header-service-name.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-service-name.njk @@ -1,5 +1,5 @@ {% set title = 'Header with service name' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/header-transactional-service-name.njk b/packages/nhsuk-frontend-review/src/components/header/header-transactional-service-name.njk similarity index 82% rename from app/components/header/header-transactional-service-name.njk rename to packages/nhsuk-frontend-review/src/components/header/header-transactional-service-name.njk index a711bc518..e2d91162d 100644 --- a/app/components/header/header-transactional-service-name.njk +++ b/packages/nhsuk-frontend-review/src/components/header/header-transactional-service-name.njk @@ -1,5 +1,5 @@ {% set title = 'Header transactional with service name' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/header/index.njk b/packages/nhsuk-frontend-review/src/components/header/index.njk similarity index 93% rename from app/components/header/index.njk rename to packages/nhsuk-frontend-review/src/components/header/index.njk index 56279572f..759910865 100644 --- a/app/components/header/index.njk +++ b/packages/nhsuk-frontend-review/src/components/header/index.njk @@ -1,5 +1,5 @@ {% set title = 'Header (default)' %} -{% from 'components/header/macro.njk' import header %} +{% from 'nhsuk/components/header/macro.njk' import header %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/hero/hero-image-content.njk b/packages/nhsuk-frontend-review/src/components/hero/hero-image-content.njk similarity index 85% rename from app/components/hero/hero-image-content.njk rename to packages/nhsuk-frontend-review/src/components/hero/hero-image-content.njk index 0e93295bf..6ca9dd390 100644 --- a/app/components/hero/hero-image-content.njk +++ b/packages/nhsuk-frontend-review/src/components/hero/hero-image-content.njk @@ -1,5 +1,5 @@ {% set title = 'Hero with image and content' %} -{% from 'components/hero/macro.njk' import hero %} +{% from 'nhsuk/components/hero/macro.njk' import hero %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/hero/hero-image.njk b/packages/nhsuk-frontend-review/src/components/hero/hero-image.njk similarity index 78% rename from app/components/hero/hero-image.njk rename to packages/nhsuk-frontend-review/src/components/hero/hero-image.njk index ab8f3b1a3..7bc34bb58 100644 --- a/app/components/hero/hero-image.njk +++ b/packages/nhsuk-frontend-review/src/components/hero/hero-image.njk @@ -1,5 +1,5 @@ {% set title = 'Hero with image' %} -{% from 'components/hero/macro.njk' import hero %} +{% from 'nhsuk/components/hero/macro.njk' import hero %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/hero/hero-with-html.njk b/packages/nhsuk-frontend-review/src/components/hero/hero-with-html.njk similarity index 79% rename from app/components/hero/hero-with-html.njk rename to packages/nhsuk-frontend-review/src/components/hero/hero-with-html.njk index 896292c29..f8e53030d 100644 --- a/app/components/hero/hero-with-html.njk +++ b/packages/nhsuk-frontend-review/src/components/hero/hero-with-html.njk @@ -1,6 +1,6 @@ {% set title = 'Hero' %} -{% from 'components/hero/macro.njk' import hero %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/hero/macro.njk' import hero %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} diff --git a/app/components/hero/index.njk b/packages/nhsuk-frontend-review/src/components/hero/index.njk similarity index 79% rename from app/components/hero/index.njk rename to packages/nhsuk-frontend-review/src/components/hero/index.njk index 7404df6ad..04382bb49 100644 --- a/app/components/hero/index.njk +++ b/packages/nhsuk-frontend-review/src/components/hero/index.njk @@ -1,5 +1,5 @@ {% set title = 'Hero' %} -{% from 'components/hero/macro.njk' import hero %} +{% from 'nhsuk/components/hero/macro.njk' import hero %} {% extends 'example.njk' %} {% block main %} diff --git a/app/components/hint/index.njk b/packages/nhsuk-frontend-review/src/components/hint/index.njk similarity index 85% rename from app/components/hint/index.njk rename to packages/nhsuk-frontend-review/src/components/hint/index.njk index acf35bc06..816697556 100644 --- a/app/components/hint/index.njk +++ b/packages/nhsuk-frontend-review/src/components/hint/index.njk @@ -1,5 +1,5 @@ {% set title = 'Hint' %} -{% from 'components/hint/macro.njk' import hint %} +{% from 'nhsuk/components/hint/macro.njk' import hint %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/images/index.njk b/packages/nhsuk-frontend-review/src/components/images/index.njk similarity index 94% rename from app/components/images/index.njk rename to packages/nhsuk-frontend-review/src/components/images/index.njk index d10d8dbc5..fb4855511 100644 --- a/app/components/images/index.njk +++ b/packages/nhsuk-frontend-review/src/components/images/index.njk @@ -1,5 +1,5 @@ {% set title = 'Images' %} -{% from 'components/images/macro.njk' import image %} +{% from 'nhsuk/components/images/macro.njk' import image %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/autocomplete.njk b/packages/nhsuk-frontend-review/src/components/input/autocomplete.njk similarity index 88% rename from app/components/input/autocomplete.njk rename to packages/nhsuk-frontend-review/src/components/input/autocomplete.njk index 5271149ca..1b16b9d55 100644 --- a/app/components/input/autocomplete.njk +++ b/packages/nhsuk-frontend-review/src/components/input/autocomplete.njk @@ -1,5 +1,5 @@ {% set title = 'Input with autocomplete attribute' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/custom-width.njk b/packages/nhsuk-frontend-review/src/components/input/custom-width.njk similarity index 91% rename from app/components/input/custom-width.njk rename to packages/nhsuk-frontend-review/src/components/input/custom-width.njk index 225d36112..bd224e2c4 100644 --- a/app/components/input/custom-width.njk +++ b/packages/nhsuk-frontend-review/src/components/input/custom-width.njk @@ -1,5 +1,5 @@ {% set title = 'Input with width modifier' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/error-and-prefix-and-suffix.njk b/packages/nhsuk-frontend-review/src/components/input/error-and-prefix-and-suffix.njk similarity index 91% rename from app/components/input/error-and-prefix-and-suffix.njk rename to packages/nhsuk-frontend-review/src/components/input/error-and-prefix-and-suffix.njk index 68118cebd..b986543fd 100644 --- a/app/components/input/error-and-prefix-and-suffix.njk +++ b/packages/nhsuk-frontend-review/src/components/input/error-and-prefix-and-suffix.njk @@ -1,5 +1,5 @@ {% set title = 'Input with error message, prefix and suffix' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/error.njk b/packages/nhsuk-frontend-review/src/components/input/error.njk similarity index 92% rename from app/components/input/error.njk rename to packages/nhsuk-frontend-review/src/components/input/error.njk index 63aafbb7b..1cc335a45 100644 --- a/app/components/input/error.njk +++ b/packages/nhsuk-frontend-review/src/components/input/error.njk @@ -1,5 +1,5 @@ {% set title = 'Input with error message' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/hint.njk b/packages/nhsuk-frontend-review/src/components/input/hint.njk similarity index 91% rename from app/components/input/hint.njk rename to packages/nhsuk-frontend-review/src/components/input/hint.njk index 816ae795c..90b5aa228 100644 --- a/app/components/input/hint.njk +++ b/packages/nhsuk-frontend-review/src/components/input/hint.njk @@ -1,5 +1,5 @@ {% set title = 'Input with hint text' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/index.njk b/packages/nhsuk-frontend-review/src/components/input/index.njk similarity index 85% rename from app/components/input/index.njk rename to packages/nhsuk-frontend-review/src/components/input/index.njk index e88176bf8..73b02cdf5 100644 --- a/app/components/input/index.njk +++ b/packages/nhsuk-frontend-review/src/components/input/index.njk @@ -1,5 +1,5 @@ {% set title = 'Input' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/prefix-and-suffix.njk b/packages/nhsuk-frontend-review/src/components/input/prefix-and-suffix.njk similarity index 90% rename from app/components/input/prefix-and-suffix.njk rename to packages/nhsuk-frontend-review/src/components/input/prefix-and-suffix.njk index 3b1785a3f..f7dc80cbe 100644 --- a/app/components/input/prefix-and-suffix.njk +++ b/packages/nhsuk-frontend-review/src/components/input/prefix-and-suffix.njk @@ -1,5 +1,5 @@ {% set title = 'Input with prefix and suffix' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/prefix.njk b/packages/nhsuk-frontend-review/src/components/input/prefix.njk similarity index 89% rename from app/components/input/prefix.njk rename to packages/nhsuk-frontend-review/src/components/input/prefix.njk index c25791f19..d2ddcf8d3 100644 --- a/app/components/input/prefix.njk +++ b/packages/nhsuk-frontend-review/src/components/input/prefix.njk @@ -1,5 +1,5 @@ {% set title = 'Input with prefix' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/input/suffix.njk b/packages/nhsuk-frontend-review/src/components/input/suffix.njk similarity index 89% rename from app/components/input/suffix.njk rename to packages/nhsuk-frontend-review/src/components/input/suffix.njk index 88290e9ac..776e0722a 100644 --- a/app/components/input/suffix.njk +++ b/packages/nhsuk-frontend-review/src/components/input/suffix.njk @@ -1,5 +1,5 @@ {% set title = 'Input with suffix' %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/inset-text/index.njk b/packages/nhsuk-frontend-review/src/components/inset-text/index.njk similarity index 85% rename from app/components/inset-text/index.njk rename to packages/nhsuk-frontend-review/src/components/inset-text/index.njk index b0751e12c..e2f4b8c03 100644 --- a/app/components/inset-text/index.njk +++ b/packages/nhsuk-frontend-review/src/components/inset-text/index.njk @@ -1,5 +1,5 @@ {% set title = 'Inset text' %} -{% from 'components/inset-text/macro.njk' import insetText %} +{% from 'nhsuk/components/inset-text/macro.njk' import insetText %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/label/bold.njk b/packages/nhsuk-frontend-review/src/components/label/bold.njk similarity index 84% rename from app/components/label/bold.njk rename to packages/nhsuk-frontend-review/src/components/label/bold.njk index 1020fa100..e9d37698f 100644 --- a/app/components/label/bold.njk +++ b/packages/nhsuk-frontend-review/src/components/label/bold.njk @@ -1,5 +1,5 @@ {% set title = 'Label with bold text' %} -{% from 'components/label/macro.njk' import label %} +{% from 'nhsuk/components/label/macro.njk' import label %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/label/index.njk b/packages/nhsuk-frontend-review/src/components/label/index.njk similarity index 81% rename from app/components/label/index.njk rename to packages/nhsuk-frontend-review/src/components/label/index.njk index c06844d3c..9b5569473 100644 --- a/app/components/label/index.njk +++ b/packages/nhsuk-frontend-review/src/components/label/index.njk @@ -1,5 +1,5 @@ {% set title = 'Label' %} -{% from 'components/label/macro.njk' import label %} +{% from 'nhsuk/components/label/macro.njk' import label %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/label/page-heading.njk b/packages/nhsuk-frontend-review/src/components/label/page-heading.njk similarity index 85% rename from app/components/label/page-heading.njk rename to packages/nhsuk-frontend-review/src/components/label/page-heading.njk index 2ce925642..547ccda5e 100644 --- a/app/components/label/page-heading.njk +++ b/packages/nhsuk-frontend-review/src/components/label/page-heading.njk @@ -1,5 +1,5 @@ {% set title = 'Label as page heading' %} -{% from 'components/label/macro.njk' import label %} +{% from 'nhsuk/components/label/macro.njk' import label %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/pagination/index.njk b/packages/nhsuk-frontend-review/src/components/pagination/index.njk similarity index 84% rename from app/components/pagination/index.njk rename to packages/nhsuk-frontend-review/src/components/pagination/index.njk index 1c881e30f..41b93aed2 100644 --- a/app/components/pagination/index.njk +++ b/packages/nhsuk-frontend-review/src/components/pagination/index.njk @@ -1,5 +1,5 @@ {% set title = 'Pagination' %} -{% from 'components/pagination/macro.njk' import pagination %} +{% from 'nhsuk/components/pagination/macro.njk' import pagination %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/panel/index.njk b/packages/nhsuk-frontend-review/src/components/panel/index.njk similarity index 84% rename from app/components/panel/index.njk rename to packages/nhsuk-frontend-review/src/components/panel/index.njk index 4474776e1..da4d6aad3 100644 --- a/app/components/panel/index.njk +++ b/packages/nhsuk-frontend-review/src/components/panel/index.njk @@ -1,5 +1,5 @@ {% set title = 'Panel' %} -{% from 'components/panel/macro.njk' import panel %} +{% from 'nhsuk/components/panel/macro.njk' import panel %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/conditional.njk b/packages/nhsuk-frontend-review/src/components/radios/conditional.njk similarity index 93% rename from app/components/radios/conditional.njk rename to packages/nhsuk-frontend-review/src/components/radios/conditional.njk index 41c856b87..64e8a57be 100644 --- a/app/components/radios/conditional.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/conditional.njk @@ -1,6 +1,6 @@ {% set title = 'Radios with conditonal content' %} -{% from 'components/radios/macro.njk' import radios %} -{% from 'components/input/macro.njk' import input %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/input/macro.njk' import input %} {% extends 'example.njk' %} {% set emailHtml %} diff --git a/app/components/radios/disabled.njk b/packages/nhsuk-frontend-review/src/components/radios/disabled.njk similarity index 93% rename from app/components/radios/disabled.njk rename to packages/nhsuk-frontend-review/src/components/radios/disabled.njk index cdc430d95..ca503461a 100644 --- a/app/components/radios/disabled.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/disabled.njk @@ -1,5 +1,5 @@ {% set title = 'Radios disabled' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/divider.njk b/packages/nhsuk-frontend-review/src/components/radios/divider.njk similarity index 93% rename from app/components/radios/divider.njk rename to packages/nhsuk-frontend-review/src/components/radios/divider.njk index 5618a440d..58f57ea71 100644 --- a/app/components/radios/divider.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/divider.njk @@ -1,5 +1,5 @@ {% set title = 'Radios with a divider' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/hint-error.njk b/packages/nhsuk-frontend-review/src/components/radios/hint-error.njk similarity index 94% rename from app/components/radios/hint-error.njk rename to packages/nhsuk-frontend-review/src/components/radios/hint-error.njk index 0a9f9f981..7599dd58c 100644 --- a/app/components/radios/hint-error.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/hint-error.njk @@ -1,5 +1,5 @@ {% set title = 'Radios with hint text and error message' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/hint.njk b/packages/nhsuk-frontend-review/src/components/radios/hint.njk similarity index 94% rename from app/components/radios/hint.njk rename to packages/nhsuk-frontend-review/src/components/radios/hint.njk index e350b1ba6..cf716fda3 100644 --- a/app/components/radios/hint.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/hint.njk @@ -1,5 +1,5 @@ {% set title = 'Radios with hint text' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/index.njk b/packages/nhsuk-frontend-review/src/components/radios/index.njk similarity index 92% rename from app/components/radios/index.njk rename to packages/nhsuk-frontend-review/src/components/radios/index.njk index c5e991677..25cad79ab 100644 --- a/app/components/radios/index.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/index.njk @@ -1,5 +1,5 @@ {% set title = 'Radios' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/inline.njk b/packages/nhsuk-frontend-review/src/components/radios/inline.njk similarity index 93% rename from app/components/radios/inline.njk rename to packages/nhsuk-frontend-review/src/components/radios/inline.njk index 6ec97603e..5041e1ada 100644 --- a/app/components/radios/inline.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/inline.njk @@ -1,5 +1,5 @@ {% set title = 'Radios inline' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/radios/nested-conditionals.njk b/packages/nhsuk-frontend-review/src/components/radios/nested-conditionals.njk similarity index 92% rename from app/components/radios/nested-conditionals.njk rename to packages/nhsuk-frontend-review/src/components/radios/nested-conditionals.njk index fb8e316d2..5a7282d8d 100644 --- a/app/components/radios/nested-conditionals.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/nested-conditionals.njk @@ -1,7 +1,7 @@ {% set title = 'Radios with nested conditonal content' %} -{% from 'components/radios/macro.njk' import radios %} -{% from 'components/input/macro.njk' import input %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/input/macro.njk' import input %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} {% extends 'example.njk' %} {% set emailHtml %} diff --git a/app/components/radios/without-fieldset.njk b/packages/nhsuk-frontend-review/src/components/radios/without-fieldset.njk similarity index 89% rename from app/components/radios/without-fieldset.njk rename to packages/nhsuk-frontend-review/src/components/radios/without-fieldset.njk index d2a84bcd4..635b11a63 100644 --- a/app/components/radios/without-fieldset.njk +++ b/packages/nhsuk-frontend-review/src/components/radios/without-fieldset.njk @@ -1,5 +1,5 @@ {% set title = 'Radios without fieldset' %} -{% from 'components/radios/macro.njk' import radios %} +{% from 'nhsuk/components/radios/macro.njk' import radios %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/select/hint-error.njk b/packages/nhsuk-frontend-review/src/components/select/hint-error.njk similarity index 93% rename from app/components/select/hint-error.njk rename to packages/nhsuk-frontend-review/src/components/select/hint-error.njk index cb16dfaa1..3b72af0e9 100644 --- a/app/components/select/hint-error.njk +++ b/packages/nhsuk-frontend-review/src/components/select/hint-error.njk @@ -1,5 +1,5 @@ {% set title = 'Select with hint text and error message' %} -{% from 'components/select/macro.njk' import select %} +{% from 'nhsuk/components/select/macro.njk' import select %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/select/index.njk b/packages/nhsuk-frontend-review/src/components/select/index.njk similarity index 92% rename from app/components/select/index.njk rename to packages/nhsuk-frontend-review/src/components/select/index.njk index de1ad98e3..9415a6578 100644 --- a/app/components/select/index.njk +++ b/packages/nhsuk-frontend-review/src/components/select/index.njk @@ -1,5 +1,5 @@ {% set title = 'Select' %} -{% from 'components/select/macro.njk' import select %} +{% from 'nhsuk/components/select/macro.njk' import select %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/skip-link/index.njk b/packages/nhsuk-frontend-review/src/components/skip-link/index.njk similarity index 85% rename from app/components/skip-link/index.njk rename to packages/nhsuk-frontend-review/src/components/skip-link/index.njk index 58ff7946b..5ed4aa7c8 100644 --- a/app/components/skip-link/index.njk +++ b/packages/nhsuk-frontend-review/src/components/skip-link/index.njk @@ -1,5 +1,5 @@ {% set title = 'Skip link' %} -{% from 'components/skip-link/macro.njk' import skipLink %} +{% from 'nhsuk/components/skip-link/macro.njk' import skipLink %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/summary-list/index.njk b/packages/nhsuk-frontend-review/src/components/summary-list/index.njk similarity index 96% rename from app/components/summary-list/index.njk rename to packages/nhsuk-frontend-review/src/components/summary-list/index.njk index 22247aa81..9a420fc18 100644 --- a/app/components/summary-list/index.njk +++ b/packages/nhsuk-frontend-review/src/components/summary-list/index.njk @@ -1,5 +1,5 @@ {% set title = 'Summary list' %} -{% from "components/summary-list/macro.njk" import summaryList %} +{% from "nhsuk/components/summary-list/macro.njk" import summaryList %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/summary-list/without-actions.njk b/packages/nhsuk-frontend-review/src/components/summary-list/without-actions.njk similarity index 93% rename from app/components/summary-list/without-actions.njk rename to packages/nhsuk-frontend-review/src/components/summary-list/without-actions.njk index 347a7e94c..9f136145f 100644 --- a/app/components/summary-list/without-actions.njk +++ b/packages/nhsuk-frontend-review/src/components/summary-list/without-actions.njk @@ -1,5 +1,5 @@ {% set title = 'Summary list without actions' %} -{% from "components/summary-list/macro.njk" import summaryList %} +{% from "nhsuk/components/summary-list/macro.njk" import summaryList %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/summary-list/without-border.njk b/packages/nhsuk-frontend-review/src/components/summary-list/without-border.njk similarity index 93% rename from app/components/summary-list/without-border.njk rename to packages/nhsuk-frontend-review/src/components/summary-list/without-border.njk index 2f1ec517d..33764716f 100644 --- a/app/components/summary-list/without-border.njk +++ b/packages/nhsuk-frontend-review/src/components/summary-list/without-border.njk @@ -1,5 +1,5 @@ {% set title = 'Summary list without border' %} -{% from "components/summary-list/macro.njk" import summaryList %} +{% from "nhsuk/components/summary-list/macro.njk" import summaryList %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/tables/index.njk b/packages/nhsuk-frontend-review/src/components/tables/index.njk similarity index 94% rename from app/components/tables/index.njk rename to packages/nhsuk-frontend-review/src/components/tables/index.njk index eb7e182b8..c90ec0305 100644 --- a/app/components/tables/index.njk +++ b/packages/nhsuk-frontend-review/src/components/tables/index.njk @@ -1,5 +1,5 @@ {% set title = 'Tables' %} -{% from 'components/tables/macro.njk' import table %} +{% from 'nhsuk/components/tables/macro.njk' import table %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/tables/responsive-table.njk b/packages/nhsuk-frontend-review/src/components/tables/responsive-table.njk similarity index 98% rename from app/components/tables/responsive-table.njk rename to packages/nhsuk-frontend-review/src/components/tables/responsive-table.njk index 70bfc7886..257f0f62a 100644 --- a/app/components/tables/responsive-table.njk +++ b/packages/nhsuk-frontend-review/src/components/tables/responsive-table.njk @@ -1,5 +1,5 @@ {% set title = 'Tables' %} -{% from 'components/tables/macro.njk' import table %} +{% from 'nhsuk/components/tables/macro.njk' import table %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/tables/table-with-word-breaks.njk b/packages/nhsuk-frontend-review/src/components/tables/table-with-word-breaks.njk similarity index 96% rename from app/components/tables/table-with-word-breaks.njk rename to packages/nhsuk-frontend-review/src/components/tables/table-with-word-breaks.njk index aea5505c0..f530ef8c1 100644 --- a/app/components/tables/table-with-word-breaks.njk +++ b/packages/nhsuk-frontend-review/src/components/tables/table-with-word-breaks.njk @@ -1,5 +1,5 @@ {% set title = 'Tables' %} -{% from 'components/tables/macro.njk' import table %} +{% from 'nhsuk/components/tables/macro.njk' import table %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/tables/tables-panel.njk b/packages/nhsuk-frontend-review/src/components/tables/tables-panel.njk similarity index 94% rename from app/components/tables/tables-panel.njk rename to packages/nhsuk-frontend-review/src/components/tables/tables-panel.njk index 409e9a679..d25780641 100644 --- a/app/components/tables/tables-panel.njk +++ b/packages/nhsuk-frontend-review/src/components/tables/tables-panel.njk @@ -1,5 +1,5 @@ {% set title = 'Tables' %} -{% from 'components/tables/macro.njk' import table %} +{% from 'nhsuk/components/tables/macro.njk' import table %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/tabs/index.njk b/packages/nhsuk-frontend-review/src/components/tabs/index.njk similarity index 97% rename from app/components/tabs/index.njk rename to packages/nhsuk-frontend-review/src/components/tabs/index.njk index f56701a72..f9e956158 100644 --- a/app/components/tabs/index.njk +++ b/packages/nhsuk-frontend-review/src/components/tabs/index.njk @@ -1,6 +1,6 @@ {% set title = 'Tabs' %} -{% from "components/tabs/macro.njk" import tabs %} +{% from "nhsuk/components/tabs/macro.njk" import tabs %} {% extends 'example.njk' %} diff --git a/app/components/tabs/tabs-with-anchor-in-panel.njk b/packages/nhsuk-frontend-review/src/components/tabs/tabs-with-anchor-in-panel.njk similarity index 93% rename from app/components/tabs/tabs-with-anchor-in-panel.njk rename to packages/nhsuk-frontend-review/src/components/tabs/tabs-with-anchor-in-panel.njk index 78ba483eb..67a8d8fc2 100644 --- a/app/components/tabs/tabs-with-anchor-in-panel.njk +++ b/packages/nhsuk-frontend-review/src/components/tabs/tabs-with-anchor-in-panel.njk @@ -1,7 +1,7 @@ {% set title = 'Tabs' %} -{% from "components/tabs/macro.njk" import tabs %} -{% from "components/tables/macro.njk" import table %} +{% from "nhsuk/components/tabs/macro.njk" import tabs %} +{% from "nhsuk/components/tables/macro.njk" import table %} {% extends 'example.njk' %} diff --git a/app/components/tag/index.njk b/packages/nhsuk-frontend-review/src/components/tag/index.njk similarity index 98% rename from app/components/tag/index.njk rename to packages/nhsuk-frontend-review/src/components/tag/index.njk index 19d21098a..0d599168c 100644 --- a/app/components/tag/index.njk +++ b/packages/nhsuk-frontend-review/src/components/tag/index.njk @@ -1,5 +1,5 @@ {% set title = 'Tag' %} -{% from 'components/tag/macro.njk' import tag %} +{% from 'nhsuk/components/tag/macro.njk' import tag %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/task-list/index.njk b/packages/nhsuk-frontend-review/src/components/task-list/index.njk similarity index 96% rename from app/components/task-list/index.njk rename to packages/nhsuk-frontend-review/src/components/task-list/index.njk index 93f204e33..13c9cc57d 100644 --- a/app/components/task-list/index.njk +++ b/packages/nhsuk-frontend-review/src/components/task-list/index.njk @@ -1,5 +1,5 @@ {% set title = 'Task list' %} -{% from 'components/task-list/macro.njk' import taskList %} +{% from 'nhsuk/components/task-list/macro.njk' import taskList %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/task-list/multiple-sections.njk b/packages/nhsuk-frontend-review/src/components/task-list/multiple-sections.njk similarity index 95% rename from app/components/task-list/multiple-sections.njk rename to packages/nhsuk-frontend-review/src/components/task-list/multiple-sections.njk index b344329ba..c9c4d54c4 100644 --- a/app/components/task-list/multiple-sections.njk +++ b/packages/nhsuk-frontend-review/src/components/task-list/multiple-sections.njk @@ -1,6 +1,6 @@ {% set title = 'Task list' %} -{% from 'components/task-list/macro.njk' import taskList %} -{% from 'components/button/macro.njk' import button %} +{% from 'nhsuk/components/task-list/macro.njk' import taskList %} +{% from 'nhsuk/components/button/macro.njk' import button %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/textarea/autocomplete.njk b/packages/nhsuk-frontend-review/src/components/textarea/autocomplete.njk similarity index 87% rename from app/components/textarea/autocomplete.njk rename to packages/nhsuk-frontend-review/src/components/textarea/autocomplete.njk index 6918ccfd3..b85af24df 100644 --- a/app/components/textarea/autocomplete.njk +++ b/packages/nhsuk-frontend-review/src/components/textarea/autocomplete.njk @@ -1,5 +1,5 @@ {% set title = 'Textarea with autocomplete attribute' %} -{% from 'components/textarea/macro.njk' import textarea %} +{% from 'nhsuk/components/textarea/macro.njk' import textarea %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/textarea/error.njk b/packages/nhsuk-frontend-review/src/components/textarea/error.njk similarity index 88% rename from app/components/textarea/error.njk rename to packages/nhsuk-frontend-review/src/components/textarea/error.njk index cbb890e2b..d9fb6a6c4 100644 --- a/app/components/textarea/error.njk +++ b/packages/nhsuk-frontend-review/src/components/textarea/error.njk @@ -1,5 +1,5 @@ {% set title = 'Textarea with error message' %} -{% from 'components/textarea/macro.njk' import textarea %} +{% from 'nhsuk/components/textarea/macro.njk' import textarea %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/textarea/index.njk b/packages/nhsuk-frontend-review/src/components/textarea/index.njk similarity index 88% rename from app/components/textarea/index.njk rename to packages/nhsuk-frontend-review/src/components/textarea/index.njk index d9197a55e..398f9c34f 100644 --- a/app/components/textarea/index.njk +++ b/packages/nhsuk-frontend-review/src/components/textarea/index.njk @@ -1,5 +1,5 @@ {% set title = 'Textarea' %} -{% from 'components/textarea/macro.njk' import textarea %} +{% from 'nhsuk/components/textarea/macro.njk' import textarea %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/typography.njk b/packages/nhsuk-frontend-review/src/components/typography.njk similarity index 96% rename from app/components/typography.njk rename to packages/nhsuk-frontend-review/src/components/typography.njk index 3459e8964..fdc9dfcda 100644 --- a/app/components/typography.njk +++ b/packages/nhsuk-frontend-review/src/components/typography.njk @@ -1,14 +1,14 @@ {% set title = 'Components - New typography and spacing' %} -{% from 'components/action-link/macro.njk' import actionLink %} -{% from 'components/breadcrumb/macro.njk' import breadcrumb %} -{% from 'components/card/macro.njk' import card %} -{% from 'components/do-dont-list/macro.njk' import list %} -{% from 'components/images/macro.njk' import image %} -{% from 'components/inset-text/macro.njk' import insetText %} -{% from 'components/pagination/macro.njk' import pagination %} -{% from 'components/details/macro.njk' import details %} -{% from 'components/tables/macro.njk' import table %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/action-link/macro.njk' import actionLink %} +{% from 'nhsuk/components/breadcrumb/macro.njk' import breadcrumb %} +{% from 'nhsuk/components/card/macro.njk' import card %} +{% from 'nhsuk/components/do-dont-list/macro.njk' import list %} +{% from 'nhsuk/components/images/macro.njk' import image %} +{% from 'nhsuk/components/inset-text/macro.njk' import insetText %} +{% from 'nhsuk/components/pagination/macro.njk' import pagination %} +{% from 'nhsuk/components/details/macro.njk' import details %} +{% from 'nhsuk/components/tables/macro.njk' import table %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/warning-callout/custom-heading.njk b/packages/nhsuk-frontend-review/src/components/warning-callout/custom-heading.njk similarity index 84% rename from app/components/warning-callout/custom-heading.njk rename to packages/nhsuk-frontend-review/src/components/warning-callout/custom-heading.njk index 59647e4ba..177be11b0 100644 --- a/app/components/warning-callout/custom-heading.njk +++ b/packages/nhsuk-frontend-review/src/components/warning-callout/custom-heading.njk @@ -1,5 +1,5 @@ {% set title = 'Warning callout' %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} {% extends 'example.njk' %} {% block content %} diff --git a/app/components/warning-callout/index.njk b/packages/nhsuk-frontend-review/src/components/warning-callout/index.njk similarity index 84% rename from app/components/warning-callout/index.njk rename to packages/nhsuk-frontend-review/src/components/warning-callout/index.njk index 03e5aeeff..37381194a 100644 --- a/app/components/warning-callout/index.njk +++ b/packages/nhsuk-frontend-review/src/components/warning-callout/index.njk @@ -1,5 +1,5 @@ {% set title = 'Warning callout' %} -{% from 'components/warning-callout/macro.njk' import warningCallout %} +{% from 'nhsuk/components/warning-callout/macro.njk' import warningCallout %} {% extends 'example.njk' %} {% block content %} diff --git a/app/index.njk b/packages/nhsuk-frontend-review/src/index.njk similarity index 100% rename from app/index.njk rename to packages/nhsuk-frontend-review/src/index.njk diff --git a/packages/nhsuk-frontend/README.md b/packages/nhsuk-frontend/README.md new file mode 100644 index 000000000..0992e6005 --- /dev/null +++ b/packages/nhsuk-frontend/README.md @@ -0,0 +1,33 @@ +# NHS.UK frontend + +NHS.UK frontend contains the code you need to start building user interfaces for NHS websites and services. + +## Guidance + +Visit the [NHS digital service manual](https://service-manual.nhs.uk/) for examples of components and guidance for when to use them. If we haven’t yet published guidance on the component you want, please [email us](mailto:service-manual@nhs.net) or get in touch on the [NHS digital service manual Slack workspace](https://join.slack.com/t/nhs-service-manual/shared_invite/enQtNTIyOTEyNjU3NDkyLTk4NDQ3YzkwYzk1Njk5YjAxYTI5YTVkZmUxMGQ0ZjA3NjMyM2ZkNjBlMWMxODVjZjYzNzg1ZmU4MWY1NmE2YzE). + +## How to install NHS.UK frontend + +### 1. Install with package managers + +We recommend that you [install NHS.UK frontend using node package manager (npm)](/docs/installation/installing-with-npm.md). + +### 2. Install by using compiled files + +You can also [install NHS.UK frontend using our compiled files](/docs/installation/installing-compiled.md), if you are not currently using a package manager. + +## Browsers and assistive technology + +Visit our [support for browsers and assistive technology](/docs/contributing/browser-support.md), for details on operating systems and software. + +## Contribute + +Read our [contributing guidelines](/CONTRIBUTING.md) to contribute to NHS.UK frontend. + +## Get in touch + +NHS.UK frontend is maintained by NHS England. [Email us](mailto:service-manual@nhs.net), open a [GitHub issue](https://github.com/nhsuk/nhsuk-frontend/issues/new) or get in touch on the [NHS digital service manual Slack workspace](https://join.slack.com/t/nhs-service-manual/shared_invite/enQtNTIyOTEyNjU3NDkyLTk4NDQ3YzkwYzk1Njk5YjAxYTI5YTVkZmUxMGQ0ZjA3NjMyM2ZkNjBlMWMxODVjZjYzNzg1ZmU4MWY1NmE2YzE). + +## Licence + +The codebase is released under the MIT Licence, unless stated otherwise. This covers both the codebase and any sample code in the documentation. The documentation is © NHS England and available under the terms of the Open Government 3.0 licence. diff --git a/packages/nhsuk-frontend/package.json b/packages/nhsuk-frontend/package.json new file mode 100644 index 000000000..b4e0b2639 --- /dev/null +++ b/packages/nhsuk-frontend/package.json @@ -0,0 +1,43 @@ +{ + "name": "nhsuk-frontend", + "version": "9.4.1", + "description": "NHS.UK frontend contains the code you need to start building user interfaces for NHS websites and services.", + "homepage": "https://nhsuk.github.io/nhsuk-frontend/", + "bugs": { + "url": "https://github.com/nhsuk/nhsuk-frontend/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nhsuk/nhsuk-frontend.git" + }, + "license": "MIT", + "exports": { + ".": { + "sass": "./src/nhsuk/index.scss", + "default": "./src/nhsuk/index.js" + }, + "./*": "./*", + "./packages/*": { + "sass": "./src/nhsuk/*.scss", + "default": "./src/nhsuk/*.js" + }, + "./packages/*.js": "./src/nhsuk/*.js", + "./packages/*.scss": "./src/nhsuk/*.scss", + "./package.json": "./package.json" + }, + "main": "src/nhsuk/index.js", + "sass": "src/nhsuk/index.scss", + "sideEffects": false, + "files": [ + "src", + "!**/*.test.*" + ], + "devDependencies": { + "@testing-library/dom": "^10.4.0", + "@testing-library/user-event": "^14.6.1", + "puppeteer": "^24.6.0" + }, + "engines": { + "node": "^20.9.0 || ^22.11.0" + } +} diff --git a/packages/.eslintrc.js b/packages/nhsuk-frontend/src/nhsuk/.eslintrc.js similarity index 100% rename from packages/.eslintrc.js rename to packages/nhsuk-frontend/src/nhsuk/.eslintrc.js diff --git a/packages/assets/favicons/apple-touch-icon-180x180.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/apple-touch-icon-180x180.png similarity index 100% rename from packages/assets/favicons/apple-touch-icon-180x180.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/apple-touch-icon-180x180.png diff --git a/packages/assets/favicons/apple-touch-icon.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/apple-touch-icon.png similarity index 100% rename from packages/assets/favicons/apple-touch-icon.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/apple-touch-icon.png diff --git a/packages/assets/favicons/favicon-192x192.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon-192x192.png similarity index 100% rename from packages/assets/favicons/favicon-192x192.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon-192x192.png diff --git a/packages/assets/favicons/favicon.ico b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.ico similarity index 100% rename from packages/assets/favicons/favicon.ico rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.ico diff --git a/packages/assets/favicons/favicon.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.png similarity index 100% rename from packages/assets/favicons/favicon.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.png diff --git a/packages/assets/favicons/favicon.svg b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.svg similarity index 100% rename from packages/assets/favicons/favicon.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/favicon.svg diff --git a/packages/assets/favicons/largetile-310x310.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/largetile-310x310.png similarity index 100% rename from packages/assets/favicons/largetile-310x310.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/largetile-310x310.png diff --git a/packages/assets/favicons/mediumtile-144x144.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/mediumtile-144x144.png similarity index 100% rename from packages/assets/favicons/mediumtile-144x144.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/mediumtile-144x144.png diff --git a/packages/assets/favicons/mediumtile-150x150.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/mediumtile-150x150.png similarity index 100% rename from packages/assets/favicons/mediumtile-150x150.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/mediumtile-150x150.png diff --git a/packages/assets/favicons/smalltile-70x70.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/smalltile-70x70.png similarity index 100% rename from packages/assets/favicons/smalltile-70x70.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/smalltile-70x70.png diff --git a/packages/assets/favicons/widetile-310x150.png b/packages/nhsuk-frontend/src/nhsuk/assets/favicons/widetile-310x150.png similarity index 100% rename from packages/assets/favicons/widetile-310x150.png rename to packages/nhsuk-frontend/src/nhsuk/assets/favicons/widetile-310x150.png diff --git a/packages/assets/icons/icon-arrow-left.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-left.svg similarity index 100% rename from packages/assets/icons/icon-arrow-left.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-left.svg diff --git a/packages/assets/icons/icon-arrow-right-circle.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-right-circle.svg similarity index 100% rename from packages/assets/icons/icon-arrow-right-circle.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-right-circle.svg diff --git a/packages/assets/icons/icon-arrow-right.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-right.svg similarity index 100% rename from packages/assets/icons/icon-arrow-right.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-arrow-right.svg diff --git a/packages/assets/icons/icon-chevron-left.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-chevron-left.svg similarity index 100% rename from packages/assets/icons/icon-chevron-left.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-chevron-left.svg diff --git a/packages/assets/icons/icon-chevron-right.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-chevron-right.svg similarity index 100% rename from packages/assets/icons/icon-chevron-right.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-chevron-right.svg diff --git a/packages/assets/icons/icon-close.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-close.svg similarity index 100% rename from packages/assets/icons/icon-close.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-close.svg diff --git a/packages/assets/icons/icon-cross.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-cross.svg similarity index 100% rename from packages/assets/icons/icon-cross.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-cross.svg diff --git a/packages/assets/icons/icon-emdash-small.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-emdash-small.svg similarity index 100% rename from packages/assets/icons/icon-emdash-small.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-emdash-small.svg diff --git a/packages/assets/icons/icon-emdash.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-emdash.svg similarity index 100% rename from packages/assets/icons/icon-emdash.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-emdash.svg diff --git a/packages/assets/icons/icon-minus.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-minus.svg similarity index 100% rename from packages/assets/icons/icon-minus.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-minus.svg diff --git a/packages/assets/icons/icon-plus.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-plus.svg similarity index 100% rename from packages/assets/icons/icon-plus.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-plus.svg diff --git a/packages/assets/icons/icon-search.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-search.svg similarity index 100% rename from packages/assets/icons/icon-search.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-search.svg diff --git a/packages/assets/icons/icon-tick.svg b/packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-tick.svg similarity index 100% rename from packages/assets/icons/icon-tick.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/icons/icon-tick.svg diff --git a/packages/assets/logos/logo-nhs.svg b/packages/nhsuk-frontend/src/nhsuk/assets/logos/logo-nhs.svg similarity index 100% rename from packages/assets/logos/logo-nhs.svg rename to packages/nhsuk-frontend/src/nhsuk/assets/logos/logo-nhs.svg diff --git a/packages/assets/logos/nhs-logo.png b/packages/nhsuk-frontend/src/nhsuk/assets/logos/nhs-logo.png similarity index 100% rename from packages/assets/logos/nhs-logo.png rename to packages/nhsuk-frontend/src/nhsuk/assets/logos/nhs-logo.png diff --git a/packages/assets/logos/open-graph.png b/packages/nhsuk-frontend/src/nhsuk/assets/logos/open-graph.png similarity index 100% rename from packages/assets/logos/open-graph.png rename to packages/nhsuk-frontend/src/nhsuk/assets/logos/open-graph.png diff --git a/packages/common.js b/packages/nhsuk-frontend/src/nhsuk/common.js similarity index 100% rename from packages/common.js rename to packages/nhsuk-frontend/src/nhsuk/common.js diff --git a/packages/common.jsdom.test.mjs b/packages/nhsuk-frontend/src/nhsuk/common.jsdom.test.mjs similarity index 100% rename from packages/common.jsdom.test.mjs rename to packages/nhsuk-frontend/src/nhsuk/common.jsdom.test.mjs diff --git a/packages/components/action-link/README.md b/packages/nhsuk-frontend/src/nhsuk/components/action-link/README.md similarity index 97% rename from packages/components/action-link/README.md rename to packages/nhsuk-frontend/src/nhsuk/components/action-link/README.md index 80abe5ff3..eb934d5c5 100644 --- a/packages/components/action-link/README.md +++ b/packages/nhsuk-frontend/src/nhsuk/components/action-link/README.md @@ -25,7 +25,7 @@ Find out more about the action link component and when to use it in the [NHS dig ### Nunjucks macro ```njk -{% from 'components/action-link/macro.njk' import actionLink %} +{% from 'nhsuk/components/action-link/macro.njk' import actionLink %} {{ actionLink({ "text": "Find a minor injuries unit", diff --git a/packages/components/action-link/_action-link.scss b/packages/nhsuk-frontend/src/nhsuk/components/action-link/_action-link.scss similarity index 100% rename from packages/components/action-link/_action-link.scss rename to packages/nhsuk-frontend/src/nhsuk/components/action-link/_action-link.scss diff --git a/packages/components/action-link/macro-options.json b/packages/nhsuk-frontend/src/nhsuk/components/action-link/macro-options.json similarity index 100% rename from packages/components/action-link/macro-options.json rename to packages/nhsuk-frontend/src/nhsuk/components/action-link/macro-options.json diff --git a/packages/components/action-link/macro.njk b/packages/nhsuk-frontend/src/nhsuk/components/action-link/macro.njk similarity index 100% rename from packages/components/action-link/macro.njk rename to packages/nhsuk-frontend/src/nhsuk/components/action-link/macro.njk diff --git a/packages/components/action-link/template.njk b/packages/nhsuk-frontend/src/nhsuk/components/action-link/template.njk similarity index 92% rename from packages/components/action-link/template.njk rename to packages/nhsuk-frontend/src/nhsuk/components/action-link/template.njk index 49cef6edb..33c4c1d92 100644 --- a/packages/components/action-link/template.njk +++ b/packages/nhsuk-frontend/src/nhsuk/components/action-link/template.njk @@ -1,4 +1,4 @@ -{% from "../../macros/attributes.njk" import nhsukAttributes %} +{% from "nhsuk/macros/attributes.njk" import nhsukAttributes %}