govuk_tech_docs 6.6.0.rc.local.tested → 6.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -4
- data/Rakefile +3 -3
- data/govuk_tech_docs.gemspec +82 -24
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/tasks/lint.rake +24 -30
- data/node_modules/.bin/nunjucks-precompile +1 -0
- data/node_modules/.package-lock.json +62 -0
- data/{documentation → node_modules/a-sync-waterfall}/LICENSE +8 -8
- data/node_modules/a-sync-waterfall/README.md +95 -0
- data/node_modules/a-sync-waterfall/index.js +83 -0
- data/node_modules/a-sync-waterfall/package.json +21 -0
- data/node_modules/a-sync-waterfall/test.js +77 -0
- data/node_modules/asap/CHANGES.md +70 -0
- data/node_modules/asap/LICENSE.md +21 -0
- data/node_modules/asap/README.md +237 -0
- data/node_modules/asap/asap.js +65 -0
- data/node_modules/asap/browser-asap.js +66 -0
- data/node_modules/asap/browser-raw.js +223 -0
- data/node_modules/asap/package.json +58 -0
- data/node_modules/asap/raw.js +101 -0
- data/node_modules/commander/CHANGELOG.md +385 -0
- data/node_modules/commander/LICENSE +22 -0
- data/node_modules/commander/Readme.md +737 -0
- data/node_modules/commander/index.js +1756 -0
- data/node_modules/commander/package.json +48 -0
- data/node_modules/commander/typings/index.d.ts +386 -0
- data/node_modules/govuk-frontend/README.md +92 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/fixtures.json +377 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/macro-options.json +142 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-default.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-additional-descriptions.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-all-sections-already-open.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-long-content-and-description.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template.njk +67 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +86 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-default.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-inverse.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template.njk +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +258 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/macro-options.json +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-inverse.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-collapse-on-mobile.html +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-last-breadcrumb-as-current-page.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-one-level.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-without-the-home-section.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template.njk +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +496 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +74 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-active-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-focus-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-hover-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-default.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-disabled.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-active-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-disabled.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-focus-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-hover-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-link.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-active-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-disabled.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-focus-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-hover-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-start.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-active-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-disabled.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-focus-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-hover-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template.njk +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +630 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +206 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-default.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-error-message.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-threshold.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-value.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-length.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-error-message.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-threshold.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-value.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-custom-rows.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-default-value-exceeding-limit.html +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-default-value.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-hint-and-error.html +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-hint.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-label-as-page-heading.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-maxwords.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-threshold.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +128 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +1344 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/macro-options.json +229 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-default.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-conditional-reveal.html +25 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-error.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-hint.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-long-text.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-and-none.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-none-and-conditional-items.html +44 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hint.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hints-on-items.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-legend-as-a-page-heading.html +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-optional-form-group-classes-showing-group-error.html +40 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-pre-checked-values.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-very-long-option-text.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template.njk +122 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +543 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/macro-options.json +132 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-accepted-confirmation-banner.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-default.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-rejected-confirmation-banner.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-with-html.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template.njk +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +1314 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +213 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-day-and-month-using-items.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-day-and-month.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-default.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-month-and-year-using-items.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-month-and-year.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-message-and-hint-using-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-message-and-hint.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-day-input-using-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-day-input.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-month-input-using-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-month-input.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-year-input-using-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-year-input.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-classes.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-items-and-classes.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-items.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-items.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-translations.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values-and-name-prefix.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values-name-prefix-and-custom-names.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template.njk +161 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +133 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/implementation.md +87 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/macro-options.json +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/template-default.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/template-expanded.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/template-with-html.html +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/template.njk +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +113 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/macro-options.json +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/template-default.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/template-translated.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/template.njk +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/fixtures.json +326 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/macro-options.json +82 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template-default.html +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template-mixed-with-and-without-links.html +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template-with-description-only.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template-with-everything.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template-without-links.html +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/template.njk +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/fixtures.json +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/macro-options.json +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/template-default.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/template.njk +25 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/fixtures.json +95 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro-options.json +50 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-default.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-silly-example.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template.njk +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +260 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/macro-options.json +70 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-as-page-heading-l.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-as-page-heading-m.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-as-page-heading-s.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-as-page-heading-without-class.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-as-page-heading-xl.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-default.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-styled-as-large-text.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-styled-as-medium-text.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-styled-as-small-text.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template-styled-as-xl-text.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/template.njk +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +416 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +179 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-default.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-custom-wrapper-classes-and-attributes.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-multiple-files.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-with-error-message-and-hint.html +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-translated.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-error-message-and-hint.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-hint-text.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-label-as-page-heading.html +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +90 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +773 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +164 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-default.html +59 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-full-gds-example.html +233 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-three-equal-columns.html +167 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-html-content-licence-and-copyright-notice.html +54 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-meta.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-text-content-licence-and-copyright-notice.html +54 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-one-column.html +97 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-two-columns.html +97 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta-links-and-meta-content.html +105 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-navigation.html +117 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-no-content-licence.html +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-custom-meta.html +41 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-meta-links.html +80 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +104 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/fixtures.json +90 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/macro-options.json +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-default.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-full-width.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-with-image-logo.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-with-text-and-image-logo.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template.njk +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +73 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +23 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +77 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/macro-options.json +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/template-default.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/template-with-html.html +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/template.njk +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +832 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/macro-options.json +245 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-default.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-and-hint.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-message.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-extra-letter-spacing.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-hint-text.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-label-as-page-heading.html +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-suffix-and-error.html +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-suffix-and-width-modifier.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-suffix.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-suffix.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-10-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-2-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-20-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-3-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-30-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-4-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-width-5-class.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template.njk +133 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +76 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/macro-options.json +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/template-default.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/template-with-html.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/template.njk +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +210 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/macro-options.json +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-as-page-heading-l.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-as-page-heading-m.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-as-page-heading-s.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-as-page-heading-without-class.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-as-page-heading-xl.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-default.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-styled-as-large-text.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-styled-as-medium-text.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-styled-as-small-text.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-styled-as-xl-text.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template-with-bold-text.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/template.njk +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/fixtures.json +482 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro-options.json +88 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-default.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-inverse.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-language-description.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-large-amount-of-multiple-languages.html +99 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-mixed-text-directions.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-multiple-languages.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-translated-navigation-label.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template.njk +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +260 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/macro-options.json +74 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-default.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-long-heading.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-lots-of-content.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-text-as-html.html +21 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-type-as-success.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template.njk +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +415 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/macro-options.json +140 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-default.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-first-page.html +29 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-last-page.html +29 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-link-and-item-text.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-many-pages.html +65 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-next-only.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only-and-labels.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only-and-very-long-labels.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only.html +22 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-previous-only.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template.njk +87 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +353 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/macro-options.json +108 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-default.html +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-content-with-long-line-length.html +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-headings-content-and-lists.html +23 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption.html +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template.njk +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +215 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro-options.json +181 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-default.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-error-message.html +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-hint-text.html +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-input-width-class.html +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-label-as-page-heading.html +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template.njk +93 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +97 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/macro-options.json +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template-default.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template.njk +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +1339 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/macro-options.json +211 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-default.html +21 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-inline.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-conditional-reveal.html +31 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-error.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-hint.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-long-text.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-item-checked.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-and-pre-checked-value.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items.html +39 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-fieldset-and-error-message.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hint.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hints-on-items.html +29 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-legend-as-page-heading.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-optional-form-group-classes-showing-group-error.html +40 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-very-long-option-text.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-without-fieldset.html +22 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template.njk +115 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +550 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/macro-options.json +163 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-default.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-full-width-override.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-hint-text-and-error-message.html +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-label-as-page-heading.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template.njk +68 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +777 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +164 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse-with-language-navigation.html +72 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item-and-collapsenavigationonmobile-set-to-true.html +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item.html +35 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-collapsenavigationonmobile-set-to-false.html +60 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-inline-end-slot.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-language-navigation.html +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +153 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-long-service-name.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-right-aligned-language-navigation.html +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-link.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name.html +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +111 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +113 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/template-default.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/template-with-focus.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/template.njk +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +1528 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/macro-options.json +248 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-extreme.html +106 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-a-html-header.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-a-text-header.html +28 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-actions-plus-summary-list-actions.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-actions.html +36 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-default.html +35 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-extreme.html +261 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-no-border-on-last-row.html +35 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-no-border.html +35 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-actions.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template.njk +94 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +651 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/macro-options.json +132 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/template-default.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/template-with-head-and-caption.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/template-with-head.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/template.njk +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +333 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/macro-options.json +84 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/template-default.html +117 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/template-tabs-with-anchor-in-panel.html +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/template.njk +48 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +149 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/macro-options.json +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-default.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-green.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-grey.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-orange.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-pink.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-purple.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-red.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-turquoise.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-yellow.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template.njk +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +563 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/macro-options.json +119 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-default.html +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-forced-hover-state.html +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-all-possible-colours.html +131 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-empty-values.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-hint-text-and-additional-states.html +77 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-very-long-single-word-tags.html +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template.njk +41 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +316 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro-options.json +143 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-default.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-custom-rows.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-default-value.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-error-message.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-hint.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-label-as-page-heading.html +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template.njk +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +101 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/template-default.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/template-multiple-lines.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/template.njk +10 -0
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +3 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/macros/attributes.njk +110 -0
- data/node_modules/govuk-frontend/dist/govuk/macros/i18n.njk +21 -0
- data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +56 -0
- data/node_modules/govuk-frontend/dist/govuk/template.njk +107 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +188 -0
- data/node_modules/govuk-frontend/package.json +99 -0
- data/node_modules/nunjucks/LICENSE +26 -0
- data/node_modules/nunjucks/README.md +58 -0
- data/node_modules/nunjucks/bin/precompile +58 -0
- data/node_modules/nunjucks/bin/precompile.cmd +5 -0
- data/node_modules/nunjucks/browser/nunjucks-slim.js +3709 -0
- data/node_modules/nunjucks/browser/nunjucks-slim.js.map +1 -0
- data/node_modules/nunjucks/browser/nunjucks-slim.min.js +3 -0
- data/node_modules/nunjucks/browser/nunjucks-slim.min.js.map +1 -0
- data/node_modules/nunjucks/browser/nunjucks.js +7021 -0
- data/node_modules/nunjucks/browser/nunjucks.js.map +1 -0
- data/node_modules/nunjucks/browser/nunjucks.min.js +3 -0
- data/node_modules/nunjucks/browser/nunjucks.min.js.map +1 -0
- data/node_modules/nunjucks/index.js +82 -0
- data/node_modules/nunjucks/package.json +112 -0
- data/node_modules/nunjucks/src/compiler.js +1027 -0
- data/node_modules/nunjucks/src/environment.js +548 -0
- data/node_modules/nunjucks/src/express-app.js +23 -0
- data/node_modules/nunjucks/src/filters.js +546 -0
- data/node_modules/nunjucks/src/globals.js +65 -0
- data/node_modules/nunjucks/src/jinja-compat.js +293 -0
- data/node_modules/nunjucks/src/lexer.js +474 -0
- data/node_modules/nunjucks/src/lib.js +325 -0
- data/node_modules/nunjucks/src/loader.js +21 -0
- data/node_modules/nunjucks/src/loaders.js +5 -0
- data/node_modules/nunjucks/src/node-loaders.js +139 -0
- data/node_modules/nunjucks/src/nodes.js +350 -0
- data/node_modules/nunjucks/src/object.js +100 -0
- data/node_modules/nunjucks/src/parser.js +1028 -0
- data/node_modules/nunjucks/src/precompile-global.js +17 -0
- data/node_modules/nunjucks/src/precompile.js +108 -0
- data/node_modules/nunjucks/src/precompiled-loader.js +31 -0
- data/node_modules/nunjucks/src/runtime.js +333 -0
- data/node_modules/nunjucks/src/tests.js +265 -0
- data/node_modules/nunjucks/src/transformer.js +166 -0
- data/node_modules/nunjucks/src/web-loaders.js +94 -0
- metadata +609 -67
- data/.github/ISSUE_TEMPLATE/bug.yaml +0 -69
- data/.github/ISSUE_TEMPLATE/config.yaml +0 -6
- data/.github/ISSUE_TEMPLATE/documentation.yaml +0 -29
- data/.github/ISSUE_TEMPLATE/enhancement.yaml +0 -25
- data/.github/dependabot.yml +0 -67
- data/.github/pull_request_template.md +0 -28
- data/.github/workflows/build-middleman-artifact.yaml +0 -41
- data/.github/workflows/check-documentation-updates.yaml +0 -33
- data/.github/workflows/check-gem-version.yaml +0 -36
- data/.github/workflows/npm-vulnerability-scanner.yaml +0 -55
- data/.github/workflows/pipeline.yaml +0 -58
- data/.github/workflows/publish-gem.yaml +0 -52
- data/.github/workflows/publish-github-pages.yaml +0 -38
- data/.github/workflows/ruby-vulnerability-scanner.yaml +0 -44
- data/.github/workflows/test.yaml +0 -48
- data/documentation/.nvmrc +0 -1
- data/documentation/Gemfile +0 -11
- data/documentation/README.md +0 -30
- data/documentation/Staticfile +0 -4
- data/documentation/config/tech-docs.yml +0 -56
- data/documentation/config.rb +0 -21
- data/documentation/source/accessibility/index.html.md.erb +0 -64
- data/documentation/source/configure_project/frontmatter/index.html.md.erb +0 -206
- data/documentation/source/configure_project/global_configuration/index.html.md.erb +0 -386
- data/documentation/source/configure_project/index.html.md.erb +0 -17
- data/documentation/source/configure_project/page_expiry_and_review/index.html.md.erb +0 -93
- data/documentation/source/configure_project/structure_docs/index.html.md.erb +0 -117
- data/documentation/source/create_project/build/index.html.md.erb +0 -20
- data/documentation/source/create_project/create_new_project/index.html.md.erb +0 -23
- data/documentation/source/create_project/get_started/index.html.md.erb +0 -58
- data/documentation/source/create_project/index.html.md.erb +0 -17
- data/documentation/source/create_project/preview/index.html.md.erb +0 -26
- data/documentation/source/images/Basic multipage.svg +0 -1
- data/documentation/source/images/Basic_multipage.svg +0 -1
- data/documentation/source/images/Nested multipage.svg +0 -1
- data/documentation/source/images/Nested_multipage.svg +0 -1
- data/documentation/source/images/Single_page.svg +0 -1
- data/documentation/source/images/core-layout-without-sidebar.png +0 -0
- data/documentation/source/images/core-layout.png +0 -0
- data/documentation/source/images/daniel-the-manual-spaniel-screenshot.svg +0 -1
- data/documentation/source/images/expired-page.png +0 -0
- data/documentation/source/images/last-reviewed-only.png +0 -0
- data/documentation/source/images/last-reviewed-only.svg +0 -1
- data/documentation/source/images/layout-layout.png +0 -0
- data/documentation/source/images/multipage.svg +0 -3
- data/documentation/source/images/not-expired-page.png +0 -0
- data/documentation/source/index.html.md.erb +0 -19
- data/documentation/source/javascripts/application.js +0 -1
- data/documentation/source/maintain_project/index.html.md.erb +0 -18
- data/documentation/source/maintain_project/redirects/index.html.md.erb +0 -22
- data/documentation/source/maintain_project/review_content/index.html.md.erb +0 -45
- data/documentation/source/maintain_project/use_latest_template/index.html.md.erb +0 -34
- data/documentation/source/partials/_links.erb +0 -81
- data/documentation/source/publish_project/deploy/index.html.md.erb +0 -44
- data/documentation/source/publish_project/index.html.md.erb +0 -15
- data/documentation/source/publish_project/version/index.html.md.erb +0 -12
- data/documentation/source/stylesheets/print.css.scss +0 -3
- data/documentation/source/stylesheets/screen-old-ie.css.scss +0 -4
- data/documentation/source/stylesheets/screen.css.scss +0 -1
- data/documentation/source/support/index.html.md.erb +0 -46
- data/documentation/source/write_docs/add_openapi_spec/index.html.md.erb +0 -48
- data/documentation/source/write_docs/content/index.html.md.erb +0 -144
- data/documentation/source/write_docs/index.html.md.erb +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-this-page.mjs","sources":["../../../../src/govuk/components/exit-this-page/exit-this-page.mjs"],"sourcesContent":["import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { createElement } from '../../common/create-element.mjs'\nimport { ElementError } from '../../errors/index.mjs'\nimport { I18n } from '../../i18n.mjs'\n\n/**\n * Exit this page component\n *\n * @preserve\n * @augments ConfigurableComponent<ExitThisPageConfig>\n */\nexport class ExitThisPage extends ConfigurableComponent {\n /** @private */\n i18n\n\n /** @private */\n $button\n\n /**\n * @private\n * @type {HTMLAnchorElement | null}\n */\n $skiplinkButton = null\n\n /**\n * @private\n * @type {HTMLElement | null}\n */\n $updateSpan = null\n\n /**\n * @private\n * @type {HTMLElement | null}\n */\n $indicatorContainer = null\n\n /**\n * @private\n * @type {HTMLElement | null}\n */\n $overlay = null\n\n /** @private */\n keypressCounter = 0\n\n /** @private */\n lastKeyWasModified = false\n\n /** @private */\n timeoutTime = 5000 // milliseconds\n\n // Store the timeout events so that we can clear them to avoid user keypresses overlapping\n // setTimeout returns an id that we can use to clear it with clearTimeout,\n // hence the 'Id' suffix\n\n /**\n * @private\n * @type {number | null}\n */\n keypressTimeoutId = null\n\n /**\n * @private\n * @type {number | null}\n */\n timeoutMessageId = null\n\n /**\n * @param {Element | null} $root - HTML element that wraps the Exit This Page button\n * @param {ExitThisPageConfig} [config] - Exit This Page config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n const $button = this.$root.querySelector('.govuk-exit-this-page__button')\n if (!($button instanceof HTMLAnchorElement)) {\n throw new ElementError({\n component: ExitThisPage,\n element: $button,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Button (`.govuk-exit-this-page__button`)'\n })\n }\n\n this.i18n = new I18n(this.config.i18n)\n this.$button = $button\n\n const $skiplinkButton = document.querySelector(\n '.govuk-js-exit-this-page-skiplink'\n )\n if ($skiplinkButton instanceof HTMLAnchorElement) {\n this.$skiplinkButton = $skiplinkButton\n }\n\n this.buildIndicator()\n this.initUpdateSpan()\n this.initButtonClickHandler()\n\n // Check to see if this has already been done by a previous initialisation of ExitThisPage\n if (!('govukFrontendExitThisPageKeypress' in document.body.dataset)) {\n document.addEventListener('keyup', this.handleKeypress.bind(this), true)\n document.body.dataset.govukFrontendExitThisPageKeypress = 'true'\n }\n\n // When the page is restored after navigating 'back' in some browsers the\n // blank overlay remains present, rendering the page unusable. Here, we check\n // to see if it's present on page (re)load, and remove it if so.\n window.addEventListener('pageshow', this.resetPage.bind(this))\n }\n\n /**\n * Create the <span> we use for screen reader announcements.\n *\n * @private\n */\n initUpdateSpan() {\n this.$updateSpan = createElement('span', {\n role: 'status',\n class: 'govuk-visually-hidden'\n })\n\n this.$root.appendChild(this.$updateSpan)\n }\n\n /**\n * Create button click handlers.\n *\n * @private\n */\n initButtonClickHandler() {\n // Main EtP button\n this.$button.addEventListener('click', this.handleClick.bind(this))\n\n // EtP secondary link\n if (this.$skiplinkButton) {\n this.$skiplinkButton.addEventListener(\n 'click',\n this.handleClick.bind(this)\n )\n }\n }\n\n /**\n * Create the HTML for the 'three lights' indicator on the button.\n *\n * @private\n */\n buildIndicator() {\n // Build container\n // Putting `aria-hidden` on it as it won't contain any readable information\n this.$indicatorContainer = createElement('div', {\n class: 'govuk-exit-this-page__indicator',\n 'aria-hidden': 'true'\n })\n\n // Create three 'lights' and place them within the container\n for (let i = 0; i < 3; i++) {\n this.$indicatorContainer.appendChild(\n createElement('div', {\n class: 'govuk-exit-this-page__indicator-light'\n })\n )\n }\n\n // Append it all to the module\n this.$button.appendChild(this.$indicatorContainer)\n }\n\n /**\n * Update whether the lights are visible and which ones are lit up depending on\n * the value of `keypressCounter`.\n *\n * @private\n */\n updateIndicator() {\n if (!this.$indicatorContainer) {\n return\n }\n\n // Show or hide the indicator container depending on keypressCounter value\n this.$indicatorContainer.classList.toggle(\n 'govuk-exit-this-page__indicator--visible',\n this.keypressCounter > 0\n )\n\n // Turn on only the indicators we want on\n const $indicators = this.$indicatorContainer.querySelectorAll(\n '.govuk-exit-this-page__indicator-light'\n )\n $indicators.forEach(($indicator, index) => {\n $indicator.classList.toggle(\n 'govuk-exit-this-page__indicator-light--on',\n index < this.keypressCounter\n )\n })\n }\n\n /**\n * Initiates the redirection away from the current page.\n * Includes the loading overlay functionality, which covers the current page with a\n * white overlay so that the contents are not visible during the loading\n * process. This is particularly important on slow network connections.\n *\n * @private\n */\n exitPage() {\n if (!this.$updateSpan) {\n return\n }\n\n this.$updateSpan.textContent = ''\n\n // Blank the page\n // As well as creating an overlay with text, we also set the body to hidden\n // to prevent screen reader and sequential navigation users potentially\n // navigating through the page behind the overlay during loading\n document.body.classList.add('govuk-exit-this-page-hide-content')\n this.$overlay = createElement('div', {\n class: 'govuk-exit-this-page-overlay',\n role: 'alert'\n })\n\n // we do these this way round, thus incurring a second paint, because changing\n // the element text after adding it means that screen readers pick up the\n // announcement more reliably.\n document.body.appendChild(this.$overlay)\n this.$overlay.textContent = this.i18n.t('activated')\n\n window.location.href = this.$button.href\n }\n\n /**\n * Pre-activation logic for when the button is clicked/activated via mouse or\n * pointer.\n *\n * We do this to differentiate it from the keyboard activation event because we\n * need to run `e.preventDefault` as the button or skiplink are both links and we\n * want to apply some additional logic in `exitPage` before navigating.\n *\n * @private\n * @param {MouseEvent} event - mouse click event\n */\n handleClick(event) {\n event.preventDefault()\n this.exitPage()\n }\n\n /**\n * Logic for the 'quick escape' keyboard sequence functionality (pressing the\n * Shift key three times without interruption, within a time limit).\n *\n * @private\n * @param {KeyboardEvent} event - keyup event\n */\n handleKeypress(event) {\n if (!this.$updateSpan) {\n return\n }\n\n // Detect if the 'Shift' key has been pressed. We want to only do things if it\n // was pressed by itself and not in a combination with another key—so we keep\n // track of whether the preceding keyup had shiftKey: true on it, and if it\n // did, we ignore the next Shift keyup event.\n //\n // This works because using Shift as a modifier key (e.g. pressing Shift + A)\n // will fire TWO keyup events, one for A (with e.shiftKey: true) and the other\n // for Shift (with e.shiftKey: false).\n if (event.key === 'Shift' && !this.lastKeyWasModified) {\n this.keypressCounter += 1\n\n // Update the indicator before the below if statement can reset it back to 0\n this.updateIndicator()\n\n // Clear the timeout for the keypress timeout message clearing itself\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId)\n this.timeoutMessageId = null\n }\n\n if (this.keypressCounter >= 3) {\n this.keypressCounter = 0\n\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId)\n this.keypressTimeoutId = null\n }\n\n this.exitPage()\n } else {\n if (this.keypressCounter === 1) {\n this.$updateSpan.textContent = this.i18n.t('pressTwoMoreTimes')\n } else {\n this.$updateSpan.textContent = this.i18n.t('pressOneMoreTime')\n }\n }\n\n this.setKeypressTimer()\n } else if (this.keypressTimeoutId) {\n // If the user pressed any key other than 'Shift', after having pressed\n // 'Shift' and activating the timer, stop and reset the timer.\n this.resetKeypressTimer()\n }\n\n // Keep track of whether the Shift modifier key was held during this keypress\n this.lastKeyWasModified = event.shiftKey\n }\n\n /**\n * Starts the 'quick escape' keyboard sequence timer.\n *\n * This can be invoked several times. We want this to be possible so that the\n * timer is restarted each time the shortcut key is pressed (e.g. the user has\n * up to n seconds between each keypress, rather than n seconds to invoke the\n * entire sequence.)\n *\n * @private\n */\n setKeypressTimer() {\n // Clear any existing timeout. This is so only one timer is running even if\n // there are multiple keypresses in quick succession.\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId)\n }\n\n // Set a fresh timeout\n this.keypressTimeoutId = window.setTimeout(\n this.resetKeypressTimer.bind(this),\n this.timeoutTime\n )\n }\n\n /**\n * Stops and resets the 'quick escape' keyboard sequence timer.\n *\n * @private\n */\n resetKeypressTimer() {\n if (!this.$updateSpan) {\n return\n }\n\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId)\n this.keypressTimeoutId = null\n }\n\n const $updateSpan = this.$updateSpan\n\n this.keypressCounter = 0\n $updateSpan.textContent = this.i18n.t('timedOut')\n\n this.timeoutMessageId = window.setTimeout(() => {\n $updateSpan.textContent = ''\n }, this.timeoutTime)\n\n this.updateIndicator()\n }\n\n /**\n * Reset the page using the EtP button\n *\n * We use this in situations where a user may re-enter a page using the browser\n * back button. In these cases, the browser can choose to restore the state of\n * the page as it was previously, including restoring the 'ghost page' overlay,\n * the announcement span having it's role set to \"alert\" and the keypress\n * indicator still active, leaving the page in an unusable state.\n *\n * By running this check when the page is shown, we can programatically restore\n * the page and the component to a \"default\" state\n *\n * @private\n */\n resetPage() {\n // If an overlay is set, remove it and reset the value\n document.body.classList.remove('govuk-exit-this-page-hide-content')\n\n if (this.$overlay) {\n this.$overlay.remove()\n this.$overlay = null\n }\n\n // Ensure the announcement span's role is status, not alert and clear any text\n if (this.$updateSpan) {\n this.$updateSpan.setAttribute('role', 'status')\n this.$updateSpan.textContent = ''\n }\n\n // Sync the keypress indicator lights\n this.updateIndicator()\n\n // If the timeouts are active, clear them\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId)\n }\n\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-exit-this-page'\n\n /**\n * Exit this page default config\n *\n * @see {@link ExitThisPageConfig}\n * @constant\n * @type {ExitThisPageConfig}\n */\n static defaults = Object.freeze({\n i18n: {\n activated: 'Loading.',\n timedOut: 'Exit this page expired.',\n pressTwoMoreTimes: 'Shift, press 2 more times to exit.',\n pressOneMoreTime: 'Shift, press 1 more time to exit.'\n }\n })\n\n /**\n * Exit this page config schema\n *\n * @constant\n * @satisfies {Schema<ExitThisPageConfig>}\n */\n static schema = Object.freeze({\n properties: {\n i18n: { type: 'object' }\n }\n })\n}\n\n/**\n * Exit this Page config\n *\n * @see {@link ExitThisPage.defaults}\n * @typedef {object} ExitThisPageConfig\n * @property {ExitThisPageTranslations} [i18n=ExitThisPage.defaults.i18n] - Exit this page translations\n */\n\n/**\n * Exit this Page translations\n *\n * @see {@link ExitThisPage.defaults.i18n}\n * @typedef {object} ExitThisPageTranslations\n *\n * Messages used by the component programatically inserted text, including\n * overlay text and screen reader announcements.\n * @property {string} [activated] - Screen reader announcement for when EtP\n * keypress functionality has been successfully activated.\n * @property {string} [timedOut] - Screen reader announcement for when the EtP\n * keypress functionality has timed out.\n * @property {string} [pressTwoMoreTimes] - Screen reader announcement informing\n * the user they must press the activation key two more times.\n * @property {string} [pressOneMoreTime] - Screen reader announcement informing\n * the user they must press the activation key one more time.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["ExitThisPage","ConfigurableComponent","constructor","$root","config","i18n","$button","$skiplinkButton","$updateSpan","$indicatorContainer","$overlay","keypressCounter","lastKeyWasModified","timeoutTime","keypressTimeoutId","timeoutMessageId","querySelector","HTMLAnchorElement","ElementError","component","element","expectedType","identifier","I18n","document","buildIndicator","initUpdateSpan","initButtonClickHandler","body","dataset","addEventListener","handleKeypress","bind","govukFrontendExitThisPageKeypress","window","resetPage","createElement","role","class","appendChild","handleClick","i","updateIndicator","classList","toggle","$indicators","querySelectorAll","forEach","$indicator","index","exitPage","textContent","add","t","location","href","event","preventDefault","key","clearTimeout","setKeypressTimer","resetKeypressTimer","shiftKey","setTimeout","remove","setAttribute","moduleName","defaults","Object","freeze","activated","timedOut","pressTwoMoreTimes","pressOneMoreTime","schema","properties","type"],"mappings":";;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,SAASC,qBAAqB,CAAC;AAwDtD;AACF;AACA;AACA;AACEC,EAAAA,WAAWA,CAACC,KAAK,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC9B,IAAA,KAAK,CAACD,KAAK,EAAEC,MAAM,CAAC;AAAA,IAAA,IAAA,CA3DtBC,IAAI,GAAA,MAAA;AAAA,IAAA,IAAA,CAGJC,OAAO,GAAA,MAAA;IAAA,IAAA,CAMPC,eAAe,GAAG,IAAI;IAAA,IAAA,CAMtBC,WAAW,GAAG,IAAI;IAAA,IAAA,CAMlBC,mBAAmB,GAAG,IAAI;IAAA,IAAA,CAM1BC,QAAQ,GAAG,IAAI;IAAA,IAAA,CAGfC,eAAe,GAAG,CAAC;IAAA,IAAA,CAGnBC,kBAAkB,GAAG,KAAK;IAAA,IAAA,CA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,WAAW,GAAG,EAAE;AACnC,IAAA;IAGA,IAAI,CAACT,eAAe,EAAE;IAGtB,IAAI,IAAI,CAAC5B,iBAAiB,EAAE;AAC1BoB,MAAAA,MAAM,CAACyB,YAAY,CAAC,IAAI,CAAC7C,iBAAiB,CAAC;AAC7C,IAAA;IAEA,IAAI,IAAI,CAACC,gBAAgB,EAAE;AACzBmB,MAAAA,MAAM,CAACyB,YAAY,CAAC,IAAI,CAAC5C,gBAAgB,CAAC;AAC5C,IAAA;AACF,EAAA;AAkCF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAncaf,YAAY,CAwYhBkE,UAAU,GAAG,sBAAsB;AAxY/BlE,YAAY,CAiZhBmE,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC9BhE,EAAAA,IAAI,EAAE;AACJiE,IAAAA,SAAS,EAAE,UAAU;AACrBC,IAAAA,QAAQ,EAAE,yBAAyB;AACnCC,IAAAA,iBAAiB,EAAE,oCAAoC;AACvDC,IAAAA,gBAAgB,EAAE;AACpB;AACF,CAAC,CAAC;AAxZSzE,YAAY,CAgahB0E,MAAM,GAAGN,MAAM,CAACC,MAAM,CAAC;AAC5BM,EAAAA,UAAU,EAAE;AACVtE,IAAAA,IAAI,EAAE;AAAEuE,MAAAA,IAAI,EAAE;AAAS;AACzB;AACF,CAAC,CAAC;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "exit-this-page",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default",
|
|
6
|
+
"options": {
|
|
7
|
+
"redirectUrl": "/full-page-examples/announcements",
|
|
8
|
+
"id": null,
|
|
9
|
+
"classes": null,
|
|
10
|
+
"attributes": {}
|
|
11
|
+
},
|
|
12
|
+
"hidden": false,
|
|
13
|
+
"description": "",
|
|
14
|
+
"pageTemplateOptions": {},
|
|
15
|
+
"screenshot": true,
|
|
16
|
+
"html": "<div class=\"govuk-exit-this-page\" data-module=\"govuk-exit-this-page\">\n <a href=\"/full-page-examples/announcements\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button\" data-module=\"govuk-button\" rel=\"nofollow noreferrer\">\n <span class=\"govuk-visually-hidden\">Emergency</span> Exit this page\n </a>\n</div>"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "testing",
|
|
20
|
+
"options": {
|
|
21
|
+
"text": "Exit this test",
|
|
22
|
+
"redirectUrl": "https://www.test.co.uk",
|
|
23
|
+
"id": "test-id",
|
|
24
|
+
"classes": "test-class",
|
|
25
|
+
"attributes": {
|
|
26
|
+
"test-attribute": true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"hidden": true,
|
|
30
|
+
"description": "",
|
|
31
|
+
"pageTemplateOptions": {},
|
|
32
|
+
"screenshot": false,
|
|
33
|
+
"html": "<div id=\"test-id\" class=\"govuk-exit-this-page test-class\" data-module=\"govuk-exit-this-page\" test-attribute=\"true\">\n <a href=\"https://www.test.co.uk\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button\" data-module=\"govuk-button\" rel=\"nofollow noreferrer\">\n Exit this test\n </a>\n</div>"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "testing-html",
|
|
37
|
+
"options": {
|
|
38
|
+
"html": "Exit <em>this</em> test"
|
|
39
|
+
},
|
|
40
|
+
"hidden": true,
|
|
41
|
+
"description": "",
|
|
42
|
+
"pageTemplateOptions": {},
|
|
43
|
+
"screenshot": false,
|
|
44
|
+
"html": "<div class=\"govuk-exit-this-page\" data-module=\"govuk-exit-this-page\">\n <a href=\"https://www.bbc.co.uk/weather\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button\" data-module=\"govuk-button\" rel=\"nofollow noreferrer\">\n Exit <em>this</em> test\n </a>\n</div>"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "translated",
|
|
48
|
+
"options": {
|
|
49
|
+
"text": "Gadael y dudalen",
|
|
50
|
+
"activatedText": "Tudalen ymadael",
|
|
51
|
+
"timedOutText": "Wedi'i amseru",
|
|
52
|
+
"pressTwoMoreTimesText": "Pwyswch 'Shift' 2 gwaith arall",
|
|
53
|
+
"pressOneMoreTimeText": "Pwyswch 'Shift' 1 mwy o amser"
|
|
54
|
+
},
|
|
55
|
+
"hidden": true,
|
|
56
|
+
"description": "",
|
|
57
|
+
"pageTemplateOptions": {},
|
|
58
|
+
"screenshot": false,
|
|
59
|
+
"html": "<div class=\"govuk-exit-this-page\" data-module=\"govuk-exit-this-page\" data-i18n.activated=\"Tudalen ymadael\" data-i18n.timed-out=\"Wedi'i amseru\" data-i18n.press-two-more-times=\"Pwyswch 'Shift' 2 gwaith arall\" data-i18n.press-one-more-time=\"Pwyswch 'Shift' 1 mwy o amser\">\n <a href=\"https://www.bbc.co.uk/weather\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button\" data-module=\"govuk-button\" rel=\"nofollow noreferrer\">\n Gadael y dudalen\n </a>\n</div>"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "text",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"required": false,
|
|
6
|
+
"description": "Text for the link. If `html` is provided, the `text` option will be ignored. Defaults to `\"Emergency Exit this page\"` with 'Emergency' visually hidden."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "html",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": false,
|
|
12
|
+
"description": "HTML for the link. If `html` is provided, the `text` option will be ignored. Defaults to `\"Emergency Exit this page\"` with 'Emergency' visually hidden."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "redirectUrl",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "URL to redirect the current tab to. Defaults to `\"https://www.bbc.co.uk/weather\"`."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "id",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": "ID attribute to add to the exit this page container."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "classes",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": "Classes to add to the exit this page container."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "attributes",
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "HTML attributes (for example data attributes) to add to the exit this page container."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "activatedText",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"description": "Text announced by screen readers when Exit this Page has been activated via the keyboard shortcut. Defaults to `\"Loading.\"`."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "timedOutText",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Text announced by screen readers when the keyboard shortcut has timed out without successful activation. Defaults to `\"Exit this page expired.\"`."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "pressTwoMoreTimesText",
|
|
52
|
+
"type": "string",
|
|
53
|
+
"required": false,
|
|
54
|
+
"description": "Text announced by screen readers when the user must press <kbd>Shift</kbd> two more times to activate the button. Defaults to `\"Shift, press 2 more times to exit.\"`."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "pressOneMoreTimeText",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"required": false,
|
|
60
|
+
"description": "Text announced by screen readers when the user must press <kbd>Shift</kbd> one more time to activate the button. Defaults to `\"Shift, press 1 more time to exit.\"`."
|
|
61
|
+
}
|
|
62
|
+
]
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<div class="govuk-exit-this-page" data-module="govuk-exit-this-page">
|
|
2
|
+
<a href="/full-page-examples/announcements" role="button" draggable="false" class="govuk-button govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button" data-module="govuk-button" rel="nofollow noreferrer">
|
|
3
|
+
<span class="govuk-visually-hidden">Emergency</span> Exit this page
|
|
4
|
+
</a>
|
|
5
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{% from "../../macros/attributes.njk" import govukAttributes %}
|
|
2
|
+
{% from "../button/macro.njk" import govukButton %}
|
|
3
|
+
|
|
4
|
+
{%- set defaultHtml %}
|
|
5
|
+
<span class="govuk-visually-hidden">Emergency</span> Exit this page
|
|
6
|
+
{% endset -%}
|
|
7
|
+
|
|
8
|
+
<div
|
|
9
|
+
{%- if params.id %} id="{{ params.id }}"{% endif %} class="govuk-exit-this-page {%- if params.classes %} {{ params.classes }}{% endif %}" data-module="govuk-exit-this-page"
|
|
10
|
+
{{- govukAttributes(params.attributes) -}}
|
|
11
|
+
{%- if params.activatedText %} data-i18n.activated="{{ params.activatedText | escape }}"{% endif %}
|
|
12
|
+
{%- if params.timedOutText %} data-i18n.timed-out="{{ params.timedOutText | escape }}"{% endif %}
|
|
13
|
+
{%- if params.pressTwoMoreTimesText %} data-i18n.press-two-more-times="{{ params.pressTwoMoreTimesText | escape }}"{% endif %}
|
|
14
|
+
{%- if params.pressOneMoreTimeText %} data-i18n.press-one-more-time="{{ params.pressOneMoreTimeText | escape }}"{% endif %}
|
|
15
|
+
>
|
|
16
|
+
{{ govukButton({
|
|
17
|
+
html: params.html if (params.html or params.text) else defaultHtml,
|
|
18
|
+
text: params.text,
|
|
19
|
+
classes: "govuk-button--warning govuk-exit-this-page__button govuk-js-exit-this-page-button",
|
|
20
|
+
href: params.redirectUrl | default("https://www.bbc.co.uk/weather", true),
|
|
21
|
+
attributes: {
|
|
22
|
+
rel: "nofollow noreferrer"
|
|
23
|
+
}
|
|
24
|
+
}) | trim | indent(2) }}
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Feedback
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
|
|
6
|
+
|
|
7
|
+
## Guidance and Examples
|
|
8
|
+
|
|
9
|
+
Find out when to use the Feedback component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/feedback).
|
|
10
|
+
|
|
11
|
+
## Component options
|
|
12
|
+
|
|
13
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
|
14
|
+
|
|
15
|
+
See [options table](https://design-system.service.gov.uk/components/feedback/#options-feedback-example) for details.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "feedback",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default",
|
|
6
|
+
"options": {
|
|
7
|
+
"titleText": "Help us improve this service",
|
|
8
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n"
|
|
9
|
+
},
|
|
10
|
+
"hidden": false,
|
|
11
|
+
"description": "",
|
|
12
|
+
"pageTemplateOptions": {},
|
|
13
|
+
"screenshot": true,
|
|
14
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n </div>\n </div>\n </div>\n</div>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "silly example",
|
|
18
|
+
"options": {
|
|
19
|
+
"titleText": "Help us improve this service",
|
|
20
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service.</p>\n<p class=\"govuk-body\">Click this cool link to <a href=\"#\" class=\"govuk-link\">give us your feedback</a>.</p>\n<p class=\"govuk-body\">There's another paragraph here.</p>\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>There is also a list</li>\n <li>With items in</li>\n <li>How strange!</li>\n</ul>\n"
|
|
21
|
+
},
|
|
22
|
+
"hidden": false,
|
|
23
|
+
"description": "In reality we'd recommend users only use the default example but this is to illustrate if a service team decides they want to add a lot of content",
|
|
24
|
+
"pageTemplateOptions": {},
|
|
25
|
+
"screenshot": false,
|
|
26
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service.</p>\n <p class=\"govuk-body\">Click this cool link to <a href=\"#\" class=\"govuk-link\">give us your feedback</a>.</p>\n <p class=\"govuk-body\">There's another paragraph here.</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>There is also a list</li>\n <li>With items in</li>\n <li>How strange!</li>\n </ul>\n </div>\n </div>\n </div>\n</div>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "html in title",
|
|
30
|
+
"options": {
|
|
31
|
+
"titleHtml": "Help us improve this <em>cool</em> service",
|
|
32
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n"
|
|
33
|
+
},
|
|
34
|
+
"hidden": true,
|
|
35
|
+
"description": "",
|
|
36
|
+
"pageTemplateOptions": {},
|
|
37
|
+
"screenshot": false,
|
|
38
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this <em>cool</em> service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n </div>\n </div>\n </div>\n</div>"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "custom heading level",
|
|
42
|
+
"options": {
|
|
43
|
+
"titleText": "Help us improve this service",
|
|
44
|
+
"headingLevel": 3,
|
|
45
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n"
|
|
46
|
+
},
|
|
47
|
+
"hidden": true,
|
|
48
|
+
"description": "",
|
|
49
|
+
"pageTemplateOptions": {},
|
|
50
|
+
"screenshot": false,
|
|
51
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h3 class=\"govuk-feedback__title\">\n Help us improve this service\n </h3>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n </div>\n </div>\n </div>\n</div>"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "html in text options",
|
|
55
|
+
"options": {
|
|
56
|
+
"titleText": "Help us improve this <em>cool</em> service",
|
|
57
|
+
"text": "Tell us about your experience using this <em>cool</em> service"
|
|
58
|
+
},
|
|
59
|
+
"hidden": true,
|
|
60
|
+
"description": "",
|
|
61
|
+
"pageTemplateOptions": {},
|
|
62
|
+
"screenshot": false,
|
|
63
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this <em>cool</em> service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">\n Tell us about your experience using this <em>cool</em> service\n </p>\n </div>\n </div>\n </div>\n</div>"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "classes",
|
|
67
|
+
"options": {
|
|
68
|
+
"titleText": "Help us improve this service",
|
|
69
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n",
|
|
70
|
+
"classes": "my-first-class my-second-class"
|
|
71
|
+
},
|
|
72
|
+
"hidden": true,
|
|
73
|
+
"description": "",
|
|
74
|
+
"pageTemplateOptions": {},
|
|
75
|
+
"screenshot": false,
|
|
76
|
+
"html": "<div class=\"govuk-feedback govuk-width-container my-first-class my-second-class\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n </div>\n </div>\n </div>\n</div>"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "attributes",
|
|
80
|
+
"options": {
|
|
81
|
+
"titleText": "Help us improve this service",
|
|
82
|
+
"html": "<p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n",
|
|
83
|
+
"attributes": {
|
|
84
|
+
"first-attribute": "first",
|
|
85
|
+
"second-attribute": "second"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"hidden": true,
|
|
89
|
+
"description": "",
|
|
90
|
+
"pageTemplateOptions": {},
|
|
91
|
+
"screenshot": false,
|
|
92
|
+
"html": "<div class=\"govuk-feedback govuk-width-container\" first-attribute=\"first\" second-attribute=\"second\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-feedback__title\">\n Help us improve this service\n </h2>\n <div class=\"govuk-feedback__body\">\n <p class=\"govuk-body\">Tell us about your experience using this service. <a href=\"#\" class=\"govuk-link\">Give us your feedback</a></p>\n </div>\n </div>\n </div>\n</div>"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "titleText",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"required": true,
|
|
6
|
+
"description": "Text to use within the title of the Feedback component. If `titleHtml` is provided, the `titleText` option will be ignored."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "titleHtml",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "HTML to use within the title of the Feedback component. If `titleHtml` is provided, the `titleText` option will be ignored."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "headingLevel",
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "Heading level, from `1` to `6`. Default is `2`."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "text",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "Text to use within the Feedback component content. If `html` is provided, the `text` option will be ignored."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "html",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": true,
|
|
30
|
+
"description": "HTML to use within the Feedback component content. If `html` is provided, the `text` option will be ignored."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "caller",
|
|
34
|
+
"type": "nunjucks-block",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "Not strictly a parameter but a [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block lets you call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you'll need to wrap the entire Feedback component in a `call` block."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "classes",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"description": "Classes to add to the Feedback component container."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "attributes",
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "HTML attributes (for example, data attributes) to add to the Feedback component container."
|
|
49
|
+
}
|
|
50
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="govuk-feedback govuk-width-container">
|
|
2
|
+
<div class="govuk-grid-row">
|
|
3
|
+
<div class="govuk-grid-column-two-thirds">
|
|
4
|
+
<h2 class="govuk-feedback__title">
|
|
5
|
+
Help us improve this service
|
|
6
|
+
</h2>
|
|
7
|
+
<div class="govuk-feedback__body">
|
|
8
|
+
<p class="govuk-body">Tell us about your experience using this service. <a href="#" class="govuk-link">Give us your feedback</a></p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="govuk-feedback govuk-width-container">
|
|
2
|
+
<div class="govuk-grid-row">
|
|
3
|
+
<div class="govuk-grid-column-two-thirds">
|
|
4
|
+
<h2 class="govuk-feedback__title">
|
|
5
|
+
Help us improve this service
|
|
6
|
+
</h2>
|
|
7
|
+
<div class="govuk-feedback__body">
|
|
8
|
+
<p class="govuk-body">Tell us about your experience using this service.</p>
|
|
9
|
+
<p class="govuk-body">Click this cool link to <a href="#" class="govuk-link">give us your feedback</a>.</p>
|
|
10
|
+
<p class="govuk-body">There's another paragraph here.</p>
|
|
11
|
+
<ul class="govuk-list govuk-list--bullet">
|
|
12
|
+
<li>There is also a list</li>
|
|
13
|
+
<li>With items in</li>
|
|
14
|
+
<li>How strange!</li>
|
|
15
|
+
</ul>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{% from "../../macros/attributes.njk" import govukAttributes -%}
|
|
2
|
+
|
|
3
|
+
{% set headingLevel = params.headingLevel if params.headingLevel else 2 -%}
|
|
4
|
+
|
|
5
|
+
<div class="govuk-feedback govuk-width-container {%- if params.classes %} {{ params.classes }}{% endif %}" {{- govukAttributes(params.attributes) }}>
|
|
6
|
+
<div class="govuk-grid-row">
|
|
7
|
+
<div class="govuk-grid-column-two-thirds">
|
|
8
|
+
<h{{ headingLevel }} class="govuk-feedback__title">
|
|
9
|
+
{{ params.titleHtml | safe if params.titleHtml else params.titleText }}
|
|
10
|
+
</h{{ headingLevel }}>
|
|
11
|
+
{% if caller or params.html or params.text %}
|
|
12
|
+
<div class="govuk-feedback__body">
|
|
13
|
+
{% if caller or params.html %}
|
|
14
|
+
{{ caller() if caller else params.html | safe | trim | indent(4) }}
|
|
15
|
+
{% elif params.text %}
|
|
16
|
+
<p class="govuk-body">
|
|
17
|
+
{{ params.text | trim | indent(6) }}
|
|
18
|
+
</p>
|
|
19
|
+
{% endif %}
|
|
20
|
+
</div>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Fieldset
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
|
|
6
|
+
|
|
7
|
+
## Guidance and Examples
|
|
8
|
+
|
|
9
|
+
Find out when to use the fieldset component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/fieldset).
|
|
10
|
+
|
|
11
|
+
## Component options
|
|
12
|
+
|
|
13
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
|
14
|
+
|
|
15
|
+
See [options table](https://design-system.service.gov.uk/components/fieldset/#options-fieldset-example) for details.
|