defra_ruby_template 5.11.1 → 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/README.md +187 -9
- data/Rakefile +123 -22
- data/app/views/layouts/defra_ruby_template.html.erb +108 -60
- data/lib/defra_ruby_template/version.rb +1 -1
- data/lib/defra_ruby_template.rb +12 -8
- data/node_modules/govuk-frontend/README.md +1 -1
- data/node_modules/govuk-frontend/dist/govuk/_base.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/_base.scss +4 -4
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +407 -453
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +408 -453
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +0 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +34 -3
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs +13 -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 +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +5 -11
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs +2 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +40 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +39 -39
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -368
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_mixin.scss +375 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +101 -199
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +101 -199
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +64 -60
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/fixtures.json +102 -97
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +3 -81
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_mixin.scss +87 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +21 -32
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +3 -132
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +134 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +25 -45
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +9 -260
- data/node_modules/govuk-frontend/dist/govuk/components/button/_mixin.scss +233 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.import.scss +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.scss +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +24 -11
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +24 -11
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +193 -209
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +12 -19
- 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-inverse-active-state.html +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-disabled.html +1 -1
- 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-secondary-active-state.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-warning-active-state.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.njk +20 -20
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +7 -42
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_mixin.scss +41 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +119 -174
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +119 -174
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +83 -36
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +245 -92
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +13 -6
- 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-maxwords.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +10 -3
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -309
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_mixin.scss +317 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +22 -10
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +22 -10
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +326 -480
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/macro-options.json +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-default.html +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-conditional-reveal.html +21 -21
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +30 -30
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-error.html +26 -26
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-hint.html +25 -25
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-long-text.html +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small.html +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items.html +35 -35
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-and-none.html +30 -32
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-none-and-conditional-items.html +40 -42
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message.html +32 -23
- 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 +21 -23
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-legend-as-a-page-heading.html +27 -27
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-optional-form-group-classes-showing-group-error.html +36 -36
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-pre-checked-values.html +25 -16
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-very-long-option-text.html +27 -30
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +4 -56
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +82 -82
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-with-html.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +8 -26
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_mixin.scss +29 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +780 -150
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +50 -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-default.html +30 -22
- 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-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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +5 -8
- 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 +84 -29
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -137
- data/node_modules/govuk-frontend/dist/govuk/components/details/_mixin.scss +143 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +22 -22
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +3 -12
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_mixin.scss +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +10 -10
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -53
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_mixin.scss +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +25 -18
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +25 -18
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/fixtures.json +21 -21
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +4 -89
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +96 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +53 -151
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +53 -151
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +16 -12
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/fixtures.json +19 -19
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -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/_fieldset.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -67
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_mixin.scss +71 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +19 -19
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +6 -216
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_mixin.scss +217 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +123 -187
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +123 -187
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +86 -49
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +125 -138
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +15 -10
- 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 +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced.html +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-translated.html +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +3 -192
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +205 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +129 -81
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +1 -7
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-default.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-full-gds-example.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-three-equal-columns.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-html-content-licence-and-copyright-notice.html +40 -19
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-meta.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-text-content-licence-and-copyright-notice.html +40 -19
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-one-column.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-two-columns.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta-links-and-meta-content.html +45 -24
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-navigation.html +45 -24
- 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 +36 -39
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_generic-header.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_mixin.scss +140 -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 +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +3 -546
- data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +119 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +15 -492
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +2 -101
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +12 -7
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +12 -8
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +11 -7
- data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +20 -63
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +3 -43
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_mixin.scss +47 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +7 -7
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +6 -166
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_mixin.scss +161 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +161 -180
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-extra-letter-spacing.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +3 -24
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_mixin.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +7 -7
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -44
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/_mixin.scss +48 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +20 -20
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -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/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -91
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +100 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +74 -108
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +24 -11
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +24 -11
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-text-as-html.html +7 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +3 -226
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_mixin.scss +235 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +109 -105
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-default.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-first-page.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-last-page.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-link-and-item-text.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-many-pages.html +9 -9
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template.njk +4 -2
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -56
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +94 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +251 -16
- data/node_modules/govuk-frontend/dist/govuk/components/panel/macro-options.json +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-default.html +1 -1
- 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 +42 -2
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +5 -54
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_mixin.scss +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +53 -48
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +42 -142
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +42 -142
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +4 -33
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_mixin.scss +42 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +15 -15
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template-default.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -325
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_mixin.scss +336 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +244 -354
- data/node_modules/govuk-frontend/dist/govuk/components/radios/macro-options.json +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +22 -10
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +22 -10
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-default.html +5 -3
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-inline.html +19 -19
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline.html +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +24 -24
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-conditional-reveal.html +27 -27
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-error.html +26 -26
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-hint.html +25 -25
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-long-text.html +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small.html +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +24 -24
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-item-checked.html +35 -35
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-and-pre-checked-value.html +35 -35
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items.html +35 -35
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-fieldset-and-error-message.html +20 -20
- 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 +23 -23
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-legend-as-page-heading.html +21 -21
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-optional-form-group-classes-showing-group-error.html +36 -36
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-very-long-option-text.html +28 -28
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +6 -56
- data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +45 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +99 -115
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +3 -185
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +283 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +331 -69
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +26 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +53 -13
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +53 -13
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +30 -2
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +1 -1
- 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 +1 -1
- 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 +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +1 -1
- 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-name-and-navigation.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +12 -4
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +3 -50
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_mixin.scss +60 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +10 -10
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +26 -25
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +26 -25
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +5 -10
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +3 -267
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_mixin.scss +286 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +282 -518
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +3 -73
- data/node_modules/govuk-frontend/dist/govuk/components/table/_mixin.scss +77 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +75 -75
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +3 -132
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_mixin.scss +140 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +44 -39
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +25 -19
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +25 -19
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +3 -94
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_mixin.scss +135 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +19 -43
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-pink.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-turquoise.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +4 -76
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_mixin.scss +83 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +35 -58
- 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-hint-text-and-additional-states.html +77 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +6 -47
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_mixin.scss +43 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +81 -81
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -64
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_mixin.scss +69 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +9 -9
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.mixin.scss +19 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +5 -18
- data/node_modules/govuk-frontend/dist/govuk/core/_index.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/core/_links.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.mixin.scss +44 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +3 -40
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.import.scss +14 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.mixin.scss +74 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +6 -64
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.mixin.scss +54 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +3 -49
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.mixin.scss +173 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -187
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.mixin.scss +15 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +22 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.import.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +12 -7
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +190 -89
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +44 -7
- data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces--internal.scss +41 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +7 -4
- data/node_modules/govuk-frontend/dist/govuk/helpers/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_index.scss +12 -13
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +35 -46
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +174 -34
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +2 -3
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing--internal.scss +80 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +27 -82
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography--internal.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +55 -74
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +17 -13
- data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.scss +73 -0
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +5 -128
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/index.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +61 -53
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/macros/attributes.njk +30 -14
- data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +7 -29
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.mixin.scss +80 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +3 -78
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.mixin.scss +26 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +3 -23
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.mixin.scss +28 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +3 -24
- data/node_modules/govuk-frontend/dist/govuk/objects/_index.import.scss +7 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.mixin.scss +55 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +3 -53
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.mixin.scss +53 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +3 -55
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.mixin.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +3 -75
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.mixin.scss +26 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -24
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +5 -6
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.mixin.scss +89 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +2 -84
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.mixin.scss +16 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -14
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.mixin.scss +43 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +2 -40
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.mixin.scss +50 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +2 -46
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +50 -21
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +168 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.scss +188 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +23 -274
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette--internal.scss +128 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +17 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.import.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +14 -13
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +3 -3
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +8 -17
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +12 -190
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings--internal.scss +69 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +9 -56
- data/node_modules/govuk-frontend/dist/govuk/template.njk +61 -23
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +12 -6
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.import.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +22 -6
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +23 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.import.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +22 -6
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +9 -6
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +6 -3
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.mixin.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +3 -6
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.import.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +2 -3
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.mixin.scss +14 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +2 -9
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +4 -3
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +13 -4
- data/node_modules/govuk-frontend/package.json +29 -22
- data/vendor/assets/assets/images/favicon.ico +0 -0
- data/vendor/assets/assets/images/favicon.svg +1 -1
- data/vendor/assets/assets/images/govuk-icon-180.png +0 -0
- data/vendor/assets/assets/images/govuk-icon-192.png +0 -0
- data/vendor/assets/assets/images/govuk-icon-512.png +0 -0
- data/vendor/assets/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/manifest.json.erb +39 -0
- data/vendor/assets/images/favicon.ico +0 -0
- data/vendor/assets/images/favicon.svg +1 -1
- data/vendor/assets/images/govuk-icon-180.png +0 -0
- data/vendor/assets/images/govuk-icon-192.png +0 -0
- data/vendor/assets/images/govuk-icon-512.png +0 -0
- data/vendor/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +407 -453
- data/vendor/assets/javascripts/defra_ruby_template_supported.js +4 -0
- data/vendor/assets/stylesheets/_base.import.scss +6 -0
- data/vendor/assets/stylesheets/_base.scss +4 -4
- data/vendor/assets/stylesheets/components/_index.import.scss +40 -0
- data/vendor/assets/stylesheets/components/_index.scss +39 -39
- data/vendor/assets/stylesheets/components/accordion/_accordion.import.scss +6 -0
- data/vendor/assets/stylesheets/components/accordion/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +3 -368
- data/vendor/assets/stylesheets/components/accordion/_mixin.scss +375 -0
- data/vendor/assets/stylesheets/components/back-link/_back-link.import.scss +6 -0
- data/vendor/assets/stylesheets/components/back-link/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/back-link/_index.scss +3 -81
- data/vendor/assets/stylesheets/components/back-link/_mixin.scss +87 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.import.scss +6 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +3 -132
- data/vendor/assets/stylesheets/components/breadcrumbs/_mixin.scss +134 -0
- data/vendor/assets/stylesheets/components/button/_button.import.scss +6 -0
- data/vendor/assets/stylesheets/components/button/_index.import.scss +13 -0
- data/vendor/assets/stylesheets/components/button/_index.scss +9 -260
- data/vendor/assets/stylesheets/components/button/_mixin.scss +233 -0
- data/vendor/assets/stylesheets/components/button/_settings.import.scss +32 -0
- data/vendor/assets/stylesheets/components/button/_settings.scss +34 -0
- data/vendor/assets/stylesheets/components/character-count/_character-count.import.scss +6 -0
- data/vendor/assets/stylesheets/components/character-count/_index.import.scss +12 -0
- data/vendor/assets/stylesheets/components/character-count/_index.scss +7 -42
- data/vendor/assets/stylesheets/components/character-count/_mixin.scss +41 -0
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.import.scss +6 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.import.scss +12 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +7 -309
- data/vendor/assets/stylesheets/components/checkboxes/_mixin.scss +317 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.import.scss +6 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.import.scss +9 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +4 -56
- data/vendor/assets/stylesheets/components/cookie-banner/_mixin.scss +62 -0
- data/vendor/assets/stylesheets/components/date-input/_date-input.import.scss +6 -0
- data/vendor/assets/stylesheets/components/date-input/_index.import.scss +13 -0
- data/vendor/assets/stylesheets/components/date-input/_index.scss +8 -26
- data/vendor/assets/stylesheets/components/date-input/_mixin.scss +29 -0
- data/vendor/assets/stylesheets/components/details/_details.import.scss +6 -0
- data/vendor/assets/stylesheets/components/details/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/details/_index.scss +3 -137
- data/vendor/assets/stylesheets/components/details/_mixin.scss +143 -0
- data/vendor/assets/stylesheets/components/error-message/_error-message.import.scss +6 -0
- data/vendor/assets/stylesheets/components/error-message/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/error-message/_index.scss +3 -12
- data/vendor/assets/stylesheets/components/error-message/_mixin.scss +16 -0
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.import.scss +6 -0
- data/vendor/assets/stylesheets/components/error-summary/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +3 -53
- data/vendor/assets/stylesheets/components/error-summary/_mixin.scss +58 -0
- data/vendor/assets/stylesheets/components/exit-this-page/_exit-this-page.import.scss +6 -0
- data/vendor/assets/stylesheets/components/exit-this-page/_index.import.scss +9 -0
- data/vendor/assets/stylesheets/components/exit-this-page/_index.scss +4 -89
- data/vendor/assets/stylesheets/components/exit-this-page/_mixin.scss +96 -0
- data/vendor/assets/stylesheets/components/feedback/_feedback.import.scss +6 -0
- data/vendor/assets/stylesheets/components/feedback/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/feedback/_index.scss +5 -0
- data/vendor/assets/stylesheets/components/feedback/_mixin.scss +48 -0
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.import.scss +6 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +3 -67
- data/vendor/assets/stylesheets/components/fieldset/_mixin.scss +71 -0
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.import.scss +6 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.import.scss +11 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +6 -216
- data/vendor/assets/stylesheets/components/file-upload/_mixin.scss +217 -0
- data/vendor/assets/stylesheets/components/footer/_footer.import.scss +6 -0
- data/vendor/assets/stylesheets/components/footer/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/footer/_index.scss +3 -192
- data/vendor/assets/stylesheets/components/footer/_mixin.scss +205 -0
- data/vendor/assets/stylesheets/components/generic-header/_generic-header.import.scss +6 -0
- data/vendor/assets/stylesheets/components/generic-header/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/generic-header/_index.scss +5 -0
- data/vendor/assets/stylesheets/components/generic-header/_mixin.scss +140 -0
- data/vendor/assets/stylesheets/components/header/_header.import.scss +6 -0
- data/vendor/assets/stylesheets/components/header/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/header/_index.scss +3 -546
- data/vendor/assets/stylesheets/components/header/_mixin.scss +119 -0
- data/vendor/assets/stylesheets/components/hint/_hint.import.scss +6 -0
- data/vendor/assets/stylesheets/components/hint/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/hint/_index.scss +3 -43
- data/vendor/assets/stylesheets/components/hint/_mixin.scss +47 -0
- data/vendor/assets/stylesheets/components/input/_index.import.scss +11 -0
- data/vendor/assets/stylesheets/components/input/_index.scss +6 -166
- data/vendor/assets/stylesheets/components/input/_input.import.scss +6 -0
- data/vendor/assets/stylesheets/components/input/_mixin.scss +161 -0
- data/vendor/assets/stylesheets/components/inset-text/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/inset-text/_index.scss +3 -24
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.import.scss +6 -0
- data/vendor/assets/stylesheets/components/inset-text/_mixin.scss +31 -0
- data/vendor/assets/stylesheets/components/label/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/label/_index.scss +3 -44
- data/vendor/assets/stylesheets/components/label/_label.import.scss +6 -0
- data/vendor/assets/stylesheets/components/label/_mixin.scss +48 -0
- data/vendor/assets/stylesheets/components/language-navigation/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/language-navigation/_index.scss +6 -0
- data/vendor/assets/stylesheets/components/language-navigation/_language-navigation.import.scss +6 -0
- data/vendor/assets/stylesheets/components/language-navigation/_mixin.scss +68 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +3 -91
- data/vendor/assets/stylesheets/components/notification-banner/_mixin.scss +100 -0
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.import.scss +6 -0
- data/vendor/assets/stylesheets/components/pagination/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/pagination/_index.scss +3 -226
- data/vendor/assets/stylesheets/components/pagination/_mixin.scss +235 -0
- data/vendor/assets/stylesheets/components/pagination/_pagination.import.scss +6 -0
- data/vendor/assets/stylesheets/components/panel/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +3 -56
- data/vendor/assets/stylesheets/components/panel/_mixin.scss +94 -0
- data/vendor/assets/stylesheets/components/panel/_panel.import.scss +6 -0
- data/vendor/assets/stylesheets/components/password-input/_index.import.scss +10 -0
- data/vendor/assets/stylesheets/components/password-input/_index.scss +5 -54
- data/vendor/assets/stylesheets/components/password-input/_mixin.scss +56 -0
- data/vendor/assets/stylesheets/components/password-input/_password-input.import.scss +6 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.import.scss +9 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +4 -33
- data/vendor/assets/stylesheets/components/phase-banner/_mixin.scss +42 -0
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.import.scss +6 -0
- data/vendor/assets/stylesheets/components/radios/_index.import.scss +12 -0
- data/vendor/assets/stylesheets/components/radios/_index.scss +7 -325
- data/vendor/assets/stylesheets/components/radios/_mixin.scss +336 -0
- data/vendor/assets/stylesheets/components/radios/_radios.import.scss +6 -0
- data/vendor/assets/stylesheets/components/select/_index.import.scss +11 -0
- data/vendor/assets/stylesheets/components/select/_index.scss +6 -56
- data/vendor/assets/stylesheets/components/select/_mixin.scss +45 -0
- data/vendor/assets/stylesheets/components/select/_select.import.scss +6 -0
- data/vendor/assets/stylesheets/components/service-navigation/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/service-navigation/_index.scss +3 -185
- data/vendor/assets/stylesheets/components/service-navigation/_mixin.scss +283 -0
- data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.import.scss +6 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +3 -50
- data/vendor/assets/stylesheets/components/skip-link/_mixin.scss +60 -0
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.import.scss +6 -0
- data/vendor/assets/stylesheets/components/summary-list/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +3 -267
- data/vendor/assets/stylesheets/components/summary-list/_mixin.scss +286 -0
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.import.scss +6 -0
- data/vendor/assets/stylesheets/components/table/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/table/_index.scss +3 -73
- data/vendor/assets/stylesheets/components/table/_mixin.scss +77 -0
- data/vendor/assets/stylesheets/components/table/_table.import.scss +6 -0
- data/vendor/assets/stylesheets/components/tabs/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/tabs/_index.scss +3 -132
- data/vendor/assets/stylesheets/components/tabs/_mixin.scss +140 -0
- data/vendor/assets/stylesheets/components/tabs/_tabs.import.scss +6 -0
- data/vendor/assets/stylesheets/components/tag/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/tag/_index.scss +3 -94
- data/vendor/assets/stylesheets/components/tag/_mixin.scss +135 -0
- data/vendor/assets/stylesheets/components/tag/_tag.import.scss +6 -0
- data/vendor/assets/stylesheets/components/task-list/_index.import.scss +9 -0
- data/vendor/assets/stylesheets/components/task-list/_index.scss +4 -76
- data/vendor/assets/stylesheets/components/task-list/_mixin.scss +83 -0
- data/vendor/assets/stylesheets/components/task-list/_task-list.import.scss +6 -0
- data/vendor/assets/stylesheets/components/textarea/_index.import.scss +11 -0
- data/vendor/assets/stylesheets/components/textarea/_index.scss +6 -47
- data/vendor/assets/stylesheets/components/textarea/_mixin.scss +43 -0
- data/vendor/assets/stylesheets/components/textarea/_textarea.import.scss +6 -0
- data/vendor/assets/stylesheets/components/warning-text/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +3 -64
- data/vendor/assets/stylesheets/components/warning-text/_mixin.scss +69 -0
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.import.scss +6 -0
- data/vendor/assets/stylesheets/core/_global-styles.import.scss +10 -0
- data/vendor/assets/stylesheets/core/_global-styles.mixin.scss +19 -0
- data/vendor/assets/stylesheets/core/_global-styles.scss +5 -18
- data/vendor/assets/stylesheets/core/_index.import.scss +6 -0
- data/vendor/assets/stylesheets/core/_index.scss +6 -7
- data/vendor/assets/stylesheets/core/_links.import.scss +10 -0
- data/vendor/assets/stylesheets/core/_links.mixin.scss +44 -0
- data/vendor/assets/stylesheets/core/_links.scss +3 -40
- data/vendor/assets/stylesheets/core/_lists.import.scss +14 -0
- data/vendor/assets/stylesheets/core/_lists.mixin.scss +74 -0
- data/vendor/assets/stylesheets/core/_lists.scss +6 -64
- data/vendor/assets/stylesheets/core/_section-break.import.scss +8 -0
- data/vendor/assets/stylesheets/core/_section-break.mixin.scss +54 -0
- data/vendor/assets/stylesheets/core/_section-break.scss +3 -49
- data/vendor/assets/stylesheets/core/_typography.import.scss +8 -0
- data/vendor/assets/stylesheets/core/_typography.mixin.scss +173 -0
- data/vendor/assets/stylesheets/core/_typography.scss +3 -187
- data/vendor/assets/stylesheets/custom-properties/_breakpoints.import.scss +8 -0
- data/vendor/assets/stylesheets/custom-properties/_breakpoints.mixin.scss +15 -0
- data/vendor/assets/stylesheets/custom-properties/_breakpoints.scss +4 -0
- data/vendor/assets/stylesheets/custom-properties/_frontend-version.import.scss +8 -0
- data/vendor/assets/stylesheets/custom-properties/_frontend-version.mixin.scss +13 -0
- data/vendor/assets/stylesheets/custom-properties/_frontend-version.scss +4 -0
- data/vendor/assets/stylesheets/custom-properties/_functional-colours.import.scss +8 -0
- data/vendor/assets/stylesheets/custom-properties/_functional-colours.mixin.scss +22 -0
- data/vendor/assets/stylesheets/custom-properties/_functional-colours.scss +4 -0
- data/vendor/assets/stylesheets/custom-properties/_index.import.scss +4 -0
- data/vendor/assets/stylesheets/custom-properties/_index.scss +4 -0
- data/vendor/assets/stylesheets/defra_ruby_template.scss +8 -11
- data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
- data/vendor/assets/stylesheets/helpers/_clearfix.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_clearfix.scss +0 -1
- data/vendor/assets/stylesheets/helpers/_colour.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_colour.scss +190 -89
- data/vendor/assets/stylesheets/helpers/_device-pixels.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_device-pixels.scss +2 -1
- data/vendor/assets/stylesheets/helpers/_focused.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_focused.scss +44 -7
- data/vendor/assets/stylesheets/helpers/_font-faces--internal.scss +41 -0
- data/vendor/assets/stylesheets/helpers/_grid.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_grid.scss +7 -4
- data/vendor/assets/stylesheets/helpers/_index.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_index.scss +12 -13
- data/vendor/assets/stylesheets/helpers/_links.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_links.scss +35 -46
- data/vendor/assets/stylesheets/helpers/_media-queries.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +174 -34
- data/vendor/assets/stylesheets/helpers/_shape-arrow.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +2 -3
- data/vendor/assets/stylesheets/helpers/_spacing--internal.scss +80 -0
- data/vendor/assets/stylesheets/helpers/_spacing.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +27 -82
- data/vendor/assets/stylesheets/helpers/_typography--internal.scss +24 -0
- data/vendor/assets/stylesheets/helpers/_typography.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_typography.scss +55 -74
- data/vendor/assets/stylesheets/helpers/_visually-hidden.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +17 -13
- data/vendor/assets/stylesheets/helpers/_width-container.import.scss +2 -0
- data/vendor/assets/stylesheets/helpers/_width-container.scss +73 -0
- data/vendor/assets/stylesheets/index.import.scss +10 -0
- data/vendor/assets/stylesheets/index.scss +6 -7
- data/vendor/assets/stylesheets/objects/_button-group.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_button-group.mixin.scss +80 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +3 -78
- data/vendor/assets/stylesheets/objects/_form-group.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_form-group.mixin.scss +26 -0
- data/vendor/assets/stylesheets/objects/_form-group.scss +3 -23
- data/vendor/assets/stylesheets/objects/_grid.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_grid.mixin.scss +28 -0
- data/vendor/assets/stylesheets/objects/_grid.scss +3 -24
- data/vendor/assets/stylesheets/objects/_index.import.scss +7 -0
- data/vendor/assets/stylesheets/objects/_index.scss +6 -7
- data/vendor/assets/stylesheets/objects/_main-wrapper.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.mixin.scss +55 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +3 -53
- data/vendor/assets/stylesheets/objects/_template.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_template.mixin.scss +53 -0
- data/vendor/assets/stylesheets/objects/_template.scss +3 -55
- data/vendor/assets/stylesheets/objects/_width-container.import.scss +8 -0
- data/vendor/assets/stylesheets/objects/_width-container.mixin.scss +9 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +3 -75
- data/vendor/assets/stylesheets/overrides/_display.import.scss +8 -0
- data/vendor/assets/stylesheets/overrides/_display.mixin.scss +26 -0
- data/vendor/assets/stylesheets/overrides/_display.scss +2 -24
- data/vendor/assets/stylesheets/overrides/_index.import.scss +6 -0
- data/vendor/assets/stylesheets/overrides/_index.scss +5 -6
- data/vendor/assets/stylesheets/overrides/_spacing.import.scss +8 -0
- data/vendor/assets/stylesheets/overrides/_spacing.mixin.scss +89 -0
- data/vendor/assets/stylesheets/overrides/_spacing.scss +2 -84
- data/vendor/assets/stylesheets/overrides/_text-align.import.scss +8 -0
- data/vendor/assets/stylesheets/overrides/_text-align.mixin.scss +16 -0
- data/vendor/assets/stylesheets/overrides/_text-align.scss +2 -14
- data/vendor/assets/stylesheets/overrides/_typography.import.scss +8 -0
- data/vendor/assets/stylesheets/overrides/_typography.mixin.scss +43 -0
- data/vendor/assets/stylesheets/overrides/_typography.scss +2 -40
- data/vendor/assets/stylesheets/overrides/_width.import.scss +8 -0
- data/vendor/assets/stylesheets/overrides/_width.mixin.scss +50 -0
- data/vendor/assets/stylesheets/overrides/_width.scss +2 -46
- data/vendor/assets/stylesheets/settings/_assets.import.scss +13 -0
- data/vendor/assets/stylesheets/settings/_assets.scss +50 -21
- data/vendor/assets/stylesheets/settings/_colours-applied.import.scss +13 -0
- data/vendor/assets/stylesheets/settings/_colours-functional.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_colours-functional.scss +168 -0
- data/vendor/assets/stylesheets/settings/_colours-legacy-functional.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_colours-legacy-functional.scss +188 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +23 -274
- data/vendor/assets/stylesheets/settings/_colours-palette--internal.scss +128 -0
- data/vendor/assets/stylesheets/settings/_custom-properties.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_custom-properties.scss +17 -0
- data/vendor/assets/stylesheets/settings/_global-styles.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_global-styles.scss +0 -1
- data/vendor/assets/stylesheets/settings/_index.import.scss +24 -0
- data/vendor/assets/stylesheets/settings/_index.scss +14 -13
- data/vendor/assets/stylesheets/settings/_links.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_links.scss +3 -3
- data/vendor/assets/stylesheets/settings/_measurements.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_measurements.scss +8 -17
- data/vendor/assets/stylesheets/settings/_media-queries.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_media-queries.scss +0 -10
- data/vendor/assets/stylesheets/settings/_spacing.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_spacing.scss +0 -1
- data/vendor/assets/stylesheets/settings/_typography-font.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +3 -2
- data/vendor/assets/stylesheets/settings/_typography-responsive.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +12 -190
- data/vendor/assets/stylesheets/settings/_warnings--internal.scss +69 -0
- data/vendor/assets/stylesheets/settings/_warnings.import.scss +2 -0
- data/vendor/assets/stylesheets/settings/_warnings.scss +9 -56
- data/vendor/assets/stylesheets/tools/_exports.import.scss +2 -0
- data/vendor/assets/stylesheets/tools/_exports.scss +12 -6
- data/vendor/assets/stylesheets/tools/_font-url.import.scss +31 -0
- data/vendor/assets/stylesheets/tools/_font-url.scss +22 -6
- data/vendor/assets/stylesheets/tools/_if.import.scss +2 -0
- data/vendor/assets/stylesheets/tools/_if.scss +23 -0
- data/vendor/assets/stylesheets/tools/_image-url.import.scss +31 -0
- data/vendor/assets/stylesheets/tools/_image-url.scss +22 -6
- data/vendor/assets/stylesheets/tools/_index.import.scss +2 -0
- data/vendor/assets/stylesheets/tools/_index.scss +6 -7
- data/vendor/assets/stylesheets/tools/_px-to-em.import.scss +2 -0
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +9 -6
- data/vendor/assets/stylesheets/tools/_px-to-rem.import.scss +2 -0
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +6 -3
- data/vendor/assets/stylesheets/utilities/_clearfix.import.scss +8 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.mixin.scss +10 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.scss +3 -6
- data/vendor/assets/stylesheets/utilities/_index.import.scss +3 -0
- data/vendor/assets/stylesheets/utilities/_index.scss +2 -3
- data/vendor/assets/stylesheets/utilities/_visually-hidden.import.scss +8 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.mixin.scss +14 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +2 -9
- metadata +541 -409
- data/node_modules/govuk-frontend/dist/govuk/_base.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/all.scss +0 -9
- data/node_modules/govuk-frontend/dist/govuk/all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-focusable-elements-inside.html +0 -26
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-one-section-open.html +0 -30
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-translations.html +0 -30
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-text.html +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-multiple-levels.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-input-disabled.html +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-input.html +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-link.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-start.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-prevent-double-click.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-link.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-start-link.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-link.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-active-state.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-focus-state.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-hover-state.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-custom-textarea-description.html +0 -9
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-error.html +0 -12
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-translations.html +0 -9
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-word-count.html +0 -9
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-disabled.html +0 -27
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-a-medium-legend.html +0 -33
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-item-checked.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items-with-special-characters.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-disabled-item.html +0 -29
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message-and-hints-on-items.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-fieldset-and-error-message.html +0 -30
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-id-and-name.html +0 -30
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-and-hint-set-aria-describedby-on-input.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-set-aria-describedby-on-input.html +0 -13
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-without-fieldset.html +0 -22
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-client-side-implementation.html +0 -60
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-autocomplete-values.html +0 -36
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-default-items.html +0 -36
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-and-hint.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-input-attributes.html +0 -36
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-optional-form-group-classes.html +0 -36
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/template-translated.html +0 -5
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-direct-media-capture.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-image-files-only.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-multiple-files.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-disabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-disabled.html +0 -13
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-optional-form-group-classes.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta.html +0 -56
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +0 -233
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -225
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +0 -89
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +0 -55
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +0 -57
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +0 -51
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +0 -30
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html +0 -119
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-and-navigation.html +0 -62
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-but-no-service-url.html +0 -34
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name.html +0 -34
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-st-edwards-crown.html +0 -19
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-disabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocapitalize-turned-off.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocomplete-attribute.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-optional-form-group-classes.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-pattern-attribute.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-long-suffix.html +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-disabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-enabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-disabled-with-type-as-success.html +0 -12
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-explicitly-enabled-with-type-as-success.html +0 -12
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-custom-tabindex.html +0 -12
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-paragraph-as-html-heading.html +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-rolealert-overridden-to-roleregion-with-type-as-success.html +0 -12
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-success-with-custom-html.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-a-list.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-accessible-labels-on-item-links.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-navigation-landmark.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only-in-a-different-language.html +0 -22
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-custom-heading-level.html +0 -8
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-new-password-autocomplete.html +0 -11
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-translations.html +0 -11
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked-using-value.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked.html +0 -19
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline-extreme.html +0 -69
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-disabled.html +0 -27
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-medium-legend.html +0 -24
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-with-special-characters.html +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-disabled.html +0 -29
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-idprefix.html +0 -16
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-id.html +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-no-items.html +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-optional-form-group-classes.html +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-selected-value.html +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html +0 -58
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-a-custom-header-level.html +0 -28
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-check-your-answers.html +0 -98
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-overridden-widths.html +0 -58
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-translated.html +0 -51
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-no-first-action.html +0 -58
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-some-actions.html +0 -45
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/template-with-small-text-modifier-for-tables-with-a-lot-of-data.html +0 -19
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-blue.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-light-blue.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-3-states.html +0 -49
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-all-possible-colours.html +0 -143
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-hint-text-and-additional-states.html +0 -77
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-autocomplete-attribute.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-optional-form-group-classes.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-disabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-enabled.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +0 -4
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +0 -12
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss +0 -41
- data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +0 -9
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +0 -195
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +0 -37
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +0 -65
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
- data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +0 -25
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +0 -1
- data/spec/spec_helper.rb +0 -98
- data/spec/tasks/assets_spec.rb +0 -53
- data/vendor/assets/assets/manifest.json +0 -39
- data/vendor/assets/assets/rebrand/images/favicon.ico +0 -0
- data/vendor/assets/assets/rebrand/images/favicon.svg +0 -1
- data/vendor/assets/assets/rebrand/images/govuk-crest.svg +0 -1
- data/vendor/assets/assets/rebrand/images/govuk-icon-180.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-192.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-512.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-mask.svg +0 -1
- data/vendor/assets/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/rebrand/manifest.json +0 -39
- data/vendor/assets/images/govuk-crest-2x.png +0 -0
- data/vendor/assets/images/govuk-crest.png +0 -0
- data/vendor/assets/stylesheets/all.scss +0 -9
- data/vendor/assets/stylesheets/components/_all.scss +0 -10
- data/vendor/assets/stylesheets/components/accordion/_accordion.scss +0 -4
- data/vendor/assets/stylesheets/components/back-link/_back-link.scss +0 -4
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +0 -4
- data/vendor/assets/stylesheets/components/button/_button.scss +0 -4
- data/vendor/assets/stylesheets/components/character-count/_character-count.scss +0 -4
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +0 -4
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +0 -4
- data/vendor/assets/stylesheets/components/date-input/_date-input.scss +0 -4
- data/vendor/assets/stylesheets/components/details/_details.scss +0 -4
- data/vendor/assets/stylesheets/components/error-message/_error-message.scss +0 -4
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +0 -4
- data/vendor/assets/stylesheets/components/exit-this-page/_exit-this-page.scss +0 -4
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +0 -4
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +0 -4
- data/vendor/assets/stylesheets/components/footer/_footer.scss +0 -4
- data/vendor/assets/stylesheets/components/header/_header.scss +0 -4
- data/vendor/assets/stylesheets/components/hint/_hint.scss +0 -4
- data/vendor/assets/stylesheets/components/input/_input.scss +0 -4
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +0 -4
- data/vendor/assets/stylesheets/components/label/_label.scss +0 -4
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +0 -4
- data/vendor/assets/stylesheets/components/pagination/_pagination.scss +0 -4
- data/vendor/assets/stylesheets/components/panel/_panel.scss +0 -4
- data/vendor/assets/stylesheets/components/password-input/_password-input.scss +0 -4
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +0 -4
- data/vendor/assets/stylesheets/components/radios/_radios.scss +0 -4
- data/vendor/assets/stylesheets/components/select/_select.scss +0 -4
- data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.scss +0 -4
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +0 -4
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +0 -4
- data/vendor/assets/stylesheets/components/table/_table.scss +0 -4
- data/vendor/assets/stylesheets/components/tabs/_tabs.scss +0 -4
- data/vendor/assets/stylesheets/components/tag/_tag.scss +0 -4
- data/vendor/assets/stylesheets/components/task-list/_task-list.scss +0 -4
- data/vendor/assets/stylesheets/components/textarea/_textarea.scss +0 -4
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +0 -4
- data/vendor/assets/stylesheets/core/_all.scss +0 -10
- data/vendor/assets/stylesheets/core/_govuk-frontend-properties.scss +0 -12
- data/vendor/assets/stylesheets/helpers/_all.scss +0 -10
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +0 -41
- data/vendor/assets/stylesheets/objects/_all.scss +0 -10
- data/vendor/assets/stylesheets/overrides/_all.scss +0 -9
- data/vendor/assets/stylesheets/settings/_all.scss +0 -10
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +0 -195
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +0 -37
- data/vendor/assets/stylesheets/tools/_all.scss +0 -10
- data/vendor/assets/stylesheets/tools/_rebrand.scss +0 -65
- data/vendor/assets/stylesheets/utilities/_all.scss +0 -10
- data/vendor/assets/stylesheets/vendor/_sass-mq.scss +0 -349
- /data/node_modules/govuk-frontend/dist/govuk/components/date-input/{template-complete-question.html → template-with-items.html} +0 -0
- /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head-and-caption.html → template-with-head-and-caption.html} +0 -0
- /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head.html → template-with-head.html} +0 -0
- /data/node_modules/govuk-frontend/dist/govuk/components/task-list/{template-example-with-very-long-single-word-tags.html → template-with-very-long-single-word-tags.html} +0 -0
|
@@ -4,16 +4,10 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.GOVUKFrontend = global.GOVUKFrontend || {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
const version = '
|
|
7
|
+
const version = '6.6.0';
|
|
8
8
|
|
|
9
|
-
function getFragmentFromUrl(url) {
|
|
10
|
-
if (!url.includes('#')) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
return url.split('#').pop();
|
|
14
|
-
}
|
|
15
9
|
function getBreakpoint(name) {
|
|
16
|
-
const property = `--govuk-
|
|
10
|
+
const property = `--govuk-breakpoint-${name}`;
|
|
17
11
|
const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);
|
|
18
12
|
return {
|
|
19
13
|
property,
|
|
@@ -69,6 +63,9 @@
|
|
|
69
63
|
function isObject(option) {
|
|
70
64
|
return !!option && typeof option === 'object' && !isArray(option);
|
|
71
65
|
}
|
|
66
|
+
function isScope($scope) {
|
|
67
|
+
return !!$scope && ($scope instanceof Element || $scope instanceof Document);
|
|
68
|
+
}
|
|
72
69
|
function formatErrorMessage(Component, message) {
|
|
73
70
|
return `${Component.moduleName}: ${message}`;
|
|
74
71
|
}
|
|
@@ -76,9 +73,6 @@
|
|
|
76
73
|
* @typedef ComponentWithModuleName
|
|
77
74
|
* @property {string} moduleName - Name of the component
|
|
78
75
|
*/
|
|
79
|
-
/**
|
|
80
|
-
* @import { ObjectNested } from './configuration.mjs'
|
|
81
|
-
*/
|
|
82
76
|
|
|
83
77
|
class GOVUKFrontendError extends Error {
|
|
84
78
|
constructor(...args) {
|
|
@@ -90,11 +84,14 @@
|
|
|
90
84
|
/**
|
|
91
85
|
* Checks if GOV.UK Frontend is supported on this page
|
|
92
86
|
*
|
|
93
|
-
* @param {
|
|
87
|
+
* @param {Element | Document | null | string} [scopeOrMessage] - HTML element `<body>` checked for browser support or support error message
|
|
94
88
|
*/
|
|
95
|
-
constructor(
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
constructor(scopeOrMessage = document.body) {
|
|
90
|
+
let supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class="govuk-frontend-supported">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';
|
|
91
|
+
if (!isScope(scopeOrMessage)) {
|
|
92
|
+
supportMessage = 'GOV.UK Frontend initialised without `<script type="module">`';
|
|
93
|
+
}
|
|
94
|
+
super(typeof scopeOrMessage === 'string' ? scopeOrMessage : supportMessage);
|
|
98
95
|
this.name = 'SupportError';
|
|
99
96
|
}
|
|
100
97
|
}
|
|
@@ -107,7 +104,7 @@
|
|
|
107
104
|
class ElementError extends GOVUKFrontendError {
|
|
108
105
|
constructor(messageOrOptions) {
|
|
109
106
|
let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';
|
|
110
|
-
if (
|
|
107
|
+
if (isObject(messageOrOptions)) {
|
|
111
108
|
const {
|
|
112
109
|
component,
|
|
113
110
|
identifier,
|
|
@@ -116,7 +113,9 @@
|
|
|
116
113
|
} = messageOrOptions;
|
|
117
114
|
message = identifier;
|
|
118
115
|
message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';
|
|
119
|
-
|
|
116
|
+
if (component) {
|
|
117
|
+
message = formatErrorMessage(component, message);
|
|
118
|
+
}
|
|
120
119
|
}
|
|
121
120
|
super(message);
|
|
122
121
|
this.name = 'ElementError';
|
|
@@ -133,6 +132,7 @@
|
|
|
133
132
|
* @import { ComponentWithModuleName } from '../common/index.mjs'
|
|
134
133
|
*/
|
|
135
134
|
|
|
135
|
+
const _self$1 = typeof globalThis !== 'undefined' ? globalThis : self;
|
|
136
136
|
class Component {
|
|
137
137
|
/**
|
|
138
138
|
* Returns the root element of the component
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
/**
|
|
187
187
|
* @typedef {typeof Component & ChildClass} ChildClassConstructor
|
|
188
188
|
*/
|
|
189
|
-
Component.elementType = HTMLElement;
|
|
189
|
+
Component.elementType = _self$1.HTMLElement;
|
|
190
190
|
|
|
191
191
|
const configOverride = Symbol.for('configOverride');
|
|
192
192
|
class ConfigurableComponent extends Component {
|
|
@@ -211,10 +211,14 @@
|
|
|
211
211
|
throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));
|
|
212
212
|
}
|
|
213
213
|
const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);
|
|
214
|
-
this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}
|
|
214
|
+
this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {});
|
|
215
|
+
this._config = mergeConfigs(this._config, this[configOverride](datasetConfig), datasetConfig);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
function normaliseString(value, property) {
|
|
219
|
+
if (property != null && property.type && !['string', 'number', 'boolean'].includes(property.type)) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
218
222
|
const trimmedValue = value ? value.trim() : '';
|
|
219
223
|
let output;
|
|
220
224
|
let outputType = property == null ? void 0 : property.type;
|
|
@@ -256,6 +260,30 @@
|
|
|
256
260
|
}
|
|
257
261
|
return out;
|
|
258
262
|
}
|
|
263
|
+
function normaliseOptions(scopeOrOptions) {
|
|
264
|
+
let $scope = document;
|
|
265
|
+
let onError;
|
|
266
|
+
if (isObject(scopeOrOptions)) {
|
|
267
|
+
const options = scopeOrOptions;
|
|
268
|
+
if (isScope(options.scope) || options.scope === null) {
|
|
269
|
+
$scope = options.scope;
|
|
270
|
+
}
|
|
271
|
+
if (typeof options.onError === 'function') {
|
|
272
|
+
onError = options.onError;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (isScope(scopeOrOptions)) {
|
|
276
|
+
$scope = scopeOrOptions;
|
|
277
|
+
} else if (scopeOrOptions === null) {
|
|
278
|
+
$scope = null;
|
|
279
|
+
} else if (typeof scopeOrOptions === 'function') {
|
|
280
|
+
onError = scopeOrOptions;
|
|
281
|
+
}
|
|
282
|
+
return {
|
|
283
|
+
scope: $scope,
|
|
284
|
+
onError
|
|
285
|
+
};
|
|
286
|
+
}
|
|
259
287
|
function mergeConfigs(...configObjects) {
|
|
260
288
|
const formattedConfigObject = {};
|
|
261
289
|
for (const configObject of configObjects) {
|
|
@@ -350,6 +378,20 @@
|
|
|
350
378
|
* @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]
|
|
351
379
|
* @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>
|
|
352
380
|
*/
|
|
381
|
+
/**
|
|
382
|
+
* @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'
|
|
383
|
+
*/
|
|
384
|
+
|
|
385
|
+
function createElement(tagName, attributes = {}, children = []) {
|
|
386
|
+
const $element = document.createElement(tagName);
|
|
387
|
+
Object.entries(attributes).forEach(([name, value]) => {
|
|
388
|
+
$element.setAttribute(name, value);
|
|
389
|
+
});
|
|
390
|
+
for (const child of children) {
|
|
391
|
+
$element.append(child);
|
|
392
|
+
}
|
|
393
|
+
return $element;
|
|
394
|
+
}
|
|
353
395
|
|
|
354
396
|
class I18n {
|
|
355
397
|
constructor(translations = {}, config = {}) {
|
|
@@ -364,7 +406,7 @@
|
|
|
364
406
|
throw new Error('i18n: lookup key missing');
|
|
365
407
|
}
|
|
366
408
|
let translation = this.translations[lookupKey];
|
|
367
|
-
if (typeof (options == null ? void 0 : options.count) === 'number' &&
|
|
409
|
+
if (typeof (options == null ? void 0 : options.count) === 'number' && isObject(translation)) {
|
|
368
410
|
const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];
|
|
369
411
|
if (translationPluralForm) {
|
|
370
412
|
translation = translationPluralForm;
|
|
@@ -406,8 +448,8 @@
|
|
|
406
448
|
return 'other';
|
|
407
449
|
}
|
|
408
450
|
const translation = this.translations[lookupKey];
|
|
409
|
-
const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) :
|
|
410
|
-
if (
|
|
451
|
+
const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : 'other';
|
|
452
|
+
if (isObject(translation)) {
|
|
411
453
|
if (preferredForm in translation) {
|
|
412
454
|
return preferredForm;
|
|
413
455
|
} else if ('other' in translation) {
|
|
@@ -417,132 +459,7 @@
|
|
|
417
459
|
}
|
|
418
460
|
throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`);
|
|
419
461
|
}
|
|
420
|
-
selectPluralFormUsingFallbackRules(count) {
|
|
421
|
-
count = Math.abs(Math.floor(count));
|
|
422
|
-
const ruleset = this.getPluralRulesForLocale();
|
|
423
|
-
if (ruleset) {
|
|
424
|
-
return I18n.pluralRules[ruleset](count);
|
|
425
|
-
}
|
|
426
|
-
return 'other';
|
|
427
|
-
}
|
|
428
|
-
getPluralRulesForLocale() {
|
|
429
|
-
const localeShort = this.locale.split('-')[0];
|
|
430
|
-
for (const pluralRule in I18n.pluralRulesMap) {
|
|
431
|
-
const languages = I18n.pluralRulesMap[pluralRule];
|
|
432
|
-
if (languages.includes(this.locale) || languages.includes(localeShort)) {
|
|
433
|
-
return pluralRule;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
462
|
}
|
|
438
|
-
I18n.pluralRulesMap = {
|
|
439
|
-
arabic: ['ar'],
|
|
440
|
-
chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],
|
|
441
|
-
french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],
|
|
442
|
-
german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],
|
|
443
|
-
irish: ['ga'],
|
|
444
|
-
russian: ['ru', 'uk'],
|
|
445
|
-
scottish: ['gd'],
|
|
446
|
-
spanish: ['pt-PT', 'it', 'es'],
|
|
447
|
-
welsh: ['cy']
|
|
448
|
-
};
|
|
449
|
-
I18n.pluralRules = {
|
|
450
|
-
arabic(n) {
|
|
451
|
-
if (n === 0) {
|
|
452
|
-
return 'zero';
|
|
453
|
-
}
|
|
454
|
-
if (n === 1) {
|
|
455
|
-
return 'one';
|
|
456
|
-
}
|
|
457
|
-
if (n === 2) {
|
|
458
|
-
return 'two';
|
|
459
|
-
}
|
|
460
|
-
if (n % 100 >= 3 && n % 100 <= 10) {
|
|
461
|
-
return 'few';
|
|
462
|
-
}
|
|
463
|
-
if (n % 100 >= 11 && n % 100 <= 99) {
|
|
464
|
-
return 'many';
|
|
465
|
-
}
|
|
466
|
-
return 'other';
|
|
467
|
-
},
|
|
468
|
-
chinese() {
|
|
469
|
-
return 'other';
|
|
470
|
-
},
|
|
471
|
-
french(n) {
|
|
472
|
-
return n === 0 || n === 1 ? 'one' : 'other';
|
|
473
|
-
},
|
|
474
|
-
german(n) {
|
|
475
|
-
return n === 1 ? 'one' : 'other';
|
|
476
|
-
},
|
|
477
|
-
irish(n) {
|
|
478
|
-
if (n === 1) {
|
|
479
|
-
return 'one';
|
|
480
|
-
}
|
|
481
|
-
if (n === 2) {
|
|
482
|
-
return 'two';
|
|
483
|
-
}
|
|
484
|
-
if (n >= 3 && n <= 6) {
|
|
485
|
-
return 'few';
|
|
486
|
-
}
|
|
487
|
-
if (n >= 7 && n <= 10) {
|
|
488
|
-
return 'many';
|
|
489
|
-
}
|
|
490
|
-
return 'other';
|
|
491
|
-
},
|
|
492
|
-
russian(n) {
|
|
493
|
-
const lastTwo = n % 100;
|
|
494
|
-
const last = lastTwo % 10;
|
|
495
|
-
if (last === 1 && lastTwo !== 11) {
|
|
496
|
-
return 'one';
|
|
497
|
-
}
|
|
498
|
-
if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {
|
|
499
|
-
return 'few';
|
|
500
|
-
}
|
|
501
|
-
if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {
|
|
502
|
-
return 'many';
|
|
503
|
-
}
|
|
504
|
-
return 'other';
|
|
505
|
-
},
|
|
506
|
-
scottish(n) {
|
|
507
|
-
if (n === 1 || n === 11) {
|
|
508
|
-
return 'one';
|
|
509
|
-
}
|
|
510
|
-
if (n === 2 || n === 12) {
|
|
511
|
-
return 'two';
|
|
512
|
-
}
|
|
513
|
-
if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {
|
|
514
|
-
return 'few';
|
|
515
|
-
}
|
|
516
|
-
return 'other';
|
|
517
|
-
},
|
|
518
|
-
spanish(n) {
|
|
519
|
-
if (n === 1) {
|
|
520
|
-
return 'one';
|
|
521
|
-
}
|
|
522
|
-
if (n % 1000000 === 0 && n !== 0) {
|
|
523
|
-
return 'many';
|
|
524
|
-
}
|
|
525
|
-
return 'other';
|
|
526
|
-
},
|
|
527
|
-
welsh(n) {
|
|
528
|
-
if (n === 0) {
|
|
529
|
-
return 'zero';
|
|
530
|
-
}
|
|
531
|
-
if (n === 1) {
|
|
532
|
-
return 'one';
|
|
533
|
-
}
|
|
534
|
-
if (n === 2) {
|
|
535
|
-
return 'two';
|
|
536
|
-
}
|
|
537
|
-
if (n === 3) {
|
|
538
|
-
return 'few';
|
|
539
|
-
}
|
|
540
|
-
if (n === 6) {
|
|
541
|
-
return 'many';
|
|
542
|
-
}
|
|
543
|
-
return 'other';
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
463
|
|
|
547
464
|
/**
|
|
548
465
|
* Accordion component
|
|
@@ -567,24 +484,16 @@
|
|
|
567
484
|
constructor($root, config = {}) {
|
|
568
485
|
super($root, config);
|
|
569
486
|
this.i18n = void 0;
|
|
570
|
-
this.controlsClass = 'govuk-accordion__controls';
|
|
571
|
-
this.showAllClass = 'govuk-accordion__show-all';
|
|
572
|
-
this.showAllTextClass = 'govuk-accordion__show-all-text';
|
|
573
487
|
this.sectionClass = 'govuk-accordion__section';
|
|
574
|
-
this.
|
|
488
|
+
this.sectionExpandedModifier = 'govuk-accordion__section--expanded';
|
|
575
489
|
this.sectionButtonClass = 'govuk-accordion__section-button';
|
|
576
490
|
this.sectionHeaderClass = 'govuk-accordion__section-header';
|
|
577
491
|
this.sectionHeadingClass = 'govuk-accordion__section-heading';
|
|
578
|
-
this.sectionHeadingDividerClass = 'govuk-accordion__section-heading-divider';
|
|
579
492
|
this.sectionHeadingTextClass = 'govuk-accordion__section-heading-text';
|
|
580
|
-
this.
|
|
581
|
-
this.
|
|
582
|
-
this.
|
|
583
|
-
this.sectionShowHideTextClass = 'govuk-accordion__section-toggle-text';
|
|
584
|
-
this.upChevronIconClass = 'govuk-accordion-nav__chevron';
|
|
585
|
-
this.downChevronIconClass = 'govuk-accordion-nav__chevron--down';
|
|
493
|
+
this.sectionToggleTextClass = 'govuk-accordion__section-toggle-text';
|
|
494
|
+
this.iconClass = 'govuk-accordion-nav__chevron';
|
|
495
|
+
this.iconOpenModifier = 'govuk-accordion-nav__chevron--down';
|
|
586
496
|
this.sectionSummaryClass = 'govuk-accordion__section-summary';
|
|
587
|
-
this.sectionSummaryFocusClass = 'govuk-accordion__section-summary-focus';
|
|
588
497
|
this.sectionContentClass = 'govuk-accordion__section-content';
|
|
589
498
|
this.$sections = void 0;
|
|
590
499
|
this.$showAllButton = null;
|
|
@@ -604,19 +513,23 @@
|
|
|
604
513
|
this.updateShowAllButton(this.areAllSectionsOpen());
|
|
605
514
|
}
|
|
606
515
|
initControls() {
|
|
607
|
-
this.$showAllButton =
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
this.$showAllIcon
|
|
516
|
+
this.$showAllButton = createElement('button', {
|
|
517
|
+
type: 'button',
|
|
518
|
+
class: 'govuk-accordion__show-all',
|
|
519
|
+
'aria-expanded': 'false'
|
|
520
|
+
});
|
|
521
|
+
this.$showAllIcon = createElement('span', {
|
|
522
|
+
class: this.iconClass
|
|
523
|
+
});
|
|
613
524
|
this.$showAllButton.appendChild(this.$showAllIcon);
|
|
614
|
-
const $accordionControls =
|
|
615
|
-
|
|
525
|
+
const $accordionControls = createElement('div', {
|
|
526
|
+
class: 'govuk-accordion__controls'
|
|
527
|
+
});
|
|
616
528
|
$accordionControls.appendChild(this.$showAllButton);
|
|
617
529
|
this.$root.insertBefore($accordionControls, this.$root.firstChild);
|
|
618
|
-
this.$showAllText =
|
|
619
|
-
|
|
530
|
+
this.$showAllText = createElement('span', {
|
|
531
|
+
class: 'govuk-accordion__show-all-text'
|
|
532
|
+
});
|
|
620
533
|
this.$showAllButton.appendChild(this.$showAllText);
|
|
621
534
|
this.$showAllButton.addEventListener('click', () => this.onShowOrHideAllToggle());
|
|
622
535
|
if ('onbeforematch' in document) {
|
|
@@ -654,39 +567,45 @@
|
|
|
654
567
|
identifier: `Section button placeholder (\`<span class="${this.sectionButtonClass}">\`)`
|
|
655
568
|
});
|
|
656
569
|
}
|
|
657
|
-
const $button =
|
|
658
|
-
|
|
659
|
-
|
|
570
|
+
const $button = createElement('button', {
|
|
571
|
+
type: 'button',
|
|
572
|
+
'aria-controls': `${this.$root.id}-content-${index + 1}`
|
|
573
|
+
});
|
|
660
574
|
for (const attr of Array.from($span.attributes)) {
|
|
661
575
|
if (attr.name !== 'id') {
|
|
662
576
|
$button.setAttribute(attr.name, attr.value);
|
|
663
577
|
}
|
|
664
578
|
}
|
|
665
|
-
const $headingText =
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
$headingTextFocus
|
|
579
|
+
const $headingText = createElement('span', {
|
|
580
|
+
class: this.sectionHeadingTextClass,
|
|
581
|
+
id: $span.id
|
|
582
|
+
});
|
|
583
|
+
const $headingTextFocus = createElement('span', {
|
|
584
|
+
class: 'govuk-accordion__section-heading-text-focus'
|
|
585
|
+
});
|
|
670
586
|
$headingText.appendChild($headingTextFocus);
|
|
671
587
|
Array.from($span.childNodes).forEach($child => $headingTextFocus.appendChild($child));
|
|
672
|
-
const $showHideToggle =
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
$showHideToggleFocus
|
|
588
|
+
const $showHideToggle = createElement('span', {
|
|
589
|
+
class: 'govuk-accordion__section-toggle',
|
|
590
|
+
'data-nosnippet': ''
|
|
591
|
+
});
|
|
592
|
+
const $showHideToggleFocus = createElement('span', {
|
|
593
|
+
class: 'govuk-accordion__section-toggle-focus'
|
|
594
|
+
});
|
|
677
595
|
$showHideToggle.appendChild($showHideToggleFocus);
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
$showHideToggleFocus.appendChild(
|
|
682
|
-
|
|
683
|
-
|
|
596
|
+
$showHideToggleFocus.appendChild(createElement('span', {
|
|
597
|
+
class: this.iconClass
|
|
598
|
+
}));
|
|
599
|
+
$showHideToggleFocus.appendChild(createElement('span', {
|
|
600
|
+
class: this.sectionToggleTextClass
|
|
601
|
+
}));
|
|
684
602
|
$button.appendChild($headingText);
|
|
685
603
|
$button.appendChild(this.getButtonPunctuationEl());
|
|
686
604
|
if ($summary) {
|
|
687
|
-
const $summarySpan =
|
|
688
|
-
const $summarySpanFocus =
|
|
689
|
-
|
|
605
|
+
const $summarySpan = createElement('span');
|
|
606
|
+
const $summarySpanFocus = createElement('span', {
|
|
607
|
+
class: 'govuk-accordion__section-summary-focus'
|
|
608
|
+
});
|
|
690
609
|
$summarySpan.appendChild($summarySpanFocus);
|
|
691
610
|
for (const attr of Array.from($summary.attributes)) {
|
|
692
611
|
$summarySpan.setAttribute(attr.name, attr.value);
|
|
@@ -724,8 +643,8 @@
|
|
|
724
643
|
this.updateShowAllButton(nowExpanded);
|
|
725
644
|
}
|
|
726
645
|
setExpanded(expanded, $section) {
|
|
727
|
-
const $showHideIcon = $section.querySelector(`.${this.
|
|
728
|
-
const $showHideText = $section.querySelector(`.${this.
|
|
646
|
+
const $showHideIcon = $section.querySelector(`.${this.iconClass}`);
|
|
647
|
+
const $showHideText = $section.querySelector(`.${this.sectionToggleTextClass}`);
|
|
729
648
|
const $button = $section.querySelector(`.${this.sectionButtonClass}`);
|
|
730
649
|
const $content = $section.querySelector(`.${this.sectionContentClass}`);
|
|
731
650
|
if (!$content) {
|
|
@@ -743,28 +662,28 @@
|
|
|
743
662
|
const ariaLabelParts = [];
|
|
744
663
|
const $headingText = $section.querySelector(`.${this.sectionHeadingTextClass}`);
|
|
745
664
|
if ($headingText) {
|
|
746
|
-
ariaLabelParts.push(
|
|
665
|
+
ariaLabelParts.push($headingText.textContent.trim());
|
|
747
666
|
}
|
|
748
667
|
const $summary = $section.querySelector(`.${this.sectionSummaryClass}`);
|
|
749
668
|
if ($summary) {
|
|
750
|
-
ariaLabelParts.push(
|
|
669
|
+
ariaLabelParts.push($summary.textContent.trim());
|
|
751
670
|
}
|
|
752
671
|
const ariaLabelMessage = expanded ? this.i18n.t('hideSectionAriaLabel') : this.i18n.t('showSectionAriaLabel');
|
|
753
672
|
ariaLabelParts.push(ariaLabelMessage);
|
|
754
673
|
$button.setAttribute('aria-label', ariaLabelParts.join(' , '));
|
|
755
674
|
if (expanded) {
|
|
756
675
|
$content.removeAttribute('hidden');
|
|
757
|
-
$section.classList.add(this.
|
|
758
|
-
$showHideIcon.classList.remove(this.
|
|
676
|
+
$section.classList.add(this.sectionExpandedModifier);
|
|
677
|
+
$showHideIcon.classList.remove(this.iconOpenModifier);
|
|
759
678
|
} else {
|
|
760
679
|
$content.setAttribute('hidden', 'until-found');
|
|
761
|
-
$section.classList.remove(this.
|
|
762
|
-
$showHideIcon.classList.add(this.
|
|
680
|
+
$section.classList.remove(this.sectionExpandedModifier);
|
|
681
|
+
$showHideIcon.classList.add(this.iconOpenModifier);
|
|
763
682
|
}
|
|
764
683
|
this.updateShowAllButton(this.areAllSectionsOpen());
|
|
765
684
|
}
|
|
766
685
|
isExpanded($section) {
|
|
767
|
-
return $section.classList.contains(this.
|
|
686
|
+
return $section.classList.contains(this.sectionExpandedModifier);
|
|
768
687
|
}
|
|
769
688
|
areAllSectionsOpen() {
|
|
770
689
|
return Array.from(this.$sections).every($section => this.isExpanded($section));
|
|
@@ -775,7 +694,7 @@
|
|
|
775
694
|
}
|
|
776
695
|
this.$showAllButton.setAttribute('aria-expanded', expanded.toString());
|
|
777
696
|
this.$showAllText.textContent = expanded ? this.i18n.t('hideAllSections') : this.i18n.t('showAllSections');
|
|
778
|
-
this.$showAllIcon.classList.toggle(this.
|
|
697
|
+
this.$showAllIcon.classList.toggle(this.iconOpenModifier, !expanded);
|
|
779
698
|
}
|
|
780
699
|
|
|
781
700
|
/**
|
|
@@ -800,7 +719,7 @@
|
|
|
800
719
|
if (id) {
|
|
801
720
|
try {
|
|
802
721
|
window.sessionStorage.setItem(id, isExpanded.toString());
|
|
803
|
-
} catch (
|
|
722
|
+
} catch (_unused) {}
|
|
804
723
|
}
|
|
805
724
|
}
|
|
806
725
|
setInitialState($section) {
|
|
@@ -814,14 +733,15 @@
|
|
|
814
733
|
if (state !== null) {
|
|
815
734
|
this.setExpanded(state === 'true', $section);
|
|
816
735
|
}
|
|
817
|
-
} catch (
|
|
736
|
+
} catch (_unused2) {}
|
|
818
737
|
}
|
|
819
738
|
}
|
|
820
739
|
getButtonPunctuationEl() {
|
|
821
|
-
const $
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
740
|
+
const $element = createElement('span', {
|
|
741
|
+
class: 'govuk-visually-hidden govuk-accordion__section-heading-divider'
|
|
742
|
+
});
|
|
743
|
+
$element.textContent = ', ';
|
|
744
|
+
return $element;
|
|
825
745
|
}
|
|
826
746
|
}
|
|
827
747
|
|
|
@@ -977,6 +897,14 @@
|
|
|
977
897
|
maxwords: undefined
|
|
978
898
|
};
|
|
979
899
|
}
|
|
900
|
+
if ('maxwords' in datasetConfig || this.config.maxwords !== undefined) {
|
|
901
|
+
console.warn(formatErrorMessage(CharacterCount, 'Option `maxwords` is deprecated. Use `maxlength` with `countType: "words"` instead.'));
|
|
902
|
+
if (!('maxlength' in datasetConfig)) {
|
|
903
|
+
var _datasetConfig$maxwor;
|
|
904
|
+
configOverrides.maxlength = (_datasetConfig$maxwor = datasetConfig.maxwords) != null ? _datasetConfig$maxwor : this.config.maxwords;
|
|
905
|
+
configOverrides.countType = 'words';
|
|
906
|
+
}
|
|
907
|
+
}
|
|
980
908
|
return configOverrides;
|
|
981
909
|
}
|
|
982
910
|
|
|
@@ -985,9 +913,11 @@
|
|
|
985
913
|
* @param {CharacterCountConfig} [config] - Character count config
|
|
986
914
|
*/
|
|
987
915
|
constructor($root, config = {}) {
|
|
988
|
-
var
|
|
916
|
+
var _this$config$maxlengt;
|
|
989
917
|
super($root, config);
|
|
990
918
|
this.$textarea = void 0;
|
|
919
|
+
this.count = 0;
|
|
920
|
+
this.segmenter = null;
|
|
991
921
|
this.$visibleCountMessage = void 0;
|
|
992
922
|
this.$screenReaderCountMessage = void 0;
|
|
993
923
|
this.lastInputTimestamp = null;
|
|
@@ -1011,7 +941,15 @@
|
|
|
1011
941
|
this.i18n = new I18n(this.config.i18n, {
|
|
1012
942
|
locale: closestAttributeValue(this.$root, 'lang')
|
|
1013
943
|
});
|
|
1014
|
-
this.
|
|
944
|
+
if (this.config.countType === 'characters' || this.config.countType === 'words' && this.config.maxwords === undefined) {
|
|
945
|
+
if (!('Segmenter' in Intl)) {
|
|
946
|
+
throw new SupportError(formatErrorMessage(CharacterCount, 'Support for "Intl.Segmenter" required'));
|
|
947
|
+
}
|
|
948
|
+
this.segmenter = new Intl.Segmenter(this.i18n.locale, {
|
|
949
|
+
granularity: this.config.countType === 'words' ? 'word' : 'grapheme'
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
this.maxLength = (_this$config$maxlengt = this.config.maxlength) != null ? _this$config$maxlengt : Infinity;
|
|
1015
953
|
this.$textarea = $textarea;
|
|
1016
954
|
const textareaDescriptionId = `${this.$textarea.id}-info`;
|
|
1017
955
|
const $textareaDescription = document.getElementById(textareaDescriptionId);
|
|
@@ -1023,35 +961,43 @@
|
|
|
1023
961
|
});
|
|
1024
962
|
}
|
|
1025
963
|
this.$errorMessage = this.$root.querySelector('.govuk-error-message');
|
|
1026
|
-
if (
|
|
964
|
+
if ($textareaDescription.textContent.match(/^\s*$/)) {
|
|
1027
965
|
$textareaDescription.textContent = this.i18n.t('textareaDescription', {
|
|
1028
966
|
count: this.maxLength
|
|
1029
967
|
});
|
|
1030
968
|
}
|
|
1031
969
|
this.$textarea.insertAdjacentElement('afterend', $textareaDescription);
|
|
1032
|
-
const $screenReaderCountMessage =
|
|
1033
|
-
|
|
1034
|
-
|
|
970
|
+
const $screenReaderCountMessage = createElement('div', {
|
|
971
|
+
class: 'govuk-character-count__sr-status govuk-visually-hidden',
|
|
972
|
+
'aria-live': 'polite'
|
|
973
|
+
});
|
|
1035
974
|
this.$screenReaderCountMessage = $screenReaderCountMessage;
|
|
1036
975
|
$textareaDescription.insertAdjacentElement('afterend', $screenReaderCountMessage);
|
|
1037
|
-
const $visibleCountMessage =
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
976
|
+
const $visibleCountMessage = createElement('div', {
|
|
977
|
+
class: `${$textareaDescription.className} govuk-character-count__status`,
|
|
978
|
+
'aria-hidden': 'true'
|
|
979
|
+
});
|
|
1041
980
|
this.$visibleCountMessage = $visibleCountMessage;
|
|
1042
981
|
$textareaDescription.insertAdjacentElement('afterend', $visibleCountMessage);
|
|
1043
982
|
$textareaDescription.classList.add('govuk-visually-hidden');
|
|
1044
983
|
this.$textarea.removeAttribute('maxlength');
|
|
1045
984
|
this.bindChangeEvents();
|
|
1046
|
-
window.addEventListener('pageshow', () =>
|
|
985
|
+
window.addEventListener('pageshow', () => {
|
|
986
|
+
if (this.$textarea.value !== this.$textarea.textContent) {
|
|
987
|
+
this.updateCount();
|
|
988
|
+
this.updateCountMessage();
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
this.updateCount();
|
|
1047
992
|
this.updateCountMessage();
|
|
1048
993
|
}
|
|
1049
994
|
bindChangeEvents() {
|
|
1050
|
-
this.$textarea.addEventListener('
|
|
995
|
+
this.$textarea.addEventListener('input', () => this.handleInput());
|
|
1051
996
|
this.$textarea.addEventListener('focus', () => this.handleFocus());
|
|
1052
997
|
this.$textarea.addEventListener('blur', () => this.handleBlur());
|
|
1053
998
|
}
|
|
1054
|
-
|
|
999
|
+
handleInput() {
|
|
1000
|
+
this.updateCount();
|
|
1055
1001
|
this.updateVisibleCountMessage();
|
|
1056
1002
|
this.lastInputTimestamp = Date.now();
|
|
1057
1003
|
}
|
|
@@ -1078,7 +1024,7 @@
|
|
|
1078
1024
|
this.updateScreenReaderCountMessage();
|
|
1079
1025
|
}
|
|
1080
1026
|
updateVisibleCountMessage() {
|
|
1081
|
-
const remainingNumber = this.maxLength - this.count
|
|
1027
|
+
const remainingNumber = this.maxLength - this.count;
|
|
1082
1028
|
const isError = remainingNumber < 0;
|
|
1083
1029
|
this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());
|
|
1084
1030
|
if (!this.$errorMessage) {
|
|
@@ -1096,33 +1042,47 @@
|
|
|
1096
1042
|
}
|
|
1097
1043
|
this.$screenReaderCountMessage.textContent = this.getCountMessage();
|
|
1098
1044
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
return
|
|
1045
|
+
updateCount() {
|
|
1046
|
+
const text = this.$textarea.value;
|
|
1047
|
+
if (this.config.countType === 'characters') {
|
|
1048
|
+
this.count = this.segmenter ? Array.from(this.segmenter.segment(text)).length : 0;
|
|
1049
|
+
return;
|
|
1104
1050
|
}
|
|
1105
|
-
|
|
1051
|
+
if (this.config.countType === 'words') {
|
|
1052
|
+
if (this.config.maxwords !== undefined) {
|
|
1053
|
+
var _text$match$length, _text$match;
|
|
1054
|
+
this.count = (_text$match$length = (_text$match = text.match(/\S+/g)) == null ? void 0 : _text$match.length) != null ? _text$match$length : 0;
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
const segments = this.segmenter ? Array.from(this.segmenter.segment(text)) : [];
|
|
1058
|
+
this.count = segments.filter(segment => segment.isWordLike).length;
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
this.count = text.length;
|
|
1106
1062
|
}
|
|
1107
1063
|
getCountMessage() {
|
|
1108
|
-
const remainingNumber = this.maxLength - this.count
|
|
1109
|
-
|
|
1110
|
-
return this.formatCountMessage(remainingNumber, countType);
|
|
1064
|
+
const remainingNumber = this.maxLength - this.count;
|
|
1065
|
+
return this.formatCountMessage(remainingNumber);
|
|
1111
1066
|
}
|
|
1112
1067
|
formatCountMessage(remainingNumber, countType) {
|
|
1068
|
+
countType = countType != null ? countType : this.config.countType;
|
|
1069
|
+
let translationKeyPrefix = 'characters';
|
|
1070
|
+
let translationKeySuffix = remainingNumber < 0 ? 'OverLimit' : 'UnderLimit';
|
|
1071
|
+
if (countType === 'words') {
|
|
1072
|
+
translationKeyPrefix = 'words';
|
|
1073
|
+
}
|
|
1113
1074
|
if (remainingNumber === 0) {
|
|
1114
|
-
|
|
1075
|
+
translationKeySuffix = 'AtLimit';
|
|
1115
1076
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
count: Math.abs(remainingNumber)
|
|
1077
|
+
return this.i18n.t(`${translationKeyPrefix}${translationKeySuffix}`, {
|
|
1078
|
+
count: remainingNumber === 0 ? undefined : Math.abs(remainingNumber)
|
|
1119
1079
|
});
|
|
1120
1080
|
}
|
|
1121
1081
|
isOverThreshold() {
|
|
1122
1082
|
if (!this.config.threshold) {
|
|
1123
1083
|
return true;
|
|
1124
1084
|
}
|
|
1125
|
-
const currentLength = this.count
|
|
1085
|
+
const currentLength = this.count;
|
|
1126
1086
|
const maxLength = this.maxLength;
|
|
1127
1087
|
const thresholdValue = maxLength * this.config.threshold / 100;
|
|
1128
1088
|
return thresholdValue <= currentLength;
|
|
@@ -1134,13 +1094,15 @@
|
|
|
1134
1094
|
*
|
|
1135
1095
|
* @see {@link CharacterCount.defaults}
|
|
1136
1096
|
* @typedef {object} CharacterCountConfig
|
|
1137
|
-
* @property {number} [maxlength] - The maximum number of characters
|
|
1138
|
-
*
|
|
1139
|
-
* @property {number} [maxwords] -
|
|
1140
|
-
*
|
|
1097
|
+
* @property {number} [maxlength] - The maximum number of characters (or words
|
|
1098
|
+
* if `countType` is set to `"words"`).
|
|
1099
|
+
* @property {number} [maxwords] - Deprecated. Use `maxlength` and
|
|
1100
|
+
* `countType: "words"` instead.
|
|
1141
1101
|
* @property {number} [threshold=0] - The percentage value of the limit at
|
|
1142
1102
|
* which point the count message is displayed. If this attribute is set, the
|
|
1143
1103
|
* count message will be hidden by default.
|
|
1104
|
+
* @property {'characters' | 'length' | 'words'} [countType] - The count type
|
|
1105
|
+
* (`"characters"`, `"length"` or `"words"`) used to count the text.
|
|
1144
1106
|
* @property {CharacterCountTranslations} [i18n=CharacterCount.defaults.i18n] - Character count translations
|
|
1145
1107
|
*/
|
|
1146
1108
|
|
|
@@ -1186,9 +1148,9 @@
|
|
|
1186
1148
|
* @property {TranslationPluralForms} [textareaDescription] - Message made
|
|
1187
1149
|
* available to assistive technologies, if none is already present in the
|
|
1188
1150
|
* HTML, to describe that the component accepts only a limited amount of
|
|
1189
|
-
* content. It is visible on the page
|
|
1190
|
-
* component will replace the `%{count}`
|
|
1191
|
-
*
|
|
1151
|
+
* content. It is visible on the page if `countType` is not supported or
|
|
1152
|
+
* JavaScript is unavailable. The component will replace the `%{count}`
|
|
1153
|
+
* placeholder with the value of the `maxlength` parameter.
|
|
1192
1154
|
*/
|
|
1193
1155
|
|
|
1194
1156
|
/**
|
|
@@ -1198,6 +1160,7 @@
|
|
|
1198
1160
|
CharacterCount.moduleName = 'govuk-character-count';
|
|
1199
1161
|
CharacterCount.defaults = Object.freeze({
|
|
1200
1162
|
threshold: 0,
|
|
1163
|
+
countType: 'length',
|
|
1201
1164
|
i18n: {
|
|
1202
1165
|
charactersUnderLimit: {
|
|
1203
1166
|
one: 'You have %{count} character remaining',
|
|
@@ -1235,6 +1198,9 @@
|
|
|
1235
1198
|
},
|
|
1236
1199
|
threshold: {
|
|
1237
1200
|
type: 'number'
|
|
1201
|
+
},
|
|
1202
|
+
countType: {
|
|
1203
|
+
type: 'string'
|
|
1238
1204
|
}
|
|
1239
1205
|
},
|
|
1240
1206
|
anyOf: [{
|
|
@@ -1383,7 +1349,7 @@
|
|
|
1383
1349
|
if (!($target instanceof HTMLAnchorElement)) {
|
|
1384
1350
|
return false;
|
|
1385
1351
|
}
|
|
1386
|
-
const inputId =
|
|
1352
|
+
const inputId = $target.hash.replace('#', '');
|
|
1387
1353
|
if (!inputId) {
|
|
1388
1354
|
return false;
|
|
1389
1355
|
}
|
|
@@ -1497,9 +1463,10 @@
|
|
|
1497
1463
|
window.addEventListener('pageshow', this.resetPage.bind(this));
|
|
1498
1464
|
}
|
|
1499
1465
|
initUpdateSpan() {
|
|
1500
|
-
this.$updateSpan =
|
|
1501
|
-
|
|
1502
|
-
|
|
1466
|
+
this.$updateSpan = createElement('span', {
|
|
1467
|
+
role: 'status',
|
|
1468
|
+
class: 'govuk-visually-hidden'
|
|
1469
|
+
});
|
|
1503
1470
|
this.$root.appendChild(this.$updateSpan);
|
|
1504
1471
|
}
|
|
1505
1472
|
initButtonClickHandler() {
|
|
@@ -1509,13 +1476,14 @@
|
|
|
1509
1476
|
}
|
|
1510
1477
|
}
|
|
1511
1478
|
buildIndicator() {
|
|
1512
|
-
this.$indicatorContainer =
|
|
1513
|
-
|
|
1514
|
-
|
|
1479
|
+
this.$indicatorContainer = createElement('div', {
|
|
1480
|
+
class: 'govuk-exit-this-page__indicator',
|
|
1481
|
+
'aria-hidden': 'true'
|
|
1482
|
+
});
|
|
1515
1483
|
for (let i = 0; i < 3; i++) {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1484
|
+
this.$indicatorContainer.appendChild(createElement('div', {
|
|
1485
|
+
class: 'govuk-exit-this-page__indicator-light'
|
|
1486
|
+
}));
|
|
1519
1487
|
}
|
|
1520
1488
|
this.$button.appendChild(this.$indicatorContainer);
|
|
1521
1489
|
}
|
|
@@ -1535,9 +1503,10 @@
|
|
|
1535
1503
|
}
|
|
1536
1504
|
this.$updateSpan.textContent = '';
|
|
1537
1505
|
document.body.classList.add('govuk-exit-this-page-hide-content');
|
|
1538
|
-
this.$overlay =
|
|
1539
|
-
|
|
1540
|
-
|
|
1506
|
+
this.$overlay = createElement('div', {
|
|
1507
|
+
class: 'govuk-exit-this-page-overlay',
|
|
1508
|
+
role: 'alert'
|
|
1509
|
+
});
|
|
1541
1510
|
document.body.appendChild(this.$overlay);
|
|
1542
1511
|
this.$overlay.textContent = this.i18n.t('activated');
|
|
1543
1512
|
window.location.href = this.$button.href;
|
|
@@ -1681,22 +1650,19 @@
|
|
|
1681
1650
|
this.$input = void 0;
|
|
1682
1651
|
this.$button = void 0;
|
|
1683
1652
|
this.$status = void 0;
|
|
1653
|
+
this.$label = void 0;
|
|
1684
1654
|
this.i18n = void 0;
|
|
1685
1655
|
this.id = void 0;
|
|
1686
1656
|
this.$announcements = void 0;
|
|
1687
1657
|
this.enteredAnotherElement = void 0;
|
|
1688
|
-
const $input = this.$root.querySelector('input');
|
|
1658
|
+
const $input = this.$root.querySelector('input[type="file"]');
|
|
1689
1659
|
if ($input === null) {
|
|
1690
1660
|
throw new ElementError({
|
|
1691
1661
|
component: FileUpload,
|
|
1692
1662
|
identifier: 'File inputs (`<input type="file">`)'
|
|
1693
1663
|
});
|
|
1694
1664
|
}
|
|
1695
|
-
if ($input.type !== 'file') {
|
|
1696
|
-
throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
|
|
1697
|
-
}
|
|
1698
1665
|
this.$input = $input;
|
|
1699
|
-
this.$input.setAttribute('hidden', 'true');
|
|
1700
1666
|
if (!this.$input.id) {
|
|
1701
1667
|
throw new ElementError({
|
|
1702
1668
|
component: FileUpload,
|
|
@@ -1711,56 +1677,67 @@
|
|
|
1711
1677
|
if (!$label.id) {
|
|
1712
1678
|
$label.id = `${this.id}-label`;
|
|
1713
1679
|
}
|
|
1680
|
+
this.$label = $label;
|
|
1714
1681
|
this.$input.id = `${this.id}-input`;
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1682
|
+
this.$input.setAttribute('hidden', 'hidden');
|
|
1683
|
+
this.$status = this.createStatus();
|
|
1684
|
+
this.$button = this.createButton();
|
|
1685
|
+
this.$root.insertAdjacentElement('afterbegin', this.$button);
|
|
1686
|
+
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
1687
|
+
this.updateDisabledState();
|
|
1688
|
+
this.observeDisabledState();
|
|
1689
|
+
this.$announcements = createElement('span', {
|
|
1690
|
+
class: 'govuk-file-upload-announcements govuk-visually-hidden',
|
|
1691
|
+
'aria-live': 'assertive'
|
|
1692
|
+
});
|
|
1693
|
+
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
1694
|
+
this.bindDraggingEvents();
|
|
1695
|
+
}
|
|
1696
|
+
createStatus() {
|
|
1697
|
+
const $status = createElement('span', {
|
|
1698
|
+
class: 'govuk-body govuk-file-upload-button__status',
|
|
1699
|
+
'aria-live': 'polite'
|
|
1700
|
+
});
|
|
1701
|
+
$status.innerText = this.i18n.t('noFileChosen');
|
|
1702
|
+
return $status;
|
|
1703
|
+
}
|
|
1704
|
+
createButton() {
|
|
1705
|
+
const $button = createElement('button', {
|
|
1706
|
+
class: 'govuk-file-upload-button govuk-file-upload-button--empty',
|
|
1707
|
+
type: 'button',
|
|
1708
|
+
id: this.id
|
|
1709
|
+
});
|
|
1720
1710
|
const ariaDescribedBy = this.$input.getAttribute('aria-describedby');
|
|
1721
1711
|
if (ariaDescribedBy) {
|
|
1722
1712
|
$button.setAttribute('aria-describedby', ariaDescribedBy);
|
|
1723
1713
|
}
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
const commaSpan = document.createElement('span');
|
|
1730
|
-
commaSpan.className = 'govuk-visually-hidden';
|
|
1731
|
-
commaSpan.innerText = ', ';
|
|
1732
|
-
commaSpan.id = `${this.id}-comma`;
|
|
1714
|
+
$button.appendChild(this.$status);
|
|
1715
|
+
const commaSpan = createElement('span', {
|
|
1716
|
+
class: 'govuk-visually-hidden',
|
|
1717
|
+
id: `${this.id}-comma`
|
|
1718
|
+
}, [', ']);
|
|
1733
1719
|
$button.appendChild(commaSpan);
|
|
1734
|
-
const containerSpan =
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
buttonSpan
|
|
1738
|
-
|
|
1720
|
+
const containerSpan = createElement('span', {
|
|
1721
|
+
class: 'govuk-file-upload-button__pseudo-button-container'
|
|
1722
|
+
});
|
|
1723
|
+
const buttonSpan = createElement('span', {
|
|
1724
|
+
class: 'govuk-button govuk-button--secondary govuk-file-upload-button__pseudo-button'
|
|
1725
|
+
}, [this.i18n.t('chooseFilesButton')]);
|
|
1739
1726
|
containerSpan.appendChild(buttonSpan);
|
|
1740
1727
|
containerSpan.insertAdjacentText('beforeend', ' ');
|
|
1741
|
-
const instructionSpan =
|
|
1742
|
-
|
|
1743
|
-
|
|
1728
|
+
const instructionSpan = createElement('span', {
|
|
1729
|
+
class: 'govuk-body govuk-file-upload-button__instruction'
|
|
1730
|
+
}, [this.i18n.t('dropInstruction')]);
|
|
1744
1731
|
containerSpan.appendChild(instructionSpan);
|
|
1745
1732
|
$button.appendChild(containerSpan);
|
|
1746
|
-
$button.setAttribute('aria-labelledby', `${
|
|
1733
|
+
$button.setAttribute('aria-labelledby', `${this.$label.id} ${commaSpan.id} ${$button.id}`);
|
|
1747
1734
|
$button.addEventListener('click', this.onClick.bind(this));
|
|
1748
1735
|
$button.addEventListener('dragover', event => {
|
|
1749
1736
|
event.preventDefault();
|
|
1750
1737
|
});
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
this.$button = $button;
|
|
1755
|
-
this.$status = $status;
|
|
1756
|
-
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
1757
|
-
this.updateDisabledState();
|
|
1758
|
-
this.observeDisabledState();
|
|
1759
|
-
this.$announcements = document.createElement('span');
|
|
1760
|
-
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
1761
|
-
this.$announcements.classList.add('govuk-visually-hidden');
|
|
1762
|
-
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
1763
|
-
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
1738
|
+
return $button;
|
|
1739
|
+
}
|
|
1740
|
+
bindDraggingEvents() {
|
|
1764
1741
|
this.$button.addEventListener('drop', this.onDrop.bind(this));
|
|
1765
1742
|
document.addEventListener('dragenter', this.updateDropzoneVisibility.bind(this));
|
|
1766
1743
|
document.addEventListener('dragenter', () => {
|
|
@@ -1778,7 +1755,7 @@
|
|
|
1778
1755
|
if (this.$button.disabled) return;
|
|
1779
1756
|
if (event.target instanceof Node) {
|
|
1780
1757
|
if (this.$root.contains(event.target)) {
|
|
1781
|
-
if (event.dataTransfer &&
|
|
1758
|
+
if (event.dataTransfer && this.canDrop(event.dataTransfer)) {
|
|
1782
1759
|
if (!this.$button.classList.contains('govuk-file-upload-button--dragging')) {
|
|
1783
1760
|
this.showDraggingState();
|
|
1784
1761
|
this.$announcements.innerText = this.i18n.t('enteredDropZone');
|
|
@@ -1800,12 +1777,30 @@
|
|
|
1800
1777
|
}
|
|
1801
1778
|
onDrop(event) {
|
|
1802
1779
|
event.preventDefault();
|
|
1803
|
-
if (event.dataTransfer &&
|
|
1780
|
+
if (event.dataTransfer && this.canFillInput(event.dataTransfer)) {
|
|
1804
1781
|
this.$input.files = event.dataTransfer.files;
|
|
1805
1782
|
this.$input.dispatchEvent(new CustomEvent('change'));
|
|
1806
1783
|
this.hideDraggingState();
|
|
1807
1784
|
}
|
|
1808
1785
|
}
|
|
1786
|
+
canFillInput(dataTransfer) {
|
|
1787
|
+
return this.matchesInputCapacity(dataTransfer.files.length);
|
|
1788
|
+
}
|
|
1789
|
+
canDrop(dataTransfer) {
|
|
1790
|
+
if (dataTransfer.items.length) {
|
|
1791
|
+
return this.matchesInputCapacity(countFileItems(dataTransfer.items));
|
|
1792
|
+
}
|
|
1793
|
+
if (dataTransfer.types.length) {
|
|
1794
|
+
return dataTransfer.types.includes('Files');
|
|
1795
|
+
}
|
|
1796
|
+
return true;
|
|
1797
|
+
}
|
|
1798
|
+
matchesInputCapacity(numberOfFiles) {
|
|
1799
|
+
if (this.$input.multiple) {
|
|
1800
|
+
return numberOfFiles > 0;
|
|
1801
|
+
}
|
|
1802
|
+
return numberOfFiles === 1;
|
|
1803
|
+
}
|
|
1809
1804
|
onChange() {
|
|
1810
1805
|
const fileCount = this.$input.files.length;
|
|
1811
1806
|
if (fileCount === 0) {
|
|
@@ -1849,9 +1844,16 @@
|
|
|
1849
1844
|
}
|
|
1850
1845
|
updateDisabledState() {
|
|
1851
1846
|
this.$button.disabled = this.$input.disabled;
|
|
1852
|
-
this.$root.classList.toggle('govuk-
|
|
1847
|
+
this.$root.classList.toggle('govuk-file-upload-wrapper--disabled', this.$button.disabled);
|
|
1853
1848
|
}
|
|
1854
1849
|
}
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* Counts the number of `DataTransferItem` whose kind is `file`
|
|
1853
|
+
*
|
|
1854
|
+
* @param {DataTransferItemList} list - The list
|
|
1855
|
+
* @returns {number} - The number of items whose kind is `file` in the list
|
|
1856
|
+
*/
|
|
1855
1857
|
FileUpload.moduleName = 'govuk-file-upload';
|
|
1856
1858
|
FileUpload.defaults = Object.freeze({
|
|
1857
1859
|
i18n: {
|
|
@@ -1873,10 +1875,14 @@
|
|
|
1873
1875
|
}
|
|
1874
1876
|
}
|
|
1875
1877
|
});
|
|
1876
|
-
function
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1878
|
+
function countFileItems(list) {
|
|
1879
|
+
let result = 0;
|
|
1880
|
+
for (let i = 0; i < list.length; i++) {
|
|
1881
|
+
if (list[i].kind === 'file') {
|
|
1882
|
+
result++;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
return result;
|
|
1880
1886
|
}
|
|
1881
1887
|
|
|
1882
1888
|
/**
|
|
@@ -1914,89 +1920,6 @@
|
|
|
1914
1920
|
* @import { TranslationPluralForms } from '../../i18n.mjs'
|
|
1915
1921
|
*/
|
|
1916
1922
|
|
|
1917
|
-
/**
|
|
1918
|
-
* Header component
|
|
1919
|
-
*
|
|
1920
|
-
* @preserve
|
|
1921
|
-
*/
|
|
1922
|
-
class Header extends Component {
|
|
1923
|
-
/**
|
|
1924
|
-
* Apply a matchMedia for desktop which will trigger a state sync if the
|
|
1925
|
-
* browser viewport moves between states.
|
|
1926
|
-
*
|
|
1927
|
-
* @param {Element | null} $root - HTML element to use for header
|
|
1928
|
-
*/
|
|
1929
|
-
constructor($root) {
|
|
1930
|
-
super($root);
|
|
1931
|
-
this.$menuButton = void 0;
|
|
1932
|
-
this.$menu = void 0;
|
|
1933
|
-
this.menuIsOpen = false;
|
|
1934
|
-
this.mql = null;
|
|
1935
|
-
const $menuButton = this.$root.querySelector('.govuk-js-header-toggle');
|
|
1936
|
-
if (!$menuButton) {
|
|
1937
|
-
return this;
|
|
1938
|
-
}
|
|
1939
|
-
this.$root.classList.add('govuk-header--with-js-navigation');
|
|
1940
|
-
const menuId = $menuButton.getAttribute('aria-controls');
|
|
1941
|
-
if (!menuId) {
|
|
1942
|
-
throw new ElementError({
|
|
1943
|
-
component: Header,
|
|
1944
|
-
identifier: 'Navigation button (`<button class="govuk-js-header-toggle">`) attribute (`aria-controls`)'
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
const $menu = document.getElementById(menuId);
|
|
1948
|
-
if (!$menu) {
|
|
1949
|
-
throw new ElementError({
|
|
1950
|
-
component: Header,
|
|
1951
|
-
element: $menu,
|
|
1952
|
-
identifier: `Navigation (\`<ul id="${menuId}">\`)`
|
|
1953
|
-
});
|
|
1954
|
-
}
|
|
1955
|
-
this.$menu = $menu;
|
|
1956
|
-
this.$menuButton = $menuButton;
|
|
1957
|
-
this.setupResponsiveChecks();
|
|
1958
|
-
this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());
|
|
1959
|
-
}
|
|
1960
|
-
setupResponsiveChecks() {
|
|
1961
|
-
const breakpoint = getBreakpoint('desktop');
|
|
1962
|
-
if (!breakpoint.value) {
|
|
1963
|
-
throw new ElementError({
|
|
1964
|
-
component: Header,
|
|
1965
|
-
identifier: `CSS custom property (\`${breakpoint.property}\`) on pseudo-class \`:root\``
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);
|
|
1969
|
-
if ('addEventListener' in this.mql) {
|
|
1970
|
-
this.mql.addEventListener('change', () => this.checkMode());
|
|
1971
|
-
} else {
|
|
1972
|
-
this.mql.addListener(() => this.checkMode());
|
|
1973
|
-
}
|
|
1974
|
-
this.checkMode();
|
|
1975
|
-
}
|
|
1976
|
-
checkMode() {
|
|
1977
|
-
if (!this.mql || !this.$menu || !this.$menuButton) {
|
|
1978
|
-
return;
|
|
1979
|
-
}
|
|
1980
|
-
if (this.mql.matches) {
|
|
1981
|
-
this.$menu.removeAttribute('hidden');
|
|
1982
|
-
this.$menuButton.setAttribute('hidden', '');
|
|
1983
|
-
} else {
|
|
1984
|
-
this.$menuButton.removeAttribute('hidden');
|
|
1985
|
-
this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
|
|
1986
|
-
if (this.menuIsOpen) {
|
|
1987
|
-
this.$menu.removeAttribute('hidden');
|
|
1988
|
-
} else {
|
|
1989
|
-
this.$menu.setAttribute('hidden', '');
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
handleMenuButtonClick() {
|
|
1994
|
-
this.menuIsOpen = !this.menuIsOpen;
|
|
1995
|
-
this.checkMode();
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
Header.moduleName = 'govuk-header';
|
|
1999
|
-
|
|
2000
1923
|
/**
|
|
2001
1924
|
* Notification Banner component
|
|
2002
1925
|
*
|
|
@@ -2088,9 +2011,10 @@
|
|
|
2088
2011
|
locale: closestAttributeValue(this.$root, 'lang')
|
|
2089
2012
|
});
|
|
2090
2013
|
this.$showHideButton.removeAttribute('hidden');
|
|
2091
|
-
const $screenReaderStatusMessage =
|
|
2092
|
-
|
|
2093
|
-
|
|
2014
|
+
const $screenReaderStatusMessage = createElement('div', {
|
|
2015
|
+
class: 'govuk-password-input__sr-status govuk-visually-hidden',
|
|
2016
|
+
'aria-live': 'polite'
|
|
2017
|
+
});
|
|
2094
2018
|
this.$screenReaderStatusMessage = $screenReaderStatusMessage;
|
|
2095
2019
|
this.$input.insertAdjacentElement('afterend', $screenReaderStatusMessage);
|
|
2096
2020
|
this.$showHideButton.addEventListener('click', this.toggle.bind(this));
|
|
@@ -2328,9 +2252,9 @@
|
|
|
2328
2252
|
}
|
|
2329
2253
|
if (this.mql.matches) {
|
|
2330
2254
|
this.$menu.removeAttribute('hidden');
|
|
2331
|
-
this.$menuButton
|
|
2255
|
+
setAttributes(this.$menuButton, attributesForHidingButton);
|
|
2332
2256
|
} else {
|
|
2333
|
-
this.$menuButton.
|
|
2257
|
+
removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));
|
|
2334
2258
|
this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
|
|
2335
2259
|
if (this.menuIsOpen) {
|
|
2336
2260
|
this.$menu.removeAttribute('hidden');
|
|
@@ -2345,7 +2269,36 @@
|
|
|
2345
2269
|
}
|
|
2346
2270
|
}
|
|
2347
2271
|
ServiceNavigation.moduleName = 'govuk-service-navigation';
|
|
2272
|
+
const attributesForHidingButton = {
|
|
2273
|
+
hidden: '',
|
|
2274
|
+
'aria-hidden': 'true'
|
|
2275
|
+
};
|
|
2348
2276
|
|
|
2277
|
+
/**
|
|
2278
|
+
* Sets a group of attributes on the given element
|
|
2279
|
+
*
|
|
2280
|
+
* @param {Element} $element - The element to set the attribute on
|
|
2281
|
+
* @param {{[attributeName: string]: string}} attributes - The attributes to set
|
|
2282
|
+
*/
|
|
2283
|
+
function setAttributes($element, attributes) {
|
|
2284
|
+
for (const attributeName in attributes) {
|
|
2285
|
+
$element.setAttribute(attributeName, attributes[attributeName]);
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* Removes a list of attributes from the given element
|
|
2291
|
+
*
|
|
2292
|
+
* @param {Element} $element - The element to remove the attributes from
|
|
2293
|
+
* @param {string[]} attributeNames - The names of the attributes to remove
|
|
2294
|
+
*/
|
|
2295
|
+
function removeAttributes($element, attributeNames) {
|
|
2296
|
+
for (const attributeName of attributeNames) {
|
|
2297
|
+
$element.removeAttribute(attributeName);
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
const _self = typeof globalThis !== 'undefined' ? globalThis : self;
|
|
2349
2302
|
/**
|
|
2350
2303
|
* Skip link component
|
|
2351
2304
|
*
|
|
@@ -2364,16 +2317,10 @@
|
|
|
2364
2317
|
super($root);
|
|
2365
2318
|
const hash = this.$root.hash;
|
|
2366
2319
|
const href = (_this$$root$getAttrib = this.$root.getAttribute('href')) != null ? _this$$root$getAttrib : '';
|
|
2367
|
-
|
|
2368
|
-
try {
|
|
2369
|
-
url = new window.URL(this.$root.href);
|
|
2370
|
-
} catch (error) {
|
|
2371
|
-
throw new ElementError(`Skip link: Target link (\`href="${href}"\`) is invalid`);
|
|
2372
|
-
}
|
|
2373
|
-
if (url.origin !== window.location.origin || url.pathname !== window.location.pathname) {
|
|
2320
|
+
if (this.$root.origin !== window.location.origin || this.$root.pathname !== window.location.pathname) {
|
|
2374
2321
|
return;
|
|
2375
2322
|
}
|
|
2376
|
-
const linkedElementId =
|
|
2323
|
+
const linkedElementId = hash.replace('#', '');
|
|
2377
2324
|
if (!linkedElementId) {
|
|
2378
2325
|
throw new ElementError(`Skip link: Target link (\`href="${href}"\`) has no hash fragment`);
|
|
2379
2326
|
}
|
|
@@ -2395,7 +2342,7 @@
|
|
|
2395
2342
|
}));
|
|
2396
2343
|
}
|
|
2397
2344
|
}
|
|
2398
|
-
SkipLink.elementType = HTMLAnchorElement;
|
|
2345
|
+
SkipLink.elementType = _self.HTMLAnchorElement;
|
|
2399
2346
|
SkipLink.moduleName = 'govuk-skip-link';
|
|
2400
2347
|
|
|
2401
2348
|
/**
|
|
@@ -2529,7 +2476,7 @@
|
|
|
2529
2476
|
return this.$root.querySelector(`a.govuk-tabs__tab[href="${hash}"]`);
|
|
2530
2477
|
}
|
|
2531
2478
|
setAttributes($tab) {
|
|
2532
|
-
const panelId =
|
|
2479
|
+
const panelId = $tab.hash.replace('#', '');
|
|
2533
2480
|
if (!panelId) {
|
|
2534
2481
|
return;
|
|
2535
2482
|
}
|
|
@@ -2633,7 +2580,7 @@
|
|
|
2633
2580
|
this.createHistoryEntry($previousTab);
|
|
2634
2581
|
}
|
|
2635
2582
|
getPanel($tab) {
|
|
2636
|
-
const panelId =
|
|
2583
|
+
const panelId = $tab.hash.replace('#', '');
|
|
2637
2584
|
if (!panelId) {
|
|
2638
2585
|
return null;
|
|
2639
2586
|
}
|
|
@@ -2681,28 +2628,34 @@
|
|
|
2681
2628
|
* Use the `data-module` attributes to find, instantiate and init all of the
|
|
2682
2629
|
* components provided as part of GOV.UK Frontend.
|
|
2683
2630
|
*
|
|
2684
|
-
* @param {Config
|
|
2631
|
+
* @param {Config | Element | Document | null} [scopeOrConfig] - Scope of the document to search within or config for all components (with optional scope)
|
|
2685
2632
|
*/
|
|
2686
|
-
function initAll(
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
if (
|
|
2691
|
-
|
|
2633
|
+
function initAll(scopeOrConfig = {}) {
|
|
2634
|
+
const config = isObject(scopeOrConfig) ? scopeOrConfig : {};
|
|
2635
|
+
const options = normaliseOptions(scopeOrConfig);
|
|
2636
|
+
try {
|
|
2637
|
+
if (!isSupported()) {
|
|
2638
|
+
throw new SupportError();
|
|
2639
|
+
}
|
|
2640
|
+
if (options.scope === null) {
|
|
2641
|
+
throw new ElementError({
|
|
2642
|
+
element: options.scope,
|
|
2643
|
+
identifier: 'GOV.UK Frontend scope element (`$scope`)'
|
|
2644
|
+
});
|
|
2645
|
+
}
|
|
2646
|
+
} catch (error) {
|
|
2647
|
+
if (options.onError) {
|
|
2648
|
+
options.onError(error, {
|
|
2692
2649
|
config
|
|
2693
2650
|
});
|
|
2694
2651
|
} else {
|
|
2695
|
-
console.log(
|
|
2652
|
+
console.log(error);
|
|
2696
2653
|
}
|
|
2697
2654
|
return;
|
|
2698
2655
|
}
|
|
2699
|
-
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
onError: config.onError
|
|
2703
|
-
};
|
|
2704
|
-
components.forEach(([Component, config]) => {
|
|
2705
|
-
createAll(Component, config, options);
|
|
2656
|
+
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [ServiceNavigation], [SkipLink], [Tabs]];
|
|
2657
|
+
components.forEach(([Component, componentConfig]) => {
|
|
2658
|
+
createAll(Component, componentConfig, options);
|
|
2706
2659
|
});
|
|
2707
2660
|
}
|
|
2708
2661
|
|
|
@@ -2718,42 +2671,42 @@
|
|
|
2718
2671
|
* @template {CompatibleClass} ComponentClass
|
|
2719
2672
|
* @param {ComponentClass} Component - class of the component to create
|
|
2720
2673
|
* @param {ComponentConfig<ComponentClass>} [config] - Config supplied to component
|
|
2721
|
-
* @param {OnErrorCallback<ComponentClass> | Element | Document | CreateAllOptions<ComponentClass>
|
|
2674
|
+
* @param {OnErrorCallback<ComponentClass> | Element | Document | null | CreateAllOptions<ComponentClass>} [scopeOrOptions] - options for createAll including scope of the document to search within and callback function if error throw by component on init
|
|
2722
2675
|
* @returns {Array<InstanceType<ComponentClass>>} - array of instantiated components
|
|
2723
2676
|
*/
|
|
2724
|
-
function createAll(Component, config,
|
|
2725
|
-
let $
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
var
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
if (onError) {
|
|
2742
|
-
onError(
|
|
2677
|
+
function createAll(Component, config, scopeOrOptions) {
|
|
2678
|
+
let $elements;
|
|
2679
|
+
const options = normaliseOptions(scopeOrOptions);
|
|
2680
|
+
try {
|
|
2681
|
+
var _options$scope;
|
|
2682
|
+
if (!isSupported()) {
|
|
2683
|
+
throw new SupportError();
|
|
2684
|
+
}
|
|
2685
|
+
if (options.scope === null) {
|
|
2686
|
+
throw new ElementError({
|
|
2687
|
+
element: options.scope,
|
|
2688
|
+
component: Component,
|
|
2689
|
+
identifier: 'Scope element (`$scope`)'
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
$elements = (_options$scope = options.scope) == null ? void 0 : _options$scope.querySelectorAll(`[data-module="${Component.moduleName}"]`);
|
|
2693
|
+
} catch (error) {
|
|
2694
|
+
if (options.onError) {
|
|
2695
|
+
options.onError(error, {
|
|
2743
2696
|
component: Component,
|
|
2744
2697
|
config
|
|
2745
2698
|
});
|
|
2746
2699
|
} else {
|
|
2747
|
-
console.log(
|
|
2700
|
+
console.log(error);
|
|
2748
2701
|
}
|
|
2749
2702
|
return [];
|
|
2750
2703
|
}
|
|
2751
|
-
return Array.from($elements).map($element => {
|
|
2704
|
+
return Array.from($elements != null ? $elements : []).map($element => {
|
|
2752
2705
|
try {
|
|
2753
2706
|
return typeof config !== 'undefined' ? new Component($element, config) : new Component($element);
|
|
2754
2707
|
} catch (error) {
|
|
2755
|
-
if (onError) {
|
|
2756
|
-
onError(error, {
|
|
2708
|
+
if (options.onError) {
|
|
2709
|
+
options.onError(error, {
|
|
2757
2710
|
element: $element,
|
|
2758
2711
|
component: Component,
|
|
2759
2712
|
config
|
|
@@ -2772,14 +2725,16 @@
|
|
|
2772
2725
|
* Config for all components via `initAll()`
|
|
2773
2726
|
*
|
|
2774
2727
|
* @typedef {object} Config
|
|
2775
|
-
* @property {
|
|
2776
|
-
* @property {
|
|
2777
|
-
* @property {
|
|
2778
|
-
* @property {
|
|
2779
|
-
* @property {
|
|
2780
|
-
* @property {
|
|
2781
|
-
* @property {
|
|
2782
|
-
* @property {
|
|
2728
|
+
* @property {Element | Document | null} [scope] - Scope of the document to search within
|
|
2729
|
+
* @property {OnErrorCallback<CompatibleClass>} [onError] - Initialisation error callback
|
|
2730
|
+
* @property {ComponentConfig<typeof Accordion>} [accordion] - Accordion config
|
|
2731
|
+
* @property {ComponentConfig<typeof Button>} [button] - Button config
|
|
2732
|
+
* @property {ComponentConfig<typeof CharacterCount>} [characterCount] - Character Count config
|
|
2733
|
+
* @property {ComponentConfig<typeof ErrorSummary>} [errorSummary] - Error Summary config
|
|
2734
|
+
* @property {ComponentConfig<typeof ExitThisPage>} [exitThisPage] - Exit This Page config
|
|
2735
|
+
* @property {ComponentConfig<typeof FileUpload>} [fileUpload] - File Upload config
|
|
2736
|
+
* @property {ComponentConfig<typeof NotificationBanner>} [notificationBanner] - Notification Banner config
|
|
2737
|
+
* @property {ComponentConfig<typeof PasswordInput>} [passwordInput] - Password input config
|
|
2783
2738
|
*/
|
|
2784
2739
|
/**
|
|
2785
2740
|
* Config for individual components
|
|
@@ -2796,7 +2751,7 @@
|
|
|
2796
2751
|
/**
|
|
2797
2752
|
* Component config keys, e.g. `accordion` and `characterCount`
|
|
2798
2753
|
*
|
|
2799
|
-
* @typedef {keyof Config} ConfigKey
|
|
2754
|
+
* @typedef {keyof Omit<Config, 'scope' | 'onError'>} ConfigKey
|
|
2800
2755
|
*/
|
|
2801
2756
|
/**
|
|
2802
2757
|
* @template {CompatibleClass} ComponentClass
|
|
@@ -2807,7 +2762,7 @@
|
|
|
2807
2762
|
* @typedef {object} ErrorContext
|
|
2808
2763
|
* @property {Element} [element] - Element used for component module initialisation
|
|
2809
2764
|
* @property {ComponentClass} [component] - Class of component
|
|
2810
|
-
* @property {ComponentConfig<ComponentClass>} config - Config supplied to
|
|
2765
|
+
* @property {Config | ComponentConfig<ComponentClass>} [config] - Config supplied to components
|
|
2811
2766
|
*/
|
|
2812
2767
|
/**
|
|
2813
2768
|
* @template {CompatibleClass} ComponentClass
|
|
@@ -2818,7 +2773,7 @@
|
|
|
2818
2773
|
/**
|
|
2819
2774
|
* @template {CompatibleClass} ComponentClass
|
|
2820
2775
|
* @typedef {object} CreateAllOptions
|
|
2821
|
-
* @property {Element | Document} [scope] - scope of the document to search within
|
|
2776
|
+
* @property {Element | Document | null} [scope] - scope of the document to search within
|
|
2822
2777
|
* @property {OnErrorCallback<ComponentClass>} [onError] - callback function if error throw by component on init
|
|
2823
2778
|
*/
|
|
2824
2779
|
|
|
@@ -2831,7 +2786,6 @@
|
|
|
2831
2786
|
exports.ErrorSummary = ErrorSummary;
|
|
2832
2787
|
exports.ExitThisPage = ExitThisPage;
|
|
2833
2788
|
exports.FileUpload = FileUpload;
|
|
2834
|
-
exports.Header = Header;
|
|
2835
2789
|
exports.NotificationBanner = NotificationBanner;
|
|
2836
2790
|
exports.PasswordInput = PasswordInput;
|
|
2837
2791
|
exports.Radios = Radios;
|