@ons/design-system 62.0.1 → 62.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -63
- package/components/access-code/example-access-code-error.njk +87 -0
- package/components/access-code/example-access-code.njk +63 -0
- package/components/accordion/example-accordion-open.njk +126 -0
- package/components/accordion/example-accordion.njk +25 -0
- package/components/address-input/example-address-input-editable.njk +52 -0
- package/components/address-input/example-address-input-manual.njk +23 -0
- package/components/address-input/example-address-input.njk +40 -0
- package/components/autosuggest/example-autosuggest-country-multiple.njk +30 -0
- package/components/autosuggest/example-autosuggest-country.njk +29 -0
- package/components/back-link/example-back-link.njk +17 -0
- package/components/breadcrumbs/example-breadcrumbs-single.njk +13 -0
- package/components/breadcrumbs/example-breadcrumbs.njk +17 -0
- package/components/button/_button.scss +5 -3
- package/components/button/example-button-custom.njk +20 -0
- package/components/button/example-button-disabled.njk +7 -0
- package/components/button/example-button-download.njk +9 -0
- package/components/button/example-button-ghost.njk +15 -0
- package/components/button/example-button-group.njk +16 -0
- package/components/button/example-button-link.njk +7 -0
- package/components/button/example-button-loader.njk +9 -0
- package/components/button/example-button-new-window.njk +12 -0
- package/components/button/example-button-print.njk +8 -0
- package/components/button/example-button-secondary-small.njk +8 -0
- package/components/button/example-button-secondary.njk +8 -0
- package/components/button/example-button-small.njk +8 -0
- package/components/button/example-button-timer.njk +9 -0
- package/components/button/example-button.njk +6 -0
- package/components/call-to-action/example-call-to-action-default.njk +14 -0
- package/components/card/example-card-set-with-images.njk +41 -0
- package/components/card/example-card-set-with-lists.njk +68 -0
- package/components/card/example-card-set.njk +38 -0
- package/components/card/example-card.njk +9 -0
- package/components/checkboxes/example-checkboxes-disabled.njk +34 -0
- package/components/checkboxes/example-checkboxes-error.njk +60 -0
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +177 -0
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +86 -0
- package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +69 -0
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +59 -0
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +51 -0
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +61 -0
- package/components/checkboxes/example-checkboxes-without-border.njk +33 -0
- package/components/checkboxes/example-checkboxes.njk +46 -0
- package/components/content-pagination/example-content-pagination.njk +20 -0
- package/components/cookies-banner/_macro.njk +4 -4
- package/components/cookies-banner/_macro.spec.js +41 -1
- package/components/cookies-banner/example-cookies-banner-cymraeg.njk +9 -0
- package/components/cookies-banner/example-cookies-banner.njk +7 -0
- package/components/date-input/example-date-input-error.njk +62 -0
- package/components/date-input/example-date-input.njk +36 -0
- package/components/details/example-details-with-saved-state.njk +10 -0
- package/components/details/example-details-with-warning.njk +19 -0
- package/components/details/example-details.njk +9 -0
- package/components/document-list/example-document-list-article-featured.njk +31 -0
- package/components/document-list/example-document-list-articles.njk +60 -0
- package/components/document-list/example-document-list-downloads.njk +59 -0
- package/components/document-list/example-document-list-search-result-featured.njk +19 -0
- package/components/document-list/example-document-list-search-results.njk +67 -0
- package/components/duration/example-duration-error.njk +30 -0
- package/components/duration/example-duration.njk +35 -0
- package/components/duration/examples-duration-error-for-single-field.njk +31 -0
- package/components/external-link/example-external-link.njk +8 -0
- package/components/feedback/example-feedback-call-to-action.njk +14 -0
- package/components/footer/example-footer-cymraeg.njk +54 -0
- package/components/footer/example-footer-default.njk +7 -0
- package/components/footer/example-footer-transactional.njk +62 -0
- package/components/footer/example-footer-warning.njk +32 -0
- package/components/footer/example-footer-with-alternative-organisation.njk +124 -0
- package/components/footer/example-footer-with-coat-of-arms.njk +32 -0
- package/components/footer/example-footer-with-copyright.njk +35 -0
- package/components/footer/example-footer.njk +85 -0
- package/components/header/_header.scss +2 -2
- package/components/header/_macro.spec.js +97 -0
- package/components/header/example-header-default.njk +12 -0
- package/components/header/example-header-external-for-survey-with-description.njk +20 -0
- package/components/header/example-header-external-for-surveys.njk +33 -0
- package/components/header/example-header-external-welsh.njk +29 -0
- package/components/header/example-header-external-with-navigation.njk +42 -0
- package/components/header/example-header-external-with-service-links.njk +35 -0
- package/components/header/example-header-external-with-sub-navigation.njk +132 -0
- package/components/header/example-header-internal.njk +32 -0
- package/components/header/example-header-neutral-for-multicoloured-logo.njk +59 -0
- package/components/hero/example-hero-dark.njk +15 -0
- package/components/hero/example-hero-default.njk +14 -0
- package/components/images/example-images-for-regular-screens.njk +8 -0
- package/components/images/example-images-for-retina-screens.njk +10 -0
- package/components/input/example-input-email.njk +12 -0
- package/components/input/example-input-number-prefixed.njk +17 -0
- package/components/input/example-input-number-suffixed.njk +34 -0
- package/components/input/example-input-number.njk +15 -0
- package/components/input/example-input-numeric-values.njk +64 -0
- package/components/input/example-input-telephone.njk +13 -0
- package/components/input/example-input-text-width-constrained.njk +11 -0
- package/components/input/example-input-text-with-character-limit-checker.njk +17 -0
- package/components/input/example-input-text-with-description.njk +10 -0
- package/components/input/example-input-text.njk +9 -0
- package/components/label/example-label-with-description.njk +8 -0
- package/components/label/example-label.njk +8 -0
- package/components/metadata/example-metadata.njk +57 -0
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +71 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +47 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date.njk +49 -0
- package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +45 -0
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +36 -0
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +63 -0
- package/components/mutually-exclusive/example-mutually-exclusive-number.njk +43 -0
- package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +40 -0
- package/components/navigation/_macro.njk +1 -1
- package/components/pagination/example-pagination-first.njk +24 -0
- package/components/pagination/example-pagination-last.njk +24 -0
- package/components/pagination/example-pagination-with-no-range-indicator.njk +42 -0
- package/components/pagination/example-pagination.njk +116 -0
- package/components/panel/example-panel-bare.njk +9 -0
- package/components/panel/example-panel-with-announcement.njk +18 -0
- package/components/panel/example-panel-with-error-details.njk +18 -0
- package/components/panel/example-panel-with-error-summary.njk +25 -0
- package/components/panel/example-panel-with-information.njk +7 -0
- package/components/panel/example-panel-with-spacious-information.njk +7 -0
- package/components/panel/example-panel-with-success-message.njk +10 -0
- package/components/panel/example-panel-with-warning.njk +8 -0
- package/components/password/example-password.njk +11 -0
- package/components/phase-banner/example-phase-banner-alpha.njk +10 -0
- package/components/phase-banner/example-phase-banner-beta.njk +9 -0
- package/components/question/example-question-ccs.njk +49 -0
- package/components/question/example-question-fieldset.njk +99 -0
- package/components/question/example-question-interviewer-note.njk +38 -0
- package/components/question/example-question-no-fieldset.njk +46 -0
- package/components/radios/example-radios-with-clear-button.njk +97 -0
- package/components/radios/example-radios-with-descriptions.njk +57 -0
- package/components/radios/example-radios-with-error.njk +38 -0
- package/components/radios/example-radios-with-revealed-checkboxes.njk +69 -0
- package/components/radios/example-radios-with-revealed-radios.njk +68 -0
- package/components/radios/example-radios-with-revealed-select.njk +69 -0
- package/components/radios/example-radios-with-revealed-text-input.njk +80 -0
- package/components/radios/example-radios-with-separator.njk +59 -0
- package/components/radios/example-radios-with-visible-text-input.njk +40 -0
- package/components/radios/example-radios-without-border.njk +48 -0
- package/components/radios/examples-radios.njk +38 -0
- package/components/related-content/example-related-content-general.njk +44 -0
- package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -0
- package/components/related-content/example-related-content-social-media.njk +40 -0
- package/components/relationships/example-relationships-error.njk +211 -0
- package/components/relationships/example-relationships-you.njk +187 -0
- package/components/relationships/example-relationships.njk +185 -0
- package/components/search/example-search-with-character-check.njk +23 -0
- package/components/search/example-search-with-placeholder.njk +16 -0
- package/components/search/example-search.njk +16 -0
- package/components/section-navigation/example-section-navigation-vertical.njk +40 -0
- package/components/section-navigation/example-section-navigation.njk +21 -0
- package/components/select/example-select-wide.njk +55 -0
- package/components/select/example-select-with-error.njk +58 -0
- package/components/select/example-select-with-inline-label.njk +23 -0
- package/components/select/example-select.njk +50 -0
- package/components/share-page/example-share-page.njk +11 -0
- package/components/skip-to-content/example-skip-to-content.njk +10 -0
- package/components/status/example-status-dead.njk +7 -0
- package/components/status/example-status-error.njk +7 -0
- package/components/status/example-status-neutral-information.njk +6 -0
- package/components/status/example-status-pending.njk +7 -0
- package/components/status/example-status-small.njk +8 -0
- package/components/status/example-status-success.njk +7 -0
- package/components/summary/example-summary-grouped-total.njk +67 -0
- package/components/summary/example-summary-grouped-with-errors.njk +96 -0
- package/components/summary/example-summary-grouped.njk +353 -0
- package/components/summary/example-summary-household-no-rows.njk +20 -0
- package/components/summary/example-summary-household.njk +77 -0
- package/components/summary/example-summary-hub.njk +170 -0
- package/components/summary/example-summary-multiple.njk +81 -0
- package/components/summary/example-summary-no-action.njk +40 -0
- package/components/summary/example-summary.njk +107 -0
- package/components/table/_macro.njk +1 -1
- package/components/table/_table.scss +10 -10
- package/components/table/example-table-basic.njk +47 -0
- package/components/table/example-table-compact.njk +73 -0
- package/components/table/example-table-footer.njk +56 -0
- package/components/table/example-table-numeric.njk +81 -0
- package/components/table/example-table-responsive.njk +89 -0
- package/components/table/example-table-scrollable.njk +158 -0
- package/components/table/example-table-sortable.njk +236 -0
- package/components/table/sortable-table.dom.js +1 -1
- package/components/table/sortable-table.js +5 -2
- package/components/table-of-contents/example-table-of-contents-grouped.njk +50 -0
- package/components/table-of-contents/example-table-of-contents-single.njk +39 -0
- package/components/table-of-contents/example-table-of-contents-sticky.njk +78 -0
- package/components/tabs/example-tabs-details.njk +59 -0
- package/components/tabs/example-tabs.njk +39 -0
- package/components/textarea/example-textarea-error.njk +16 -0
- package/components/textarea/example-textarea-with-character-limit.njk +18 -0
- package/components/textarea/example-textarea.njk +12 -0
- package/components/timeline/example-timeline.njk +35 -0
- package/components/timeout-modal/example-timeout-modal.njk +16 -0
- package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -0
- package/components/upload/example-upload-error.njk +16 -0
- package/components/upload/example-upload.njk +12 -0
- package/components/video/example-video.njk +14 -0
- package/css/main.css +3 -3
- package/css/print.css +1 -1
- package/layout/_template.njk +1 -12
- package/package.json +3 -8
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +2 -2
- package/scss/base/_typography.scss +2 -2
- package/scss/main.scss +0 -1
- package/scss/print.scss +13 -5
- package/scss/utilities/_highlight.scss +6 -0
- package/scss/utilities/_index.scss +1 -0
- package/components/code-highlight/_macro.njk +0 -5
- package/components/code-highlight/_macro.spec.js +0 -56
- package/components/code-highlight/code-highlight.spec.js +0 -18
- package/scss/patternlib.scss +0 -148
package/css/print.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.ons-btn,.ons-navigation-search,.ons-summary__actions,.ons-footer,.ons-cookies-banner,.ons-language-links,.ons-breadcrumb,.ons-u-ph{display:none !important}a::after{content:" (" attr(href) ") "}.ons-header__main,.ons-header__bottom{background:transparent}.ons-header__title{color:var(--ons-color-black)}.ons-header .ons-header__svg-logo{fill:var(--ons-color-black)}.ons-navigation--main,.ons-navigation--sub{border-top:1px solid var(--ons-color-text-link);display:block !important;padding:1rem 0 .5rem}.ons-navigation--main .ons-navigation__item,.ons-navigation--sub .ons-navigation__item{display:inline-block}.ons-navigation--main .ons-navigation__item--active,.ons-navigation--sub .ons-navigation__item--active{border:0}.ons-navigation--main .ons-navigation__link,.ons-navigation--main .ons-navigation__link:hover,.ons-navigation--sub .ons-navigation__link,.ons-navigation--sub .ons-navigation__link:hover{color:var(--ons-color-text-link)}details,details>summary{display:block !important}.ons-hero{-webkit-print-color-adjust:exact;color-adjust:exact}.ons-grid__col{display:block}.ons-panel,h1,h2,h3,h4,h5,h6,p{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}
|
package/layout/_template.njk
CHANGED
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
{% set cdn_url = (pageConfig.cdn.url if pageConfig.cdn and pageConfig.cdn.url) or "https://cdn.ons.gov.uk/sdc/design-system" %}
|
|
17
17
|
{% set slash = "" if cdn_url | last == "/" else "/" %}
|
|
18
18
|
{% set assetsURL = cdn_url + slash + ((pageConfig.cdn.version if pageConfig.cdn and pageConfig.cdn.version) or release_version or designSystemVersion) %}
|
|
19
|
-
{% elif pageInfo and pageInfo.version %}
|
|
20
|
-
{# Prototype kits #}
|
|
21
|
-
{% set assetsURL = "/" + pageInfo.version %}
|
|
22
19
|
{% elif pageConfig.assetsURL %}
|
|
23
20
|
{# Runner Dev #}
|
|
24
21
|
{% set assetsURL = pageConfig.assetsURL %}
|
|
@@ -29,8 +26,6 @@
|
|
|
29
26
|
|
|
30
27
|
{% if pageConfig and pageConfig.title %}
|
|
31
28
|
{% set page_title = pageConfig.title %}
|
|
32
|
-
{% elif pageInfo and pageInfo.title %}
|
|
33
|
-
{% set page_title = pageInfo.title %}
|
|
34
29
|
{% elif page and page.title %}
|
|
35
30
|
{% set page_title = page.title %}
|
|
36
31
|
{% else %}
|
|
@@ -225,15 +220,9 @@
|
|
|
225
220
|
{% block bodyEnd %}{% endblock %}
|
|
226
221
|
{% endblock %}
|
|
227
222
|
|
|
228
|
-
{% if isPatternLib %}
|
|
229
|
-
{% set scripts = assetsURL + "/scripts/main.js," + assetsURL + "/scripts/patternlib.js" %}
|
|
230
|
-
{% else %}
|
|
231
|
-
{% set scripts = assetsURL + "/scripts/main.js" %}
|
|
232
|
-
{% endif %}
|
|
233
|
-
|
|
234
223
|
<script{% if pageConfig.cspNonce %} nonce="{{ pageConfig.cspNonce }}"{% elif pageConfig.cspNonce is not defined and csp_nonce %} nonce="{{ csp_nonce() }}"{% endif %}>
|
|
235
224
|
(function() {
|
|
236
|
-
var s = '{{
|
|
225
|
+
var s = [ '{{ assetsURL }}/scripts/main.js' ],
|
|
237
226
|
c = document.createElement('script');
|
|
238
227
|
|
|
239
228
|
if (!('noModule' in c)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ons/design-system",
|
|
3
3
|
"description": "ONS Design System built CSS, JS, and Nunjucks templates",
|
|
4
|
-
"version": "62.0
|
|
4
|
+
"version": "62.1.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "gulp start",
|
|
12
12
|
"watch": "gulp watch",
|
|
13
|
-
"test": "gulp build-assets
|
|
13
|
+
"test": "gulp build-assets && TEST_PORT=3020 TEST_WITH_PUPPETEER=1 jest '.*\\.spec\\.js'",
|
|
14
14
|
"test:no-build": "TEST_PORT=3020 TEST_WITH_PUPPETEER=1 jest '.*\\.spec\\.js'",
|
|
15
15
|
"test:with-log": "yarn test --no-color 2>test.log",
|
|
16
16
|
"test:start-server": "TEST_PORT=3020 gulp start-dev-server",
|
|
17
17
|
"build": "yarn && yarn tidy-clean && NODE_ENV=production gulp build",
|
|
18
18
|
"npm-bundle": "NODE_ENV=production yarn tidy-clean && NODE_ENV=production gulp build-package && babel-node ci/generate-npm-package.js",
|
|
19
19
|
"cdn-bundle": "NODE_ENV=production yarn tidy-clean && NODE_ENV=production gulp build-package && babel-node ci/prepare-templates-for-zip.js",
|
|
20
|
-
"test-visual": "yarn build && npx percy exec -- babel-node src/tests/visual/percy.snapshots.js",
|
|
21
20
|
"tidy-clean": "rm -rf build css favicons fonts img components layout scripts coverage scss js",
|
|
22
21
|
"check-unused": "npx npm-check-unused",
|
|
23
22
|
"dedupe-deps": "npx yarn-deduplicate yarn.lock",
|
|
@@ -101,7 +100,6 @@
|
|
|
101
100
|
"gulp-terser": "^2.0.1",
|
|
102
101
|
"http-server": "^0.12.3",
|
|
103
102
|
"husky": "^1.2.0",
|
|
104
|
-
"iframe-resizer": "4.2.11",
|
|
105
103
|
"jest": "^27.5.1",
|
|
106
104
|
"jest-axe": "^6.0.0",
|
|
107
105
|
"jest-puppeteer": "^6.1.0",
|
|
@@ -109,7 +107,6 @@
|
|
|
109
107
|
"lighthouse": "^7.5.0",
|
|
110
108
|
"lint-staged": "^8.1.0",
|
|
111
109
|
"lodash": "^4.17.21",
|
|
112
|
-
"marked": "^2.1.3",
|
|
113
110
|
"mdn-polyfills": "^5.14.0",
|
|
114
111
|
"minimist": "^1.2.5",
|
|
115
112
|
"normalize.css": "^8.0.1",
|
|
@@ -118,7 +115,6 @@
|
|
|
118
115
|
"postcss-url": "^8.0.0",
|
|
119
116
|
"prepend-file": "^1.3.1",
|
|
120
117
|
"prettier": "^1.15.2",
|
|
121
|
-
"prismjs": "1.24.0",
|
|
122
118
|
"puppeteer": "^13.5.1",
|
|
123
119
|
"remark-cli": "^9.0.0",
|
|
124
120
|
"remark-lint": "^8.0.0",
|
|
@@ -137,8 +133,7 @@
|
|
|
137
133
|
"vinyl-buffer": "^1.0.1",
|
|
138
134
|
"vinyl-source-stream": "^2.0.0",
|
|
139
135
|
"watchify": "^3.0.0",
|
|
140
|
-
"whatwg-fetch": "^3.0.0"
|
|
141
|
-
"yaml": "^1.10.2"
|
|
136
|
+
"whatwg-fetch": "^3.0.0"
|
|
142
137
|
},
|
|
143
138
|
"publishConfig": {
|
|
144
139
|
"access": "public"
|