diff --git a/tests/linters/.eslintrc.js b/.eslintrc.js similarity index 100% rename from tests/linters/.eslintrc.js rename to .eslintrc.js diff --git a/tests/linters/.htmlhintrc b/.htmlhintrc similarity index 100% rename from tests/linters/.htmlhintrc rename to .htmlhintrc diff --git a/.prettierrc.js b/.prettierrc.js index 20a955687..2bc62970f 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -13,6 +13,7 @@ module.exports = { { files: '*.scss', options: { + printWidth: 120, singleQuote: false } } diff --git a/tests/linters/.stylelintignore b/.stylelintignore similarity index 100% rename from tests/linters/.stylelintignore rename to .stylelintignore diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 000000000..d5629a62d --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,87 @@ +module.exports = { + extends: 'stylelint-config-gds/scss', + ignoreFiles: [ + '**/dist/**', + '**/vendor/**', + + // Ignore CSS-in-JS (including dotfiles) + '**/?(.)*.{cjs,js,mjs}' + ], + overrides: [ + { + customSyntax: 'postcss-markdown', + files: ['**/*.md'] + }, + { + customSyntax: 'postcss-markdown', + files: ['**/coding-standards.md', '**/README.md'], + rules: { + // Allow markdown `*.md` CSS bad examples + 'block-no-empty': null, + 'color-no-hex': null, + 'selector-max-id': null, + 'selector-no-qualifying-type': null, + + // Allow markdown `*.md` Sass bad examples + 'scss/dollar-variable-pattern': null + } + }, + { + customSyntax: 'postcss-scss', + files: ['**/*.scss'], + rules: { + // Disallow hex colours + // https://stylelint.io/user-guide/rules/color-no-hex/ + 'color-no-hex': true, + + // Properties and values that are disallowed + // https://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/ + 'declaration-property-value-disallowed-list': { + transition: ['all'], + '/^border/': ['none'] + }, + + // Disallow @mixin before @extends + // /~https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md#extended-at-rule-objects + 'order/order': [ + { + type: 'at-rule', + name: 'extend' + }, + { + type: 'at-rule', + name: 'mixin' + } + ], + + // Allow underscores (but not numbers) in mixin naming pattern + // /~https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-mixin-pattern + 'scss/at-mixin-pattern': [ + /^([a-z-_])*$/, + { + message: 'Mixin names may only contain [a-z-_] characters' + } + ], + + // Allow underscores in $variable naming pattern + // /~https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/dollar-variable-pattern + 'scss/dollar-variable-pattern': [ + /^([a-z0-9-_])*$/, + { + message: 'Variable names may only contain [a-z0-9-_] characters' + } + ], + + // Allow underscores (but not numbers) in %placeholder naming pattern + // /~https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/percent-placeholder-pattern + 'scss/percent-placeholder-pattern': [ + /^([a-z-_])*$/, + { + message: 'Placeholders may only contain [a-z-_] characters' + } + ] + } + } + ], + plugins: ['stylelint-order'] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index dc246d2f4..5aedcf18d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ :new: **New features** - Adds `text` param for Inset text ([PR 1113](/~https://github.com/nhsuk/nhsuk-frontend/pull/1113)) +- Make it easier to set checkbox and radio checked items ([PR 1105](/~https://github.com/nhsuk/nhsuk-frontend/pull/1105)) + +## 9.2.0 - 12 February 2025 :wrench: **Fixes** @@ -12,6 +15,7 @@ - Fix appearance of disabled warning buttons ([Issue 1034]([/~https://github.com/nhsuk/nhsuk-service-manual-community-backlog/issues/1034])) - Fix reverse button text colour ([PR 1080]([/~https://github.com/nhsuk/nhsuk-frontend/pull/1080])) - Fix details component requiring html param in uppercase ([PR 1090](/~https://github.com/nhsuk/nhsuk-frontend/pull/1090), [Issue 1089](/~https://github.com/nhsuk/nhsuk-frontend/issues/1089)) +- Replace image component example images to match assets used on service manual ([Issue 1091](/~https://github.com/nhsuk/nhsuk-frontend/issues/1091)) ## 9.1.0 - 4 November 2024 diff --git a/app/components/checkboxes/index.njk b/app/components/checkboxes/index.njk index 28149af8d..7f27eacac 100644 --- a/app/components/checkboxes/index.njk +++ b/app/components/checkboxes/index.njk @@ -20,6 +20,7 @@ "classes": "nhsuk-fieldset__legend--m" } }, + "values": ["british"], "hint": { "text": "If you have more than 1 nationality, select all options that are relevant to you." }, diff --git a/app/components/images/index.njk b/app/components/images/index.njk index 5527ebb14..912b552b7 100644 --- a/app/components/images/index.njk +++ b/app/components/images/index.njk @@ -11,16 +11,16 @@
{{ image({ - "src": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-320x213.jpg", - "sizes": "(min-width: 1020px) 320px, (min-width: 768px) 50vw, 100vw", - "srcset": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-640x427.jpg 640w, https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-767x511.jpg 767w", - "alt": "Picture of allergic conjunctivitis", - "caption": "Itchy, red, watering eyes" + src: "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg", + sizes: "(max-width: 768px) 100vw, 66vw", + srcset: "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg 600w, https://service-manual.nhs.uk/assets/image-example-stretch-marks-1000w.jpg 1000w", + alt: "Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin.", + caption: "Stretch marks can be pink, red, brown, black, silver or purple. They usually start off darker and fade over time." }) }} {{ image({ - "src": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-320x213.jpg", - "alt": "Picture of allergic conjunctivitis" + "src": "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg", + "alt": "Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin." }) }}
diff --git a/app/components/radios/index.njk b/app/components/radios/index.njk index 74c6c1a7b..8acf3c18c 100644 --- a/app/components/radios/index.njk +++ b/app/components/radios/index.njk @@ -22,6 +22,7 @@ "hint": { "text": "This includes changing your last name or spelling your name differently." }, + "value": "no", "items": [ { "value": "yes", @@ -29,8 +30,7 @@ }, { "value": "no", - "text": "No", - "checked": true + "text": "No" } ] }) }} diff --git a/docs/contributing/coding-standards.md b/docs/contributing/coding-standards.md index 918d1f462..17abe1037 100755 --- a/docs/contributing/coding-standards.md +++ b/docs/contributing/coding-standards.md @@ -61,9 +61,9 @@ The naming convention follows this pattern: .block__element {} .block--modifier {} -.nhsuk-card // Block - the root of a component -.nhsuk-card__heading // Element - a part of the block -.nhsuk-card--clickable // Modifier - a variant of the block +.nhsuk-card {} // Block - the root of a component +.nhsuk-card__heading {} // Element - a part of the block +.nhsuk-card--clickable {} // Modifier - a variant of the block ``` It uses double hyphens (`--`) and underscores (`__`) so that the block, element @@ -72,9 +72,9 @@ or modifiers themselves can be hyphen delimited without causing ambiguity. For example: ```scss -.nhsuk-a-z-nav -.nhsuk-a-z-nav__link -.nhsuk-a-z-nav__link--disabled +.nhsuk-a-z-nav {} +.nhsuk-a-z-nav__link {} +.nhsuk-a-z-nav__link--disabled {} ``` #### BEM further reading: @@ -97,11 +97,11 @@ Bad: ```scss .nhsuk-contents-list { - ... + // ... &__item { - ... - &:before { - ... + // ... + &::before { + // ... } } } @@ -111,13 +111,13 @@ Good: ```scss .nhsuk-contents-list { - ... + // ... } .nhsuk-contents-list__item { - ... - &:before { - ... + // ... + &::before { + // ... } } ``` @@ -134,9 +134,9 @@ 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/packages/core/all"; +// ... } ``` @@ -144,11 +144,11 @@ Bad: ```scss .nhsuk-checkboxes__conditional { - ... + // ... .js-enabled &--hidden { - ... + // ... } - ... + // ... } ``` @@ -156,11 +156,11 @@ Good: ```scss .nhsuk-checkboxes__conditional { - ... + // ... } .js-enabled .nhsuk-checkboxes__conditional--hidden { - ... + // ... } ``` @@ -200,21 +200,19 @@ the top block comment and then a reference to the number should go next to the l Example: ```scss -/* ========================================================================== - #TITLE - ========================================================================== */ - -/** - * Long-form comment. - * - * This spans multiple lines and is also constrained to no longer than 80 - * characters in width. - * - * 1. Provide line-comments like this. - */ - -.X-class { - color: red; /* [1] */ +//// +/// Title +//// + +/// Long-form comment +/// +/// This spans multiple lines and is also constrained to no longer than 80 +/// characters in width. +/// +/// 1. Provide line-comments like this. + +.nhsuk-example { + color: $color_nhsuk-red; // [1] } ``` diff --git a/docs/contributing/linting.md b/docs/contributing/linting.md index 273f0c488..a14460cdf 100644 --- a/docs/contributing/linting.md +++ b/docs/contributing/linting.md @@ -187,15 +187,15 @@ margin: 1px 2px 3px; Bad: ``` -@import '_foo.scss'; -@import '_bar/foo.scss'; +@import "_foo.scss"; +@import "_bar/foo.scss"; ``` Good: ``` -@import 'foo'; -@import 'bar/foo'; +@import "foo"; +@import "bar/foo"; ``` ### Properties should be formatted with a single space separating the colon from the property's value @@ -204,7 +204,7 @@ Bad: ``` .foo { - content:'bar'; + content:"bar"; } ``` @@ -212,7 +212,7 @@ Good: ``` .foo { - content: 'bar'; + content: "bar"; } ``` diff --git a/docs/installation/installing-with-npm.md b/docs/installation/installing-with-npm.md index 5fabb82a0..81dfbc4bd 100644 --- a/docs/installation/installing-with-npm.md +++ b/docs/installation/installing-with-npm.md @@ -38,18 +38,18 @@ 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'; +```scss +@import "node_modules/nhsuk-frontend/packages/nhsuk"; ``` Alternatively you can import each of the individual components separately, meaning you can import just the components that you are using. -```SCSS +```scss // Core (required) -@import 'node_modules/nhsuk-frontend/packages/core/all'; +@import "node_modules/nhsuk-frontend/packages/core/all"; // Individual component (optional) -@import 'node_modules/nhsuk-frontend/packages/components/action-link/action-link'; +@import "node_modules/nhsuk-frontend/packages/components/action-link/action-link"; ``` ## Importing JavaScript diff --git a/package-lock.json b/package-lock.json index eb425c52c..b96900de1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nhsuk-frontend", - "version": "9.1.0", + "version": "9.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nhsuk-frontend", - "version": "9.1.0", + "version": "9.2.0", "license": "MIT", "devDependencies": { "@babel/core": "^7.24.7", @@ -33,14 +33,15 @@ "jest-environment-jsdom": "^29.7.0", "jest-environment-puppeteer": "^10.0.1", "nunjucks": "^3.2.4", + "postcss-markdown": "^1.3.0", + "postcss-scss": "^4.0.9", "prettier": "3.3.3", "puppeteer": "^22.12.1", "sass": "^1.77.6", "start-server-and-test": "^2.0.4", - "stylelint": "^13.13.1", - "stylelint-config-prettier": "^9.0.5", - "stylelint-order": "^4.1.0", - "stylelint-scss": "^3.21.0", + "stylelint": "^16.14.1", + "stylelint-config-gds": "^2.0.0", + "stylelint-order": "^6.0.4", "wait-on": "^7.2.0", "webpack-stream": "^7.0.0" }, @@ -1820,6 +1821,107 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz", + "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/@dual-bundle/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "/~https://github.com/sponsors/wooorm" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2743,6 +2845,41 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@keyv/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-+E/LyaAeuABniD/RvUezWVXKpeuvwLEA9//nE9952zBaOdBd2mQ3pPoM8cUe2X6IcMByfuSLzmYqnYshG60+HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3" + } + }, + "node_modules/@keyv/serialize/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/@mirzazeyrek/node-resemble-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@mirzazeyrek/node-resemble-js/-/node-resemble-js-1.2.1.tgz", @@ -2946,35 +3083,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@stylelint/postcss-css-in-js": { - "version": "0.37.3", - "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.3.tgz", - "integrity": "sha512-scLk3cSH1H9KggSniseb2KNAU5D9FWc3H7BxCSAIdtU9OWIyw0zkEZ9qEKHryRM+SExYXRKNb7tOOVNAsQ3iwg==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "dependencies": { - "@babel/core": "^7.17.9" - }, - "peerDependencies": { - "postcss": ">=7.0.0", - "postcss-syntax": ">=0.36.2" - } - }, - "node_modules/@stylelint/postcss-markdown": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.2.tgz", - "integrity": "sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==", - "deprecated": "Use the original unforked package instead: postcss-markdown", - "dev": true, - "dependencies": { - "remark": "^13.0.0", - "unist-util-find-all-after": "^3.0.2" - }, - "peerDependencies": { - "postcss": ">=7.0.0", - "postcss-syntax": ">=0.36.2" - } - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -3112,34 +3220,17 @@ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/unist": "^2" } }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "node_modules/@types/node": { "version": "18.14.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.4.tgz", "integrity": "sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==", "dev": true }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -3153,10 +3244,11 @@ "dev": true }, "node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", - "dev": true + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/yargs": { "version": "17.0.22", @@ -3826,15 +3918,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -3867,6 +3950,7 @@ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3909,34 +3993,6 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "node_modules/autoprefixer": { - "version": "9.8.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", - "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", - "dev": true, - "dependencies": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "picocolors": "^0.2.1", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - } - }, - "node_modules/autoprefixer/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -4320,16 +4376,6 @@ "node": ">=8" } }, - "node_modules/bail": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", - "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", - "dev": true, - "funding": { - "type": "github", - "url": "/~https://github.com/sponsors/wooorm" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4681,6 +4727,17 @@ "node": ">= 0.8" } }, + "node_modules/cacheable": { + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.8.8.tgz", + "integrity": "sha512-OE1/jlarWxROUIpd0qGBSKFLkNsotY8pt4GeiVErUYh/NUeTNrT+SBksUgllQv4m6a0W/VZsLuiHb88maavqEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.7.0", + "keyv": "^5.2.3" + } + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -4718,23 +4775,6 @@ "node": ">=6" } }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001629", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001629.tgz", @@ -4783,6 +4823,7 @@ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -4793,6 +4834,7 @@ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -4803,6 +4845,7 @@ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -4954,18 +4997,6 @@ "node": ">= 0.10" } }, - "node_modules/clone-regexp": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", - "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", - "dev": true, - "dependencies": { - "is-regexp": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", @@ -5023,6 +5054,13 @@ "color-support": "bin.js" } }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true, + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -5294,19 +5332,30 @@ "dev": true }, "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "/~https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/create-jest": { @@ -5415,11 +5464,36 @@ "node": ">= 8" } }, + "node_modules/css-functions-list": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz", + "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12 || >=16" + } + }, + "node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -5580,40 +5654,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", - "dev": true, - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", @@ -5808,73 +5848,17 @@ "node": ">=6.0.0" } }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "deprecated": "Use your platform's native DOMException instead", "dev": true, "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "/~https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "/~https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", - "dev": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/duplexer": { @@ -5958,12 +5942,6 @@ "node": ">=10.13.0" } }, - "node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -6775,18 +6753,6 @@ "url": "/~https://github.com/sponsors/sindresorhus" } }, - "node_modules/execall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", - "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", - "dev": true, - "dependencies": { - "clone-regexp": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -7086,16 +7052,17 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -7125,6 +7092,23 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -7143,6 +7127,20 @@ "reusify": "^1.0.4" } }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "/~https://github.com/sponsors/wooorm" + } + }, "node_modules/faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -7586,10 +7584,11 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "dev": true, + "license": "ISC" }, "node_modules/follow-redirects": { "version": "1.15.6", @@ -7655,6 +7654,15 @@ "node": ">= 6" } }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -7817,18 +7825,6 @@ "node": ">=8.0.0" } }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -8067,21 +8063,6 @@ "node": ">= 0.10" } }, - "node_modules/gonzales-pe": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", - "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "gonzales": "bin/gonzales.js" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -8728,15 +8709,6 @@ "node": ">= 0.10" } }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -8842,35 +8814,12 @@ "node": ">=0.10.0" } }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/hookified": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.7.0.tgz", + "integrity": "sha512-XQdMjqC1AyeOzfs+17cnIk7Wdfu1hh2JtcyNfBf5u9jHrT3iZUlGHxLTntFBuk5lwkqJ6l3+daeQdHK5yByHVA==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "license": "MIT" }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", @@ -8891,10 +8840,11 @@ "dev": true }, "node_modules/html-tags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.2.0.tgz", - "integrity": "sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -9000,34 +8950,6 @@ "node": ">=8" } }, - "node_modules/htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "dependencies": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "node_modules/htmlparser2/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -9154,15 +9076,6 @@ "url": "/~https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -9291,6 +9204,7 @@ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -9301,6 +9215,7 @@ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", "dev": true, + "license": "MIT", "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" @@ -9372,29 +9287,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "/~https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -9454,6 +9346,7 @@ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -9503,6 +9396,7 @@ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "/~https://github.com/sponsors/wooorm" @@ -9562,15 +9456,6 @@ "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -9602,15 +9487,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/is-regexp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", - "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -9695,12 +9571,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, "node_modules/is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -9713,18 +9583,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-valid-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", @@ -11857,6 +11715,16 @@ "node": ">=8" } }, + "node_modules/keyv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.2.3.tgz", + "integrity": "sha512-AGKecUfzrowabUv0bH1RIR5Vf7w+l4S3xtQAypKaUpTdIR1EbrAcTxHCrpo9Q+IWeUlFE2palRtgIQcgm+PQJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.0.2" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -11867,10 +11735,11 @@ } }, "node_modules/known-css-properties": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz", - "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==", - "dev": true + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", + "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", + "dev": true, + "license": "MIT" }, "node_modules/last-run": { "version": "2.0.0", @@ -12016,138 +11885,43 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true + "dev": true, + "license": "MIT" }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" + "yallist": "^3.0.2" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "semver": "^6.0.0" }, "engines": { "node": ">=8" }, "funding": { - "url": "/~https://github.com/chalk/ansi-styles?sponsor=1" + "url": "/~https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "/~https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/longest-streak": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", - "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", - "dev": true, - "funding": { - "type": "github", - "url": "/~https://github.com/sponsors/wooorm" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/make-error-cause": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", - "integrity": "sha512-4TO2Y3HkBnis4c0dxhAgD/jprySYLACf7nwN6V0HAHDx59g12WlRpUmFy1bRHamjGUEEBrEvCq6SUpsEE2lhUg==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha512-4TO2Y3HkBnis4c0dxhAgD/jprySYLACf7nwN6V0HAHDx59g12WlRpUmFy1bRHamjGUEEBrEvCq6SUpsEE2lhUg==", "dev": true, "dependencies": { "make-error": "^1.2.0" @@ -12171,18 +11945,6 @@ "node": ">=0.10.0" } }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, "node_modules/map-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", @@ -12204,6 +11966,7 @@ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/mdast": "^3.0.0", "mdast-util-to-string": "^2.0.0", @@ -12216,18 +11979,14 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-to-markdown": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", - "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "node_modules/mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/unist": "^2.0.0", - "longest-streak": "^2.0.0", - "mdast-util-to-string": "^2.0.0", - "parse-entities": "^2.0.0", - "repeat-string": "^1.0.0", - "zwitch": "^1.0.0" + "micromark-extension-frontmatter": "^0.2.0" }, "funding": { "type": "opencollective", @@ -12239,11 +11998,19 @@ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", "dev": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, + "node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -12267,38 +12034,13 @@ } }, "node_modules/meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", - "dev": true, - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/meow/node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "/~https://github.com/sponsors/sindresorhus" @@ -12352,11 +12094,26 @@ "url": "https://opencollective.com/unified" } ], + "license": "MIT", "dependencies": { "debug": "^4.0.0", "parse-entities": "^2.0.0" } }, + "node_modules/micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fault": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -12410,15 +12167,6 @@ "node": ">=6" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -12440,29 +12188,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minimist-options/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -12496,6 +12221,25 @@ "node": ">= 10.13.0" } }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "/~https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -12581,54 +12325,6 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -12638,21 +12334,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-selector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", - "integrity": "sha512-dxvWdI8gw6eAvk9BlPffgEoGfM7AdijoCwOEJge3e3ulT2XLgmU7KvvxprOaCu05Q1uGRHmOhHe1r6emZoKyFw==", - "dev": true - }, "node_modules/now-and-later": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-3.0.0.tgz", @@ -12677,12 +12358,6 @@ "node": ">=8" } }, - "node_modules/num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==", - "dev": true - }, "node_modules/nunjucks": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", @@ -13092,6 +12767,7 @@ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", "dev": true, + "license": "MIT", "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -13284,10 +12960,11 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -13544,45 +13221,66 @@ } }, "node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/ai" + } + ], + "license": "MIT", "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" + "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-html": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", - "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", + "node_modules/postcss-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-1.3.0.tgz", + "integrity": "sha512-8qT5DFZPgistBVvb4tK64wr+95nNM0Y73lNXIBkEMDiwpeYkhClyO0GOW+xeLagyoiea4jH3l7Dzj/XaO3Z/+Q==", "dev": true, + "license": "MIT", "dependencies": { - "htmlparser2": "^3.10.0" + "mdast-util-from-markdown": "^0.8.5", + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.2", + "postcss": "^8.5.0", + "postcss-safe-parser": "^6.0.0" }, - "peerDependencies": { - "postcss": ">=5.0.0", - "postcss-syntax": ">=0.36.0" + "engines": { + "node": "^12 || >=14" } }, - "node_modules/postcss-less": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", - "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", + "node_modules/postcss-markdown/node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", "dev": true, - "dependencies": { - "postcss": "^7.0.14" - }, + "license": "MIT", "engines": { - "node": ">=6.14.4" + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" } }, "node_modules/postcss-media-query-parser": { @@ -13592,50 +13290,72 @@ "dev": true }, "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", - "dev": true + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", + "dev": true, + "license": "MIT" }, "node_modules/postcss-safe-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", - "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", + "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", "dev": true, - "dependencies": { - "postcss": "^7.0.26" - }, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/ai" + } + ], + "license": "MIT", "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/postcss-sass": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.4.4.tgz", - "integrity": "sha512-BYxnVYx4mQooOhr+zer0qWbSPYnarAy8ZT7hAQtbxtgVf8gy+LSLT/hHGe35h14/pZDTw1DsxdbrwxBN++H+fg==", - "dev": true, - "dependencies": { - "gonzales-pe": "^4.3.0", - "postcss": "^7.0.21" + "node": ">=18.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" } }, "node_modules/postcss-scss": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", - "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", "dev": true, - "dependencies": { - "postcss": "^7.0.6" - }, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/ai" + } + ], + "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.29" } }, "node_modules/postcss-selector-parser": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", - "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -13645,37 +13365,19 @@ } }, "node_modules/postcss-sorting": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-5.0.1.tgz", - "integrity": "sha512-Y9fUFkIhfrm6i0Ta3n+89j56EFqaNRdUKqXyRp6kvTcSXnmgEjaVowCXH+JBe9+YKWqd4nc28r2sgwnzJalccA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14", - "postcss": "^7.0.17" - }, - "engines": { - "node": ">=8.7.0" - } - }, - "node_modules/postcss-syntax": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", - "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-8.0.2.tgz", + "integrity": "sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==", "dev": true, + "license": "MIT", "peerDependencies": { - "postcss": ">=5.0.0" + "postcss": "^8.4.20" } }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/postcss/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "node_modules/prelude-ls": { @@ -13961,32 +13663,6 @@ } } }, - "node_modules/puppeteer/node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "/~https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/pure-rand": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", @@ -14050,15 +13726,6 @@ "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", "dev": true }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -14139,135 +13806,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -14313,19 +13851,6 @@ "node": ">= 10.13.0" } }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -14415,62 +13940,12 @@ "jsesc": "bin/jsesc" } }, - "node_modules/remark": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", - "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", - "dev": true, - "dependencies": { - "remark-parse": "^9.0.0", - "remark-stringify": "^9.0.0", - "unified": "^9.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-parse": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", - "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", - "dev": true, - "dependencies": { - "mdast-util-from-markdown": "^0.8.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-stringify": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", - "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", - "dev": true, - "dependencies": { - "mdast-util-to-markdown": "^0.6.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", "dev": true }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/replace-ext": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", @@ -15194,6 +14669,7 @@ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -15211,6 +14687,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -15226,6 +14703,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -15237,7 +14715,8 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/smart-buffer": { "version": "4.2.0", @@ -15299,10 +14778,11 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -15357,47 +14837,6 @@ "url": "/~https://github.com/sponsors/isaacs" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, - "node_modules/specificity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", - "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", - "dev": true, - "bin": { - "specificity": "bin/specificity" - } - }, "node_modules/split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -15652,165 +15091,234 @@ "node": ">=6" } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "/~https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint": { + "version": "16.14.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.14.1.tgz", + "integrity": "sha512-oqCL7AC3786oTax35T/nuLL8p2C3k/8rHKAooezrPGRvUX0wX+qqs5kMWh5YYT4PHQgVDobHT4tw55WgpYG6Sw==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", "dependencies": { - "min-indent": "^1.0.0" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/media-query-list-parser": "^4.0.2", + "@csstools/selector-specificity": "^5.0.0", + "@dual-bundle/import-meta-resolve": "^4.1.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^9.0.0", + "css-functions-list": "^3.2.3", + "css-tree": "^3.1.0", + "debug": "^4.3.7", + "fast-glob": "^3.3.3", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^10.0.5", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^7.0.3", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.35.0", + "mathml-tag-names": "^2.1.3", + "meow": "^13.2.0", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.5.1", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-safe-parser": "^7.0.1", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "supports-hyperlinks": "^3.1.0", + "svg-tags": "^1.0.0", + "table": "^6.9.0", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "stylelint": "bin/stylelint.mjs" }, "engines": { - "node": ">=8" + "node": ">=18.12.0" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/stylelint-config-gds": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-gds/-/stylelint-config-gds-2.0.0.tgz", + "integrity": "sha512-uloFaElSPR25oJ+tTCO0oLmuiq6qpFMPUwKRz90dGA9eEE+37ljd718P3GFwk5dNNtC3hr3KtNqW8kQOJvgugg==", + "dev": true, + "license": "MIT", + "dependencies": { + "stylelint-config-standard": "^36.0.0", + "stylelint-config-standard-scss": "^13.0.0" + }, + "peerDependencies": { + "stylelint": "^16.0.2" + } + }, + "node_modules/stylelint-config-recommended": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", + "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": "^16.1.0" + } + }, + "node_modules/stylelint-config-recommended-scss": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", + "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", "dev": true, + "license": "MIT", + "dependencies": { + "postcss-scss": "^4.0.9", + "stylelint-config-recommended": "^14.0.1", + "stylelint-scss": "^6.4.0" + }, "engines": { - "node": ">=8" + "node": ">=18.12.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^16.6.1" }, - "funding": { - "url": "/~https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "postcss": { + "optional": true + } } }, - "node_modules/style-search": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", - "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==", - "dev": true - }, - "node_modules/stylelint": { - "version": "13.13.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz", - "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==", + "node_modules/stylelint-config-standard": { + "version": "36.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", + "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "/~https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", "dependencies": { - "@stylelint/postcss-css-in-js": "^0.37.2", - "@stylelint/postcss-markdown": "^0.36.2", - "autoprefixer": "^9.8.6", - "balanced-match": "^2.0.0", - "chalk": "^4.1.1", - "cosmiconfig": "^7.0.0", - "debug": "^4.3.1", - "execall": "^2.0.0", - "fast-glob": "^3.2.5", - "fastest-levenshtein": "^1.0.12", - "file-entry-cache": "^6.0.1", - "get-stdin": "^8.0.0", - "global-modules": "^2.0.0", - "globby": "^11.0.3", - "globjoin": "^0.1.4", - "html-tags": "^3.1.0", - "ignore": "^5.1.8", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "known-css-properties": "^0.21.0", - "lodash": "^4.17.21", - "log-symbols": "^4.1.0", - "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.4", - "normalize-selector": "^0.2.0", - "postcss": "^7.0.35", - "postcss-html": "^0.36.0", - "postcss-less": "^3.1.4", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^4.0.2", - "postcss-sass": "^0.4.4", - "postcss-scss": "^2.1.1", - "postcss-selector-parser": "^6.0.5", - "postcss-syntax": "^0.36.2", - "postcss-value-parser": "^4.1.0", - "resolve-from": "^5.0.0", - "slash": "^3.0.0", - "specificity": "^0.4.1", - "string-width": "^4.2.2", - "strip-ansi": "^6.0.0", - "style-search": "^0.1.0", - "sugarss": "^2.0.0", - "svg-tags": "^1.0.0", - "table": "^6.6.0", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^3.0.3" - }, - "bin": { - "stylelint": "bin/stylelint.js" + "stylelint-config-recommended": "^14.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">=18.12.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" + "peerDependencies": { + "stylelint": "^16.1.0" } }, - "node_modules/stylelint-config-prettier": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/stylelint-config-prettier/-/stylelint-config-prettier-9.0.5.tgz", - "integrity": "sha512-U44lELgLZhbAD/xy/vncZ2Pq8sh2TnpiPvo38Ifg9+zeioR+LAkHu0i6YORIOxFafZoVg0xqQwex6e6F25S5XA==", + "node_modules/stylelint-config-standard-scss": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-13.1.0.tgz", + "integrity": "sha512-Eo5w7/XvwGHWkeGLtdm2FZLOMYoZl1omP2/jgFCXyl2x5yNz7/8vv4Tj6slHvMSSUNTaGoam/GAZ0ZhukvalfA==", "dev": true, - "bin": { - "stylelint-config-prettier": "bin/check.js", - "stylelint-config-prettier-check": "bin/check.js" + "license": "MIT", + "dependencies": { + "stylelint-config-recommended-scss": "^14.0.0", + "stylelint-config-standard": "^36.0.0" }, "engines": { - "node": ">= 12" + "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": ">= 11.x < 15" + "postcss": "^8.3.3", + "stylelint": "^16.3.1" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } } }, "node_modules/stylelint-order": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-4.1.0.tgz", - "integrity": "sha512-sVTikaDvMqg2aJjh4r48jsdfmqLT+nqB1MOsaBnvM3OwLx4S+WXcsxsgk5w18h/OZoxZCxuyXMh61iBHcj9Qiw==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-6.0.4.tgz", + "integrity": "sha512-0UuKo4+s1hgQ/uAxlYU4h0o0HS4NiQDud0NAUNI0aa8FJdmYHA5ZZTFHiV5FpmE3071e9pZx5j0QpVJW5zOCUA==", "dev": true, + "license": "MIT", "dependencies": { - "lodash": "^4.17.15", - "postcss": "^7.0.31", - "postcss-sorting": "^5.0.1" + "postcss": "^8.4.32", + "postcss-sorting": "^8.0.2" }, "peerDependencies": { - "stylelint": "^10.0.1 || ^11.0.0 || ^12.0.0 || ^13.0.0" + "stylelint": "^14.0.0 || ^15.0.0 || ^16.0.1" } }, "node_modules/stylelint-scss": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.21.0.tgz", - "integrity": "sha512-CMI2wSHL+XVlNExpauy/+DbUcB/oUZLARDtMIXkpV/5yd8nthzylYd1cdHeDMJVBXeYHldsnebUX6MoV5zPW4A==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.11.0.tgz", + "integrity": "sha512-AvJ6LVzz2iXHxPlPTR9WVy73FC/vmohH54VySNlCKX1NIXNAeuzy/VbIkMJLMyw/xKYqkgY4kAgB+qy5BfCaCg==", "dev": true, + "license": "MIT", "dependencies": { - "lodash": "^4.17.15", + "css-tree": "^3.0.1", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.35.0", + "mdn-data": "^2.15.0", "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0" }, "engines": { - "node": ">=8" + "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" + "stylelint": "^16.0.2" } }, - "node_modules/stylelint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/stylelint-scss/node_modules/mdn-data": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.15.0.tgz", + "integrity": "sha512-KIrS0lFPOqA4DgeO16vI5fkAsy8p++WBlbXtB5P1EQs8ubBgguAInNd1DnrCeTRfGchY0kgThgDOOIPyOLH2dQ==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "/~https://github.com/chalk/ansi-styles?sponsor=1" - } + "license": "CC0-1.0" }, "node_modules/stylelint/node_modules/balanced-match": { "version": "2.0.0", @@ -15818,39 +15326,45 @@ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", "dev": true }, - "node_modules/stylelint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/stylelint/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "ms": "^2.1.3" }, "engines": { - "node": ">=10" + "node": ">=6.0" }, - "funding": { - "url": "/~https://github.com/chalk/chalk?sponsor=1" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/stylelint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.0.6.tgz", + "integrity": "sha512-0wvv16mVo9nN0Md3k7DMjgAPKG/TY4F/gYMBVb/wMThFRJvzrpaqBFqF6km9wf8QfYTN+mNg5aeaBLfy8k35uA==", "dev": true, + "license": "MIT", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "flat-cache": "^6.1.6" } }, - "node_modules/stylelint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/stylelint/node_modules/flat-cache": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.6.tgz", + "integrity": "sha512-F+CKgSwp0pzLx67u+Zy1aCueVWFAHWbXepvXlZ+bWVTaASbm5SyCnSJ80Fp1ePEmS57wU+Bf6cx6525qtMZ4lQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cacheable": "^1.8.8", + "flatted": "^3.3.2", + "hookified": "^1.7.0" + } }, "node_modules/stylelint/node_modules/global-modules": { "version": "2.0.0", @@ -15878,13 +15392,14 @@ "node": ">=6" } }, - "node_modules/stylelint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/stylelint/node_modules/ignore": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", + "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 4" } }, "node_modules/stylelint/node_modules/kind-of": { @@ -15896,6 +15411,13 @@ "node": ">=0.10.0" } }, + "node_modules/stylelint/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/stylelint/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -15905,16 +15427,17 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/stylelint/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, + "license": "ISC", "engines": { - "node": ">=8" + "node": ">=14" + }, + "funding": { + "url": "/~https://github.com/sponsors/isaacs" } }, "node_modules/stylelint/node_modules/which": { @@ -15930,24 +15453,17 @@ } }, "node_modules/stylelint/node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/sugarss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", - "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.2" + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/super-simple-web-server": { @@ -15971,6 +15487,46 @@ "node": ">=4" } }, + "node_modules/supports-hyperlinks": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", + "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "/~https://github.com/chalk/supports-hyperlinks?sponsor=1" + } + }, + "node_modules/supports-hyperlinks/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -16021,10 +15577,11 @@ } }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -16037,15 +15594,16 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -16056,7 +15614,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tapable": { "version": "2.2.1", @@ -16404,25 +15963,6 @@ "tree-kill": "cli.js" } }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/trough": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", - "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", - "dev": true, - "funding": { - "type": "github", - "url": "/~https://github.com/sponsors/wooorm" - } - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -16584,15 +16124,6 @@ "url": "/~https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", @@ -16727,61 +16258,12 @@ "node": ">=4" } }, - "node_modules/unified": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", - "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", - "dev": true, - "dependencies": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^2.0.0", - "trough": "^1.0.0", - "vfile": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unified/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/unist-util-find-all-after": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.2.tgz", - "integrity": "sha512-xaTC/AGZ0rIM2gM28YVRAFPIZpzbpDtU3dRmp7EXlNVA8ziQc4hY3H7BHXM1J49nEmiqc3svnqMReW+PGqbZKQ==", - "dev": true, - "dependencies": { - "unist-util-is": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-is": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", - "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", "dev": true, + "license": "MIT", "dependencies": { "@types/unist": "^2.0.2" }, @@ -16893,12 +16375,6 @@ "node": ">= 0.4.0" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -16922,16 +16398,6 @@ "node": ">= 10.13.0" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/value-or-function": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-4.0.0.tgz", @@ -16950,36 +16416,6 @@ "node": ">= 0.8" } }, - "node_modules/vfile": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", - "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "is-buffer": "^2.0.0", - "unist-util-stringify-position": "^2.0.0", - "vfile-message": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", - "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/vinyl": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", @@ -17697,15 +17133,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -17781,16 +17208,6 @@ "funding": { "url": "/~https://github.com/sponsors/colinhacks" } - }, - "node_modules/zwitch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", - "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", - "dev": true, - "funding": { - "type": "github", - "url": "/~https://github.com/sponsors/wooorm" - } } } } diff --git a/package.json b/package.json index 35d37414b..c648a10a2 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,23 @@ { "name": "nhsuk-frontend", - "version": "9.1.0", + "version": "9.2.0", "description": "NHS.UK frontend contains the code you need to start building user interfaces for NHS websites and services.", "engines": { "node": ">=20.0.0" }, "scripts": { - "prepare": "gulp bundle", - "build": "gulp build", - "start": "gulp", + "prepare": "gulp bundle --color", + "build": "gulp build --color", + "start": "gulp --color", "test": "npm run lint && npm run jest:ci", "lint": "npm run lint:js && npm run lint:css && npm run lint:html && npm run prettier", "prettier": "prettier --check .", "prettier:fix": "prettier --write .", - "lint:js": "eslint -c ./tests/linters/.eslintrc.js packages/components/**/*.js", - "lint:js:fix": "eslint --fix -c ./tests/linters/.eslintrc.js packages/components/**/*.js", - "lint:css": "stylelint -f verbose --config ./tests/linters/.stylelintrc.js packages/**/*.scss", - "lint:css:fix": "stylelint --fix -f verbose --config ./tests/linters/.stylelintrc.js packages/**/*.scss", - "lint:html": "htmlhint --config ./tests/linters/.htmlhintrc ./dist/app/components/**/*.html", + "lint:js": "eslint --color \"packages/components/**/*.js\"", + "lint:js:fix": "npm run lint:js -- --fix", + "lint:css": "stylelint --color --formatter verbose \"**/*.{md,scss}\"", + "lint:css:fix": "npm run lint:css -- --fix", + "lint:html": "htmlhint \"dist/app/components/**/*.html\"", "backstop:interactive": "backstop remote --config ./tests/backstop/backstop.js", "backstop:ref": "concurrently \"npm start\" \"wait-on http://localhost:3000 && backstop --config=./tests/backstop/backstop.js reference --docker\"", "backstop:test": "concurrently \"npm start\" \"wait-on http://localhost:3000 && backstop --config=./tests/backstop/backstop.js test --docker\"", @@ -25,10 +25,10 @@ "backstop:citest": "backstop --config=./tests/backstop/backstop.js test --docker", "backstop:approve": "backstop --config=./tests/backstop/backstop.js approve", "backstop:clean": "rm -rf tests/backstop/bitmaps_test/*", - "build-gh-pages": "gulp bundle && BASE_URL='/nhsuk-frontend/' gulp docs:build", + "build-gh-pages": "gulp bundle && BASE_URL=\"/nhsuk-frontend/\" gulp docs:build", "build-gh-release": "gulp zip", - "jest:dev": "jest --watch", - "jest:ci": "jest" + "jest:dev": "jest --color --watch", + "jest:ci": "jest --color" }, "devDependencies": { "@babel/core": "^7.24.7", @@ -55,14 +55,15 @@ "jest-environment-jsdom": "^29.7.0", "jest-environment-puppeteer": "^10.0.1", "nunjucks": "^3.2.4", + "postcss-markdown": "^1.3.0", + "postcss-scss": "^4.0.9", "prettier": "3.3.3", "puppeteer": "^22.12.1", "sass": "^1.77.6", "start-server-and-test": "^2.0.4", - "stylelint": "^13.13.1", - "stylelint-config-prettier": "^9.0.5", - "stylelint-order": "^4.1.0", - "stylelint-scss": "^3.21.0", + "stylelint": "^16.14.1", + "stylelint-config-gds": "^2.0.0", + "stylelint-order": "^6.0.4", "wait-on": "^7.2.0", "webpack-stream": "^7.0.0" }, diff --git a/packages/components/action-link/_action-link.scss b/packages/components/action-link/_action-link.scss index 7d9a37027..1b0abca02 100644 --- a/packages/components/action-link/_action-link.scss +++ b/packages/components/action-link/_action-link.scss @@ -1,17 +1,17 @@ -/* ========================================================================== - COMPONENTS/ #ACTION-LINK - ========================================================================== */ - -/** - * 1. Display is inline-block so the top and bottom margins/paddings are - * respected. - * 2. 'Random number' is used to properly have sufficient space between icon - * and text. - * 3. Position is relative so the arrow icon can display absolute. - * 4. Text decoration none used to override default styling. - * 5. Box shadow 8px used instead of the default 4px. - * 6. Text decoration underline used to override default styling. - */ +//// +/// Action link component +/// +/// 1. Display is inline-block so the top and bottom margins/paddings are +/// respected. +/// 2. 'Random number' is used to properly have sufficient space between icon +/// and text. +/// 3. Position is relative so the arrow icon can display absolute. +/// 4. Text decoration none used to override default styling. +/// 5. Box shadow 8px used instead of the default 4px. +/// 6. Text decoration underline used to override default styling. +/// +/// @group components +//// .nhsuk-action-link { @include nhsuk-responsive-margin(6, "bottom"); @@ -20,20 +20,20 @@ .nhsuk-action-link__link { @include nhsuk-font(22); - display: inline-block; /* [1] */ + display: inline-block; // [1] font-weight: $nhsuk-font-bold; - padding-left: 38px; /* [2] */ - position: relative; /* [3] */ - text-decoration: none; /* [4] */ + padding-left: 38px; // [2] + position: relative; // [3] + text-decoration: none; // [4] &:hover { .nhsuk-action-link__text { - text-decoration: underline; /* [6] */ + text-decoration: underline; // [6] } } &:focus { - @include nhsuk-focused-text(); + @include nhsuk-focused-text; &:hover { .nhsuk-action-link__text { @@ -44,7 +44,7 @@ } @include mq($until: tablet) { - padding-left: 26px; /* [2] */ + padding-left: 26px; // [2] } @include mq($media-type: print) { diff --git a/packages/components/back-link/_back-link.scss b/packages/components/back-link/_back-link.scss index 2137c8b92..1e1da4d10 100644 --- a/packages/components/back-link/_back-link.scss +++ b/packages/components/back-link/_back-link.scss @@ -1,17 +1,17 @@ -/* ========================================================================== - COMPONENTS/ #BACK-LINK - ========================================================================== */ - -/** - * 1. Allow space for the arrow. - * 2. Align the icon with the start of the back link. - * 3. Align the icon with the middle of the text. - * 4. Make back link same height as breadcrumb. - */ +//// +/// Back link component +/// +/// 1. Allow space for the arrow. +/// 2. Align the icon with the start of the back link. +/// 3. Align the icon with the middle of the text. +/// 4. Make back link same height as breadcrumb. +/// +/// @group components +//// .nhsuk-back-link { margin-top: nhsuk-spacing(3); - line-height: 1; /* 4 */ + line-height: 1; // [5] @include mq($from: tablet) { margin-top: nhsuk-spacing(4); @@ -26,19 +26,19 @@ border: 0; cursor: pointer; display: inline-block; - padding: 0 0 0 16px; /* 1 */ + padding: 0 0 0 16px; // [1] position: relative; text-decoration: none; .nhsuk-icon__chevron-left { height: 24px; - left: -8px; /* 2 */ + left: -8px; // [2] position: absolute; - top: -1px; /* 3 */ + top: -1px; // [3] width: 24px; @include mq($from: tablet) { - top: 0; /* 3 */ + top: 0; // [3] } } diff --git a/packages/components/breadcrumb/_breadcrumb.scss b/packages/components/breadcrumb/_breadcrumb.scss index 1b2880303..10e9ad7c9 100644 --- a/packages/components/breadcrumb/_breadcrumb.scss +++ b/packages/components/breadcrumb/_breadcrumb.scss @@ -1,18 +1,18 @@ -/* ========================================================================== - COMPONENTS / #BREADCRUMB - ========================================================================== */ - -/** - * 1. Hide the breadcrumb on print stylesheets. - * 3. Don't show the full breadcrumb below tablet size. - * 4. Typography sizing mixin, see core/tools/_typography - * 5. and core/settings/_typography for size maps. - * 5. .. but show a back to index page link. - * 6. Spacing to align the chevron with breadcrumb items - */ +//// +/// Breadcrumb component +/// +/// 1. Hide the breadcrumb on print stylesheets. +/// 3. Don't show the full breadcrumb below tablet size. +/// 4. Typography sizing mixin, see core/tools/_typography +/// 5. and core/settings/_typography for size maps. +/// .. but show a back to index page link. +/// 6. Spacing to align the chevron with breadcrumb items +/// +/// @group components +//// .nhsuk-breadcrumb { - @include print-hide(); /* [1] */ + @include print-hide; // [1] margin-top: nhsuk-spacing(3); @include mq($from: tablet) { @@ -22,30 +22,30 @@ .nhsuk-breadcrumb__list { @include mq($until: tablet) { - display: none; /* [3] */ + display: none; // [3] } - @include nhsuk-font(16); /* [4] */ + @include nhsuk-font(16); // [4] list-style: none; margin: 0; padding: 0; } .nhsuk-breadcrumb__item { - @include nhsuk-font(16); /* [4] */ + @include nhsuk-font(16); // [4] display: inline-block; margin-bottom: 0; - &:not(:last-child):after { + &:not(:last-child)::after { background: url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__chevron-right' xmlns='http://www.w3.org/2000/svg' fill='%23aeb7bd' height='18' width='18' viewBox='0 0 24 24' aria-hidden='true'%3E%3Cpath d='M15.5 12a1 1 0 0 1-.29.71l-5 5a1 1 0 0 1-1.42-1.42l4.3-4.29-4.3-4.29a1 1 0 0 1 1.42-1.42l5 5a1 1 0 0 1 .29.71z'%3E%3C/path%3E%3C/svg%3E") right 0 top 0 no-repeat; content: ""; display: inline-block; - height: 19px; /* [6] */ - margin-left: 9px; /* [6] */ - margin-right: 2px; /* [6] */ - vertical-align: middle; /* [6] */ - width: 18px; /* [6] */ + height: 19px; // [6] + margin-left: 9px; // [6] + margin-right: 2px; // [6] + vertical-align: middle; // [6] + width: 18px; // [6] } } @@ -66,16 +66,16 @@ } .nhsuk-breadcrumb__back { - @include nhsuk-font(16); /* [4] */ + @include nhsuk-font(16); // [4] margin: 0; padding-left: nhsuk-spacing(3); position: relative; @include mq($from: tablet) { - display: none; /* [5] */ + display: none; // [5] } - &:before { + &::before { background: url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__chevron-left' xmlns='http://www.w3.org/2000/svg' fill='%23005eb8' height='24' width='24' viewBox='8 0 24 24' aria-hidden='true'%3E%3Cpath d='M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z'%3E%3C/path%3E%3C/svg%3E") no-repeat; content: ""; diff --git a/packages/components/button/_button.scss b/packages/components/button/_button.scss index 94086f84a..a1575eb02 100644 --- a/packages/components/button/_button.scss +++ b/packages/components/button/_button.scss @@ -1,13 +1,13 @@ -/* ========================================================================== - COMPONENTS/ #BUTTON - ========================================================================== */ - -/** - * 1. Ensure that any global link styles are overridden. - * 2. Fix unwanted button padding in Firefox. - * 3. Use a pseudo element to expand the click target area to include the - * button's shadow as well, in case users try to click it. - */ +//// +/// Button component +/// +/// 1. Ensure that any global link styles are overridden. +/// 2. Fix unwanted button padding in Firefox. +/// 3. Use a pseudo element to expand the click target area to include the +/// button's shadow as well, in case users try to click it. +/// +/// @group components +//// // Because the shadow (s0) is visually 'part of' the button, we need to reduce // the height of the button to compensate by adjusting its padding (s1) and @@ -39,7 +39,7 @@ $button-shadow-size: 4px; padding: nhsuk-spacing(2) nhsuk-spacing(3); // s2 } - /* 2 */ + // [2] &:link, &:visited, &:active, @@ -48,7 +48,7 @@ $button-shadow-size: 4px; text-decoration: none; } - /* 3 */ + // [3] &::-moz-focus-inner { border: 0; padding: 0; @@ -80,7 +80,7 @@ $button-shadow-size: 4px; top: $button-shadow-size; } - /* 4 */ + // [5] &::before { background: transparent; bottom: -($nhsuk-border-width-form-element + $button-shadow-size); @@ -108,9 +108,7 @@ $button-shadow-size: 4px; } } -/** - * Button variations - */ +/// Button variations .nhsuk-button--secondary { background-color: $nhsuk-secondary-button-color; @@ -192,9 +190,8 @@ $button-shadow-size: 4px; } } -/** - * Button disabled states - */ +/// Button disabled states + .nhsuk-button--disabled, .nhsuk-button:disabled { opacity: (0.5); diff --git a/packages/components/card/card.scss b/packages/components/card/card.scss index 6b99fba44..a9622046b 100644 --- a/packages/components/card/card.scss +++ b/packages/components/card/card.scss @@ -1,30 +1,30 @@ -/* ========================================================================== - COMPONENTS / #CARD - ========================================================================== */ - -/** - * 1. Is needed for the :active top positioning, and invisible clickable overlay. - * 2. Border is used to create a divider between the white content - * box and an image. - * 3. Creates the 'pressed down' effect when clicked. - * 4. Removes padding-top from headings directly after the card group. - * 5. Includes the border width to achieve the correct left alignment. - * 6. Stops the heading from spanning the full width of the card. - * 7. Removes padding top for the feature heading positioning. - * 8. Default care card colour set to blue (non-urgent care card) - - * using the @mixin care-card tools/_mixins.scss. - * The same mixin is used for each care card, setting the background - * colour,text colour and print border width with the variables. - * 9. 'Random number' for the heading triangle. - * 10. 'Random number' for the heading triangle positioning. - * 11. 'Random number' used for spacing to compensate for the triangle. - * 12. Needed to enable the triangle to show correctly in high contrast mode. - * 13. Prevent additional padding on headings - * 14. Give the action link icon sufficient contrast when used in the emergency variant - * 15. Reset the positioning to the default [1] to display heading triangle on a coloured background. - * 16. Emergency care card needs to be white because the background colour is black. - * 17. Trick IE10 into rendering the invisible clickable area. Without this it does not. - */ +//// +/// Card component +/// +/// 1. Is needed for the :active top positioning, and invisible clickable overlay. +/// 2. Border is used to create a divider between the white content +/// box and an image. +/// 3. Creates the 'pressed down' effect when clicked. +/// 4. Removes padding-top from headings directly after the card group. +/// 5. Includes the border width to achieve the correct left alignment. +/// 6. Stops the heading from spanning the full width of the card. +/// 7. Removes padding top for the feature heading positioning. +/// 8. Default care card colour set to blue (non-urgent care card) - +/// using the @mixin care-card tools/_mixins.scss. +/// The same mixin is used for each care card, setting the background +/// colour,text colour and print border width with the variables. +/// 9. 'Random number' for the heading triangle. +/// 10. 'Random number' for the heading triangle positioning. +/// 11. 'Random number' used for spacing to compensate for the triangle. +/// 12. Needed to enable the triangle to show correctly in high contrast mode. +/// 13. Prevent additional padding on headings +/// 14. Give the action link icon sufficient contrast when used in the emergency variant +/// 15. Reset the positioning to the default [1] to display heading triangle on a coloured background. +/// 16. Emergency care card needs to be white because the background colour is black. +/// 17. Trick IE10 into rendering the invisible clickable area. Without this it does not. +/// +/// @group components +//// $card-border-width: 1px; $card-border-bottom-width: nhsuk-spacing(1); @@ -36,20 +36,20 @@ $card-border-hover-color: $color_nhsuk-grey-3; background: $color_nhsuk-white; border: $card-border-width solid $card-border-color; - position: relative; /* [1] */ + position: relative; // [1] width: 100%; } .nhsuk-card__img { - @include print-hide(); + @include print-hide; - border-bottom: $card-border-width solid $color_nhsuk-grey-5; /* [2] */ + border-bottom: $card-border-width solid $color_nhsuk-grey-5; // [2] display: block; width: 100%; } .nhsuk-card__content { - @include top-and-bottom(); + @include top-and-bottom; @include nhsuk-responsive-padding(5); } @@ -59,8 +59,7 @@ $card-border-hover-color: $color_nhsuk-grey-3; margin-bottom: nhsuk-spacing(3); } -/* Clickable card - ========================================================================== */ +/// Clickable card .nhsuk-card--clickable { border-bottom-width: $card-border-bottom-width; @@ -68,7 +67,7 @@ $card-border-hover-color: $color_nhsuk-grey-3; .nhsuk-card__heading a, .nhsuk-card__link { &::before { - background-color: rgba(255, 255, 255, 0); /* [17] */ + background-color: rgba(255, 255, 255, 0); // [17] bottom: 0; content: ""; display: block; @@ -81,21 +80,17 @@ $card-border-hover-color: $color_nhsuk-grey-3; &:active { border-color: $card-border-hover-color; - bottom: -$card-border-width; /* [3] */ + bottom: -$card-border-width; // [3] } } -/* Card group - ========================================================================== */ - -/** -* Card group allows you to have a row of cards. -* -* Flexbox is used to make each card in a row the same height. -*/ +/// Card group +/// +/// Allows you to have a row of cards. +/// Flexbox is used to make each card in a row the same height. .nhsuk-card-group { - @include flex(); + @include flex; margin-bottom: nhsuk-spacing(3); padding: 0; @@ -108,12 +103,12 @@ $card-border-hover-color: $color_nhsuk-grey-3; + .nhsuk-heading-l, + h3, + .nhsuk-heading-m { - padding-top: 0; /* [4] */ + padding-top: 0; // [4] } } .nhsuk-card-group__item { - @include flex-item(); + @include flex-item; list-style-type: none; margin-bottom: 0; @@ -133,8 +128,7 @@ $card-border-hover-color: $color_nhsuk-grey-3; } } -/* Card feature - ========================================================================== */ +/// Card feature .nhsuk-card--feature { @include nhsuk-responsive-margin(7, "top"); @@ -144,31 +138,31 @@ $card-border-hover-color: $color_nhsuk-grey-3; background: $color_nhsuk-blue; color: $color_nhsuk-white; display: inline-block; - left: -(nhsuk-spacing(4) + $card-border-width); /* [5] */ + left: -(nhsuk-spacing(4) + $card-border-width); // [5] margin-bottom: nhsuk-spacing(2); - margin-right: -(nhsuk-spacing(4)); /* [6] */ + margin-right: -(nhsuk-spacing(4)); // [6] padding: nhsuk-spacing(2) nhsuk-spacing(4); position: relative; top: -(nhsuk-spacing(2)); @include mq($from: tablet) { - left: -(nhsuk-spacing(5) + $card-border-width); /* [5] */ - margin-right: -(nhsuk-spacing(5)); /* [6] */ + left: -(nhsuk-spacing(5) + $card-border-width); // [5] + margin-right: -(nhsuk-spacing(5)); // [6] padding: nhsuk-spacing(2) nhsuk-spacing(5); top: -(nhsuk-spacing(3)); } } .nhsuk-card__content--feature { - padding-top: 0 !important; /* stylelint-disable-line declaration-no-important */ /* [7] */ + // stylelint-disable-next-line declaration-no-important + padding-top: 0 !important; // [7] } -/* Care card - ========================================================================== */ +/// Care card .nhsuk-card--care { @include nhsuk-responsive-margin(7, "top"); - @include care-card($color_nhsuk-blue, $color_nhsuk-white, 4px); /* [8] */ + @include care-card($color_nhsuk-blue, $color_nhsuk-white, 4px); // [8] } .nhsuk-card--care__heading-container { @@ -185,33 +179,33 @@ $card-border-hover-color: $color_nhsuk-grey-3; @include print-color($nhsuk-print-text-color); margin: 0; - padding-top: 0; /* [13] */ + padding-top: 0; // [13] } .nhsuk-card--care__arrow { - bottom: -10px; /* [9] */ + bottom: -10px; // [9] display: block; - height: 20px; /* [9] */ - left: 30px; /* [10] */ + height: 20px; // [9] + left: 30px; // [10] overflow: hidden; position: absolute; transform: rotate(45deg); - width: 20px; /* [9] */ - @include print-hide(); + width: 20px; // [9] + @include print-hide; @include mq($from: tablet) { - left: 38px; /* [10] */ + left: 38px; // [10] } - &:before, - &:after { - border: solid 32px $color_nhsuk-blue; /* [9] */ + &::before, + &::after { + border: solid 32px $color_nhsuk-blue; // [9] content: ""; display: block; height: 0; position: absolute; top: 0; - transform: rotate(45deg); /* [12] */ + transform: rotate(45deg); // [12] width: 0; } } @@ -220,8 +214,8 @@ $card-border-hover-color: $color_nhsuk-grey-3; @include care-card($color_nhsuk-red, $color_nhsuk-white, 6px); .nhsuk-card--care__arrow { - &:before, - &:after { + &::before, + &::after { border-color: $color_nhsuk-red; } } @@ -231,8 +225,8 @@ $card-border-hover-color: $color_nhsuk-grey-3; @include care-card($color_nhsuk-red, $color_nhsuk-white, 8px); .nhsuk-card--care__arrow { - &:before, - &:after { + &::before, + &::after { border-color: $color_nhsuk-red; } } @@ -241,17 +235,17 @@ $card-border-hover-color: $color_nhsuk-grey-3; background-color: $color_nhsuk-black; border: 0; color: $color_nhsuk-white; - position: static; /* [15] */ + position: static; // [15] a { - color: $color_nhsuk-white; /* [16] */ + color: $color_nhsuk-white; // [16] &:focus { - color: $color_nhsuk-black; /* [16] */ + color: $color_nhsuk-black; // [16] } } @include mq($media-type: print) { - background-color: white; + background-color: $color_nhsuk-white; color: $nhsuk-print-text-color; } } @@ -265,6 +259,7 @@ $card-border-hover-color: $color_nhsuk-grey-3; &:hover { color: $color_nhsuk-white; } + &:focus { color: $color_nhsuk-black; } @@ -272,13 +267,12 @@ $card-border-hover-color: $color_nhsuk-grey-3; .nhsuk-action-link__link { .nhsuk-icon__arrow-right-circle { - fill: $color_nhsuk-white; /* [14] */ + fill: $color_nhsuk-white; // [14] } } } -/* Card primary - ========================================================================== */ +/// Card primary .nhsuk-card__content--primary { padding-right: 75px; @@ -298,8 +292,7 @@ $card-border-hover-color: $color_nhsuk-grey-3; } } -/* Card secondary - ========================================================================== */ +/// Card secondary .nhsuk-card--secondary { background: transparent; diff --git a/packages/components/checkboxes/_checkboxes.scss b/packages/components/checkboxes/_checkboxes.scss index 9f3aae326..c9818e2f9 100644 --- a/packages/components/checkboxes/_checkboxes.scss +++ b/packages/components/checkboxes/_checkboxes.scss @@ -1,11 +1,11 @@ -/* ========================================================================== - COMPONENTS/ #CHECKBOXES - ========================================================================== */ - -/** - * 1. remove 300ms pause on mobile. - * 2. Fix bug in IE11 caused by transform rotate (-45deg). - */ +//// +/// Checkboxes component +/// +/// 1. remove 300ms pause on mobile. +/// 2. Fix bug in IE11 caused by transform rotate (-45deg). +/// +/// @group components +//// $nhsuk-checkboxes-size: nhsuk-spacing(6); $nhsuk-checkboxes-label-padding-left-right: 12px; @@ -43,7 +43,7 @@ $nhsuk-checkboxes-label-padding-left-right: 12px; display: inline-block; margin-bottom: 0; padding: 8px $nhsuk-checkboxes-label-padding-left-right nhsuk-spacing(1); - -ms-touch-action: manipulation; /* 1 */ + -ms-touch-action: manipulation; // [1] touch-action: manipulation; } @@ -73,7 +73,7 @@ $nhsuk-checkboxes-label-padding-left-right: 12px; content: ""; height: 10px; left: 10px; - opacity: 0; /* 2 */ + opacity: 0; // [2] position: absolute; top: 13px; -ms-transform: rotate(-45deg); @@ -82,25 +82,24 @@ $nhsuk-checkboxes-label-padding-left-right: 12px; width: 22px; } -/* - * Focus state - * - * 1. Since box-shadows are removed when users customise their colours - * We set a transparent outline that is shown instead. - * https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/ - */ +/// Focus state +/// +/// 1. Since box-shadows are removed when users customise their colours +/// We set a transparent outline that is shown instead. +/// +/// @link https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/ .nhsuk-checkboxes__input:focus + .nhsuk-checkboxes__label::before { - @include nhsuk-focused-checkbox(); + @include nhsuk-focused-checkbox; } -/* Selected state */ +/// Selected state .nhsuk-checkboxes__input:checked + .nhsuk-checkboxes__label::after { opacity: 1; } -/* Disabled state */ +/// Disabled state .nhsuk-checkboxes__input:disabled, .nhsuk-checkboxes__input:disabled + .nhsuk-checkboxes__label { @@ -111,7 +110,7 @@ $nhsuk-checkboxes-label-padding-left-right: 12px; opacity: 0.5; } -/* Divider variant */ +/// Divider variant .nhsuk-checkboxes__divider { $nhsuk-divider-size: $nhsuk-checkboxes-size !default; @@ -123,19 +122,17 @@ $nhsuk-checkboxes-label-padding-left-right: 12px; width: $nhsuk-divider-size; } -/* - * Conditional - * - * 1. Calculate the amount of padding needed to keep the border - * centered against the checkbox. - * 2. Move the border centered with the checkbox. - * 3. Move the contents of the conditional inline with the label. - */ +/// Conditional +/// +/// 1. Calculate the amount of padding needed to keep the border +/// centered against the checkbox. +/// 2. Move the border centered with the checkbox. +/// 3. Move the contents of the conditional inline with the label. $conditional-border-width: $nhsuk-border-width-mobile; -$conditional-border-padding: ($nhsuk-checkboxes-size * 0.5) - ($conditional-border-width * 0.5); /* 1 */ -$conditional-margin-left: $conditional-border-padding; /* 2 */ -$conditional-padding-left: $conditional-border-padding + $nhsuk-checkboxes-label-padding-left-right; /* 3 */ +$conditional-border-padding: ($nhsuk-checkboxes-size * 0.5) - ($conditional-border-width * 0.5); // [1] +$conditional-margin-left: $conditional-border-padding; // [2] +$conditional-padding-left: $conditional-border-padding + $nhsuk-checkboxes-label-padding-left-right; // [3] .nhsuk-checkboxes__conditional { @include nhsuk-responsive-margin(4, "bottom"); diff --git a/packages/components/checkboxes/template.njk b/packages/components/checkboxes/template.njk index 0e4b0d41c..a00f9ffe1 100644 --- a/packages/components/checkboxes/template.njk +++ b/packages/components/checkboxes/template.njk @@ -53,9 +53,11 @@ {%- if item.divider %}
{{ item.divider }}
{%- else %} + {% set isChecked = item.checked | default((item.value in params.values and item.checked != false) if params.values else false, true) %} +
{% if item.conditional %} -
+
{{ item.conditional.html | safe }}
{% endif %} diff --git a/packages/components/contents-list/_contents-list.scss b/packages/components/contents-list/_contents-list.scss index a9c6636b9..9ef030a2f 100644 --- a/packages/components/contents-list/_contents-list.scss +++ b/packages/components/contents-list/_contents-list.scss @@ -1,11 +1,11 @@ -/* ========================================================================== - COMPONENTS / #CONTENTS-LIST - ========================================================================== */ - -/** - * 1. Creates a grey line before each list - * item using a ASCII number for the symbol. - */ +//// +/// Contents list component +/// +/// 1. Creates a grey line before each list +/// item using a ASCII number for the symbol. +/// +/// @group components +//// .nhsuk-contents-list { @include nhsuk-responsive-margin(7, "bottom"); diff --git a/packages/components/date-input/_date-input.scss b/packages/components/date-input/_date-input.scss index 374993239..76c71e31f 100644 --- a/packages/components/date-input/_date-input.scss +++ b/packages/components/date-input/_date-input.scss @@ -1,15 +1,15 @@ -/* ========================================================================== - COMPONENTS/ #DATE-INPUT - ========================================================================== */ - -/** - * 1. font-size: 0 removes whitespace caused by inline-block - */ +//// +/// Date input component +/// +/// 1. font-size: 0 removes whitespace caused by inline-block +/// +/// @group components +//// .nhsuk-date-input { @include clearfix; - font-size: 0; /* 1 */ + font-size: 0; // [1] } .nhsuk-date-input__item { diff --git a/packages/components/details/_details.scss b/packages/components/details/_details.scss index 342d9a87e..5e26d210f 100644 --- a/packages/components/details/_details.scss +++ b/packages/components/details/_details.scss @@ -1,22 +1,18 @@ -/* ========================================================================== - COMPONENTS / #DETAILS - ========================================================================== */ - -/** - * Details component. - * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - * - * 1. Style the summary to look like a link... - * 2. Make the focus outline shrink-wrap the text content of the summary - * 3. Absolutely position the marker against this element - * 3. Allow for absolutely positioned marker and align with disclosed text - * 4. Only underline the text, not the arrow - * 5. Remove the default details marker so we can style our own consistently and - * ensure it displays in Firefox - * 6. Custom padding to left align the details text with the summary - */ +//// +/// Details component +/// +/// 1. Style the summary to look like a link... +/// 2. Make the focus outline shrink-wrap the text content of the summary +/// 3. Absolutely position the marker against this element +/// 3. Allow for absolutely positioned marker and align with disclosed text +/// 4. Only underline the text, not the arrow +/// 5. Remove the default details marker so we can style our own consistently and +/// ensure it displays in Firefox +/// 6. Custom padding to left align the details text with the summary +/// +/// @group components +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// .nhsuk-details { @include nhsuk-text-color; @@ -26,17 +22,17 @@ } .nhsuk-details__summary { - color: $color_nhsuk-blue; /* [1] */ + color: $color_nhsuk-blue; // [1] cursor: pointer; - display: inline-block; /* [2] */ + display: inline-block; // [2] padding-left: nhsuk-spacing(4); - position: relative; /* [3] */ + position: relative; // [3] &:hover { color: $nhsuk-link-hover-color; } - &:before { + &::before { bottom: 0; content: ""; left: 0; @@ -48,7 +44,7 @@ } &:focus { - @include nhsuk-focused-text(); + @include nhsuk-focused-text; .nhsuk-icon { fill: $nhsuk-focus-text-color; @@ -63,37 +59,35 @@ } } -.nhsuk-details[open] > .nhsuk-details__summary:before { +.nhsuk-details[open] > .nhsuk-details__summary::before { @include govuk-shape-arrow($direction: down, $base: 14px); } .nhsuk-details__summary-text { - text-decoration: underline; /* [4] */ + text-decoration: underline; // [4] } .nhsuk-details__summary::-webkit-details-marker { - display: none; /* [5] */ + display: none; // [5] } .nhsuk-details__text { border-left: nhsuk-spacing(1) solid $color_nhsuk-grey-4; margin-top: nhsuk-spacing(2); padding: nhsuk-spacing(3); - padding-left: 20px; /* [6] */ - @include top-and-bottom(); + padding-left: 20px; // [6] + @include top-and-bottom; } -/** - * Expander variation. - * - * 1. !important used because the icon is populated - * by the JavaScript polyfill - * 2. Remove the default hover, focus and active - * styles for this component. - * 3. -2px left margin to align the icon to the content. - * 4. When a group of details is used reduce the - * margin between them so they sit together. - */ +/// Expander variation. +/// +/// 1. !important used because the icon is populated +/// by the JavaScript polyfill +/// 2. Remove the default hover, focus and active +/// styles for this component. +/// 3. -2px left margin to align the icon to the content. +/// 4. When a group of details is used reduce the +/// margin between them so they sit together. $expander-border-width: 1px; $expander-border-bottom-width: nhsuk-spacing(1); @@ -119,8 +113,9 @@ $expander-border-hover-color: $color_nhsuk-grey-3; padding: nhsuk-spacing(3) - $nhsuk-focus-width nhsuk-spacing(3) nhsuk-spacing(3); } - &:before { - display: none !important; /* stylelint-disable-line declaration-no-important */ /* [1] */ + &::before { + // stylelint-disable-next-line declaration-no-important + display: none !important; // [1] } &:hover { @@ -133,13 +128,13 @@ $expander-border-hover-color: $color_nhsuk-grey-3; box-shadow: none; .nhsuk-details__summary-text { - @include nhsuk-focused-text(); + @include nhsuk-focused-text; + } - &:before { - background: $nhsuk-focus-color - url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__plus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='002f5c'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M12 8v8M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") - left -2px center no-repeat; - } + .nhsuk-details__summary-text::before { + background: $nhsuk-focus-color + url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__plus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='002f5c'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M12 8v8M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") + left -2px center no-repeat; } } } @@ -150,18 +145,18 @@ $expander-border-hover-color: $color_nhsuk-grey-3; display: inline-block; padding: nhsuk-spacing(1) nhsuk-spacing(1) nhsuk-spacing(1) 38px; position: relative; + } - &:before { - background: url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__plus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23005eb8'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M12 8v8M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") - left -2px center no-repeat; - content: ""; - display: inline-block; - height: 32px; - left: 0; - position: absolute; - top: calc(50% - 16px); - width: 32px; - } + .nhsuk-details__summary-text::before { + background: url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__plus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23005eb8'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M12 8v8M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") + left -2px center no-repeat; + content: ""; + display: inline-block; + height: 32px; + left: 0; + position: absolute; + top: calc(50% - 16px); + width: 32px; } .nhsuk-details__text { @@ -190,19 +185,19 @@ $expander-border-hover-color: $color_nhsuk-grey-3; .nhsuk-details__summary-text::before { background: $nhsuk-focus-color url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__minus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='002f5c'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") - left -2px center no-repeat; /* [3] */ + left -2px center no-repeat; // [3] } } } .nhsuk-details__summary-text::before { background: url("data:image/svg+xml,%3Csvg class='nhsuk-icon nhsuk-icon__minus' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' aria-hidden='true'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23005eb8'%3E%3C/circle%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M8 12h8'%3E%3C/path%3E%3C/svg%3E%0A") - left -2px center no-repeat; /* [3] */ + left -2px center no-repeat; // [3] } } .nhsuk-expander-group { - /* [4] */ + // [4] > .nhsuk-details { @include nhsuk-responsive-margin(2, "bottom"); diff --git a/packages/components/do-dont-list/_do-dont-list.scss b/packages/components/do-dont-list/_do-dont-list.scss index f84de3721..6148784da 100644 --- a/packages/components/do-dont-list/_do-dont-list.scss +++ b/packages/components/do-dont-list/_do-dont-list.scss @@ -1,20 +1,20 @@ -/* ========================================================================== - COMPONENTS / #DO-DONT-LIST - ========================================================================== */ - -/** - * Do and Don't lists help users understand more easily what they should - * and shouldn't do. - * - * 1. Uses @mixin panel-with-label from tools/_mixins. - * 2. Uses @mixin heading-label from tools/_mixins. - */ +//// +/// Do and Don't list component +/// +/// Do and Don't lists help users understand more easily what they should +/// and shouldn't do. +/// +/// 1. Uses @mixin panel-with-label from tools/_mixins. +/// 2. Uses @mixin heading-label from tools/_mixins. +/// +/// @group components +//// .nhsuk-do-dont-list { - @include panel-with-label($color_nhsuk-white, $nhsuk-text-color, $color_nhsuk-grey-4); /* [1] */ + @include panel-with-label($color_nhsuk-white, $nhsuk-text-color, $color_nhsuk-grey-4); // [1] } .nhsuk-do-dont-list__label { - @include heading-label($color_nhsuk-blue, $color_nhsuk-white); /* [2] */ + @include heading-label($color_nhsuk-blue, $color_nhsuk-white); // [2] @include print-color($nhsuk-print-text-color); } diff --git a/packages/components/error-message/_error-message.scss b/packages/components/error-message/_error-message.scss index 9a33a5c3f..d37392864 100644 --- a/packages/components/error-message/_error-message.scss +++ b/packages/components/error-message/_error-message.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - COMPONENTS/ #ERROR-MESSAGE - ========================================================================== */ +//// +/// Error message component +/// +/// @group components +//// .nhsuk-error-message { @include nhsuk-font(19, $weight: bold); diff --git a/packages/components/error-summary/_error-summary.scss b/packages/components/error-summary/_error-summary.scss index bc1c6b5e7..70cafe933 100644 --- a/packages/components/error-summary/_error-summary.scss +++ b/packages/components/error-summary/_error-summary.scss @@ -1,11 +1,11 @@ -/* ========================================================================== - COMPONENTS/ #ERROR-SUMMARY - ========================================================================== */ - -/** - * 1. Cross-component class - adjusts styling of list component. - * 2. Override default link styling to use error colour - */ +//// +/// Error summary component +/// +/// 1. Cross-component class - adjusts styling of list component. +/// 2. Override default link styling to use error colour +/// +/// @group components +//// .nhsuk-error-summary { @include nhsuk-responsive-padding(4); @@ -47,7 +47,7 @@ } .nhsuk-error-summary__list { - /* 1 */ + // [1] margin-bottom: 0; margin-top: 0; } @@ -55,7 +55,7 @@ .nhsuk-error-summary__list a { @include nhsuk-typography-weight-bold; - /* 2 */ + // [2] &:link, &:visited, &:hover, @@ -64,6 +64,6 @@ } &:focus { - @include nhsuk-focused-text(); + @include nhsuk-focused-text; } } diff --git a/packages/components/fieldset/_fieldset.scss b/packages/components/fieldset/_fieldset.scss index c993dd04f..fe71cdf1e 100644 --- a/packages/components/fieldset/_fieldset.scss +++ b/packages/components/fieldset/_fieldset.scss @@ -1,15 +1,15 @@ -/* ========================================================================== - COMPONENTS/ #FIELDSET - ========================================================================== */ - -/** - * 1. Fix legend text wrapping in Edge and IE versions: - * 2. IE9-11 & Edge 12-13 - * 3. Hack to let legends or elements within legends have margins in webkit browsers. - * 4. When the legend contains an H1, we want the H1 to inherit all styles from - * the legend. Effectively we want to be able to treat the heading as if it is - * not there. - */ +//// +/// Fieldset component +/// +/// 1. Fix legend text wrapping in Edge and IE versions: +/// 2. IE9-11 & Edge 12-13 +/// 3. Hack to let legends or elements within legends have margins in webkit browsers. +/// 4. When the legend contains an H1, we want the H1 to inherit all styles from +/// the legend. Effectively we want to be able to treat the heading as if it is +/// not there. +/// +/// @group components +//// .nhsuk-fieldset { @include clearfix; @@ -22,17 +22,17 @@ .nhsuk-fieldset__legend { @include nhsuk-font(19); - box-sizing: border-box; /* 1 */ + box-sizing: border-box; // [1] color: $color_nhsuk-black; - display: table; /* 2 */ + display: table; // [2] margin-bottom: nhsuk-spacing(2); margin-top: 0; - max-width: 100%; /* 1 */ + max-width: 100%; // [1] padding: 0; - white-space: normal; /* 3 */ + white-space: normal; // [3] } -/* Heading modifiers */ +/// Heading modifiers .nhsuk-fieldset__legend--xl { @include nhsuk-font($size: 48, $weight: bold); @@ -55,7 +55,7 @@ } .nhsuk-fieldset__heading { - /* 4 */ + // [5] font-size: inherit; font-weight: inherit; margin: 0; diff --git a/packages/components/footer/_footer.scss b/packages/components/footer/_footer.scss index 1872a07b4..c42461eb8 100644 --- a/packages/components/footer/_footer.scss +++ b/packages/components/footer/_footer.scss @@ -1,10 +1,14 @@ -/* ========================================================================== - COMPONENTS / #FOOTER - ========================================================================== */ +//// +/// Footer component +/// +/// @group components +//// + +@use "sass:math"; .nhsuk-footer-container { - @include clearfix(); - @include print-hide(); + @include clearfix; + @include print-hide; @include nhsuk-responsive-padding(5, bottom); @include nhsuk-responsive-padding(5, top); @@ -37,7 +41,7 @@ float: left; padding-bottom: 0; padding-right: 40px; - width: 75%; + width: math.percentage(math.div(3, 4)); &:last-child { padding-right: 0; @@ -82,7 +86,7 @@ .nhsuk-footer__meta { @include mq($until: desktop) { - border-top: 1px solid #f0f4f5; + border-top: 1px solid $color_nhsuk-grey-5; padding-top: 35px; } } diff --git a/packages/components/header/_header-organisation.scss b/packages/components/header/_header-organisation.scss index f2715badc..72133c309 100644 --- a/packages/components/header/_header-organisation.scss +++ b/packages/components/header/_header-organisation.scss @@ -1,6 +1,4 @@ -/** - * These are the styles for the organisation header variants. -*/ +/// These are the styles for the organisation header variants. .nhsuk-header--organisation { .nhsuk-header__link { diff --git a/packages/components/header/_header-service.scss b/packages/components/header/_header-service.scss index a14e4556e..f9a5cf304 100644 --- a/packages/components/header/_header-service.scss +++ b/packages/components/header/_header-service.scss @@ -1,6 +1,4 @@ -/** - * These are the styles for the service header variants. -*/ +/// These are the styles for the service header variants. .nhsuk-header__link--service { height: auto; diff --git a/packages/components/header/_header-transactional.scss b/packages/components/header/_header-transactional.scss index bfce5ab28..8616307d3 100644 --- a/packages/components/header/_header-transactional.scss +++ b/packages/components/header/_header-transactional.scss @@ -1,6 +1,4 @@ -/** - * These are the styles for the transactional header variants. -*/ +/// These are the styles for the transactional header variants. .nhsuk-header__transactional-service-name { margin-bottom: -(nhsuk-spacing(1)); diff --git a/packages/components/header/_header-white.scss b/packages/components/header/_header-white.scss index 6ff7fe321..d06a1b13b 100644 --- a/packages/components/header/_header-white.scss +++ b/packages/components/header/_header-white.scss @@ -1,6 +1,4 @@ -/** - * These are the styles for the white header variants. -*/ +/// These are the styles for the white header variants. .nhsuk-header--white { background-color: $color_nhsuk-white; @@ -21,7 +19,7 @@ .nhsuk-navigation { .nhsuk-header__navigation-list { - border-top: none; + border-top-width: 0; } } diff --git a/packages/components/header/_header.scss b/packages/components/header/_header.scss index 15e501d2a..7712af774 100644 --- a/packages/components/header/_header.scss +++ b/packages/components/header/_header.scss @@ -1,22 +1,22 @@ -/* ========================================================================== - COMPONENTS / #HEADER - ========================================================================== */ - -/** -* The behaviour with regards to responsiveness is as follow: - * - * - Mobile to tablet view - * Menu toggle button visible and navigation links hidden, search toggle - button visible and search form hidden - * - * - Tablet to desktop view - * Menu toggle button visible and navigation links hidden, search toggle - * button hidden and search form visible - * - * - Desktop+ view - * Menu toggle button hidden and navigation links visible, search toggle - * button hidden and search form visible - */ +//// +/// Header component +/// +/// The behaviour with regards to responsiveness is as follow: +/// +/// - Mobile to tablet view +/// Menu toggle button visible and navigation links hidden, search toggle +/// button visible and search form hidden +/// +/// - Tablet to desktop view +/// Menu toggle button visible and navigation links hidden, search toggle +/// button hidden and search form visible +/// +/// - Desktop+ view +/// Menu toggle button hidden and navigation links visible, search toggle +/// button hidden and search form visible +/// +/// @group components +//// .nhsuk-header { background-color: $color_nhsuk-blue; @@ -93,7 +93,7 @@ } @include mq($media-type: print) { - &:after { + &::after { content: ""; } } @@ -124,7 +124,7 @@ } .nhsuk-header__content { - @include print-hide(); + @include print-hide; position: relative; &.js-show { @@ -172,6 +172,7 @@ border-top-left-radius: $nhsuk-border-radius; border-top-right-radius: 0; padding: 0 nhsuk-spacing(3); + &:focus { border: nhsuk-spacing(1) solid $nhsuk-focus-text-color; box-shadow: 0 0 0 $nhsuk-focus-width $nhsuk-focus-color; @@ -179,15 +180,18 @@ outline-offset: $nhsuk-focus-width; padding: 0 13px; } + &::placeholder { color: $color_nhsuk-grey-1; font-size: $nhsuk-base-font-size; opacity: 1; // fixes low contrast of placeholder text in firefox } + &:-ms-input-placeholder { color: $color_nhsuk-grey-1; font-size: $nhsuk-base-font-size; } + &::-webkit-input-placeholder { color: $color_nhsuk-grey-1; font-size: $nhsuk-base-font-size; @@ -309,7 +313,7 @@ } &:focus { - @include nhsuk-focused-button(); + @include nhsuk-focused-button; box-shadow: 0 -2px $nhsuk-focus-color, 0 $nhsuk-focus-width $nhsuk-focus-text-color; @@ -459,6 +463,10 @@ gap: nhsuk-spacing(4); width: 100%; + @include mq($from: tablet) { + border-top: 1px solid $color_transparent_nhsuk-white-20; + } + @include mq($from: desktop) { justify-content: space-between; } @@ -468,12 +476,18 @@ } } +.nhsuk-header__navigation-list--left-aligned { + @include mq($from: desktop) { + justify-content: initial; + } +} + .nhsuk-header__navigation-item { margin-bottom: 0; } .nhsuk-navigation-container { - @include print-hide(); + @include print-hide; position: relative; @include mq($until: tablet) { @@ -484,7 +498,7 @@ // ul of hidden nav .nhsuk-header__drop-down { @extend %nhsuk-navigation-list; - @include print-hide(); + @include print-hide; background-color: $color_nhsuk-white; border-bottom: nhsuk-spacing(1) solid $color_nhsuk-grey-5; overflow: hidden; @@ -522,15 +536,3 @@ display: none; } } - -.nhsuk-header__navigation-list { - @include mq($from: tablet) { - border-top: 1px solid $color_transparent_nhsuk-white-20; - } -} - -.nhsuk-header__navigation-list--left-aligned { - @include mq($from: desktop) { - justify-content: initial; - } -} diff --git a/packages/components/hero/_hero.scss b/packages/components/hero/_hero.scss index ff391696e..6860a9e13 100644 --- a/packages/components/hero/_hero.scss +++ b/packages/components/hero/_hero.scss @@ -1,24 +1,22 @@ -/* ========================================================================== - COMPONENTS / #HERO - ========================================================================== */ - -/** - * Hero component shared styles. - * - * 1. Position relative to support the description - * appearing over the image. - * 2. Adds a border between the header and hero, if required - */ +//// +/// Hero component shared styles +/// +/// 1. Position relative to support the description +/// appearing over the image. +/// 2. Adds a border between the header and hero, if required +/// +/// @group components +/// .nhsuk-hero { @include print-color($nhsuk-print-text-color); background-color: $color_nhsuk-blue; color: $color_nhsuk-white; - position: relative; /* [1] */ + position: relative; // [1] .nhsuk-hero--border { - /* [2] */ + // [2] border-top: $nhsuk-hero-border solid $nhsuk-secondary-border-color; } } @@ -28,68 +26,64 @@ @include nhsuk-responsive-padding(8, bottom); } -/** - * Hero component image styles - * - * 3. Center the background image. - * 4. Stop the height affecting print stylesheets. - * 5. Show more of the image for larger screen sizes - * 6. Overlay must be min same height as .nhsuk-hero--image to cover the image. - * 7. Darken the background image with an overlay. - * 12. Remove any heights/min heights in Windows high contrast mode. - */ +/// Hero component image styles +/// +/// 3. Center the background image. +/// 4. Stop the height affecting print stylesheets. +/// 5. Show more of the image for larger screen sizes +/// 6. Overlay must be min same height as .nhsuk-hero--image to cover the image. +/// 7. Darken the background image with an overlay. +/// 12. Remove any heights/min heights in Windows high contrast mode. .nhsuk-hero--image { - background-position: center right; /* [3] */ + background-position: center right; // [3] background-repeat: no-repeat; background-size: cover; @media only screen { - /* [4] */ + // [4] min-height: 200px; } @include mq($from: tablet) { @media only screen { - /* [4] */ - min-height: 320px; /* [5] */ + // [4] + min-height: 320px; // [5] .nhsuk-hero__overlay { - height: 320px; /* [6] */ + height: 320px; // [6] } } } @media screen and (-ms-high-contrast: active) { - min-height: 0; /* [12] */ + min-height: 0; // [12] } .nhsuk-hero__overlay { - background-color: $color_transparent_nhsuk-blue-50; /* [7] */ + background-color: $color_transparent_nhsuk-blue-50; // [7] @media only screen { - /* [4] */ - min-height: 200px; /* [6] */ + // [4] + min-height: 200px; // [6] } @media screen and (-ms-high-contrast: active) { - height: auto; /* [12] */ - min-height: 0; /* [12] */ + height: auto; // [12] + min-height: 0; // [12] } } } -/** - * Hero component description styles. - * - * 8. 'Random number' for the triangle. - * 9. 'Random number' for the triangle positioning. - * 10. Needed to enable the triangle to show correctly in high contrast mode. - * 11. Give the description box a max width. - * 13. Remove the arrow in Windows high contrast mode. - * 14. Reduce spacing and change positioning for Windows high contrast mode. - * 15. Prevent text breaking out of box on smaller sizes - */ +/// Hero component description styles. +/// +/// 8. 'Random number' for the triangle. +/// 9. 'Random number' for the triangle positioning. +/// 10. Needed to enable the triangle to show correctly in high contrast mode. +/// 11. Give the description box a max width. +/// 13. Remove the arrow in Windows high contrast mode. +/// 14. Reduce spacing and change positioning for Windows high contrast mode. +/// 15. Prevent text breaking out of box on smaller sizes .nhsuk-hero--image-description { .nhsuk-hero-content { @@ -101,60 +95,63 @@ top: 70px; .nhsuk-hero__arrow { - bottom: -10px; /* [8] */ + bottom: -10px; // [8] display: block; - height: 20px; /* [8] */ - left: 32px; /* [9] */ + height: 20px; // [8] + left: 32px; // [9] overflow: hidden; position: absolute; transform: rotate(45deg); - width: 20px; /* [8] */ - @include print-hide(); - - @include mq($from: tablet) { - left: 46px; /* [9] */ - } - - &:before, - &:after { - border: solid 32px $color_nhsuk-blue; /* [8] */ - content: ""; - display: block; - height: 0; - position: absolute; - top: 0; - transform: rotate(45deg); /* [10] */ - width: 0; - } + width: 20px; // [8] + @include print-hide; + } - @media screen and (-ms-high-contrast: active) { - display: none; /* [13] */ - } + .nhsuk-hero__arrow::before, + .nhsuk-hero__arrow::after { + border: solid 32px $color_nhsuk-blue; // [8] + content: ""; + display: block; + height: 0; + position: absolute; + top: 0; + transform: rotate(45deg); // [10] + width: 0; } + } - @include mq(375px) { - /* [15] */ - width: 85%; + @include mq(375px) { + .nhsuk-hero-content { + width: 85%; // [15] } + } - @include mq($from: tablet) { - @include top-and-bottom(); - bottom: -48px; /* [8] */ + @include mq($from: tablet) { + .nhsuk-hero-content { + @include top-and-bottom; + bottom: -48px; // [8] margin-bottom: 0; - max-width: 35em; /* [11] */ + max-width: 35em; // [11] padding: nhsuk-spacing(5) nhsuk-spacing(6); position: absolute; top: auto; } - @include mq($media-type: print) { + .nhsuk-hero__arrow { + left: 46px; // [9] + } + } + + @include mq($media-type: print) { + .nhsuk-hero-content { color: $color_nhsuk-black; max-width: 100%; padding: 0; } + } - @media screen and (-ms-high-contrast: active) { - /* [14] */ + @media screen and (-ms-high-contrast: active) { + .nhsuk-hero-content { + // [14] bottom: 0; margin-bottom: 0; min-height: 0; @@ -162,5 +159,9 @@ position: relative; top: 0; } + + .nhsuk-hero__arrow { + display: none; // [13] + } } } diff --git a/packages/components/hint/_hint.scss b/packages/components/hint/_hint.scss index 7b0b2c81f..814e4aaa1 100644 --- a/packages/components/hint/_hint.scss +++ b/packages/components/hint/_hint.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - COMPONENTS/ #HINT - ========================================================================== */ +//// +/// Hint component +/// +/// @group components +//// .nhsuk-hint { @include nhsuk-font(19); diff --git a/packages/components/images/README.md b/packages/components/images/README.md index d26f9e51c..7ac46a0be 100644 --- a/packages/components/images/README.md +++ b/packages/components/images/README.md @@ -12,13 +12,13 @@ Find out more about the images component and when to use it in the [NHS digital ```html
- Picture of allergic conjunctivitis + Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin.
- Itchy, red, watering eyes + Stretch marks can be pink, red, brown, black, silver or purple. They usually start off darker and fade over time.
- Picture of allergic conjunctivitis + Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin.
``` @@ -28,16 +28,16 @@ Find out more about the images component and when to use it in the [NHS digital {% from 'components/images/macro.njk' import image %} {{ image({ - "src": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-320x213.jpg", - "sizes": "(min-width: 1020px) 320px, (min-width: 768px) 50vw, 100vw", - "srcset": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-640x427.jpg 640w, https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-767x511.jpg 767w", - "alt": "Picture of allergic conjunctivitis", - "caption": "Itchy, red, watering eyes" + src: "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg", + sizes: "(max-width: 768px) 100vw, 66vw", + srcset: "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg 600w, https://service-manual.nhs.uk/assets/image-example-stretch-marks-1000w.jpg 1000w", + alt: "Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin.", + caption: "Stretch marks can be pink, red, brown, black, silver or purple. They usually start off darker and fade over time." }) }} {{ image({ - "src": "https://assets.nhs.uk/prod/images/S_1017_allergic-conjunctivitis_M15.2e16d0ba.fill-320x213.jpg", - "alt": "Picture of allergic conjunctivitis" + "src": "https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg", + "alt": "Close-up of a person’s tummy showing a number of creases in the skin under their belly button. Shown on light brown skin." }) }} ``` diff --git a/packages/components/images/_images.scss b/packages/components/images/_images.scss index 29d1f20b2..9f0f60029 100644 --- a/packages/components/images/_images.scss +++ b/packages/components/images/_images.scss @@ -1,34 +1,36 @@ -/* ========================================================================== - COMPONENTS / #IMAGES - ========================================================================== */ - -/** - * 1. Overrides default browser margin values. - * 2. Makes the image width two thirds of its container for desktop. - * 3. Avoid image printing full width of a page. - * 4. Removes top margin from subsequent nhsuk-image. - */ +//// +/// Image component +/// +/// 1. Overrides default browser margin values. +/// 2. Makes the image width two thirds of its container for desktop. +/// 3. Avoid image printing full width of a page. +/// 4. Removes top margin from subsequent nhsuk-image. +/// +/// @group components +//// + +@use "sass:math"; .nhsuk-image { background-color: $color_nhsuk-white; border-bottom: 1px solid $color_nhsuk-grey-4; - margin-left: 0; /* [1] */ - margin-right: 0; /* [1] */ + margin-left: 0; // [1] + margin-right: 0; // [1] @include nhsuk-responsive-margin(6, "bottom"); @include nhsuk-responsive-margin(6, "top"); @include mq($from: desktop) { - width: 66.66667%; /* [2] */ + width: math.percentage(math.div(2, 3)); // [2] } @include mq($media-type: print) { - width: 50%; /* [3] */ + width: math.percentage(math.div(1, 2)); // [3] } & + .nhsuk-image { - @include nhsuk-responsive-margin(0, "top"); /* [4] */ + @include nhsuk-responsive-margin(0, "top"); // [4] } } diff --git a/packages/components/input/_input.scss b/packages/components/input/_input.scss index e14d9df11..38d33f10c 100644 --- a/packages/components/input/_input.scss +++ b/packages/components/input/_input.scss @@ -1,21 +1,21 @@ -/* ========================================================================== - COMPONENTS/ #INPUT - ========================================================================== */ - -/** - * 1. Disable inner shadow and remove rounded corners - * 2. setting any background-color makes text invisible when changing colours to dark - * backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476) - * as background-color and color need to always be set together, color should - * not be set either. - */ +//// +/// Input component +/// +/// 1. Disable inner shadow and remove rounded corners +/// 2. setting any background-color makes text invisible when changing colours to dark +/// backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476) +/// as background-color and color need to always be set together, color should +/// not be set either. +/// +/// @group components +//// .nhsuk-input { @include nhsuk-font(19); - -moz-appearance: none; /* 1 */ - -webkit-appearance: none; /* 1 */ - appearance: none; /* 1 */ - border: $nhsuk-border-width-form-element solid $nhsuk-form-border-color; /* 2 */ + -moz-appearance: none; // [1] + -webkit-appearance: none; // [1] + appearance: none; // [1] + border: $nhsuk-border-width-form-element solid $nhsuk-form-border-color; // [2] border-radius: 0; box-sizing: border-box; min-height: 40px; @@ -35,7 +35,6 @@ } .nhsuk-input[type="number"] { - /* stylelint-disable-line string-quotes */ -moz-appearance: textfield; } @@ -75,7 +74,7 @@ max-width: 5.4ex; } -// Suffix and prefix +/// Suffix and prefix .nhsuk-input__wrapper { display: flex; diff --git a/packages/components/inset-text/_inset-text.scss b/packages/components/inset-text/_inset-text.scss index 7052200e0..778019fc2 100644 --- a/packages/components/inset-text/_inset-text.scss +++ b/packages/components/inset-text/_inset-text.scss @@ -1,17 +1,17 @@ -/* ========================================================================== - COMPONENTS / #INSET-TEXT - ========================================================================== */ - -/** - * 1. Removes top margin from first element and bottom margin from last, - * to ensure correct spacing within the component. - * 2. Restricts the width of the text to optimise the line length for - * readability. - */ +//// +/// Inset text component +/// +/// 1. Removes top margin from first element and bottom margin from last, +/// to ensure correct spacing within the component. +/// 2. Restricts the width of the text to optimise the line length for +/// readability. +/// +/// @group components +//// .nhsuk-inset-text { - @include top-and-bottom(); /* [1] */ - @include reading-width(); /* [2] */ + @include top-and-bottom; // [1] + @include reading-width; // [2] @include nhsuk-responsive-margin(7, "bottom"); @include nhsuk-responsive-margin(7, "top"); diff --git a/packages/components/label/_label.scss b/packages/components/label/_label.scss index 5d7a78cac..d6c8b40c0 100644 --- a/packages/components/label/_label.scss +++ b/packages/components/label/_label.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - COMPONENTS/ #LABEL - ========================================================================== */ +//// +/// Label component +/// +/// @group components +//// .nhsuk-label { @include nhsuk-font(19); @@ -9,7 +11,7 @@ margin-bottom: nhsuk-spacing(1); } -/* Modifiers that make labels look more like their equivalent headings */ +// Modifiers that make labels look more like their equivalent headings .nhsuk-label--xl, .nhsuk-label--l, .nhsuk-label--m { diff --git a/packages/components/pagination/_pagination.scss b/packages/components/pagination/_pagination.scss index cf7b139f0..5d4021aef 100644 --- a/packages/components/pagination/_pagination.scss +++ b/packages/components/pagination/_pagination.scss @@ -1,13 +1,13 @@ -/* ========================================================================== - COMPONENTS / #PAGINATION - ========================================================================== */ - -/** - * 1. Padding to give the icon spacing. - * 2. Append the word 'page' after next and - * previous on print stylesheets to make it easier - * to understand in print context. - */ +//// +/// Pagination component +/// +/// 1. Padding to give the icon spacing. +/// 2. Append the word 'page' after next and +/// previous on print stylesheets to make it easier +/// to understand in print context. +/// +/// @group components +//// .nhsuk-pagination { @include nhsuk-responsive-margin(7, "top"); @@ -15,7 +15,7 @@ } .nhsuk-pagination__list { - @include clearfix(); + @include clearfix; } .nhsuk-pagination-item--previous { @@ -28,7 +28,7 @@ } .nhsuk-pagination__title { - padding-left: nhsuk-spacing(5); /* [1] */ + padding-left: nhsuk-spacing(5); // [1] } } @@ -42,7 +42,7 @@ } .nhsuk-pagination__title { - padding-right: nhsuk-spacing(5); /* [1] */ + padding-right: nhsuk-spacing(5); // [1] } } @@ -119,8 +119,8 @@ display: block; @include mq($media-type: print) { - &:after { - content: " page"; /* [2] */ + &::after { + content: " page"; // [2] } } } diff --git a/packages/components/radios/_radios.scss b/packages/components/radios/_radios.scss index b7fade2c8..56513f18a 100644 --- a/packages/components/radios/_radios.scss +++ b/packages/components/radios/_radios.scss @@ -1,11 +1,11 @@ -/* ========================================================================== - COMPONENTS/ #RADIOS - ========================================================================== */ - -/** - * 1. remove 300ms pause on mobile. - * 2. Fix bug in IE11 caused by transform rotate (-45deg). - */ +//// +/// Radios component +/// +/// 1. remove 300ms pause on mobile. +/// 2. Fix bug in IE11 caused by transform rotate (-45deg). +/// +/// @group components +//// $nhsuk-radios-size: nhsuk-spacing(6); $nhsuk-radios-label-padding-left-right: 12px; @@ -46,8 +46,8 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; display: inline-block; margin-bottom: 0; padding: 8px $nhsuk-radios-label-padding-left-right nhsuk-spacing(1); - -ms-touch-action: manipulation; /* 1 */ - touch-action: manipulation; /* 1 */ + -ms-touch-action: manipulation; // [1] + touch-action: manipulation; // [1] } .nhsuk-radios__hint { @@ -82,25 +82,24 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; width: 0; } -/** - * Focus state - * - * 1. Since box-shadows are removed when users customise their colours - * We set a transparent outline that is shown instead. - * https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/ - */ +/// Focus state +/// +/// 1. Since box-shadows are removed when users customise their colours +/// We set a transparent outline that is shown instead. +/// +/// @link https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/ .nhsuk-radios__input:focus + .nhsuk-radios__label::before { - @include nhsuk-focused-radio(); + @include nhsuk-focused-radio; } -/* Selected state */ +/// Selected state .nhsuk-radios__input:checked + .nhsuk-radios__label::after { opacity: 1; } -/* Disabled state */ +/// Disabled state .nhsuk-radios__input:disabled, .nhsuk-radios__input:disabled + .nhsuk-radios__label { @@ -111,11 +110,9 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; opacity: 0.5; } -/* - * Inline variant - * - * 1. Prevent inline modifier being used with conditional reveals - */ +/// Inline variant +/// +/// 1. Prevent inline modifier being used with conditional reveals .nhsuk-radios--inline { @include mq($from: tablet) { @@ -129,7 +126,7 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; } &.nhsuk-radios--conditional { - /* 1 */ + // [1] .nhsuk-radios__item { float: none; margin-right: 0; @@ -137,7 +134,7 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; } } -/* Divider variant */ +/// Divider variant .nhsuk-radios__divider { $nhsuk-divider-size: $nhsuk-radios-size !default; @@ -149,7 +146,7 @@ $nhsuk-radios-focus-width: $nhsuk-focus-width + 1px; width: $nhsuk-divider-size; } -/* Conditional */ +/// Conditional $conditional-border-width: $nhsuk-border-width-mobile; // Calculate the amount of padding needed to keep the border centered against the radios. diff --git a/packages/components/radios/template.njk b/packages/components/radios/template.njk index 86c750c8d..0c1da935e 100644 --- a/packages/components/radios/template.njk +++ b/packages/components/radios/template.njk @@ -53,9 +53,10 @@ {%- else %} {%- set hasHint = true if item.hint.text or item.hint.html %} {%- set itemHintId = id + '-item-hint' %} + {% set isChecked = item.checked | default((item.value == params.value and item.checked != false) if params.value else false, true) %}
{% if item.conditional.html %} -
+
{{ item.conditional.html | safe }}
{% endif %} diff --git a/packages/components/select/_select.scss b/packages/components/select/_select.scss index 5e2f714a9..f8f8418b3 100644 --- a/packages/components/select/_select.scss +++ b/packages/components/select/_select.scss @@ -1,15 +1,16 @@ -/* ========================================================================== - COMPONENTS/ #SELECT - ========================================================================== */ - -/** - * Select input sizing - * 1. Uses rems so that safari input scales with font size - * 2. This min-width was chosen because: - * - it makes the Select wider than it is tall (which is what users expect) - * - 20ex + 3ex matches the 'width-10' variant of the input component - * - it fits comfortably on screens as narrow as 240px wide - */ +//// +/// Select component +/// +/// Input sizing: +/// +/// 1. Uses rems so that safari input scales with font size +/// 2. This min-width was chosen because: +/// - it makes the Select wider than it is tall (which is what users expect) +/// - 20ex + 3ex matches the 'width-10' variant of the input component +/// - it fits comfortably on screens as narrow as 240px wide +/// +/// @group components +//// .nhsuk-select { @include nhsuk-font(19); @@ -18,8 +19,8 @@ border: $nhsuk-border-width-form-element solid $nhsuk-form-border-color; box-sizing: border-box; color: $color-nhsuk-black; - height: 2.5rem; /* [1] */ - min-width: 20ex + 3ex; /* [2] */ + height: 2.5rem; // [1] + min-width: 20ex + 3ex; // [2] max-width: 100%; padding: nhsuk-spacing(1); diff --git a/packages/components/skip-link/_skip-link.scss b/packages/components/skip-link/_skip-link.scss index 47d974344..e9df162f7 100644 --- a/packages/components/skip-link/_skip-link.scss +++ b/packages/components/skip-link/_skip-link.scss @@ -1,20 +1,20 @@ -/* ========================================================================== - COMPONENTS / #SKIP-LINK - ========================================================================== */ - -/** - * 1. Hides the skip link off the page, - * 2. until the link gains focus from keyboard tabbing. - */ +//// +/// Skip link component +/// +/// 1. Hides the skip link off the page, +/// 2. until the link gains focus from keyboard tabbing. +/// +/// @group components +//// .nhsuk-skip-link { - left: -9999px; /* [1] */ + left: -9999px; // [1] padding: nhsuk-spacing(2); position: absolute; &:active, &:focus { - left: nhsuk-spacing(3); /* [2] */ + left: nhsuk-spacing(3); // [2] top: nhsuk-spacing(3); z-index: 2; } diff --git a/packages/components/summary-list/_summary-list.scss b/packages/components/summary-list/_summary-list.scss index be641cda5..8c85e5d73 100644 --- a/packages/components/summary-list/_summary-list.scss +++ b/packages/components/summary-list/_summary-list.scss @@ -1,27 +1,25 @@ -/* ========================================================================== - COMPONENTS/ #SUMMARY-LIST - ========================================================================== */ - -/** - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - * - * 1. Required to allow us to wrap words that overflow. - * 2. Reset default user agent styles - * 3. Automatic wrapping for unbreakable text (e.g. URLs) - * 4. Fallback for older browsers only - */ +//// +/// Summary list component +/// +/// 1. Required to allow us to wrap words that overflow. +/// 2. Reset default user agent styles +/// 3. Automatic wrapping for unbreakable text (e.g. URLs) +/// 4. Fallback for older browsers only +/// +/// @group components +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// .nhsuk-summary-list { @include nhsuk-font($size: 19); @include mq($from: tablet) { display: table; - table-layout: fixed; /* [1] */ + table-layout: fixed; // [1] width: 100%; } - margin: 0; /* [2] */ + margin: 0; // [2] @include nhsuk-responsive-margin(6, "bottom"); } @@ -38,7 +36,7 @@ .nhsuk-summary-list__key, .nhsuk-summary-list__value, .nhsuk-summary-list__actions { - margin: 0; /* [2] */ + margin: 0; // [2] vertical-align: top; @include mq($from: tablet) { @@ -62,9 +60,9 @@ .nhsuk-summary-list__key, .nhsuk-summary-list__value { - /* [3] */ + // [3] overflow-wrap: break-word; - word-wrap: break-word; /* [4] */ + word-wrap: break-word; // [4] } .nhsuk-summary-list__key { @@ -95,8 +93,8 @@ } .nhsuk-summary-list__actions-list { - margin: 0; /* [2] */ - padding: 0; /* [2] */ + margin: 0; // [2] + padding: 0; // [2] width: 100%; } diff --git a/packages/components/tables/_tables.scss b/packages/components/tables/_tables.scss index f05fcc5e8..24741f5d3 100644 --- a/packages/components/tables/_tables.scss +++ b/packages/components/tables/_tables.scss @@ -1,13 +1,13 @@ -/* ========================================================================== - COMPONENTS / #TABLE - ========================================================================== */ +//// +/// Table component +/// +/// @group components +//// -/** - * Table container is used to ensure the table does not break the container. - * - * 1. Margin is removed so there isn't double spacing. - * 2. XS size not added because it matches the table header, so it'd be bad for hierarchy - */ +/// Table container is used to ensure the table does not break the container. +/// +/// 1. Margin is removed so there isn't double spacing. +/// 2. XS size not added because it matches the table header, so it'd be bad for hierarchy .nhsuk-table-container { @include nhsuk-responsive-margin(7, "bottom"); @@ -19,7 +19,7 @@ width: 100%; .nhsuk-table { - margin: 0; /* [1] */ + margin: 0; // [1] } } @@ -39,14 +39,11 @@ @include nhsuk-typography-responsive(22); } -/* [2] */ +// [2] -/* Table row hover -========================================================================== */ - -/** - * Table row hover is used to aid readability for users. - */ +/// Table row hover +/// +/// Table row hover is used to aid readability for users. .nhsuk-table__row { &:hover { @@ -54,19 +51,16 @@ } } -/* Table panel with tab heading -========================================================================== */ - -/** - * 1. Margin is removed so there isn't double spacing. - */ +/// Table panel with tab heading +/// +/// 1. Margin is removed so there isn't double spacing. .nhsuk-table__panel-with-heading-tab { @include panel-with-label($color_nhsuk-white, $nhsuk-text-color, $color_nhsuk-grey-4); .nhsuk-table-container, .nhsuk-table { - margin: 0; /* [1] */ + margin: 0; // [1] } } @@ -74,34 +68,31 @@ @include heading-label($color_nhsuk-blue, $color_nhsuk-white); } -/* Responsive table -========================================================================== */ - -/** - * 1. Hiding the thead on mobile - * 2. Displaying the thead on desktop - * 3. Removing default screen reader behaviour - * 4. Assigning role of table-row on desktop to give default screen reader behaviour - * 5. Using justify content to space out elements in the row on mobile - * 6. Assigning a minimum width in case of black cell - * 7. Aligning content to the right on mobile - * 8. Aligning mobile header to left to split it from the data - * 9. Hiding mobile specific header from desktop view - * 10. Adding a display block value due to IE 11 not having full flex support - */ +/// Responsive table +/// +/// 1. Hiding the thead on mobile +/// 2. Displaying the thead on desktop +/// 3. Removing default screen reader behaviour +/// 4. Assigning role of table-row on desktop to give default screen reader behaviour +/// 5. Using justify content to space out elements in the row on mobile +/// 6. Assigning a minimum width in case of black cell +/// 7. Aligning content to the right on mobile +/// 8. Aligning mobile header to left to split it from the data +/// 9. Hiding mobile specific header from desktop view +/// 10. Adding a display block value due to IE 11 not having full flex support .nhsuk-table-responsive { margin-bottom: 0; width: 100%; thead { - @include visually-hidden; /* [1] */ + @include visually-hidden; // [1] @include mq($from: desktop) { - @include visually-shown(table-header-group); /* [2] */ + @include visually-shown(table-header-group); // [2] - &:before, - &:after { + &::before, + &::after { content: ""; } } @@ -111,64 +102,69 @@ .nhsuk-table-responsive__heading { font-weight: $nhsuk-font-bold; padding-right: nhsuk-spacing(3); - text-align: left; /* [8] */ - - @include mq($from: desktop) { - display: none; /* [9] */ - } + text-align: left; // [8] } .nhsuk-table__row { - display: block; /* [3] */ + display: block; // [3] margin-bottom: nhsuk-spacing(4); &:last-child { margin-bottom: 0; } + } - @include mq($from: desktop) { - display: table-row; /* [4] */ + .nhsuk-table__row th { + text-align: right; + } + + .nhsuk-table__row td { + display: block; // For browsers that don't support flexbox + display: flex; + justify-content: space-between; // [5] + min-width: 1px; // [6] + } + + @media all and (-ms-high-contrast: none) { + .nhsuk-table__row td { + display: block; // [10] } + } + + @include mq($until: desktop) { + .nhsuk-table__row td { + padding-right: 0; + text-align: right; // [7] - th { - text-align: right; - @include mq($from: desktop) { - text-align: left; + &:last-child { + border-bottom: 3px solid $color_nhsuk-grey-4; } } + } - td { - display: block; // For browsers that don't support flexbox - display: flex; - justify-content: space-between; /* [5] */ - min-width: 1px; /* [6] */ - @media all and (-ms-high-contrast: none) { - /* [10] */ - display: block; - } + @include mq($from: desktop) { + .nhsuk-table-responsive__heading { + display: none; // [9] + } - @include mq($from: desktop) { - display: table-cell; - } + .nhsuk-table__row { + display: table-row; // [4] + } - @include mq($until: desktop) { - padding-right: 0; - text-align: right; /* [7] */ - &:last-child { - border-bottom: 3px solid $color_nhsuk-grey-4; - } - } + .nhsuk-table__row th { + text-align: left; + } + + .nhsuk-table__row td { + display: table-cell; } } } } -/* Numeric tables -========================================================================== */ - -/** - * Right aligns table cells for numeric tables. - */ +/// Numeric tables +/// +/// Right aligns table cells for numeric tables. .nhsuk-table__header--numeric, .nhsuk-table__cell--numeric { diff --git a/packages/components/tabs/_tabs.scss b/packages/components/tabs/_tabs.scss index 713c3ac99..1a14cfca4 100644 --- a/packages/components/tabs/_tabs.scss +++ b/packages/components/tabs/_tabs.scss @@ -20,7 +20,7 @@ @include nhsuk-font($size: 19); margin-left: nhsuk-spacing(5); - &:before { + &::before { color: $nhsuk-text-color; content: "\2014 "; // "— " margin-left: -(nhsuk-spacing(5)); @@ -62,7 +62,7 @@ position: relative; text-align: center; - &:before { + &::before { content: none; } } @@ -90,7 +90,7 @@ margin-bottom: 0; - &:after { + &::after { bottom: 0; content: ""; left: 0; diff --git a/packages/components/tag/_tag.scss b/packages/components/tag/_tag.scss index 831764a26..0817fc314 100644 --- a/packages/components/tag/_tag.scss +++ b/packages/components/tag/_tag.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - #TAG - ========================================================================== */ +//// +/// Footer component +/// +/// @group components +//// .nhsuk-tag { @include nhsuk-font($size: 16, $weight: bold, $line-height: 1); @@ -17,8 +19,7 @@ text-decoration: none; } -/* Colour variants - ========================================================================== */ +/// Colour variants .nhsuk-tag--white { background-color: $color_nhsuk-white; @@ -80,8 +81,7 @@ color: shade($color_nhsuk-yellow, 70%); } -/* Remove tag border - ========================================================================== */ +/// Remove tag border .nhsuk-tag--no-border { border: 0; diff --git a/packages/components/task-list/_task-list.scss b/packages/components/task-list/_task-list.scss index ce8ab3729..fc1d6806c 100644 --- a/packages/components/task-list/_task-list.scss +++ b/packages/components/task-list/_task-list.scss @@ -1,7 +1,9 @@ -/** - * Original SASS taken from GOV.UK Design System - * /~https://github.com/alphagov/govuk-frontend/blob/main/packages/govuk-frontend/src/govuk/components/task-list/_index.scss - */ +//// +/// Task list component +/// +/// @group components +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// // NHS pages have a grey background, so we need a slightly daker colour for the hover // This produces 1.1:1 contrast, the same as GOV.UK’s @@ -25,7 +27,9 @@ $nhsuk-task-list-hover-color: darken($color_nhsuk-grey-5, 6%); position: relative; width: 100%; margin-bottom: 0; + // stylelint-disable-next-line function-calc-no-unspaced-operator padding-top: calc(nhsuk-spacing(2) + 4px); + // stylelint-disable-next-line function-calc-no-unspaced-operator padding-bottom: calc(nhsuk-spacing(2) + 4px); border-bottom: 1px solid $nhsuk-border-color; } @@ -63,6 +67,7 @@ $nhsuk-task-list-hover-color: darken($color_nhsuk-grey-5, 6%); @include nhsuk-font($size: 16, $weight: regular, $line-height: 1); padding-bottom: nhsuk-spacing(1); padding-left: nhsuk-spacing(2); + // stylelint-disable-next-line function-calc-no-unspaced-operator padding-top: calc(nhsuk-spacing(1) + 2px); // to match the spacing on tags text-decoration: none; } diff --git a/packages/components/textarea/_textarea.scss b/packages/components/textarea/_textarea.scss index 932d620e9..9a636cc03 100644 --- a/packages/components/textarea/_textarea.scss +++ b/packages/components/textarea/_textarea.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - COMPONENTS/ #TEXTAREA - ========================================================================== */ +//// +/// Textarea component +/// +/// @group components +//// .nhsuk-textarea { @include nhsuk-font(19); diff --git a/packages/components/warning-callout/_warning-callout.scss b/packages/components/warning-callout/_warning-callout.scss index 7334cc9dd..6395cb38f 100644 --- a/packages/components/warning-callout/_warning-callout.scss +++ b/packages/components/warning-callout/_warning-callout.scss @@ -1,16 +1,16 @@ -/* ========================================================================== - COMPONENTS / #WARNING-CALLOUT - ========================================================================== */ - -/** - * 1. Uses @mixin panel-with-label from tools/_mixins. - * 2. Uses @mixin heading-label from tools/_mixins. - */ +//// +/// Warning callout component +/// +/// 1. Uses @mixin panel-with-label from tools/_mixins. +/// 2. Uses @mixin heading-label from tools/_mixins. +/// +/// @group components +//// .nhsuk-warning-callout { - @include panel-with-label($color_nhsuk-pale-yellow, $nhsuk-text-color, $color_nhsuk-yellow); /* [1] */ + @include panel-with-label($color_nhsuk-pale-yellow, $nhsuk-text-color, $color_nhsuk-yellow); // [1] } .nhsuk-warning-callout__label { - @include heading-label($color_nhsuk-yellow, $nhsuk-text-color); /* [2] */ + @include heading-label($color_nhsuk-yellow, $nhsuk-text-color); // [2] } diff --git a/packages/core/README.md b/packages/core/README.md index 5560a08f9..600e05954 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -253,22 +253,22 @@ large-desktop: 990px - `$and`: additional custom directives ```scss -.responsive { +.nhsuk-example { // Apply styling to mobile and upwards @include mq($from: mobile) { - color: red; + color: $color_nhsuk-red; } // Apply styling up to devices smaller than tablets (exclude tablets) @include mq($until: tablet) { - color: blue; + color: $color_nhsuk-blue; } // Same thing, in landscape orientation @include mq($until: tablet, $and: '(orientation: landscape)') { - color: green; + color: $color_nhsuk-green; } // Apply styling to print media @include mq($media-type: print) { - color: orange; + color: $color_nhsuk-orange; } } ``` diff --git a/packages/core/all.scss b/packages/core/all.scss index 0c35075a2..13fc3c92d 100644 --- a/packages/core/all.scss +++ b/packages/core/all.scss @@ -1,6 +1,6 @@ -//*-----------------------------------*// -// #CORE -//*-----------------------------------*// +//// +/// Core +//// // Settings @import "settings/all"; diff --git a/packages/core/elements/_forms.scss b/packages/core/elements/_forms.scss index 5b415b975..6235dede9 100644 --- a/packages/core/elements/_forms.scss +++ b/packages/core/elements/_forms.scss @@ -1,12 +1,12 @@ -/* ========================================================================== - ELEMENTS / #FORMS - ========================================================================== */ - -/** - * Make sure our form elements don’t use any UA-specific font styles: we want - * them to use ours. This may need reverting as more design information becomes - * available, and we start putting together more complete forms. - */ +/// +/// Forms +/// +/// Make sure our form elements don’t use any UA-specific font styles: we want +/// them to use ours. This may need reverting as more design information becomes +/// available, and we start putting together more complete forms. +/// +/// @group elements +/// button, input, diff --git a/packages/core/elements/_links.scss b/packages/core/elements/_links.scss index bd494f38d..adfb4e824 100644 --- a/packages/core/elements/_links.scss +++ b/packages/core/elements/_links.scss @@ -1,25 +1,25 @@ -/* ========================================================================== - ELEMENTS / #LINKS - ========================================================================== */ - -/** - * Our basic `
` elements only need very minimal styling. - * It uses the @mixin nhsuk-link-style-default within tools/links. - * Anything more opinionated (e.g. buttons, calls-to-action, etc.) will need a - * class defining in the Components layer. - * - * 1. Outputs full link URL for print. - * 2. Point unit used for print. - */ +//// +/// Links +/// +/// Our basic `` elements only need very minimal styling. +/// It uses the @mixin nhsuk-link-style-default within tools/links. +/// Anything more opinionated (e.g. buttons, calls-to-action, etc.) will need a +/// class defining in the Components layer. +/// +/// 1. Outputs full link URL for print. +/// 2. Point unit used for print. +/// +/// @group elements +//// a { @include nhsuk-link-style-default; @include mq($media-type: print) { - &:after { + &::after { color: $color_nhsuk-black; - content: " (Link: " attr(href) ")"; /* [1] */ - font-size: inherit; /* [2] */ + content: " (Link: " attr(href) ")"; // [1] + font-size: inherit; // [2] } } } diff --git a/packages/core/elements/_page.scss b/packages/core/elements/_page.scss index d795204a6..f5e156a07 100644 --- a/packages/core/elements/_page.scss +++ b/packages/core/elements/_page.scss @@ -1,22 +1,22 @@ -/* ========================================================================== - ELEMENTS / #PAGE - ========================================================================== */ - -/** - * High-level, page-level styling. - * - * 1. The reason for this is to prevent "centering jumps" when navigating back - * and forth between pages with enough content to have a vertical scroll bar - * and pages that do not. - * 2. Fonts on OSX will look more consistent with other systems that do not - * render text using sub-pixel anti-aliasing. - * 3. Override the user agent style margin of 8px. - * 4. Ensure the page always fills at least the entire height of the viewport. - */ +//// +/// Page +/// +/// High-level, page-level styling. +/// +/// 1. The reason for this is to prevent "centering jumps" when navigating back +/// and forth between pages with enough content to have a vertical scroll bar +/// and pages that do not. +/// 2. Fonts on OSX will look more consistent with other systems that do not +/// render text using sub-pixel anti-aliasing. +/// 3. Override the user agent style margin of 8px. +/// 4. Ensure the page always fills at least the entire height of the viewport. +/// +/// @group elements +//// html { background-color: $color_nhsuk-grey-4; - overflow-y: scroll; /* [1] */ + overflow-y: scroll; // [1] @if $nhsuk-include-font-face { @include _nhsuk-font-face-frutiger; @@ -28,9 +28,9 @@ body { background-color: $color_nhsuk-grey-5; color: $nhsuk-text-color; font-size: $nhsuk-base-font-size; - -moz-osx-font-smoothing: grayscale; /* [2] */ - -webkit-font-smoothing: antialiased; /* [2] */ + -moz-osx-font-smoothing: grayscale; // [2] + -webkit-font-smoothing: antialiased; // [2] line-height: _nhsuk-line-height($nhsuk-base-line-height, $nhsuk-base-font-size); - margin: 0; /* [3] */ - min-height: 100%; /* [4] */ + margin: 0; // [3] + min-height: 100%; // [4] } diff --git a/packages/core/elements/_table.scss b/packages/core/elements/_table.scss index 73c5fec93..0f23b7d23 100644 --- a/packages/core/elements/_table.scss +++ b/packages/core/elements/_table.scss @@ -1,17 +1,17 @@ -/* ========================================================================== - ELEMENTS / #TABLES - ========================================================================== */ - -/** - * 1. Force ``s to be full-width by default. - */ +//// +/// Tables +/// +/// 1. Force `
`s to be full-width by default. +/// +/// @group elements +//// table { @include nhsuk-responsive-margin(7, "bottom"); border-spacing: 0; vertical-align: top; - width: 100%; /* [1] */ + width: 100%; // [1] @include mq($media-type: print) { page-break-inside: avoid; diff --git a/packages/core/generic/_box-sizing.scss b/packages/core/generic/_box-sizing.scss index 8bcbb64e3..b254df322 100644 --- a/packages/core/generic/_box-sizing.scss +++ b/packages/core/generic/_box-sizing.scss @@ -1,13 +1,13 @@ -/* ========================================================================== - GENERIC / #BOX-SIZING - ========================================================================== */ - -/** - * Set the global `box-sizing` state to `border-box`. - * - * https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice - * http://paulirish.com/2012/box-sizing-border-box-ftw - */ +//// +/// Box sizing +/// +/// Set the global `box-sizing` state to `border-box`. +/// +/// @link https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice +/// @link http://paulirish.com/2012/box-sizing-border-box-ftw +/// +/// @group generic +//// html { -moz-box-sizing: border-box; @@ -17,8 +17,8 @@ html { * { &, - &:before, - &:after { + &::before, + &::after { -moz-box-sizing: inherit; -webkit-box-sizing: inherit; box-sizing: inherit; diff --git a/packages/core/generic/_font-face.scss b/packages/core/generic/_font-face.scss index 0d79cf0e5..e1f044e4c 100644 --- a/packages/core/generic/_font-face.scss +++ b/packages/core/generic/_font-face.scss @@ -1,13 +1,13 @@ -// ========================================================================== -// SETTINGS / #FONT-FACE -// ========================================================================== - -// NHS uses the Frutiger font, it was originally made -// for print, but we've had to adapt for web. -// NHS England has a licence for the Frutiger webfont that the NHS website team can use. -// All other NHS England teams and other NHS organisations must have their own licence with Monotype. - -/* stylelint-disable indentation */ +//// +/// Font face +/// +/// NHS uses the Frutiger font, it was originally made +/// for print, but we've had to adapt for web. +/// NHS England has a licence for the Frutiger webfont that the NHS website team can use. +/// All other NHS England teams and other NHS organisations must have their own licence with Monotype. +/// +/// @group settings +//// @function nhsuk-font-url($filename) { @return url($nhsuk-fonts-path + $filename); diff --git a/packages/core/objects/_grid.scss b/packages/core/objects/_grid.scss index f61ebd534..72b518b95 100644 --- a/packages/core/objects/_grid.scss +++ b/packages/core/objects/_grid.scss @@ -1,6 +1,8 @@ -/* ========================================================================== - OBJECTS / #GRID - ========================================================================== */ +//// +/// Grid +/// +/// @group objects +//// @include govuk-exports("govuk/objects/grid") { @include govuk-grid-row; diff --git a/packages/core/objects/_main-wrapper.scss b/packages/core/objects/_main-wrapper.scss index 003ce08d0..9ee0d10d7 100644 --- a/packages/core/objects/_main-wrapper.scss +++ b/packages/core/objects/_main-wrapper.scss @@ -1,29 +1,25 @@ -/* ========================================================================== - OBJECTS / #MAIN-WRAPPER - ========================================================================== */ - -/** - * Page wrapper for the grid system - * - * Usage: - *
- *
- * - *
- *
- * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - * - * 1. In IE11 the `main` element can be used, but is not recognized – - * meaning it's not defined in IE's default style sheet, - * so it uses CSS initial value, which is inline. - */ +//// +/// Page wrapper for the grid system +/// +/// 1. In IE11 the `main` element can be used, but is not recognized – +/// meaning it's not defined in IE's default style sheet, +/// so it uses CSS initial value, which is inline +/// +/// @group objects +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// +/// @example html +///
+///
+/// +///
+///
+//// @mixin govuk-main-wrapper { - @include top-and-bottom(); - display: block; /* [1] */ + @include top-and-bottom; + display: block; // [1] padding-top: nhsuk-spacing(4); padding-bottom: nhsuk-spacing(4); diff --git a/packages/core/objects/_width-container.scss b/packages/core/objects/_width-container.scss index b9b7bb4f1..4d409ea2a 100644 --- a/packages/core/objects/_width-container.scss +++ b/packages/core/objects/_width-container.scss @@ -1,31 +1,27 @@ -/* ========================================================================== - OBJECTS / #WIDTH-CONTAINER - ========================================================================== */ - -/** - * Page width for the grid system - * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - * - * 1. On mobile, add half width gutters - * 2. Limit the width of the container to the page width - * 3. From desktop, add full width gutters - * 4. As soon as the viewport is greater than the width of the page plus the - * gutters, just centre the content instead of adding gutters. - * 5. Full width container, spanning the entire width of the viewport - */ +//// +/// Page width for the grid system +/// +/// 1. On mobile, add half width gutters +/// 2. Limit the width of the container to the page width +/// 3. From desktop, add full width gutters +/// 4. As soon as the viewport is greater than the width of the page plus the +/// gutters, just centre the content instead of adding gutters. +/// 5. Full width container, spanning the entire width of the viewport +/// +/// @group objects +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// @mixin govuk-width-container { - margin: 0 $nhsuk-gutter-half; /* [1] */ + margin: 0 $nhsuk-gutter-half; // [1] - max-width: $nhsuk-page-width; /* [2] */ + max-width: $nhsuk-page-width; // [2] @include govuk-media-query($from: desktop) { - margin: 0 $nhsuk-gutter; /* [3] */ + margin: 0 $nhsuk-gutter; // [3] } - /* [4] */ + // [4] @include govuk-media-query($and: "(min-width: #{($nhsuk-page-width + $nhsuk-gutter * 2)})") { margin: 0 auto; } @@ -33,10 +29,10 @@ @mixin nhsuk-width-container-fluid { margin: 0 $nhsuk-gutter-half; - max-width: 100%; /* [5] */ + max-width: 100%; // [5] @include govuk-media-query($from: desktop) { - margin: 0 $nhsuk-gutter; /* [3] */ + margin: 0 $nhsuk-gutter; // [3] } } @@ -44,6 +40,7 @@ .nhsuk-width-container { @include govuk-width-container; } + .nhsuk-width-container-fluid { @include nhsuk-width-container-fluid; } diff --git a/packages/core/settings/_all.scss b/packages/core/settings/_all.scss index 9ecdf14b1..f7119574d 100644 --- a/packages/core/settings/_all.scss +++ b/packages/core/settings/_all.scss @@ -1,6 +1,6 @@ -// ========================================================================== -// #SETTINGS -// ========================================================================== +//// +/// Settings +//// @import "breakpoints"; @import "colours"; diff --git a/packages/core/settings/_breakpoints.scss b/packages/core/settings/_breakpoints.scss index ef95d668f..46c6ef86a 100644 --- a/packages/core/settings/_breakpoints.scss +++ b/packages/core/settings/_breakpoints.scss @@ -1,26 +1,26 @@ -// ========================================================================== -// SETTINGS / #BREAKPOINTS -// ========================================================================== - -// -// sass-mq config - /~https://github.com/sass-mq/sass-mq -// -// mq() takes up to three optional parameters: -// $from: inclusive min-width boundary -// $until: exclusive max-width boundary -// $and: additional custom directives -// $media-type: $mq-media-type // defaults to 'all' -// -// 1. To enable support for browsers that do not support @media queries, -// (IE <= 8, Firefox <= 3, Opera <= 9) set $mq-responsive to false -// Create a separate stylesheet served exclusively to these browsers, -// meaning @media queries will be rasterized, relying on the cascade itself -// 2. Define the breakpoint from the $mq-breakpoints list that should -// be used as the target width when outputting a static stylesheet -// (i.e. when $mq-responsive is set to 'false'). +//// +/// Breakpoints +/// +/// @link /~https://github.com/sass-mq/sass-mq sass-mq config +/// +/// mq() takes up to three optional parameters: +/// $from: inclusive min-width boundary +/// $until: exclusive max-width boundary +/// $and: additional custom directives +/// $media-type: $mq-media-type // defaults to 'all' +/// +/// 1. To enable support for browsers that do not support @media queries, +/// (IE <= 8, Firefox <= 3, Opera <= 9) set $mq-responsive to false +/// Create a separate stylesheet served exclusively to these browsers, +/// meaning @media queries will be rasterized, relying on the cascade itself +/// 2. Define the breakpoint from the $mq-breakpoints list that should +/// be used as the target width when outputting a static stylesheet +/// (i.e. when $mq-responsive is set to 'false'). /// +/// @group settings +//// -$mq-responsive: true; // [1] // +$mq-responsive: true; // [1] $mq-breakpoints: ( mobile: 320px, @@ -29,4 +29,4 @@ $mq-breakpoints: ( large-desktop: 990px ); -$mq-static-breakpoint: desktop; // [2] // +$mq-static-breakpoint: desktop; // [2] diff --git a/packages/core/settings/_colours.scss b/packages/core/settings/_colours.scss index b5b4ed63b..0b8def3f0 100644 --- a/packages/core/settings/_colours.scss +++ b/packages/core/settings/_colours.scss @@ -1,20 +1,18 @@ -// ========================================================================== -// SETTINGS / #COLOURS -// ========================================================================== - -// -// NHS colour palette -// -// Colours are prefixed with color_ to make them easier to -// search for within the code base. -// -// We also prefix them with nhsuk- to prevent clashing with -// other colours in existing code bases. -// -// We use the word color, not colour, for variables. -// - -/* stylelint-disable color-no-hex */ +//// +/// NHS colour palette +/// +/// Colours are prefixed with color_ to make them easier to +/// search for within the code base. +/// +/// We also prefix them with nhsuk- to prevent clashing with +/// other colours in existing code bases. +/// +/// We use the word color, not colour, for variables. +/// +/// @group settings +//// + +// stylelint-disable color-no-hex $color_nhsuk-blue: #005eb8; $color_nhsuk-white: #ffffff; @@ -25,9 +23,7 @@ $color_nhsuk-dark-pink: #7c2855; $color_nhsuk-red: #d5281b; $color_nhsuk-yellow: #ffeb3b; -// -// Secondary colours -// +/// Secondary colours $color_nhsuk-pale-yellow: #fff9c4; $color_nhsuk-warm-yellow: #ffb81c; @@ -35,9 +31,7 @@ $color_nhsuk-orange: #ed8b00; $color_nhsuk-aqua-green: #00a499; $color_nhsuk-pink: #ae2573; -// -// Greyscale -// +/// Greyscale $color_nhsuk-grey-1: #4c6272; $color_nhsuk-grey-2: #768692; @@ -45,24 +39,23 @@ $color_nhsuk-grey-3: #aeb7bd; $color_nhsuk-grey-4: #d8dde0; $color_nhsuk-grey-5: #f0f4f5; -/* stylelint-enable color-no-hex */ -// -// RGB and alpha values -// -// Used to create drop/box shadows e.g. for search suggestions dropdown -// +// stylelint-enable color-no-hex + +/// RGB and alpha values +/// +/// Used to create drop/box shadows e.g. for search suggestions dropdown +/// $color_nhsuk-grey-1-rgb: rgb(66, 84, 98); $alpha-transparency-50: 0.5; -// -// Functions for tint and shade -// -// Usage: tint(color, percentage) -// tint($color_nhsuk-black, 10%) -// shade(color, percentage) -// shade($color_nhsuk-blue, 50%) -// +/// Functions for tint and shade +/// +/// @example scss +/// tint(color, percentage); +/// tint($color_nhsuk-black, 10%); +/// shade(color, percentage); +/// shade($color_nhsuk-blue, 50%); @function tint($color, $percentage) { @return mix(white, $color, $percentage); @@ -72,69 +65,68 @@ $alpha-transparency-50: 0.5; @return mix(black, $color, $percentage); } -// -// Primary colour variations -// -// 1. used for link :active states -// 2. used for .is-active state on main navigation -// 3. used for :hover states on main navigation -// 4. used for :active states on main navigation -// 5. used for primary button and action link icon :hover states -// 6. used for primary button and action link icon :active states -// +/// Primary colour variations +/// +/// 1. used for link :active states +/// 2. used for .is-active state on main navigation +/// 3. used for :hover states on main navigation +/// 4. used for :active states on main navigation +/// 5. used for primary button and action link icon :hover states +/// 6. used for primary button and action link icon :active states -$color_tint_nhsuk-black-10: tint($color_nhsuk-black, 10%); // [1] // +$color_tint_nhsuk-black-10: tint($color_nhsuk-black, 10%); // [1] -$color_shade_nhsuk-blue-20: shade($color_nhsuk-blue, 20%); // [2] // -$color_shade_nhsuk-blue-35: shade($color_nhsuk-blue, 35%); // [3] // -$color_shade_nhsuk-blue-50: shade($color_nhsuk-blue, 50%); // [4] // +$color_shade_nhsuk-blue-20: shade($color_nhsuk-blue, 20%); // [2] +$color_shade_nhsuk-blue-35: shade($color_nhsuk-blue, 35%); // [3] +$color_shade_nhsuk-blue-50: shade($color_nhsuk-blue, 50%); // [4] -$color_shade_nhsuk-green-35: shade($color_nhsuk-green, 35%); // [5] // -$color_shade_nhsuk-green-50: shade($color_nhsuk-green, 50%); // [6] // +$color_shade_nhsuk-green-35: shade($color_nhsuk-green, 35%); // [5] +$color_shade_nhsuk-green-50: shade($color_nhsuk-green, 50%); // [6] $color_transparent_nhsuk-white-20: rgba($color_nhsuk-white, 0.2); $color_transparent_nhsuk-blue-50: rgba($color_shade_nhsuk-blue-50, 0.1); -// -// Colour aliases -// +/// Colour aliases + +/// Text -// Text $nhsuk-text-color: $color_nhsuk-black; $nhsuk-secondary-text-color: $color_nhsuk-grey-1; $nhsuk-print-text-color: $color_nhsuk-black; +// stylelint-disable-next-line color-no-hex $nhsuk-footer-link-text-color: #003087; +// stylelint-disable-next-line color-no-hex $nhsuk-footer-copyright-text-color: #231f20; -// Links +/// Links + $nhsuk-link-color: $color_nhsuk-blue; $nhsuk-link-hover-color: $color_nhsuk-dark-pink; $nhsuk-link-active-color: shade($nhsuk-link-color, 50%); $nhsuk-link-visited-color: $color_nhsuk-purple; -// Focus +/// Focus + $nhsuk-focus-color: $color_nhsuk-yellow; $nhsuk-focus-text-color: $color_nhsuk-black; -// Border +/// Border + $nhsuk-border-color: $color_nhsuk-grey-4; $nhsuk-secondary-border-color: $color_transparent_nhsuk-white-20; -// Box shadow +/// Box shadow + $nhsuk-box-shadow: rgba(33, 43, 50, 0.16); $nhsuk-box-shadow-color: $color_nhsuk-grey-1-rgb; -// -// Forms -// +/// Forms $nhsuk-error-color: $color_nhsuk-red; $nhsuk-form-border-color: $color_nhsuk-grey-1; $nhsuk-form-element-background-color: $color_nhsuk-white; -// -// Buttons -// +/// Buttons $nhsuk-button-color: $color_nhsuk-green; $nhsuk-button-hover-color: shade($nhsuk-button-color, 20%); diff --git a/packages/core/settings/_globals.scss b/packages/core/settings/_globals.scss index 46c79b0ff..9f16e8624 100644 --- a/packages/core/settings/_globals.scss +++ b/packages/core/settings/_globals.scss @@ -1,15 +1,15 @@ -// ========================================================================== -// SETTINGS / #GLOBALS -// ========================================================================== - -// -// Fonts -// -// 1. Fallback fonts if Frutiger fails to load -// - -$nhsuk-font: Frutiger W01 !default; -$nhsuk-font-fallback: Arial, Sans-serif !default; // [1] // +//// +/// Globals +/// +/// @group settings +//// + +/// Fonts +/// +/// 1. Fallback fonts if Frutiger fails to load + +$nhsuk-font: "Frutiger W01" !default; +$nhsuk-font-fallback: arial, sans-serif !default; // [1] $nhsuk-font-family-print: sans-serif !default; $nhsuk-font-bold: 600 !default; $nhsuk-font-normal: 400 !default; @@ -17,30 +17,22 @@ $nhsuk-font-light: $nhsuk-font-normal !default; $nhsuk-fonts-path: "https://assets.nhs.uk/fonts/" !default; $nhsuk-include-font-face: true !default; -// -// Font sizing and spacing -// +/// Font sizing and spacing $nhsuk-base-font-size: 16px !default; $nhsuk-base-line-height: 24px !default; -// -// Icon default sizing -// +/// Icon default sizing $nhsuk-icon-size: 34px !default; -// -// Grid spacing -// +/// Grid spacing $nhsuk-page-width: 960px !default; $nhsuk-gutter: 32px; $nhsuk-gutter-half: $nhsuk-gutter * 0.5; -// -// Border sizes -// +/// Border sizes $nhsuk-border-width-inset-text: 8px !default; $nhsuk-care-card-triangle-border: 16px !default; @@ -49,15 +41,11 @@ $nhsuk-hero-border: 1px !default; $nhsuk-border-table-header-width: 2px !default; $nhsuk-border-table-cell-width: 1px !default; -// -// Border radius -// +/// Border radius $nhsuk-border-radius: 4px !default; -// -// Box shadow -// +/// Box shadow $nhsuk-box-shadow-spread: 4px !default; $nhsuk-box-shadow-blur: 4px !default; @@ -67,15 +55,11 @@ $nhsuk-box-expander: 4px !default; $nhsuk-box-shadow-pagination: 16px !default; $nhsuk-box-shadow-link: 4px !default; -// -// Header spacing -// +/// Header spacing $nhsuk-header-spacing: 20px; -// -// Form elements -// +/// Form elements $nhsuk-border-width-form-element: 2px !default; $nhsuk-border-width-form-element-error: 2px !default; diff --git a/packages/core/settings/_spacing.scss b/packages/core/settings/_spacing.scss index da187c6ed..92be6bb29 100644 --- a/packages/core/settings/_spacing.scss +++ b/packages/core/settings/_spacing.scss @@ -1,13 +1,12 @@ -// ========================================================================== -// SETTINGS / #SPACING -// ========================================================================== +//// +/// Spacing +/// +/// @group settings +//// -// -// Single point spacing variables -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Single point spacing variables +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) $nhsuk-spacing-points: ( 0: 0, @@ -22,23 +21,19 @@ $nhsuk-spacing-points: ( 9: 64px ) !default; -// Responsive spacing map -// ========================================================================== - -// -// These definitions are used to generate responsive spacing that adapts -// according to the breakpoints (see 'tools/spacing'). These maps should be -// used wherever possible to standardise responsive spacing. -// -// You can define different behaviour on tablet and desktop. The 'null' -// breakpoint is for mobile. -// -// Access responsive spacing with `nhsuk-responsive-margin` or -// `nhsuk-responsive-padding` mixins. -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Responsive spacing map +/// +/// These definitions are used to generate responsive spacing that adapts +/// according to the breakpoints (see 'tools/spacing'). These maps should be +/// used wherever possible to standardise responsive spacing. +/// +/// You can define different behaviour on tablet and desktop. The 'null' +/// breakpoint is for mobile. +/// +/// Access responsive spacing with `nhsuk-responsive-margin` or +/// `nhsuk-responsive-padding` mixins. +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) $nhsuk-spacing-responsive-scale: ( 0: ( diff --git a/packages/core/settings/_typography.scss b/packages/core/settings/_typography.scss index 81a693899..c866cf152 100644 --- a/packages/core/settings/_typography.scss +++ b/packages/core/settings/_typography.scss @@ -1,32 +1,30 @@ -// ========================================================================== -// SETTINGS / #TYPOGRAPHY -// ========================================================================== - -// Responsive typography font map -// ========================================================================== +//// +/// Typography +/// +/// @group settings +//// -// -// This is used to generate responsive typography that adapts according to the -// breakpoints. -// -// Font size and font weight can be defined for each breakpoint. You can define -// different behaviour on tablet and desktop. The 'null' breakpoint is for -// mobile. -// -// Line-heights will automatically be converted from pixel measurements into -// relative values. For example, with a font-size of 16px and a line-height of -// 24px, the line-height will be converted to 1.5 before output. -// -// You can also specify a separate font size and line height for print media. -// -// @prop {Number} $point.$breakpoint.font-size - Font size for `$point` at `$breakpoint` -// @prop {Number} $point.$breakpoint.line-height - Line height for `$point` at `$breakpoint` -// @prop {Number} $point.print.font-size - Font size for `$point` when printing -// @prop {Number} $point.print.line-height - Line height for `$point` when printing -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend +/// Responsive typography font map +/// +/// This is used to generate responsive typography that adapts according to the +/// breakpoints. +/// +/// Font size and font weight can be defined for each breakpoint. You can define +/// different behaviour on tablet and desktop. The 'null' breakpoint is for +/// mobile. +/// +/// Line-heights will automatically be converted from pixel measurements into +/// relative values. For example, with a font-size of 16px and a line-height of +/// 24px, the line-height will be converted to 1.5 before output. +/// +/// You can also specify a separate font size and line height for print media. +/// +/// @prop {Number} $point.$breakpoint.font-size - Font size for `$point` at `$breakpoint` +/// @prop {Number} $point.$breakpoint.line-height - Line height for `$point` at `$breakpoint` +/// @prop {Number} $point.print.font-size - Font size for `$point` when printing +/// @prop {Number} $point.print.line-height - Line height for `$point` when printing /// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) $nhsuk-typography-scale: ( 64: ( @@ -157,17 +155,12 @@ $nhsuk-typography-scale: ( ) ) !default; -// Font weights -// ========================================================================== +/// Font weights -// -// Font weight for normal typography -// +/// Font weight for normal typography $nhsuk-font-normal: 400 !default; -// -// Font weight for bold typography -// +/// Font weight for bold typography $nhsuk-font-bold: 600 !default; diff --git a/packages/core/styles/_icons.scss b/packages/core/styles/_icons.scss index a05fa7ceb..8d2e8a09d 100644 --- a/packages/core/styles/_icons.scss +++ b/packages/core/styles/_icons.scss @@ -1,15 +1,17 @@ -/* ========================================================================== - STYLES / #ICONS - ========================================================================== */ +//// +/// Icons +/// +/// @group styles +//// -// Default icon size +/// Default icon size .nhsuk-icon { height: $nhsuk-icon-size; width: $nhsuk-icon-size; } -// Default icon colours +/// Default icon colours .nhsuk-icon__search { fill: $color_nhsuk-blue; @@ -58,6 +60,7 @@ .nhsuk-icon__chevron-up { fill: $color_nhsuk-blue; + path { fill: $color_nhsuk-white; } @@ -77,7 +80,7 @@ fill: $color_nhsuk-blue; } -// Icon size adjustments +/// Icon size adjustments .nhsuk-icon--size-25 { height: $nhsuk-icon-size * 1.25; diff --git a/packages/core/styles/_lists.scss b/packages/core/styles/_lists.scss index 07556cccc..540534e2f 100644 --- a/packages/core/styles/_lists.scss +++ b/packages/core/styles/_lists.scss @@ -1,20 +1,20 @@ -/* ========================================================================== - STYLES / #LISTS - ========================================================================== */ - -// The % (silent class) allows code to be extended (@extend) to other elements -// without bloating the code. -// -// @example scss -// .foo { -// @extend %nhsuk-section-break--xl; -// } - -/** - * 1. 'Random number' used to align ul and ol left with content. - * 2. 'Random number' used to give sufficient spacing between text and icon. - * 3. 'Random number' used to align icon and text. - */ +//// +/// Lists +/// +/// The % (silent class) allows code to be extended (@extend) to other elements +/// without bloating the code. +/// +/// 1. 'Random number' used to align ul and ol left with content. +/// 2. 'Random number' used to give sufficient spacing between text and icon. +/// 3. 'Random number' used to align icon and text. +/// +/// @group styles +/// +/// @example scss +/// .foo { +/// @extend %nhsuk-section-break--xl; +/// } +//// %nhsuk-list { @include nhsuk-typography-responsive(19); @@ -41,7 +41,7 @@ %nhsuk-list--bullet { list-style-type: disc; - padding-left: 20px; /* [1] */ + padding-left: 20px; // [1] } .nhsuk-list--bullet { @@ -50,7 +50,7 @@ %nhsuk-list--number { list-style-type: decimal; - padding-left: 20px; /* [1] */ + padding-left: 20px; // [1] } .nhsuk-list--number { @@ -75,12 +75,12 @@ ol { .nhsuk-list--cross { list-style: none; margin-top: 0; - padding-left: 40px; /* [2] */ + padding-left: 40px; // [2] position: relative; svg { - left: -4px; /* [3] */ - margin-top: -5px; /* [3] */ + left: -4px; // [3] + margin-top: -5px; // [3] position: absolute; } } diff --git a/packages/core/styles/_section-break.scss b/packages/core/styles/_section-break.scss index b599d363f..a274a07ea 100644 --- a/packages/core/styles/_section-break.scss +++ b/packages/core/styles/_section-break.scss @@ -1,22 +1,20 @@ -/* ========================================================================== - STYLES / #SECTION-BREAK - ========================================================================== */ - -// The % (silent class) allows code to be extended (@extend) to other elements -// without bloating the code. -// -// @example scss -// .foo { -// @extend %nhsuk-section-break--xl; -// } - -/** - * 1. Extended the section-break--l code for usage of a semantic
with - * no class name. - * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - */ +//// +/// Section break +/// +/// The % (silent class) allows code to be extended (@extend) to other elements +/// without bloating the code. +/// +/// 1. Extended the section-break--l code for usage of a semantic
with +/// no class name. +/// +/// @group styles +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// +/// @example scss +/// .foo { +/// @extend %nhsuk-section-break--xl; +/// } +//// %nhsuk-section-break { border: 0; @@ -63,7 +61,7 @@ } hr { - /* [1] */ + // [1] @extend %nhsuk-section-break; @extend %nhsuk-section-break--l; @extend %nhsuk-section-break--visible; diff --git a/packages/core/styles/_typography.scss b/packages/core/styles/_typography.scss index bbb6a04a2..8bd21b08a 100644 --- a/packages/core/styles/_typography.scss +++ b/packages/core/styles/_typography.scss @@ -1,16 +1,20 @@ -/* ========================================================================== - STYLES / #TYPOGRAPHY - ========================================================================== */ - -/* Headings */ - -// The % (silent class) allows code to be extended (@extend) to other elements -// without bloating the code. -// -// @example scss -// .foo { -// @extend %nhsuk-heading-xl; -// } +//// +/// Typography +/// +/// @group styles +//// + +/// +/// Headings +/// +/// The % (silent class) allows code to be extended (@extend) to other elements +/// without bloating the code. +/// +/// @example scss +/// .foo { +/// @extend %nhsuk-heading-xl; +/// } +//// %nhsuk-heading-xl { @include nhsuk-typography-responsive(48); @@ -102,7 +106,7 @@ h6, @extend %nhsuk-heading-xxs; } -/* Captions to be used inside headings */ +/// Captions to be used inside headings .nhsuk-caption-xl { @include nhsuk-font(26); @@ -132,7 +136,7 @@ h6, margin-top: nhsuk-spacing(1); } -/* Body (paragraphs) */ +/// Body (paragraphs) %nhsuk-body-l { @include nhsuk-typography-responsive(24); @@ -181,17 +185,16 @@ address { font-style: normal; } -/** - * Lede text - * - * 1. Apply lede text styling to p and ul within the lede element - * 2. Reduces the spacing between the page heading and the lede text - */ +/// Lede text +/// +/// 1. Apply lede text styling to p and ul within the lede element +/// 2. Reduces the spacing between the page heading and the lede text .nhsuk-lede-text { @include nhsuk-font(24); @include nhsuk-responsive-margin(7, "bottom"); - /* [1] */ + + // [1] p, ul { @include nhsuk-font(24); @@ -203,22 +206,19 @@ address { @include nhsuk-responsive-margin(5, "bottom"); } -/* [2] */ +// [2] h1 + .nhsuk-lede-text, h1 + .nhsuk-lede-text--small { margin-top: -(nhsuk-spacing(2)); } -/** - * Contextual adjustments - * - * Add top padding to headings that appear directly after paragraphs. - * - * 1. Removes the padding-top because of the lede-text's increased margin-bottom - * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/nhsuk-frontend - */ +/// Contextual adjustments +/// +/// Add top padding to headings that appear directly after paragraphs. +/// +/// 1. Removes the padding-top because of the lede-text's increased margin-bottom +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) %nhsuk-body-l + %nhsuk-heading-l { padding-top: nhsuk-spacing(1); @@ -247,12 +247,12 @@ h1 + .nhsuk-lede-text--small { } } -/* [1] */ +// [1] .nhsuk-lede-text + %nhsuk-heading-l { padding-top: 0; } -/* Font weight for and */ +/// Font weight for and strong, b { @@ -290,6 +290,7 @@ b { } h1 { + // stylelint-disable-next-line declaration-no-important margin-bottom: 15pt !important; } diff --git a/packages/core/tools/_all.scss b/packages/core/tools/_all.scss index 1c70b587e..9eef9fb66 100644 --- a/packages/core/tools/_all.scss +++ b/packages/core/tools/_all.scss @@ -1,6 +1,6 @@ -// ========================================================================== -// #TOOLS -// ========================================================================== +//// +/// Tools +//// @import "exports"; @import "functions"; diff --git a/packages/core/tools/_exports.scss b/packages/core/tools/_exports.scss index 3e8c9ed3f..90fdad75c 100644 --- a/packages/core/tools/_exports.scss +++ b/packages/core/tools/_exports.scss @@ -1,30 +1,29 @@ -// ========================================================================== -// TOOLS / #EXPORTS -// ========================================================================== +//// +/// Exports +/// +/// @group tools +/// +/// Exports are used to ensure that the modules of CSS we define throughout Frontend +/// are only included in the generated CSS once, no matter how many times they +/// are included e.g. by individual components. +/// +/// 1. List of modules which have already been exported +/// 2. If the mixin is not in the list of modules already exported... +/// 3. then add it to the list +/// 4. ... and output the CSS for that module +/// 5. The next time exports is called for the module of the same name, +/// it will be found in the list and so nothing will be outputted. +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// -// -// Exports are used to ensure that the modules of CSS we define throughout Frontend -// are only included in the generated CSS once, no matter how many times they -// are included e.g. by individual components. -// -// -// 1. List of modules which have already been exported -// 2. If the mixin is not in the list of modules already exported... -// 3. then add it to the list -// 4. ... and output the CSS for that module -// 5. The next time exports is called for the module of the same name, -// it will be found in the list and so nothing will be outputted. -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// - -$imported-modules: () !default; // [1] // +$imported-modules: () !default; // [1] @mixin govuk-exports($name, $warn: true) { - @if (index($imported-modules, $name) == null) { - // [2] // - $imported-modules: append($imported-modules, $name) !global; // [3] // - @content; // [4] // - } // [5] // + @if not index($imported-modules, $name) { + // [2] + $imported-modules: append($imported-modules, $name) !global; // [3] + @content; // [4] + } + // [5] } diff --git a/packages/core/tools/_focused.scss b/packages/core/tools/_focused.scss index c64b85c8b..6293383a8 100644 --- a/packages/core/tools/_focused.scss +++ b/packages/core/tools/_focused.scss @@ -1,13 +1,13 @@ -// ========================================================================== -// TOOLS / #FOCUSED -// ========================================================================== +//// +/// Focused +/// +/// @group tools +//// -// -// Focused text -// -// Provides an outline to clearly indicate when the target element is focused. -// Used for interactive text-based elements. -// +/// Focused text +/// +/// Provides an outline to clearly indicate when the target element is focused. +/// Used for interactive text-based elements. @mixin nhsuk-focused-text { background-color: $nhsuk-focus-color; @@ -33,7 +33,7 @@ @mixin nhsuk-focused-input { border: 2px solid $nhsuk-focus-text-color; box-shadow: inset 0 0 0 2px; - outline: $nhsuk-focus-width solid $nhsuk-focus-color; /* 1 */ + outline: $nhsuk-focus-width solid $nhsuk-focus-color; // [1] outline-offset: 0; } @@ -67,7 +67,7 @@ border: 0; box-shadow: 0 $nhsuk-focus-width 0 0 $nhsuk-focus-text-color; color: $nhsuk-focus-text-color; - outline: $nhsuk-focus-width solid transparent; /* 1 */ + outline: $nhsuk-focus-width solid transparent; // [1] outline-offset: $nhsuk-focus-width; .nhsuk-icon { diff --git a/packages/core/tools/_functions.scss b/packages/core/tools/_functions.scss index d64a1c0ba..30b9f05e5 100644 --- a/packages/core/tools/_functions.scss +++ b/packages/core/tools/_functions.scss @@ -1,43 +1,42 @@ -// ========================================================================== -// TOOLS / #FUNCTIONS -// ========================================================================== - -// Convert pixels to em -// ========================================================================== - -// -// A quick way to convert px into em -// Usage: nhsuk-em(20px, $nhsuk-base-font-size); -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +//// +/// Functions +/// +/// @group tools +//// @use "sass:math"; +/// Convert pixels to em +/// +/// A quick way to convert px into em +/// +/// @example scss +/// nhsuk-em(20px, $nhsuk-base-font-size); +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) + @function nhsuk-em($value, $context-font-size) { - @if (unitless($value)) { + @if unitless($value) { $value: $value * 1px; } - @if (unitless($context-font-size)) { + @if unitless($context-font-size) { $context-font-size: $context-font-size * 1px; } @return math.div($value, $context-font-size) * 1em; } -// Convert pixels to rem -// ========================================================================== - -// -// A quick way to convert px into rem -// Usage: nhsuk-px-to-rem(20px); -// -// The $nhsuk-base-font-size (defined in settings/_globals.scss) -// must be configured to match the font-size of your root (html) element -// +/// Convert pixels to rem +/// +/// A quick way to convert px into rem +/// +/// @example scss +/// nhsuk-px-to-rem(20px); +/// +/// The $nhsuk-base-font-size (defined in settings/_globals.scss) +/// must be configured to match the font-size of your root (html) element @function nhsuk-px-to-rem($value) { - @if (unitless($value)) { + @if unitless($value) { $value: $value * 1px; } diff --git a/packages/core/tools/_grid.scss b/packages/core/tools/_grid.scss index dfcd6f8c8..ac9bb5e7b 100644 --- a/packages/core/tools/_grid.scss +++ b/packages/core/tools/_grid.scss @@ -1,33 +1,28 @@ -// ========================================================================== -// TOOLS / #GRID -// ========================================================================== +//// +/// Grid +/// +/// @group tools +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +@use "sass:math"; -// Map of grid column widths -// ========================================================================== +/// Map of grid column widths $_nhsuk-grid-widths: ( - one-quarter: 25%, - one-third: 33.3333%, - one-half: 50%, - two-thirds: 66.6666%, - three-quarters: 75%, + one-quarter: math.percentage(math.div(1, 4)), + one-third: math.percentage(math.div(1, 3)), + one-half: math.percentage(math.div(1, 2)), + two-thirds: math.percentage(math.div(2, 3)), + three-quarters: math.percentage(math.div(3, 4)), full: 100% ) !default; -// -// Grid width percentage -// -// @param {String} $key - Name of grid width (e.g. two-thirds) -// @return {Number} Percentage width -// @throw if `$key` is not a valid grid width -// -// Usage: -// +/// Grid width percentage +/// +/// @param {String} $key - Name of grid width (e.g. two-thirds) +/// @return {Number} Percentage width +/// @throw if `$key` is not a valid grid width @function grid-width($key) { @if map-has-key($_nhsuk-grid-widths, $key) { @@ -37,20 +32,17 @@ $_nhsuk-grid-widths: ( @error "Unknown grid width `#{$key}`"; } -// -// Generate grid row styles -// -// Creates a grid row class with a standardised margin. -// -// @param {String} $class [govuk-grid-row] CSS class name -// -// @example scss - Default -// @include govuk-grid-row; -// -// @example scss - Customising the class name -// @include govuk-grid-row("app-grid"); -// -// +/// Generate grid row styles +/// +/// Creates a grid row class with a standardised margin. +/// +/// @param {String} $class [govuk-grid-row] CSS class name +/// +/// @example scss - Default +/// @include govuk-grid-row; +/// +/// @example scss - Customising the class name +/// @include govuk-grid-row("app-grid"); @mixin govuk-grid-row($class: "nhsuk-grid-row") { .#{$class} { @@ -60,35 +52,33 @@ $_nhsuk-grid-widths: ( } } -// -// Generate grid column styles -// -// Creates a cross browser grid column with a class of '.govuk-grid-column' by -// default, and a standardised gutter between the columns. -// -// Common widths are predefined above as keywords in the `$grid-widths` map. -// -// By default their width changes from 100% to specified width at the 'tablet' -// breakpoint, but that can be configured to be any other breakpoint by using -// the `$at` parameter. -// -// @param {String} $class [govuk-grid-column] CSS class name -// @param {String} $width [full] one-quarter | one-third | one-half | two-third | three-quarters | full -// @param {String} $float [left] left | right -// @param {String} $at [tablet] - mobile | tablet | desktop | any custom breakpoint in px or em -// -// @example scss - Default -// @include govuk-grid-column(two-thirds) -// -// @example scss - Customising the class name -// @include govuk-grid-column(one-half, $class: "test-column"); -// -// @example scss - Customising the breakpoint where width percentage is applied -// @include govuk-grid-column(one-half, $at: desktop); -// -// @example scss - Customising the float direction -// @include govuk-grid-column(one-half, $float: right); -// +/// Generate grid column styles +/// +/// Creates a cross browser grid column with a class of '.govuk-grid-column' by +/// default, and a standardised gutter between the columns. +/// +/// Common widths are predefined above as keywords in the `$grid-widths` map. +/// +/// By default their width changes from 100% to specified width at the 'tablet' +/// breakpoint, but that can be configured to be any other breakpoint by using +/// the `$at` parameter. +/// +/// @param {String} $class [govuk-grid-column] CSS class name +/// @param {String} $width [full] one-quarter | one-third | one-half | two-third | three-quarters | full +/// @param {String} $float [left] left | right +/// @param {String} $at [tablet] - mobile | tablet | desktop | any custom breakpoint in px or em +/// +/// @example scss - Default +/// @include govuk-grid-column(two-thirds) +/// +/// @example scss - Customising the class name +/// @include govuk-grid-column(one-half, $class: "test-column"); +/// +/// @example scss - Customising the breakpoint where width percentage is applied +/// @include govuk-grid-column(one-half, $at: desktop); +/// +/// @example scss - Customising the float direction +/// @include govuk-grid-column(one-half, $float: right); @mixin govuk-grid-column($width: full, $float: left, $at: desktop, $class: "nhsuk-grid-column") { .#{$class}-#{$width} { diff --git a/packages/core/tools/_ifff.scss b/packages/core/tools/_ifff.scss index dae1c141a..f7ea1634b 100644 --- a/packages/core/tools/_ifff.scss +++ b/packages/core/tools/_ifff.scss @@ -1,18 +1,16 @@ -// ========================================================================== -// TOOLS / #ifff -// ========================================================================== - -// -// Syntactic sugar around Sass' built-in `if` function that does not require -// you to pass a value for `$if-false`. -// -// @param {Boolean} $condition - Whether to return the value of `$if-true` -// @param {Mixed} $if-true - Value to return if `$condition` is truthy -// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +//// +/// Ifff +/// +/// Syntactic sugar around Sass' built-in `if` function that does not require +/// you to pass a value for `$if-false`. +/// +/// @group tools +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// +/// @param {Boolean} $condition - Whether to return the value of `$if-true` +/// @param {Mixed} $if-true - Value to return if `$condition` is truthy +/// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null +//// @function iff($condition, $if-true) { @return if($condition, $if-true, null); diff --git a/packages/core/tools/_links.scss b/packages/core/tools/_links.scss index 678151d3c..cad03beb2 100644 --- a/packages/core/tools/_links.scss +++ b/packages/core/tools/_links.scss @@ -1,12 +1,13 @@ -// ========================================================================== -// TOOLS / #LINKS -// ========================================================================== +//// +/// Links +/// +/// @group tools +//// -// -// Default link styling -// -// Usage: @include nhsuk-link-style-default; -// +/// Default link styling +/// +/// @example scss +/// @include nhsuk-link-style-default; @mixin nhsuk-link-style-default { color: $nhsuk-link-color; @@ -21,7 +22,7 @@ } &:focus { - @include nhsuk-focused-text(); + @include nhsuk-focused-text; &:hover { text-decoration: none; @@ -41,11 +42,10 @@ } } -// -// White link styling, used in the footer. -// -// Usage: @include nhsuk-link-style-white; -// +/// White link styling, used in the footer. +/// +/// @example scss +/// @include nhsuk-link-style-white; @mixin nhsuk-link-style-white { color: $color_nhsuk-white; @@ -71,11 +71,10 @@ } } -// -// Default link hover only styling -// -// Usage: @include nhsuk-link-style-hover; -// +/// Default link hover only styling +/// +/// @example scss +/// @include nhsuk-link-style-hover; @mixin nhsuk-link-style-hover { &:hover { @@ -100,7 +99,6 @@ /// @include nhsuk-link-style-default; /// @include nhsuk-link-style-no-visited-state; /// } -/// @mixin nhsuk-link-style-no-visited-state { &:link { @@ -137,7 +135,6 @@ /// @include nhsuk-link-style-default; /// @include nhsuk-link-style-text; /// } -/// @mixin nhsuk-link-style-text { &:link, diff --git a/packages/core/tools/_mixins.scss b/packages/core/tools/_mixins.scss index bc903f864..7b95dc531 100644 --- a/packages/core/tools/_mixins.scss +++ b/packages/core/tools/_mixins.scss @@ -1,41 +1,43 @@ -// ========================================================================== -// TOOLS / #MIXINS -// ========================================================================== +//// +/// Mixins +/// +/// @group tools +//// -// -// Clearfix mixin -// -// Usage: @include clearfix(); -// See utilities/clearfix -// +/// Clearfix mixin +/// +/// @see utilities/clearfix +/// +/// @example scss +/// @include clearfix(); @mixin clearfix() { - &:after { + &::after { clear: both; content: ""; display: block; } } -// -// Reading width mixin, add a maximum width -// to large pieces of content -// -// Usage: @include reading-width(); -// See utilities/reading-width -// +/// Reading width mixin, add a maximum width +/// to large pieces of content +/// +/// @see utilities/reading-width +/// +/// @example scss +/// @include reading-width(); @mixin reading-width() { max-width: 44em; } -// -// Visually hidden mixin, used for hiding -// content visually but keeping it in the DOM -// -// Usage: @include visually-hidden(); -// See utilities/visually-hidden -// +/// Visually hidden mixin, used for hiding +/// content visually but keeping it in the DOM +/// +/// @see utilities/visually-hidden +/// +/// @example scss +/// @include visually-hidden(); @mixin visually-hidden() { // Absolute positioning has the unintended consequence of removing any @@ -63,15 +65,15 @@ width: 1px; } -// -// Visually shown mixin, used for displaying -// content visually that has previously been hidden -// by visually-hidden -// Differences between mobile and desktop views -// Use $display-property to assign display -// -// Usage: @include visually-shown(table-header-group); -// +/// Visually shown mixin, used for displaying +/// content visually that has previously been hidden +/// by visually-hidden +/// +/// Differences between mobile and desktop views +/// Use $display-property to assign display +/// +/// @example scss +/// @include visually-shown(table-header-group); @mixin visually-shown($display-property) { clip: auto; @@ -84,32 +86,33 @@ width: auto; } -// -// Top and bottom margin mixin, remove -// the top and bottom margin spacing -// -// Usage: @include top-and-bottom(); -// See utilities/top-and-bottom -// +/// Top and bottom margin mixin, remove +/// the top and bottom margin spacing +/// +/// @see utilities/top-and-bottom +/// +/// @example scss +/// @include top-and-bottom(); @mixin top-and-bottom() { & > *:first-child { margin-top: 0; } + & > *:last-child { margin-bottom: 0; } } -// -// Panel mixin -// -// Usage: @include panel-with-label($color_nhsuk-blue, $color_nhsuk-white); -// See components/_panel -// +/// Panel mixin +/// +/// See components/_panel +/// +/// @example scss +/// @include panel-with-label($color_nhsuk-blue, $color_nhsuk-white); @mixin panel($panel-background-color, $panel-text-color) { - @include top-and-bottom(); + @include top-and-bottom; @include nhsuk-responsive-margin(7, "bottom"); @include nhsuk-responsive-margin(7, "top"); @include nhsuk-responsive-padding(5); @@ -123,56 +126,57 @@ } } -// -// Panel with label mixin, inherits panel styling -// and removes padding top for the label positioning. -// -// Used in-conjunction with @mixin heading-label -// -// Usage: @include panel-with-label($color_nhsuk-blue, $color_nhsuk-white); -// See components/_warning-component -// +/// Panel with label mixin, inherits panel styling +/// and removes padding top for the label positioning. +/// +/// Used in-conjunction with @mixin heading-label +/// +/// @see components/_warning-component +/// +/// @example scss +/// @include panel-with-label($color_nhsuk-blue, $color_nhsuk-white); @mixin panel-with-label($panel-background-color, $panel-text-color, $panel-border-color) { @include panel($panel-background-color, $panel-text-color); border: 1px solid $panel-border-color; - padding-top: 0 !important; /* stylelint-disable-line declaration-no-important */ + // stylelint-disable-next-line declaration-no-important + padding-top: 0 !important; } -// -// Heading label mixin, adds a tab heading to -// warning callout, do and don't lists and panel. -// -// Used in-conjunction with @mixin panel-with-label -// -// Usage: @include heading-label($color_nhsuk-blue, $color_nhsuk-white); -// See components/_warning-component -// -// 1. Background colour to be set on the @include. -// 2. Text colour to be set on the @include. -// 3. Display inline-block so it does not take up the full width. -// 4. Margin -24px left and right aligns the heading to the box. -// 5. Top positioning set to minus to make the heading -// sit just outside the box. -// +/// Heading label mixin, adds a tab heading to +/// warning callout, do and don't lists and panel. +/// +/// Used in-conjunction with @mixin panel-with-label +/// +/// @see components/_warning-component +/// +/// 1. Background colour to be set on the @include. +/// 2. Text colour to be set on the @include. +/// 3. Display inline-block so it does not take up the full width. +/// 4. Margin -24px left and right aligns the heading to the box. +/// 5. Top positioning set to minus to make the heading +/// sit just outside the box. +/// +/// @example scss +/// @include heading-label($color_nhsuk-blue, $color_nhsuk-white); @mixin heading-label($heading-background-color, $heading-text-color) { @include nhsuk-typography-responsive(24); - background-color: $heading-background-color; // [1] // - color: $heading-text-color; // [2] // - display: inline-block; // [3] // + background-color: $heading-background-color; // [1] + color: $heading-text-color; // [2] + display: inline-block; // [3] margin: nhsuk-spacing(0) nhsuk-spacing(0) nhsuk-spacing(2) -33px; padding: nhsuk-spacing(2) nhsuk-spacing(5); position: relative; - top: -16px; // [5] // + top: -16px; // [5] @include mq($until: tablet) { margin-left: -25px; margin-right: 0; padding: nhsuk-spacing(2) nhsuk-spacing(4); - top: -8px; // [5] // + top: -8px; // [5] } @include mq($media-type: print) { @@ -182,13 +186,13 @@ } } -// -// Care card mixin, used for creating -// different coloured care cards. -// -// Usage: @include care-card($color_nhsuk-blue, $color_nhsuk-white, 4px); -// See components/card/card -// +/// Care card mixin, used for creating +/// different coloured care cards. +/// +/// @see components/card/card +/// +/// @example scss +/// @include care-card($color_nhsuk-blue, $color_nhsuk-white, 4px); @mixin care-card($heading-background-color, $heading-text-color, $print-border-size) { .nhsuk-card--care__heading-container { @@ -203,13 +207,13 @@ } } -// -// Print colour mixin, sets the text print colour -// warning callout, do and don't lists and panels. -// -// Usage: @include print-color($nhsuk-print-text-color); -// See components/_care-card -// +/// Print colour mixin, sets the text print colour +/// warning callout, do and don't lists and panels. +/// +/// @see components/_care-card +/// +/// @example scss +/// @include print-color($nhsuk-print-text-color); @mixin print-color($print-color) { @include mq($media-type: print) { @@ -224,12 +228,12 @@ } } -// -// Print hide mixin, hides the element from print. -// -// Usage: @include print-hide(); -// See components/_care-card -// +/// Print hide mixin, hides the element from print. +/// +/// @see components/_care-card +/// +/// @example scss +/// @include print-hide(); @mixin print-hide() { @include mq($media-type: print) { @@ -237,20 +241,20 @@ } } -// -// Flex mixin -// Usage: @include flex(); -// +/// Flex mixin +/// +/// @example scss +/// @include flex(); @mixin flex() { display: flex; flex-wrap: wrap; } -// -// Flex item mixin -// Usage: @include flex-item(); -// +/// Flex item mixin +/// +/// @example scss +/// @include flex-item(); @mixin flex-item() { display: flex; @@ -260,10 +264,9 @@ } } -// -// Remove margin mobile mixin, removes left and right -// margin at tablet breakpoint. -// +/// Remove margin mobile mixin +/// +/// Removes left and right margin at tablet breakpoint @mixin remove-margin-mobile() { @include mq($until: tablet) { diff --git a/packages/core/tools/_sass-mq.scss b/packages/core/tools/_sass-mq.scss index 652363fe9..6b8bc6ca5 100644 --- a/packages/core/tools/_sass-mq.scss +++ b/packages/core/tools/_sass-mq.scss @@ -1,13 +1,12 @@ -// ========================================================================== -// TOOLS / #SASS-MQ -// ========================================================================== - -// -// We use sass-mq module for media queries -// -// 1. Import sass-mq from our vendor dependencies folder opposed to node_modules -// in case node_modules is not installed in the folder relative to the root folder -// +//// +/// Sass MQ +/// +/// We use sass-mq module for media queries +/// +/// 1. Import sass-mq from our vendor dependencies folder opposed to node_modules +/// in case node_modules is not installed in the folder relative to the root folder +/// +/// @group tools $sass-mq-already-included: false !default; @@ -15,16 +14,13 @@ $sass-mq-already-included: false !default; $mq-show-breakpoints: (); } -@import "../vendor/sass-mq"; // [1] // +@import "../vendor/sass-mq"; // [1] $sass-mq-already-included: true; -// -// sass-mq helpers -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Helpers +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) @mixin govuk-media-query($args...) { @include mq($args...) { diff --git a/packages/core/tools/_shape-arrow.scss b/packages/core/tools/_shape-arrow.scss index 7c620eff8..04eff6c36 100644 --- a/packages/core/tools/_shape-arrow.scss +++ b/packages/core/tools/_shape-arrow.scss @@ -1,20 +1,17 @@ -// ========================================================================== -// TOOLS / #SHAPE-ARROW -// ========================================================================== +//// +/// Shape arrow +/// +/// @group tools +//// -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// -// Calculate the height of an equilateral triangle -// Multiplying half the length of the base of an equilateral triangle by the -// square root of three gives us its height. We use 1.732 as an approximation. -// -// @param {Number} $base - Length of the base of the triangle -// @return {Number} Calculated height of the triangle -// - -/* stylelint-disable string-quotes, order/properties-alphabetical-order */ +/// Calculate the height of an equilateral triangle +/// Multiplying half the length of the base of an equilateral triangle by the +/// square root of three gives us its height. We use 1.732 as an approximation. +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// +/// @param {Number} $base - Length of the base of the triangle +/// @return {Number} Calculated height of the triangle @function _govuk-equilateral-height($base) { $square-root-of-three: 1.732; @@ -22,23 +19,21 @@ @return ($base * 0.5) * $square-root-of-three; } -// -// Arrow mixin -// -// Generate Arrows (triangles) by using a mix of transparent (1) and coloured -// borders. The coloured borders inherit the text colour of the element (2). -// -// Ensure the arrow is rendered correctly if browser colours are overridden by -// providing a clip path (3). Without this the transparent borders are -// overridden to become visible which results in a square. -// -// We need both because older browsers do not support clip-path. -// -// @param {String} $direction - Direction for arrow: up, right, down, left. -// @param {Number} $base - Length of the triangle 'base' side -// @param {Number} $height [null] - Height of triangle. Omit for equilateral. -// @param {String} $display [block] - CSS display property of the arrow -// +/// Arrow mixin +/// +/// Generate Arrows (triangles) by using a mix of transparent (1) and coloured +/// borders. The coloured borders inherit the text colour of the element (2). +/// +/// Ensure the arrow is rendered correctly if browser colours are overridden by +/// providing a clip path (3). Without this the transparent borders are +/// overridden to become visible which results in a square. +/// +/// We need both because older browsers do not support clip-path. +/// +/// @param {String} $direction - Direction for arrow: up, right, down, left. +/// @param {Number} $base - Length of the triangle 'base' side +/// @param {Number} $height [null] - Height of triangle. Omit for equilateral. +/// @param {String} $display [block] - CSS display property of the arrow @mixin govuk-shape-arrow($direction, $base, $height: null, $display: block) { display: $display; @@ -51,14 +46,14 @@ $perpendicular: $base * 0.5; - @if ($height == null) { + @if not $height { $height: _govuk-equilateral-height($base); } @if $direction == "up" { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3 - border-width: 0 $perpendicular $height $perpendicular; + border-width: 0 $perpendicular $height; border-bottom-color: inherit; // 2 } @else if $direction == "right" { clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3 diff --git a/packages/core/tools/_spacing.scss b/packages/core/tools/_spacing.scss index 9dff39597..44c3e6f61 100644 --- a/packages/core/tools/_spacing.scss +++ b/packages/core/tools/_spacing.scss @@ -1,32 +1,30 @@ -// ========================================================================== -// TOOLS - #SPACING -// ========================================================================== - -// Single point spacing -// ========================================================================== - -// -// Returns measurement corresponding to the spacing point requested. -// -// @param {Number} $spacing-point - Point on the spacing scale (set in `settings/_spacing.sccs`) -// -// @returns {String} Spacing Measurement eg. 8px -// -// @example scss -// .foo { -// padding: nhsuk-spacing(5); -// top: nhsuk-spacing(2) !important; // if `!important` is required -// } -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +//// +/// Spacing +/// +/// @group tools +//// + +/// Single point spacing +/// +/// Returns measurement corresponding to the spacing point requested. +/// +/// @param {Number} $spacing-point - Point on the spacing scale (set in `settings/_spacing.sccs`) +/// +/// @returns {String} Spacing Measurement eg. 8px +/// +/// @example scss +/// .foo { +/// padding: nhsuk-spacing(5); +/// top: nhsuk-spacing(2) !important; // if `!important` is required +/// } +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) @function nhsuk-spacing($spacing-point) { $actual-input-type: type-of($spacing-point); @if $actual-input-type != "number" { @error "Expected a number (integer), but got a " - + "#{$actual-input-type}."; /* stylelint-disable-line indentation */ + + "#{$actual-input-type}."; } @if not map-has-key($nhsuk-spacing-points, $spacing-point) { @@ -36,38 +34,35 @@ @return map-get($nhsuk-spacing-points, $spacing-point); } -// Responsive spacing -// ========================================================================== - -// -// Adds responsive spacing (either padding or margin, depending on `$property`) -// by fetching a 'spacing map' from the responsive spacing scale, which defines -// different spacing values at different breakpoints. -// -// To generate responsive spacing, use 'nhsuk-responsive-margin' or -// 'nhsuk-responsive-padding' mixins -// -// @param {Number} $responsive-spacing-point - Point on the responsive spacing -// scale, corresponds to a map of breakpoints and spacing values -// @param {String} $property - Property to add spacing to (e.g. 'margin') -// @param {String} $direction [all] - Direction to add spacing to -// (`top`, `right`, `bottom`, `left`, `all`) -// @param {Boolean} $important [false] - Whether to mark as `!important` -// @param {Number} $adjustment [false] - Offset to adjust spacing by -// -// @example scss -// .foo { -// padding: nhsuk-spacing(5); -// top: nhsuk-spacing(2) !important; // if `!important` is required -// } -// -// 1. Make sure that the return value from `_settings/spacing.scss` is a map. -// 2. Loop through each breakpoint in the map -// 3. The 'null' breakpoint is for mobile. -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Responsive spacing +/// +/// Adds responsive spacing (either padding or margin, depending on `$property`) +/// by fetching a 'spacing map' from the responsive spacing scale, which defines +/// different spacing values at different breakpoints. +/// +/// To generate responsive spacing, use 'nhsuk-responsive-margin' or +/// 'nhsuk-responsive-padding' mixins +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $property - Property to add spacing to (e.g. 'margin') +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing by +/// +/// @example scss +/// .foo { +/// padding: nhsuk-spacing(5); +/// top: nhsuk-spacing(2) !important; // if `!important` is required +/// } +/// +/// 1. Make sure that the return value from `_settings/spacing.scss` is a map. +/// 2. Loop through each breakpoint in the map +/// 3. The 'null' breakpoint is for mobile. +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// @mixin _nhsuk-responsive-spacing( $responsive-spacing-point, @@ -83,25 +78,25 @@ @if not map-has-key($nhsuk-spacing-responsive-scale, $responsive-spacing-point) { @error "Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the " - + "responsive spacing scale in `_settings/spacing.scss`."; /* stylelint-disable-line indentation */ + + "responsive spacing scale in `_settings/spacing.scss`."; } - $scale-map: map-get($nhsuk-spacing-responsive-scale, $responsive-spacing-point); // [1] // + $scale-map: map-get($nhsuk-spacing-responsive-scale, $responsive-spacing-point); // [1] $actual-map-type: type-of($scale-map); @if $actual-map-type != "map" { @error "Expected a number (integer), but got a " - + "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)"; /* stylelint-disable-line indentation */ + + "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)"; } @each $breakpoint, $breakpoint-value in $scale-map { - // [2] // + // [2] - @if ($adjustment) { + @if $adjustment { $breakpoint-value: $breakpoint-value + $adjustment; } - @if $breakpoint == null { - // [3] // + @if not $breakpoint { + // [3] @if $direction == all { #{$property}: $breakpoint-value iff($important, !important); @@ -120,61 +115,55 @@ } } -// Responsive margin -// ========================================================================== - -// -// Adds responsive margin by fetching a 'spacing map' from the responsive -// spacing scale, which defines different spacing values at different -// breakpoints. Wrapper for the `_nhsuk-responsive-spacing` mixin. -// -// @see {mixin} _nhsuk-responsive-spacing -// -// @param {Number} $responsive-spacing-point - Point on the responsive spacing -// scale, corresponds to a map of breakpoints and spacing values -// @param {String} $direction [all] - Direction to add spacing to -// (`top`, `right`, `bottom`, `left`, `all`) -// @param {Boolean} $important [false] - Whether to mark as `!important` -// @param {Number} $adjustment [false] - Offset to adjust spacing by -// -// @example scss -// .foo { -// @include nhsuk-responsive-margin(6, 'left', $adjustment: 1px); -// } -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Responsive margin +/// +/// Adds responsive margin by fetching a 'spacing map' from the responsive +/// spacing scale, which defines different spacing values at different +/// breakpoints. Wrapper for the `_nhsuk-responsive-spacing` mixin. +/// +/// @see {mixin} _nhsuk-responsive-spacing +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing by +/// +/// @example scss +/// .foo { +/// @include nhsuk-responsive-margin(6, 'left', $adjustment: 1px); +/// } +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// @mixin nhsuk-responsive-margin($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) { @include _nhsuk-responsive-spacing($responsive-spacing-point, "margin", $direction, $important, $adjustment); } -// Responsive padding -// ========================================================================== - -// -// Adds responsive padding by fetching a 'spacing map' from the responsive -// spacing scale, which defines different spacing values at different -// breakpoints. Wrapper for the `_nhsuk-responsive-spacing` mixin. -// -// @see {mixin} _nhsuk-responsive-spacing -// -// @param {Number} $responsive-spacing-point - Point on the responsive spacing -// scale, corresponds to a map of breakpoints and spacing values -// @param {String} $direction [all] - Direction to add spacing to -// (`top`, `right`, `bottom`, `left`, `all`) -// @param {Boolean} $important [false] - Whether to mark as `!important` -// @param {Number} $adjustment [false] - Offset to adjust spacing -// -// @example scss -// .foo { -// @include nhsuk-responsive-padding(6, 'left', $adjustment: 1px); -// } -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Responsive padding +/// +/// Adds responsive padding by fetching a 'spacing map' from the responsive +/// spacing scale, which defines different spacing values at different +/// breakpoints. Wrapper for the `_nhsuk-responsive-spacing` mixin. +/// +/// @see {mixin} _nhsuk-responsive-spacing +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing +/// +/// @example scss +/// .foo { +/// @include nhsuk-responsive-padding(6, 'left', $adjustment: 1px); +/// } +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// @mixin nhsuk-responsive-padding($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) { @include _nhsuk-responsive-spacing($responsive-spacing-point, "padding", $direction, $important, $adjustment); diff --git a/packages/core/tools/_typography.scss b/packages/core/tools/_typography.scss index d2a8b0924..39d22af3e 100644 --- a/packages/core/tools/_typography.scss +++ b/packages/core/tools/_typography.scss @@ -1,23 +1,19 @@ -// ========================================================================== -// TOOLS / #TYPOGRAPHY -// ========================================================================== - -// -// These mixins allow us to quickly and consistently generate common text -// patterns such as colours and font-weight -// +//// +/// Typography +/// +/// These mixins allow us to quickly and consistently generate common text +/// patterns such as colours and font-weight +/// +/// @group tools +//// @use "sass:math"; -// Text colour -// ========================================================================== - -// -// Sets the text colour, including a suitable override for print. -// -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend -// +/// Text colour +/// +/// Sets the text colour, including a suitable override for print. +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) @mixin nhsuk-text-color { color: $nhsuk-text-color; @@ -27,42 +23,34 @@ } } -// Normal font weight -// ========================================================================== - -// -// @param {Boolean} $important [false] - Whether to mark declarations as -// `!important`. Generally Used to create override classes. -// +/// Normal font weight +/// +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. Generally Used to create override classes. @mixin nhsuk-typography-weight-normal($important: false) { font-weight: $nhsuk-font-normal iff($important, !important); } -// Bold font weight -// ========================================================================== - -// -// @param {Boolean} $important [false] - Whether to mark declarations as -// `!important`. Generally Used to create override classes. -// +/// Bold font weight +/// +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. Generally Used to create override classes. @mixin nhsuk-typography-weight-bold($important: false) { font-weight: $nhsuk-font-bold iff($important, !important); } -// Line height -// ========================================================================== - -// -// Convert line-heights specified in pixels into a relative value, unless -// they are already unit-less (and thus already treated as relative values) -// or the units do not match the units used for the font size. -// -// @param {Number} $line-height Line height -// @param {Number} $font-size Font size -// @return {Number} The line height as either a relative value or unmodified -// +/// Line height +/// +/// +/// Convert line-heights specified in pixels into a relative value, unless +/// they are already unit-less (and thus already treated as relative values) +/// or the units do not match the units used for the font size. +/// +/// @param {Number} $line-height Line height +/// @param {Number} $font-size Font size +/// @return {Number} The line height as either a relative value or unmodified @function _nhsuk-line-height($line-height, $font-size) { @if not unitless($line-height) and unit($line-height) == unit($font-size) { @@ -76,49 +64,47 @@ @return $line-height; } -// Responsive typography -// ========================================================================== - -// -// Takes a 'font map' as an argument and uses it to create font-size and -// line-height declarations for different breakpoints, and for print. -// -// Example font map: -// -// $my-font-map: ( -// null: ( -// font-size: 16px, -// line-height: 20px -// ), -// tablet: ( -// font-size: 19px, -// line-height: 25px -// ), -// print: ( -// font-size: 14pt, -// line-height: 1.15 -// ) -// );\ -// -// @example scss -// .foo { -// @include nhsuk-typography-responsive(19); -// } -// -// .foo { -// @include nhsuk-typography-responsive(36, $important: true); -// } -// -// @param {Map} $font-map - Font map -// @param {Number} $override-line-height [false] - Non responsive custom line -// height. Omit to use the line height from the font map. -// @param {Boolean} $important [false] - Whether to mark declarations as -// `!important`. -// -// 1. Mark rules as !important if $important is true - this will result in -// these variables becoming strings, so this needs to happen//after* they -// are used in calculations -// +/// Responsive typography +/// +/// Takes a 'font map' as an argument and uses it to create font-size and +/// line-height declarations for different breakpoints, and for print. +/// +/// Example font map: +/// +/// $my-font-map: ( +/// null: ( +/// font-size: 16px, +/// line-height: 20px +/// ), +/// tablet: ( +/// font-size: 19px, +/// line-height: 25px +/// ), +/// print: ( +/// font-size: 14pt, +/// line-height: 1.15 +/// ) +/// );\ +/// +/// @example scss +/// .foo { +/// @include nhsuk-typography-responsive(19); +/// } +/// +/// .foo { +/// @include nhsuk-typography-responsive(36, $important: true); +/// } +/// +/// @param {Map} $font-map - Font map +/// @param {Number} $override-line-height [false] - Non responsive custom line +/// height. Omit to use the line height from the font map. +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. +/// +/// 1. Mark rules as !important if $important is true - this will result in +/// these variables becoming strings, so this needs to happen *after* they +/// are used in calculations +/// @mixin nhsuk-typography-responsive($size, $override-line-height: false, $important: false) { @if not map-has-key($nhsuk-typography-scale, $size) { @@ -136,12 +122,12 @@ $font-size: $font-size ); - // [1] // + // [1] $font-size: $font-size iff($important, !important); $font-size-rem: $font-size-rem iff($important, !important); $line-height: $line-height iff($important, !important); - @if $breakpoint == null { + @if not $breakpoint { font-size: $font-size; font-size: $font-size-rem; line-height: $line-height; @@ -160,24 +146,21 @@ } } -// Font -// ========================================================================== - -// -// @example scss -// .foo { -// @include nhsuk-font(19); -// } -// -// .foo { -// @include nhsuk-font(36, $weight: bold); -// } -// -// @param {Number} $size - Size of the font as it would appear on desktop - -// uses the responsive font size map -// @param {String} $weight [normal] - Weight: `bold` or `normal` -// @param {Number} $line-height [false] - Line-height, if overriding the default -// +/// Font +/// +/// @example scss +/// .foo { +/// @include nhsuk-font(19); +/// } +/// +/// .foo { +/// @include nhsuk-font(36, $weight: bold); +/// } +/// +/// @param {Number} $size - Size of the font as it would appear on desktop - +/// uses the responsive font size map +/// @param {String} $weight [normal] - Weight: `bold` or `normal` +/// @param {Number} $line-height [false] - Line-height, if overriding the default @mixin nhsuk-font($size, $weight: normal, $line-height: false) { @if $weight == normal { diff --git a/packages/core/utilities/_clearfix.scss b/packages/core/utilities/_clearfix.scss index 4ff536862..e826657c8 100644 --- a/packages/core/utilities/_clearfix.scss +++ b/packages/core/utilities/_clearfix.scss @@ -1,15 +1,13 @@ -/* ========================================================================== - UTILITIES / #CLEARFIX - ========================================================================== */ - -/** - * Automatically clear an elements - * child elements - * - * Usage: class="nhsuk-u-clear" - * See tools/mixins - */ +//// +/// Clearfix +/// +/// Automatically clear an elements +/// child elements +/// +/// @example html +///
+//// .nhsuk-u-clear { - @include clearfix(); + @include clearfix; } diff --git a/packages/core/utilities/_display.scss b/packages/core/utilities/_display.scss index e6b088feb..d8a5fefcc 100644 --- a/packages/core/utilities/_display.scss +++ b/packages/core/utilities/_display.scss @@ -1,8 +1,10 @@ -/* ========================================================================== - UTILITIES / #DISPLAY - ========================================================================== */ +//// +/// Display +/// +/// @group utilities +//// -/* stylelint-disable declaration-no-important */ +// stylelint-disable declaration-no-important .nhsuk-u-display-block { display: block !important; diff --git a/packages/core/utilities/_float.scss b/packages/core/utilities/_float.scss index 7c8f91497..26c81c669 100644 --- a/packages/core/utilities/_float.scss +++ b/packages/core/utilities/_float.scss @@ -1,8 +1,10 @@ -/* ========================================================================== - UTILITIES / #FLOAT - ========================================================================== */ +//// +/// Float +/// +/// @group utilities +//// -/* stylelint-disable declaration-no-important */ +// stylelint-disable declaration-no-important .nhsuk-u-float-left { float: left !important; diff --git a/packages/core/utilities/_grid-widths.scss b/packages/core/utilities/_grid-widths.scss index 7eae77eac..1bf6c27e8 100644 --- a/packages/core/utilities/_grid-widths.scss +++ b/packages/core/utilities/_grid-widths.scss @@ -1,64 +1,65 @@ -/* ========================================================================== - UTILITIES / #GRID - ========================================================================== */ +//// +/// Grid widths +/// +/// Force grid widths on all screen sizes +/// +/// By default all grid elements will go to 100% width +/// on screen sizes below tablet, these utilities can force +/// custom widths on all screen sizes +/// +/// @group utilities +/// +/// @example html +///
+//// @use "sass:math"; -/** - * Force grid widths on all screen sizes - * By default all grid elements will go to 100% width - * on screen sizes below tablet, these utilities can force - * custom widths on all screen sizes - * - * Usage: class="nhsuk-u-one-half" - */ - // Utility classes are allowed to use !important; // so we disable stylelint for that rule -/* stylelint-disable declaration-no-important */ +// stylelint-disable declaration-no-important .nhsuk-u-one-half { float: left; - width: percentage(1 * 0.5) !important; + width: math.percentage(math.div(1, 2)) !important; } .nhsuk-u-one-third { float: left; - width: percentage(math.div(1, 3)) !important; + width: math.percentage(math.div(1, 3)) !important; } .nhsuk-u-two-thirds { float: left; - width: percentage(math.div(2, 3)) !important; + width: math.percentage(math.div(2, 3)) !important; } .nhsuk-u-one-quarter { float: left; - width: percentage(1 * 0.25) !important; + width: math.percentage(math.div(1, 4)) !important; } .nhsuk-u-three-quarters { float: left; - width: percentage(3 * 0.25) !important; + width: math.percentage(math.div(3, 4)) !important; } -/** - * Force grid widths on screen sizes on tablet - * and above - * - * By default all grid elements will go to 100% width - * on every screen size, these utilities can force - * custom widths on screen sizes on tablet - * and above - * - * Usage: class="nhsuk-u-one-half-tablet" - */ +/// Force grid widths on screen sizes on tablet +/// and above +/// +/// By default all grid elements will go to 100% width +/// on every screen size, these utilities can force +/// custom widths on screen sizes on tablet +/// and above +/// +/// @example html +///
.nhsuk-u-one-half-tablet { width: 100% !important; @include mq($from: tablet) { float: left; - width: percentage(1 * 0.5) !important; + width: math.percentage(math.div(1, 2)) !important; } } @@ -66,7 +67,7 @@ width: 100% !important; @include mq($from: tablet) { float: left; - width: percentage(math.div(1, 3)) !important; + width: math.percentage(math.div(1, 3)) !important; } } @@ -74,7 +75,7 @@ width: 100% !important; @include mq($from: tablet) { float: left; - width: percentage(math.div(2, 3)) !important; + width: math.percentage(math.div(2, 3)) !important; } } @@ -82,7 +83,7 @@ width: 100% !important; @include mq($from: tablet) { float: left; - width: percentage(1 * 0.25) !important; + width: math.percentage(math.div(1, 4)) !important; } } @@ -90,6 +91,6 @@ width: 100% !important; @include mq($from: tablet) { float: left; - width: percentage(3 * 0.25) !important; + width: math.percentage(math.div(3, 4)) !important; } } diff --git a/packages/core/utilities/_link-nowrap.scss b/packages/core/utilities/_link-nowrap.scss index 4f695dd6c..036c4ff53 100644 --- a/packages/core/utilities/_link-nowrap.scss +++ b/packages/core/utilities/_link-nowrap.scss @@ -1,13 +1,14 @@ -/* ========================================================================== - UTILITIES / #LINK-NOWRAP - ========================================================================== */ - -/** - * Prevent long anchor links from line breaking - * on smaller screens - * - * Usage: class="nhsuk-u-nowrap" - */ +//// +/// Link nowrap +/// +/// Prevent long anchor links from line breaking +/// on smaller screens +/// +/// @group utilities +/// +/// @example html +/// +//// .nhsuk-u-nowrap { @include mq($until: tablet) { diff --git a/packages/core/utilities/_list-border.scss b/packages/core/utilities/_list-border.scss index 0b447e34e..8b078b0e4 100644 --- a/packages/core/utilities/_list-border.scss +++ b/packages/core/utilities/_list-border.scss @@ -1,12 +1,16 @@ -// ========================================================================== -// COMPONENTS / #LIST-BORDER -// ========================================================================== - -/** - * Adds a grey border to the bottom of an
  • tag - * - * Usage: class="nhsuk-list--border" - */ +//// +/// List border +/// +/// Adds a grey border to the bottom of an
  • tag +/// +/// @group utilities +/// +/// @example html +///
      +///
    • Item 1
    • +///
    • Item 2
    • +///
    +//// .nhsuk-list--border li { border-bottom: 1px solid $color_nhsuk-grey-4; diff --git a/packages/core/utilities/_reading-width.scss b/packages/core/utilities/_reading-width.scss index 225c4ff89..59d68c382 100644 --- a/packages/core/utilities/_reading-width.scss +++ b/packages/core/utilities/_reading-width.scss @@ -1,15 +1,14 @@ -/* ========================================================================== - UTILITIES / #READING-WIDTH - ========================================================================== */ - -/** - * Reading width mixin, add a maximum width - * to large pieces of content - * - * Usage: class="nhsuk-u-reading-width" - * See tools/mixins - */ +//// +/// Reading width +/// +/// Adds a maximum width to large pieces of content +/// +/// @group utilities +/// +/// @example html +///
    +//// .nhsuk-u-reading-width { - @include reading-width(); + @include reading-width; } diff --git a/packages/core/utilities/_spacing.scss b/packages/core/utilities/_spacing.scss index 46241e4ce..afdd02d67 100644 --- a/packages/core/utilities/_spacing.scss +++ b/packages/core/utilities/_spacing.scss @@ -1,41 +1,43 @@ -// ========================================================================== // -// UTILITIES / #SPACING -// ========================================================================== // +//// +/// Spacing +/// +/// @group utilities +//// -// Directions for spacing -// Original code taken from GDS (Government Digital Service) -// /~https://github.com/alphagov/govuk-frontend +/// Directions for spacing +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) $_spacing-directions: ("top", "right", "bottom", "left") !default; -// Spacing override classes -// -// Generate spacing override classes for the given property (e.g. margin) -// for each point in the spacing scale. -// -// @param {String} $property - Property to add spacing to (e.g. 'margin') -// -// @example scss -// .nhsuk-u-margin-0 { -// margin: 0; -// } -// -// .nhsuk-u-margin-top-1 { -// margin-top: [whatever spacing point 1 is...] -// } -// -// 1. For each point in the spacing scale (defined in settings), create an -// override that affects all directions... -// 2. ... and then an override for each individual direction +/// Spacing override classes +/// +/// Generate spacing override classes for the given property (e.g. margin) +/// for each point in the spacing scale. +/// +/// @param {String} $property - Property to add spacing to (e.g. 'margin') +/// +/// @example scss +/// .nhsuk-u-margin-0 { +/// margin: 0; +/// } +/// +/// .nhsuk-u-margin-top-1 { +/// margin-top: [whatever spacing point 1 is...] +/// } +/// +/// 1. For each point in the spacing scale (defined in settings), create an +/// override that affects all directions... +/// 2. ... and then an override for each individual direction @mixin _nhsuk-generate-spacing-overrides($property) { - // [1] // + // [1] @each $scale-point, $scale-map in $nhsuk-spacing-responsive-scale { .nhsuk-u-#{$property}-#{$scale-point} { @include _nhsuk-responsive-spacing($scale-point, $property, "all", true); } - // [2] // + // [2] @each $direction in $_spacing-directions { .nhsuk-u-#{$property}-#{$direction}-#{$scale-point} { @include _nhsuk-responsive-spacing($scale-point, $property, $direction, true); diff --git a/packages/core/utilities/_text-align.scss b/packages/core/utilities/_text-align.scss index 2ac25b45e..4609f4593 100644 --- a/packages/core/utilities/_text-align.scss +++ b/packages/core/utilities/_text-align.scss @@ -1,8 +1,10 @@ -/* ========================================================================== - UTILITIES / #TEXT-ALIGN - ========================================================================== */ +//// +/// Text align +/// +/// @group utilities +//// -/* stylelint-disable declaration-no-important */ +// stylelint-disable declaration-no-important .nhsuk-u-text-align-left { text-align: left !important; diff --git a/packages/core/utilities/_typography.scss b/packages/core/utilities/_typography.scss index b562f6c86..a12134e9c 100644 --- a/packages/core/utilities/_typography.scss +++ b/packages/core/utilities/_typography.scss @@ -1,19 +1,18 @@ -/* ========================================================================== - UTILITIES / #TYPOGRAPHY - ========================================================================== */ +//// +/// Typography +/// +/// @group utilities +//// // Utility classes are allowed to use !important; // so we disable stylelint for that rule -/** - * Font size and line height - * - * Generate typography override classes for each responsive font map in the - * typography scale eg .nhsuk-u-font-size-48 - * - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - */ +/// Font size and line height +/// +/// Generate typography override classes for each responsive font map in the +/// typography scale eg .nhsuk-u-font-size-48 +/// +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) @each $size in map-keys($nhsuk-typography-scale) { .nhsuk-u-font-size-#{$size} { @@ -21,13 +20,13 @@ } } -/* Weights - ========================================================================== */ - -/** - * Generate font weight override classes for normal and bold - * eg .nhsuk-u-font-weight-normal - */ +/// Weights +/// +/// Generate font weight override classes for normal and bold +/// +/// @example html +///

    Example

    +///

    Example

    .nhsuk-u-font-weight-normal { @include nhsuk-typography-weight-normal($important: true); @@ -37,14 +36,14 @@ @include nhsuk-typography-weight-bold($important: true); } -/* Colours - ========================================================================== */ +/// Colours -/** - * Secondary text colour $nhsuk-secondary-text-color - * eg

    Published on: 15 March 2018

    - */ +/// Secondary text colour +/// +/// @example html +///

    Published on: 15 March 2018

    .nhsuk-u-secondary-text-color { - color: $nhsuk-secondary-text-color !important; /* stylelint-disable-line declaration-no-important */ + // stylelint-disable-next-line declaration-no-important + color: $nhsuk-secondary-text-color !important; } diff --git a/packages/core/utilities/_visually-hidden.scss b/packages/core/utilities/_visually-hidden.scss index 047ce4cb0..08bf65eee 100644 --- a/packages/core/utilities/_visually-hidden.scss +++ b/packages/core/utilities/_visually-hidden.scss @@ -1,14 +1,14 @@ -/* ========================================================================== - UTILITIES / #VISUALLY-HIDDEN - ========================================================================== */ - -/** - * Hide elements visually but keep it in the DOM - * - * Usage: class="nhsuk-u-visually-hidden" - * See tools/mixins - */ +//// +/// Visually hidden +/// +/// Hide elements visually but keep it in the DOM +/// +/// @group utilities +/// +/// @example html +/// Error: +//// .nhsuk-u-visually-hidden { - @include visually-hidden(); + @include visually-hidden; } diff --git a/packages/core/utilities/_widths.scss b/packages/core/utilities/_widths.scss index 81aec6504..bfdc54d18 100644 --- a/packages/core/utilities/_widths.scss +++ b/packages/core/utilities/_widths.scss @@ -1,18 +1,20 @@ -/* ========================================================================== - UTILITIES / #WIDTH - ========================================================================== */ - -/** - * Original code taken from GDS (Government Digital Service) - * /~https://github.com/alphagov/govuk-frontend - * Force element widths on all screen sizes - * - * Usage: class="nhsuk-u-width-full" - */ +//// +/// Widths +/// +/// Force element widths on all screen sizes +/// +/// @group utilities +/// @link /~https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +/// +/// @example html +/// +//// + +@use "sass:math"; // Utility classes are allowed to use !important; // so we disable stylelint for that rule -/* stylelint-disable declaration-no-important */ +// stylelint-disable declaration-no-important .nhsuk-u-width-full { width: 100% !important; @@ -22,7 +24,7 @@ width: 100% !important; @include mq($from: tablet) { - width: 75% !important; + width: math.percentage(math.div(3, 4)) !important; } } @@ -30,7 +32,7 @@ width: 100% !important; @include mq($from: tablet) { - width: 66.66% !important; + width: math.percentage(math.div(2, 3)) !important; } } @@ -38,7 +40,7 @@ width: 100% !important; @include mq($from: tablet) { - width: 50% !important; + width: math.percentage(math.div(1, 2)) !important; } } @@ -46,7 +48,7 @@ width: 100% !important; @include mq($from: tablet) { - width: 33.33% !important; + width: math.percentage(math.div(1, 3)) !important; } } @@ -54,6 +56,6 @@ width: 100% !important; @include mq($from: tablet) { - width: 25% !important; + width: math.percentage(math.div(1, 4)) !important; } } diff --git a/packages/core/vendor/sass-mq.scss b/packages/core/vendor/sass-mq.scss index 976fc4b7e..3c761fb6d 100644 --- a/packages/core/vendor/sass-mq.scss +++ b/packages/core/vendor/sass-mq.scss @@ -1,7 +1,6 @@ // mq() v4.0.2 // sass-mq/sass-mq -/* stylelint-disable indentation */ @charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly // See /~https://github.com/sass-mq/sass-mq/pull/10 @@ -92,10 +91,8 @@ $mq-media-type: all !default; /// @requires $mq-base-font-size /// @returns {Number} @function mq-px2em($px, $base-font-size: $mq-base-font-size) { - /* stylelint-disable-line scss/at-function-pattern */ - @if unitless($px) { - @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels."; /* stylelint-disable-line at-rule-disallowed-list, string-quotes */ + @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels."; @return mq-px2em($px * 1px, $base-font-size); } @else if unit($px) == em { @return $px; @@ -118,7 +115,7 @@ $mq-media-type: all !default; @if map-has-key($breakpoints, $name) { @return map-get($breakpoints, $name); } @else { - @warn "Breakpoint #{$name} wasn't found in $breakpoints."; /* stylelint-disable-line at-rule-disallowed-list */ + @warn "Breakpoint #{$name} wasn't found in $breakpoints."; } } @@ -337,7 +334,8 @@ $mq-media-type: all !default; /// /// // Show breakpoints using custom settings /// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px)); -/* stylelint-disable color-no-hex */ + +// stylelint-disable color-no-hex @mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) { body:before { background-color: #fcf8e3; @@ -351,12 +349,13 @@ $mq-media-type: all !default; right: 0; top: 0; z-index: 100; - /* stylelint-enable color-no-hex */ + // stylelint-enable color-no-hex + // Loop through the breakpoints that should be shown @each $show-breakpoint in $show-breakpoints { $width: mq-get-breakpoint-width($show-breakpoint, $breakpoints); @include mq($show-breakpoint, $breakpoints: $breakpoints) { - content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})"; /* stylelint-disable-line string-quotes */ + content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})"; } } } diff --git a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_0_iPhone_5_SE.png b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_0_iPhone_5_SE.png index 68e36ed7f..d977b31ef 100644 Binary files a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_0_iPhone_5_SE.png and b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_0_iPhone_5_SE.png differ diff --git a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_1_iPhone_6-8.png b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_1_iPhone_6-8.png index 52dad5b5f..e7c1be2f3 100644 Binary files a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_1_iPhone_6-8.png and b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_1_iPhone_6-8.png differ diff --git a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_2_iPad.png b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_2_iPad.png index 9a7896e25..2b1e6de70 100644 Binary files a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_2_iPad.png and b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_2_iPad.png differ diff --git a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_3_Surface_iPad_Pro.png b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_3_Surface_iPad_Pro.png index 3221888bb..1554cf836 100644 Binary files a/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_3_Surface_iPad_Pro.png and b/tests/backstop/bitmaps_reference/nhsuk-frontend_Images_0_document_3_Surface_iPad_Pro.png differ diff --git a/tests/linters/.stylelintrc.js b/tests/linters/.stylelintrc.js deleted file mode 100644 index b626409e4..000000000 --- a/tests/linters/.stylelintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - extends: ['stylelint-config-prettier'], - plugins: ['stylelint-order', 'stylelint-scss'], - rules: require('./stylelint-rules') -} diff --git a/tests/linters/stylelint-rules.js b/tests/linters/stylelint-rules.js deleted file mode 100644 index bad7c253f..000000000 --- a/tests/linters/stylelint-rules.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = { - 'order/order': [ - { - type: 'at-rule', - name: 'extend' - }, - { - type: 'at-rule', - name: 'mixin' - } - ], - 'declaration-block-single-line-max-declarations': 1, - 'selector-list-comma-newline-after': 'always', - 'color-no-hex': true, - 'color-named': 'never', - 'at-rule-disallowed-list': ['debug', 'warn'], - 'declaration-block-no-duplicate-properties': [true, { ignore: ['consecutive-duplicates-with-different-values'] }], // Permits fallbacks - 'block-no-empty': true, - 'selector-max-id': 0, - 'declaration-no-important': true, - 'color-no-invalid-hex': true, - 'no-duplicate-selectors': true, - 'property-no-unknown': true, - 'declaration-property-value-disallowed-list': { - transition: ['all'], - '/^border/': ['none'] - }, - 'selector-no-qualifying-type': true, - 'string-quotes': 'double', - 'selector-attribute-quotes': 'always', - 'no-eol-whitespace': true, - 'number-no-trailing-zeros': true, - 'scss/at-import-partial-extension': 'never', - 'scss/at-import-no-partial-leading-underscore': true, - 'shorthand-property-no-redundant-values': true, - 'length-zero-no-unit': true, - 'scss/at-mixin-pattern': '^[-_a-z]+$', - 'scss/percent-placeholder-pattern': '^[-_a-z]+$', - 'block-opening-brace-newline-after': 'always-multi-line', - 'block-opening-brace-space-after': 'always-single-line', - 'block-closing-brace-newline-after': 'always-single-line', - 'block-closing-brace-newline-before': 'always-multi-line', - 'block-closing-brace-space-before': 'always-single-line', - 'value-list-comma-space-after': 'always-single-line', - 'selector-list-comma-space-after': 'always-single-line', - 'media-query-list-comma-space-after': 'always', - 'declaration-colon-space-before': 'never', - 'media-feature-colon-space-before': 'never', - 'declaration-colon-space-after': 'always', - 'media-feature-colon-space-after': 'always', - 'declaration-bang-space-before': 'always', - 'declaration-bang-space-after': 'never', - 'selector-pseudo-class-parentheses-space-inside': 'never', - 'media-feature-parentheses-space-inside': 'never', - 'function-calc-no-unspaced-operator': true, - 'media-feature-range-operator-space-after': 'always', - 'media-feature-range-operator-space-before': 'always', - 'scss/operator-no-unspaced': true, - 'declaration-block-trailing-semicolon': 'always', - 'no-missing-end-of-source-newline': true -}