govuk_publishing_components 17.21.0 → 18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +1 -1
- data/app/assets/stylesheets/component_guide/application.scss +5 -7
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +5 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -15
- data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +28 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +1 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +18 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +8 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +6 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +10 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +17 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +8 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +4 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +1 -1
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +14 -12
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_button.html.erb +16 -2
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +5 -1
- data/app/views/govuk_publishing_components/components/_details.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_title.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/button.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +4 -1
- data/app/views/govuk_publishing_components/components/docs/table.yml +1 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +2 -2
- data/config/initializers/assets.rb +3 -3
- data/config/locales/en.yml +0 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +4 -9
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +4 -5
- data/node_modules/govuk-frontend/{all-ie8.scss → govuk/all-ie8.scss} +0 -0
- data/node_modules/govuk-frontend/{all.js → govuk/all.js} +116 -63
- data/node_modules/govuk-frontend/{all.scss → govuk/all.scss} +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-mask-icon.svg +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/{common.js → govuk/common.js} +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/_accordion.scss +48 -28
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/accordion.js +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro-options.json +8 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/template.njk +1 -3
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/_back-link.scss +17 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/_breadcrumbs.scss +10 -11
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/_button.scss +76 -46
- data/node_modules/govuk-frontend/{components → govuk/components}/button/button.js +168 -17
- data/node_modules/govuk-frontend/{components → govuk/components}/button/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/macro.njk +0 -0
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/_character-count.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/character-count.js +5 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/template.njk +2 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/_checkboxes.scss +4 -6
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/checkboxes.js +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/template.njk +18 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/_date-input.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/details/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/_details.scss +12 -13
- data/node_modules/govuk-frontend/{components → govuk/components}/details/details.js +3 -4
- data/node_modules/govuk-frontend/{components → govuk/components}/details/implementation.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/_error-message.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/_error-summary.scss +4 -17
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/error-summary.js +0 -10
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/_fieldset.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro-options.json +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +81 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/_footer.scss +47 -16
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro-options.json +5 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/header/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/header/_header.scss +34 -21
- data/node_modules/govuk-frontend/{components → govuk/components}/header/header.js +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/header/macro-options.json +2 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/header/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/header/template.njk +6 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/_hint.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/_input.scss +24 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/input/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/_inset-text.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/_label.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/_panel.scss +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/_phase-banner.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/template.njk +5 -7
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/_radios.scss +7 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/radios.js +24 -11
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/template.njk +15 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/select/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/_select.scss +23 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/select/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/_skip-link.scss +6 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/_summary-list.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro-options.json +7 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/table/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/_table.scss +1 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/template.njk +14 -14
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +142 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/tabs.js +59 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/template.njk +4 -6
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +44 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +55 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/_warning-text.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/template.njk +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_global-styles.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_links.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_lists.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_section-break.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_template.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_typography.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_all.scss +1 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_clearfix.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_colour.scss +23 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_device-pixels.scss +0 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +60 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_links.scss +15 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_media-queries.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_shape-arrow.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_typography.scss +23 -5
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_visually-hidden.scss +4 -2
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_form-group.scss +0 -0
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_grid.scss +2 -2
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_main-wrapper.scss +15 -1
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_width-container.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_display.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_typography.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_width.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_assets.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-applied.scss +9 -8
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-organisations.scss +1 -1
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +101 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +75 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_global-styles.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_ie8.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_measurements.scss +2 -2
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_media-queries.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font-families.scss +11 -1
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font.scss +27 -7
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-responsive.scss +9 -10
- data/node_modules/govuk-frontend/{template.njk → govuk/template.njk} +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_compatibility.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_exports.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_font-url.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_ie8.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_iff.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_image-url.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-em.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-rem.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_clearfix.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_visually-hidden.scss +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/_sass-mq.scss +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/DOMTokenList.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Document.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/classList.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/closest.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/matches.js +0 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +259 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +257 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Event.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Function/prototype/bind.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Object/defineProperty.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Window.js +0 -0
- data/node_modules/govuk-frontend/package.json +21 -21
- data/node_modules/react-is/README.md +2 -12
- data/node_modules/react-is/build-info.json +5 -5
- data/node_modules/react-is/cjs/react-is.development.js +7 -2
- data/node_modules/react-is/cjs/react-is.production.min.js +6 -6
- data/node_modules/react-is/package.json +13 -13
- data/node_modules/react-is/umd/react-is.development.js +7 -2
- data/node_modules/react-is/umd/react-is.production.min.js +5 -5
- data/node_modules/type/CHANGELOG.md +62 -50
- data/node_modules/type/LICENSE +15 -0
- data/node_modules/type/README.md +19 -19
- data/node_modules/type/error/is.js +28 -7
- data/node_modules/type/package.json +36 -22
- data/node_modules/type/test/error/is.js +13 -5
- metadata +247 -344
- data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +0 -79
- data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +0 -41
- data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +0 -35
- data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +0 -49
- data/node_modules/accessible-autocomplete/CHANGELOG.md +0 -269
- data/node_modules/accessible-autocomplete/CONTRIBUTING.md +0 -150
- data/node_modules/accessible-autocomplete/LICENSE.txt +0 -20
- data/node_modules/accessible-autocomplete/Procfile +0 -1
- data/node_modules/accessible-autocomplete/README.md +0 -416
- data/node_modules/accessible-autocomplete/accessibility-criteria.md +0 -42
- data/node_modules/accessible-autocomplete/app.json +0 -15
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +0 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/examples/form.html +0 -671
- data/node_modules/accessible-autocomplete/examples/index.html +0 -665
- data/node_modules/accessible-autocomplete/examples/multiselect.html +0 -134
- data/node_modules/accessible-autocomplete/examples/preact/index.html +0 -346
- data/node_modules/accessible-autocomplete/examples/react/index.html +0 -347
- data/node_modules/accessible-autocomplete/package-lock.json +0 -14491
- data/node_modules/accessible-autocomplete/package.json +0 -173
- data/node_modules/accessible-autocomplete/preact.js +0 -1
- data/node_modules/accessible-autocomplete/react.js +0 -1
- data/node_modules/accessible-autocomplete/scripts/check-staged.js +0 -14
- data/node_modules/accessible-autocomplete/src/autocomplete.css +0 -192
- data/node_modules/accessible-autocomplete/src/autocomplete.js +0 -618
- data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +0 -11
- data/node_modules/accessible-autocomplete/src/status.js +0 -80
- data/node_modules/accessible-autocomplete/src/wrapper.js +0 -76
- data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +0 -44
- data/node_modules/accessible-autocomplete/test/functional/index.js +0 -485
- data/node_modules/accessible-autocomplete/test/functional/wrapper.js +0 -318
- data/node_modules/accessible-autocomplete/test/integration/index.js +0 -188
- data/node_modules/accessible-autocomplete/test/karma.config.js +0 -42
- data/node_modules/accessible-autocomplete/test/wdio.config.js +0 -80
- data/node_modules/accessible-autocomplete/webpack.config.babel.js +0 -193
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/components/button/template.njk +0 -35
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +0 -19
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +0 -130
- data/node_modules/govuk-frontend/components/tag/_tag.scss +0 -33
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +0 -32
- data/node_modules/govuk-frontend/helpers/_focusable.scss +0 -34
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +0 -67
- data/node_modules/govuk-frontend/helpers/_grid.scss +0 -107
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +0 -37
- data/node_modules/govuk-frontend/settings/_compatibility.scss +0 -51
- data/node_modules/preact/LICENSE +0 -21
- data/node_modules/preact/README.md +0 -592
- data/node_modules/preact/debug.js +0 -740
- data/node_modules/preact/debug.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.js +0 -2
- data/node_modules/preact/debug/dist/debug.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.mjs +0 -681
- data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
- data/node_modules/preact/debug/dist/debug.module.js +0 -2
- data/node_modules/preact/debug/dist/debug.module.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.umd.js +0 -2
- data/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
- data/node_modules/preact/debug/index.js +0 -122
- data/node_modules/preact/devtools.js +0 -403
- data/node_modules/preact/devtools.js.map +0 -1
- data/node_modules/preact/devtools/devtools.js +0 -395
- data/node_modules/preact/devtools/index.js +0 -4
- data/node_modules/preact/dist/preact.d.ts +0 -1712
- data/node_modules/preact/dist/preact.dev.js +0 -727
- data/node_modules/preact/dist/preact.dev.js.map +0 -1
- data/node_modules/preact/dist/preact.js +0 -414
- data/node_modules/preact/dist/preact.js.flow +0 -25
- data/node_modules/preact/dist/preact.js.map +0 -1
- data/node_modules/preact/dist/preact.min.js +0 -2
- data/node_modules/preact/dist/preact.min.js.map +0 -1
- data/node_modules/preact/dist/preact.mjs +0 -724
- data/node_modules/preact/dist/preact.mjs.map +0 -1
- data/node_modules/preact/dist/preact.umd.js +0 -751
- data/node_modules/preact/dist/preact.umd.js.map +0 -1
- data/node_modules/preact/package.json +0 -226
- data/node_modules/preact/src/clone-element.js +0 -18
- data/node_modules/preact/src/component.js +0 -90
- data/node_modules/preact/src/constants.js +0 -17
- data/node_modules/preact/src/dom/index.js +0 -139
- data/node_modules/preact/src/h.js +0 -86
- data/node_modules/preact/src/options.js +0 -22
- data/node_modules/preact/src/preact.d.ts +0 -1712
- data/node_modules/preact/src/preact.js +0 -32
- data/node_modules/preact/src/preact.js.flow +0 -25
- data/node_modules/preact/src/render-queue.js +0 -27
- data/node_modules/preact/src/render.js +0 -22
- data/node_modules/preact/src/util.js +0 -30
- data/node_modules/preact/src/vdom/component-recycler.js +0 -48
- data/node_modules/preact/src/vdom/component.js +0 -296
- data/node_modules/preact/src/vdom/diff.js +0 -337
- data/node_modules/preact/src/vdom/index.js +0 -54
- data/node_modules/preact/src/vnode.js +0 -9
- data/node_modules/preact/typings.json +0 -5
@@ -12,8 +12,8 @@
|
|
12
12
|
aria-expanded="true"
|
13
13
|
role="button">Close</a>
|
14
14
|
|
15
|
-
<div class="
|
16
|
-
<div class="
|
15
|
+
<div class="govuk-grid-row">
|
16
|
+
<div class="govuk-grid-column-two-thirds">
|
17
17
|
<div class="gem-c-feedback__error-summary gem-c-feedback__js-show js-hidden js-errors" tabindex="-1"></div>
|
18
18
|
|
19
19
|
<input type="hidden" name="url" value="<%= url_without_pii %>">
|
@@ -12,8 +12,8 @@
|
|
12
12
|
aria-expanded="true"
|
13
13
|
role="button">Close</a>
|
14
14
|
|
15
|
-
<div class="
|
16
|
-
<div class="
|
15
|
+
<div class="govuk-grid-row">
|
16
|
+
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
|
17
17
|
<div class="gem-c-feedback__error-summary js-hidden js-errors" tabindex="-1"></div>
|
18
18
|
|
19
19
|
<input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
|
@@ -29,12 +29,12 @@ Rails.application.config.assets.precompile += %w(
|
|
29
29
|
# Add GOV.Frontend assets
|
30
30
|
|
31
31
|
Rails.application.config.assets.precompile += %w(
|
32
|
-
accessible-autocomplete/dist/accessible-autocomplete.min.css
|
33
32
|
govuk-logotype-crown.png
|
34
33
|
)
|
35
34
|
|
36
35
|
Rails.application.config.assets.paths += %W(
|
37
|
-
#{__dir__}/../../node_modules/govuk-frontend/assets/images
|
38
|
-
#{__dir__}/../../node_modules/govuk-frontend/assets/fonts
|
36
|
+
#{__dir__}/../../node_modules/govuk-frontend/govuk/assets/images
|
37
|
+
#{__dir__}/../../node_modules/govuk-frontend/govuk/assets/fonts
|
38
|
+
#{__dir__}/../../node_modules/govuk-frontend/
|
39
39
|
#{__dir__}/../../node_modules/
|
40
40
|
)
|
data/config/locales/en.yml
CHANGED
@@ -30,8 +30,6 @@ en:
|
|
30
30
|
request_format_details_html: "If you use assistive technology and need a version of this document in a more accessible format, please email <a href='mailto:%{alternative_format_contact_email}' target='_blank' class='govuk-link'>%{alternative_format_contact_email}</a>. Please tell us what format you need. It will help us if you say what assistive technology you use."
|
31
31
|
article_schema:
|
32
32
|
scoped_search_description: "Search within %{title}"
|
33
|
-
autocomplete:
|
34
|
-
multiselect: "To select multiple items in a list, hold down Ctrl (PC) or Cmd (Mac) key."
|
35
33
|
back_link:
|
36
34
|
back: 'Back'
|
37
35
|
contents_list:
|
@@ -71,17 +71,12 @@ In order to import GOV.UK Frontend images and fonts to your project, you should
|
|
71
71
|
|
72
72
|
## Getting updates
|
73
73
|
|
74
|
-
To
|
74
|
+
To be notified when there’s a new release, you can either:
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
```
|
79
|
-
|
80
|
-
To update to the latest version, run:
|
76
|
+
- [watch the govuk-frontend Github repository](https://help.github.com/en/articles/watching-and-unwatching-repositories)
|
77
|
+
- join the [#govuk-design-system channel on cross-government Slack](https://ukgovernmentdigital.slack.com/app_redirect?channel=govuk-design-system)
|
81
78
|
|
82
|
-
|
83
|
-
npm update govuk-frontend
|
84
|
-
```
|
79
|
+
Find out how to [update with npm](https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/updating-with-npm.md).
|
85
80
|
|
86
81
|
## Licence
|
87
82
|
|
File without changes
|
@@ -1291,28 +1291,21 @@ if (detect) return
|
|
1291
1291
|
})
|
1292
1292
|
.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
1293
1293
|
|
1294
|
-
/**
|
1295
|
-
* JavaScript 'shim' to trigger the click event of element(s) when the space key is pressed.
|
1296
|
-
*
|
1297
|
-
* Created since some Assistive Technologies (for example some Screenreaders)
|
1298
|
-
* will tell a user to press space on a 'button', so this functionality needs to be shimmed
|
1299
|
-
* See https://github.com/alphagov/govuk_elements/pull/272#issuecomment-233028270
|
1300
|
-
*
|
1301
|
-
* Usage instructions:
|
1302
|
-
* the 'shim' will be automatically initialised
|
1303
|
-
*/
|
1304
|
-
|
1305
1294
|
var KEY_SPACE = 32;
|
1306
1295
|
var DEBOUNCE_TIMEOUT_IN_SECONDS = 1;
|
1307
|
-
var debounceFormSubmitTimer = null;
|
1308
1296
|
|
1309
1297
|
function Button ($module) {
|
1310
1298
|
this.$module = $module;
|
1299
|
+
this.debounceFormSubmitTimer = null;
|
1311
1300
|
}
|
1312
1301
|
|
1313
1302
|
/**
|
1314
|
-
*
|
1315
|
-
*
|
1303
|
+
* JavaScript 'shim' to trigger the click event of element(s) when the space key is pressed.
|
1304
|
+
*
|
1305
|
+
* Created since some Assistive Technologies (for example some Screenreaders)
|
1306
|
+
* will tell a user to press space on a 'button', so this functionality needs to be shimmed
|
1307
|
+
* See https://github.com/alphagov/govuk_elements/pull/272#issuecomment-233028270
|
1308
|
+
*
|
1316
1309
|
* @param {object} event event
|
1317
1310
|
*/
|
1318
1311
|
Button.prototype.handleKeyDown = function (event) {
|
@@ -1339,14 +1332,14 @@ Button.prototype.debounce = function (event) {
|
|
1339
1332
|
}
|
1340
1333
|
|
1341
1334
|
// If the timer is still running then we want to prevent the click from submitting the form
|
1342
|
-
if (debounceFormSubmitTimer) {
|
1335
|
+
if (this.debounceFormSubmitTimer) {
|
1343
1336
|
event.preventDefault();
|
1344
1337
|
return false
|
1345
1338
|
}
|
1346
1339
|
|
1347
|
-
debounceFormSubmitTimer = setTimeout(function () {
|
1348
|
-
debounceFormSubmitTimer = null;
|
1349
|
-
}, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);
|
1340
|
+
this.debounceFormSubmitTimer = setTimeout(function () {
|
1341
|
+
this.debounceFormSubmitTimer = null;
|
1342
|
+
}.bind(this), DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);
|
1350
1343
|
};
|
1351
1344
|
|
1352
1345
|
/**
|
@@ -1363,9 +1356,6 @@ Button.prototype.init = function () {
|
|
1363
1356
|
* and 'shim' to add accessiblity enhancements for all browsers
|
1364
1357
|
*
|
1365
1358
|
* http://caniuse.com/#feat=details
|
1366
|
-
*
|
1367
|
-
* Usage instructions:
|
1368
|
-
* the 'polyfill' will be automatically initialised
|
1369
1359
|
*/
|
1370
1360
|
|
1371
1361
|
var KEY_ENTER = 13;
|
@@ -1449,7 +1439,9 @@ Details.prototype.init = function () {
|
|
1449
1439
|
$summary.setAttribute('aria-controls', $content.id);
|
1450
1440
|
|
1451
1441
|
// Set tabIndex so the summary is keyboard accessible for non-native elements
|
1452
|
-
//
|
1442
|
+
//
|
1443
|
+
// We have to use the camelcase `tabIndex` property as there is a bug in IE6/IE7 when we set the correct attribute lowercase:
|
1444
|
+
// See http://web.archive.org/web/20170120194036/http://www.saliences.com/browserBugs/tabIndex.html for more information.
|
1453
1445
|
if (!NATIVE_DETAILS) {
|
1454
1446
|
$summary.tabIndex = 0;
|
1455
1447
|
}
|
@@ -1511,7 +1503,7 @@ Details.prototype.destroy = function (node) {
|
|
1511
1503
|
|
1512
1504
|
function CharacterCount ($module) {
|
1513
1505
|
this.$module = $module;
|
1514
|
-
this.$textarea = $module.querySelector('.js-character-count');
|
1506
|
+
this.$textarea = $module.querySelector('.govuk-js-character-count');
|
1515
1507
|
}
|
1516
1508
|
|
1517
1509
|
CharacterCount.prototype.defaults = {
|
@@ -1651,8 +1643,12 @@ CharacterCount.prototype.updateCountMessage = function () {
|
|
1651
1643
|
var thresholdValue = maxLength * thresholdPercent / 100;
|
1652
1644
|
if (thresholdValue > currentLength) {
|
1653
1645
|
countMessage.classList.add('govuk-character-count__message--disabled');
|
1646
|
+
// Ensure threshold is hidden for users of assistive technologies
|
1647
|
+
countMessage.setAttribute('aria-hidden', true);
|
1654
1648
|
} else {
|
1655
1649
|
countMessage.classList.remove('govuk-character-count__message--disabled');
|
1650
|
+
// Ensure threshold is visible for users of assistive technologies
|
1651
|
+
countMessage.removeAttribute('aria-hidden');
|
1656
1652
|
}
|
1657
1653
|
|
1658
1654
|
// Update styles
|
@@ -1853,16 +1849,6 @@ ErrorSummary.prototype.focusTarget = function ($target) {
|
|
1853
1849
|
return false
|
1854
1850
|
}
|
1855
1851
|
|
1856
|
-
// Prefer using the history API where possible, as updating
|
1857
|
-
// window.location.hash causes the viewport to jump to the input briefly
|
1858
|
-
// before then scrolling to the label/legend in IE10, IE11 and Edge (as tested
|
1859
|
-
// in Edge 17).
|
1860
|
-
if (window.history.pushState) {
|
1861
|
-
window.history.pushState(null, null, '#' + inputId);
|
1862
|
-
} else {
|
1863
|
-
window.location.hash = inputId;
|
1864
|
-
}
|
1865
|
-
|
1866
1852
|
// Scroll the legend or label into view *before* calling focus on the input to
|
1867
1853
|
// avoid extra scrolling in browsers that don't support `preventScroll` (which
|
1868
1854
|
// at time of writing is most of them...)
|
@@ -1929,7 +1915,7 @@ Header.prototype.init = function () {
|
|
1929
1915
|
}
|
1930
1916
|
|
1931
1917
|
// Check for button
|
1932
|
-
var $toggleButton = $module.querySelector('.js-header-toggle');
|
1918
|
+
var $toggleButton = $module.querySelector('.govuk-js-header-toggle');
|
1933
1919
|
if (!$toggleButton) {
|
1934
1920
|
return
|
1935
1921
|
}
|
@@ -1972,12 +1958,11 @@ Header.prototype.handleClick = function (event) {
|
|
1972
1958
|
|
1973
1959
|
function Radios ($module) {
|
1974
1960
|
this.$module = $module;
|
1975
|
-
this.$inputs = $module.querySelectorAll('input[type="radio"]');
|
1976
1961
|
}
|
1977
1962
|
|
1978
1963
|
Radios.prototype.init = function () {
|
1979
1964
|
var $module = this.$module;
|
1980
|
-
var $inputs =
|
1965
|
+
var $inputs = $module.querySelectorAll('input[type="radio"]');
|
1981
1966
|
|
1982
1967
|
/**
|
1983
1968
|
* Loop over all items with [data-controls]
|
@@ -2004,26 +1989,88 @@ Radios.prototype.init = function () {
|
|
2004
1989
|
};
|
2005
1990
|
|
2006
1991
|
Radios.prototype.setAttributes = function ($input) {
|
2007
|
-
var
|
2008
|
-
|
1992
|
+
var $content = document.querySelector('#' + $input.getAttribute('aria-controls'));
|
1993
|
+
|
1994
|
+
if ($content && $content.classList.contains('govuk-radios__conditional')) {
|
1995
|
+
var inputIsChecked = $input.checked;
|
1996
|
+
|
1997
|
+
$input.setAttribute('aria-expanded', inputIsChecked);
|
2009
1998
|
|
2010
|
-
var $content = this.$module.querySelector('#' + $input.getAttribute('aria-controls'));
|
2011
|
-
if ($content) {
|
2012
1999
|
$content.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);
|
2013
2000
|
}
|
2014
2001
|
};
|
2015
2002
|
|
2016
2003
|
Radios.prototype.handleClick = function (event) {
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2004
|
+
var $clickedInput = event.target;
|
2005
|
+
// We only want to handle clicks for radio inputs
|
2006
|
+
if ($clickedInput.type !== 'radio') {
|
2007
|
+
return
|
2008
|
+
}
|
2009
|
+
// Because checking one radio can uncheck a radio in another $module,
|
2010
|
+
// we need to call set attributes on all radios in the same form, or document if they're not in a form.
|
2011
|
+
//
|
2012
|
+
// We also only want radios which have aria-controls, as they support conditional reveals.
|
2013
|
+
var $allInputs = document.querySelectorAll('input[type="radio"][aria-controls]');
|
2014
|
+
nodeListForEach($allInputs, function ($input) {
|
2015
|
+
// Only inputs with the same form owner should change.
|
2016
|
+
var hasSameFormOwner = ($input.form === $clickedInput.form);
|
2017
|
+
|
2018
|
+
// In radios, only radios with the same name will affect each other.
|
2019
|
+
var hasSameName = ($input.name === $clickedInput.name);
|
2020
|
+
if (hasSameName && hasSameFormOwner) {
|
2022
2021
|
this.setAttributes($input);
|
2023
2022
|
}
|
2024
2023
|
}.bind(this));
|
2025
2024
|
};
|
2026
2025
|
|
2026
|
+
(function(undefined) {
|
2027
|
+
|
2028
|
+
// Detection from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b09a5d2acf3314b46a6c8f8d0c31b85c
|
2029
|
+
var detect = (
|
2030
|
+
'Element' in this && "nextElementSibling" in document.documentElement
|
2031
|
+
);
|
2032
|
+
|
2033
|
+
if (detect) return
|
2034
|
+
|
2035
|
+
|
2036
|
+
(function (global) {
|
2037
|
+
|
2038
|
+
// Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-404b69b4750d18dea4174930a49170fd
|
2039
|
+
Object.defineProperty(Element.prototype, "nextElementSibling", {
|
2040
|
+
get: function(){
|
2041
|
+
var el = this.nextSibling;
|
2042
|
+
while (el && el.nodeType !== 1) { el = el.nextSibling; }
|
2043
|
+
return (el.nodeType === 1) ? el : null;
|
2044
|
+
}
|
2045
|
+
});
|
2046
|
+
|
2047
|
+
}(this));
|
2048
|
+
|
2049
|
+
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
2050
|
+
|
2051
|
+
(function(undefined) {
|
2052
|
+
|
2053
|
+
// Detection from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-a162235fbc9c0dd40d4032265f44942e
|
2054
|
+
var detect = (
|
2055
|
+
'Element' in this && 'previousElementSibling' in document.documentElement
|
2056
|
+
);
|
2057
|
+
|
2058
|
+
if (detect) return
|
2059
|
+
|
2060
|
+
(function (global) {
|
2061
|
+
// Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b45a1197b842728cb76b624b6ba7d739
|
2062
|
+
Object.defineProperty(Element.prototype, 'previousElementSibling', {
|
2063
|
+
get: function(){
|
2064
|
+
var el = this.previousSibling;
|
2065
|
+
while (el && el.nodeType !== 1) { el = el.previousSibling; }
|
2066
|
+
return (el.nodeType === 1) ? el : null;
|
2067
|
+
}
|
2068
|
+
});
|
2069
|
+
|
2070
|
+
}(this));
|
2071
|
+
|
2072
|
+
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
2073
|
+
|
2027
2074
|
function Tabs ($module) {
|
2028
2075
|
this.$module = $module;
|
2029
2076
|
this.$tabs = $module.querySelectorAll('.govuk-tabs__tab');
|
@@ -2165,6 +2212,7 @@ Tabs.prototype.setAttributes = function ($tab) {
|
|
2165
2212
|
$tab.setAttribute('id', 'tab_' + panelId);
|
2166
2213
|
$tab.setAttribute('role', 'tab');
|
2167
2214
|
$tab.setAttribute('aria-controls', panelId);
|
2215
|
+
$tab.setAttribute('aria-selected', 'false');
|
2168
2216
|
$tab.setAttribute('tabindex', '-1');
|
2169
2217
|
|
2170
2218
|
// set panel attributes
|
@@ -2179,6 +2227,7 @@ Tabs.prototype.unsetAttributes = function ($tab) {
|
|
2179
2227
|
$tab.removeAttribute('id');
|
2180
2228
|
$tab.removeAttribute('role');
|
2181
2229
|
$tab.removeAttribute('aria-controls');
|
2230
|
+
$tab.removeAttribute('aria-selected');
|
2182
2231
|
$tab.removeAttribute('tabindex');
|
2183
2232
|
|
2184
2233
|
// unset panel attributes
|
@@ -2189,6 +2238,10 @@ Tabs.prototype.unsetAttributes = function ($tab) {
|
|
2189
2238
|
};
|
2190
2239
|
|
2191
2240
|
Tabs.prototype.onTabClick = function (e) {
|
2241
|
+
if (!e.target.classList.contains('govuk-tabs__tab')) {
|
2242
|
+
// Allow events on child DOM elements to bubble up to tab parent
|
2243
|
+
return false
|
2244
|
+
}
|
2192
2245
|
e.preventDefault();
|
2193
2246
|
var $newTab = e.target;
|
2194
2247
|
var $currentTab = this.getCurrentTab();
|
@@ -2228,7 +2281,7 @@ Tabs.prototype.activateNextTab = function () {
|
|
2228
2281
|
var currentTab = this.getCurrentTab();
|
2229
2282
|
var nextTabListItem = currentTab.parentNode.nextElementSibling;
|
2230
2283
|
if (nextTabListItem) {
|
2231
|
-
var nextTab = nextTabListItem.
|
2284
|
+
var nextTab = nextTabListItem.querySelector('.govuk-tabs__tab');
|
2232
2285
|
}
|
2233
2286
|
if (nextTab) {
|
2234
2287
|
this.hideTab(currentTab);
|
@@ -2242,7 +2295,7 @@ Tabs.prototype.activatePreviousTab = function () {
|
|
2242
2295
|
var currentTab = this.getCurrentTab();
|
2243
2296
|
var previousTabListItem = currentTab.parentNode.previousElementSibling;
|
2244
2297
|
if (previousTabListItem) {
|
2245
|
-
var previousTab = previousTabListItem.
|
2298
|
+
var previousTab = previousTabListItem.querySelector('.govuk-tabs__tab');
|
2246
2299
|
}
|
2247
2300
|
if (previousTab) {
|
2248
2301
|
this.hideTab(currentTab);
|
@@ -2269,18 +2322,18 @@ Tabs.prototype.hidePanel = function (tab) {
|
|
2269
2322
|
|
2270
2323
|
Tabs.prototype.unhighlightTab = function ($tab) {
|
2271
2324
|
$tab.setAttribute('aria-selected', 'false');
|
2272
|
-
$tab.classList.remove('govuk-
|
2325
|
+
$tab.parentNode.classList.remove('govuk-tabs__list-item--selected');
|
2273
2326
|
$tab.setAttribute('tabindex', '-1');
|
2274
2327
|
};
|
2275
2328
|
|
2276
2329
|
Tabs.prototype.highlightTab = function ($tab) {
|
2277
2330
|
$tab.setAttribute('aria-selected', 'true');
|
2278
|
-
$tab.classList.add('govuk-
|
2331
|
+
$tab.parentNode.classList.add('govuk-tabs__list-item--selected');
|
2279
2332
|
$tab.setAttribute('tabindex', '0');
|
2280
2333
|
};
|
2281
2334
|
|
2282
2335
|
Tabs.prototype.getCurrentTab = function () {
|
2283
|
-
return this.$module.querySelector('.govuk-
|
2336
|
+
return this.$module.querySelector('.govuk-tabs__list-item--selected .govuk-tabs__tab')
|
2284
2337
|
};
|
2285
2338
|
|
2286
2339
|
// this is because IE doesn't always return the actual value but a relative full path
|
@@ -2300,45 +2353,45 @@ function initAll (options) {
|
|
2300
2353
|
// Defaults to the entire document if nothing is set.
|
2301
2354
|
var scope = typeof options.scope !== 'undefined' ? options.scope : document;
|
2302
2355
|
|
2303
|
-
|
2304
|
-
|
2356
|
+
var $buttons = scope.querySelectorAll('[data-module="govuk-button"]');
|
2357
|
+
nodeListForEach($buttons, function ($button) {
|
2358
|
+
new Button($button).init();
|
2359
|
+
});
|
2305
2360
|
|
2306
|
-
|
2307
|
-
var $accordions = scope.querySelectorAll('[data-module="accordion"]');
|
2361
|
+
var $accordions = scope.querySelectorAll('[data-module="govuk-accordion"]');
|
2308
2362
|
nodeListForEach($accordions, function ($accordion) {
|
2309
2363
|
new Accordion($accordion).init();
|
2310
2364
|
});
|
2311
2365
|
|
2312
|
-
|
2313
|
-
var $details = scope.querySelectorAll('details');
|
2366
|
+
var $details = scope.querySelectorAll('[data-module="govuk-details"]');
|
2314
2367
|
nodeListForEach($details, function ($detail) {
|
2315
2368
|
new Details($detail).init();
|
2316
2369
|
});
|
2317
2370
|
|
2318
|
-
var $
|
2319
|
-
nodeListForEach($
|
2371
|
+
var $characterCounts = scope.querySelectorAll('[data-module="govuk-character-count"]');
|
2372
|
+
nodeListForEach($characterCounts, function ($characterCount) {
|
2320
2373
|
new CharacterCount($characterCount).init();
|
2321
2374
|
});
|
2322
2375
|
|
2323
|
-
var $checkboxes = scope.querySelectorAll('[data-module="checkboxes"]');
|
2376
|
+
var $checkboxes = scope.querySelectorAll('[data-module="govuk-checkboxes"]');
|
2324
2377
|
nodeListForEach($checkboxes, function ($checkbox) {
|
2325
2378
|
new Checkboxes($checkbox).init();
|
2326
2379
|
});
|
2327
2380
|
|
2328
2381
|
// Find first error summary module to enhance.
|
2329
|
-
var $errorSummary = scope.querySelector('[data-module="error-summary"]');
|
2382
|
+
var $errorSummary = scope.querySelector('[data-module="govuk-error-summary"]');
|
2330
2383
|
new ErrorSummary($errorSummary).init();
|
2331
2384
|
|
2332
2385
|
// Find first header module to enhance.
|
2333
|
-
var $toggleButton = scope.querySelector('[data-module="header"]');
|
2386
|
+
var $toggleButton = scope.querySelector('[data-module="govuk-header"]');
|
2334
2387
|
new Header($toggleButton).init();
|
2335
2388
|
|
2336
|
-
var $radios = scope.querySelectorAll('[data-module="radios"]');
|
2389
|
+
var $radios = scope.querySelectorAll('[data-module="govuk-radios"]');
|
2337
2390
|
nodeListForEach($radios, function ($radio) {
|
2338
2391
|
new Radios($radio).init();
|
2339
2392
|
});
|
2340
2393
|
|
2341
|
-
var $tabs = scope.querySelectorAll('[data-module="tabs"]');
|
2394
|
+
var $tabs = scope.querySelectorAll('[data-module="govuk-tabs"]');
|
2342
2395
|
nodeListForEach($tabs, function ($tabs) {
|
2343
2396
|
new Tabs($tabs).init();
|
2344
2397
|
});
|