defra_ruby_template 5.4.0 → 5.11.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/app/views/layouts/defra_ruby_template.html.erb +43 -23
- data/lib/defra_ruby_template/version.rb +1 -1
- data/lib/defra_ruby_template.rb +3 -8
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +882 -492
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +877 -492
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +5 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/all.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
- 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 +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +1 -0
- 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 +1 -0
- 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 +39 -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 +169 -0
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.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/index.mjs +20 -83
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs +60 -0
- data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +35 -31
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +296 -195
- 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 +295 -194
- 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 +88 -110
- 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 +16 -3
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +25 -15
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template.njk +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +53 -15
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/macro-options.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-inverse.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-collapse-on-mobile.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-last-breadcrumb-as-current-page.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-multiple-levels.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-one-level.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-without-the-home-section.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template.njk +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +217 -106
- 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 +216 -105
- 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 +9 -22
- 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 +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +2 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +12 -4
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +256 -145
- 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 +255 -144
- 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 +29 -34
- 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 +80 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +6 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-error.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-hint-and-error.html +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +5 -4
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +6 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +96 -50
- 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 +95 -49
- 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 +9 -18
- 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 +88 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +23 -14
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +23 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +7 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +238 -127
- 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 +237 -126
- 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 +10 -22
- 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 +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +218 -107
- 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 +217 -106
- 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 +10 -22
- 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 +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -5
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +175 -9
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +744 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +736 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +257 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +220 -16
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +52 -3
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-direct-media-capture.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-image-files-only.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-multiple-files.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-disabled.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-disabled.html +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-with-error-message-and-hint.html +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-translated.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +42 -5
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +61 -19
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +223 -21
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +78 -32
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +90 -43
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +89 -42
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +10 -18
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +31 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-and-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-but-no-service-url.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-st-edwards-crown.html +10 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +11 -41
- data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -4
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +97 -27
- data/node_modules/govuk-frontend/dist/govuk/components/input/macro-options.json +6 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-disabled.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-and-hint.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-message.html +2 -5
- data/node_modules/govuk-frontend/dist/govuk/components/input/template.njk +5 -4
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +238 -127
- 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 +237 -126
- 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 +10 -22
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +24 -37
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/macro-options.json +4 -4
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +13 -9
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +12 -9
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +27 -2
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro-options.json +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +220 -110
- 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 +219 -109
- 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 +12 -25
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-default.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template.njk +4 -2
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +0 -8
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +51 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +96 -50
- 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 +95 -49
- 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 +9 -18
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +5 -5
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +43 -9
- data/node_modules/govuk-frontend/dist/govuk/components/select/macro-options.json +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-id.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template.njk +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +187 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +515 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +138 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +229 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +221 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +153 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-long-service-name.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-link.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name.html +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +103 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +95 -48
- 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 +94 -47
- 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 +15 -23
- 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.scss +14 -22
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +174 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-extreme.html +106 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +22 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +15 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +95 -53
- 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 +94 -52
- 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 +15 -28
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +11 -8
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +12 -10
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +44 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-empty-values.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +32 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro-options.json +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template.njk +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +6 -5
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +16 -3
- 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/_colour.scss +55 -8
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +14 -4
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +18 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +30 -62
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +90 -24
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +78 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +39 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +244 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +5 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/template.njk +20 -9
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +65 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +25 -0
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +1 -1
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +8 -1
- data/node_modules/govuk-frontend/package.json +16 -16
- data/spec/spec_helper.rb +98 -0
- data/spec/tasks/assets_spec.rb +53 -0
- data/vendor/assets/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/vendor/assets/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/vendor/assets/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/vendor/assets/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/vendor/assets/assets/images/favicon.ico +0 -0
- data/vendor/assets/assets/images/favicon.svg +1 -0
- data/vendor/assets/assets/images/govuk-crest.svg +1 -0
- 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-icon-mask.svg +1 -0
- data/vendor/assets/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/manifest.json +39 -0
- data/vendor/assets/assets/rebrand/images/favicon.ico +0 -0
- data/vendor/assets/assets/rebrand/images/favicon.svg +1 -0
- data/vendor/assets/assets/rebrand/images/govuk-crest.svg +1 -0
- 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 +1 -0
- data/vendor/assets/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/rebrand/manifest.json +39 -0
- data/vendor/assets/images/govuk-crest.svg +1 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +882 -492
- data/vendor/assets/stylesheets/all.scss +6 -0
- data/vendor/assets/stylesheets/components/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +35 -31
- data/vendor/assets/stylesheets/components/character-count/_index.scss +12 -4
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +6 -1
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +23 -14
- data/vendor/assets/stylesheets/components/date-input/_index.scss +2 -2
- data/vendor/assets/stylesheets/components/details/_index.scss +7 -2
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +4 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +3 -5
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +175 -9
- data/vendor/assets/stylesheets/components/footer/_index.scss +61 -19
- data/vendor/assets/stylesheets/components/header/_index.scss +223 -21
- data/vendor/assets/stylesheets/components/input/_index.scss +7 -4
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +3 -2
- data/vendor/assets/stylesheets/components/pagination/_index.scss +24 -37
- data/vendor/assets/stylesheets/components/panel/_index.scss +13 -9
- data/vendor/assets/stylesheets/components/password-input/_index.scss +12 -9
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +0 -8
- data/vendor/assets/stylesheets/components/radios/_index.scss +7 -5
- data/vendor/assets/stylesheets/components/select/_index.scss +5 -5
- data/vendor/assets/stylesheets/components/service-navigation/_index.scss +187 -0
- data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.scss +4 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +6 -4
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +14 -22
- data/vendor/assets/stylesheets/components/tag/_index.scss +11 -8
- data/vendor/assets/stylesheets/components/task-list/_index.scss +12 -10
- data/vendor/assets/stylesheets/components/textarea/_index.scss +3 -3
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +6 -5
- data/vendor/assets/stylesheets/core/_govuk-frontend-properties.scss +1 -1
- data/vendor/assets/stylesheets/defra_ruby_template.scss +6 -0
- data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
- data/vendor/assets/stylesheets/helpers/_colour.scss +55 -8
- data/vendor/assets/stylesheets/helpers/_focused.scss +14 -4
- data/vendor/assets/stylesheets/helpers/_grid.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_links.scss +2 -2
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_typography.scss +18 -1
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +30 -62
- data/vendor/assets/stylesheets/objects/_template.scss +5 -1
- data/vendor/assets/stylesheets/overrides/_typography.scss +5 -1
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +39 -1
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +244 -10
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +5 -10
- data/vendor/assets/stylesheets/tools/_index.scss +1 -0
- data/vendor/assets/stylesheets/tools/_rebrand.scss +65 -0
- metadata +100 -24
- data/.github/dependabot.yml +0 -14
- data/.github/workflows/ci.yml +0 -31
- data/.gitignore +0 -8
- data/.rspec +0 -1
- data/.rubocop.yml +0 -3
- data/.ruby-version +0 -1
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -58
- data/defra_ruby_template.gemspec +0 -35
- data/node_modules/.package-lock.json +0 -16
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +0 -18
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +0 -31
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-value.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +0 -16
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs.map +0 -1
- data/package-lock.json +0 -24
- data/package.json +0 -29
@@ -0,0 +1,138 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "classes",
|
4
|
+
"type": "string",
|
5
|
+
"required": false,
|
6
|
+
"description": "Classes to add to the service navigation container."
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "attributes",
|
10
|
+
"type": "object",
|
11
|
+
"required": false,
|
12
|
+
"description": "HTML attributes (for example, data attributes) to add to the service navigation container."
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "ariaLabel",
|
16
|
+
"type": "string",
|
17
|
+
"required": false,
|
18
|
+
"description": "The text for the `aria-label` which labels the service navigation container when a service name is included. Defaults to `\"Service information\"`."
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "menuButtonText",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"description": "The text of the mobile navigation menu toggle."
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "menuButtonLabel",
|
28
|
+
"type": "string",
|
29
|
+
"required": false,
|
30
|
+
"description": "The screen reader label for the mobile navigation menu toggle. Defaults to the same value as `menuButtonText` if not specified."
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "navigationLabel",
|
34
|
+
"type": "string",
|
35
|
+
"required": false,
|
36
|
+
"description": "The screen reader label for the mobile navigation menu. Defaults to the same value as `menuButtonText` if not specified."
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"name": "navigationId",
|
40
|
+
"type": "string",
|
41
|
+
"required": false,
|
42
|
+
"description": "The ID used to associate the mobile navigation toggle with the navigation menu. Defaults to `navigation`."
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "navigationClasses",
|
46
|
+
"type": "string",
|
47
|
+
"required": false,
|
48
|
+
"description": "Classes to add to the navigation menu container."
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"name": "serviceName",
|
52
|
+
"type": "string",
|
53
|
+
"required": false,
|
54
|
+
"description": "The name of your service."
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "serviceUrl",
|
58
|
+
"type": "string",
|
59
|
+
"required": false,
|
60
|
+
"description": "The homepage of your service."
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "navigation",
|
64
|
+
"type": "array",
|
65
|
+
"required": true,
|
66
|
+
"description": "Used to add navigation to the service header.",
|
67
|
+
"params": [
|
68
|
+
{
|
69
|
+
"name": "current",
|
70
|
+
"type": "boolean",
|
71
|
+
"required": false,
|
72
|
+
"description": "If `true`, indicates that the user is currently on this page. This takes precedence over `active`."
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"name": "active",
|
76
|
+
"type": "boolean",
|
77
|
+
"required": false,
|
78
|
+
"description": "If `true`, indicates that the user is within this group of pages in the navigation hierarchy."
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"name": "html",
|
82
|
+
"type": "string",
|
83
|
+
"required": true,
|
84
|
+
"description": "HTML for the navigation item. If `html` is provided, the `text` option will be ignored."
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"name": "text",
|
88
|
+
"type": "string",
|
89
|
+
"required": true,
|
90
|
+
"description": "Text for the navigation item. If `html` is provided, the `text` option will be ignored."
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"name": "href",
|
94
|
+
"type": "string",
|
95
|
+
"required": false,
|
96
|
+
"description": "URL of the navigation item anchor."
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"name": "attributes",
|
100
|
+
"type": "object",
|
101
|
+
"required": false,
|
102
|
+
"description": "HTML attributes (for example data attributes) to add to the navigation item anchor."
|
103
|
+
}
|
104
|
+
]
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"name": "slots",
|
108
|
+
"type": "object",
|
109
|
+
"required": false,
|
110
|
+
"description": "Specified points for injecting custom HTML into the service header.",
|
111
|
+
"params": [
|
112
|
+
{
|
113
|
+
"name": "start",
|
114
|
+
"type": "string",
|
115
|
+
"required": false,
|
116
|
+
"description": "HTML injected at the start of the service header container."
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"name": "end",
|
120
|
+
"type": "string",
|
121
|
+
"required": false,
|
122
|
+
"description": "HTML injected at the end of the service header container."
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"name": "navigationStart",
|
126
|
+
"type": "string",
|
127
|
+
"required": false,
|
128
|
+
"description": "HTML injected before the first list item in the navigation list. Requires `navigation` to be set."
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"name": "navigationEnd",
|
132
|
+
"type": "string",
|
133
|
+
"required": false,
|
134
|
+
"description": "HTML injected after the last list item in the navigation list. Requires `navigation` to be set."
|
135
|
+
}
|
136
|
+
]
|
137
|
+
}
|
138
|
+
]
|
@@ -0,0 +1,229 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.GOVUKFrontend = global.GOVUKFrontend || {}));
|
5
|
+
})(this, (function (exports) { 'use strict';
|
6
|
+
|
7
|
+
function getBreakpoint(name) {
|
8
|
+
const property = `--govuk-frontend-breakpoint-${name}`;
|
9
|
+
const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);
|
10
|
+
return {
|
11
|
+
property,
|
12
|
+
value: value || undefined
|
13
|
+
};
|
14
|
+
}
|
15
|
+
function isInitialised($root, moduleName) {
|
16
|
+
return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);
|
17
|
+
}
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Checks if GOV.UK Frontend is supported on this page
|
21
|
+
*
|
22
|
+
* Some browsers will load and run our JavaScript but GOV.UK Frontend
|
23
|
+
* won't be supported.
|
24
|
+
*
|
25
|
+
* @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support
|
26
|
+
* @returns {boolean} Whether GOV.UK Frontend is supported on this page
|
27
|
+
*/
|
28
|
+
function isSupported($scope = document.body) {
|
29
|
+
if (!$scope) {
|
30
|
+
return false;
|
31
|
+
}
|
32
|
+
return $scope.classList.contains('govuk-frontend-supported');
|
33
|
+
}
|
34
|
+
function formatErrorMessage(Component, message) {
|
35
|
+
return `${Component.moduleName}: ${message}`;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* @typedef ComponentWithModuleName
|
39
|
+
* @property {string} moduleName - Name of the component
|
40
|
+
*/
|
41
|
+
/**
|
42
|
+
* @import { ObjectNested } from './configuration.mjs'
|
43
|
+
*/
|
44
|
+
|
45
|
+
class GOVUKFrontendError extends Error {
|
46
|
+
constructor(...args) {
|
47
|
+
super(...args);
|
48
|
+
this.name = 'GOVUKFrontendError';
|
49
|
+
}
|
50
|
+
}
|
51
|
+
class SupportError extends GOVUKFrontendError {
|
52
|
+
/**
|
53
|
+
* Checks if GOV.UK Frontend is supported on this page
|
54
|
+
*
|
55
|
+
* @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support
|
56
|
+
*/
|
57
|
+
constructor($scope = document.body) {
|
58
|
+
const 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';
|
59
|
+
super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type="module">`');
|
60
|
+
this.name = 'SupportError';
|
61
|
+
}
|
62
|
+
}
|
63
|
+
class ElementError extends GOVUKFrontendError {
|
64
|
+
constructor(messageOrOptions) {
|
65
|
+
let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';
|
66
|
+
if (typeof messageOrOptions === 'object') {
|
67
|
+
const {
|
68
|
+
component,
|
69
|
+
identifier,
|
70
|
+
element,
|
71
|
+
expectedType
|
72
|
+
} = messageOrOptions;
|
73
|
+
message = identifier;
|
74
|
+
message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';
|
75
|
+
message = formatErrorMessage(component, message);
|
76
|
+
}
|
77
|
+
super(message);
|
78
|
+
this.name = 'ElementError';
|
79
|
+
}
|
80
|
+
}
|
81
|
+
class InitError extends GOVUKFrontendError {
|
82
|
+
constructor(componentOrMessage) {
|
83
|
+
const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\`$root\`) already initialised`);
|
84
|
+
super(message);
|
85
|
+
this.name = 'InitError';
|
86
|
+
}
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* @import { ComponentWithModuleName } from '../common/index.mjs'
|
90
|
+
*/
|
91
|
+
|
92
|
+
class Component {
|
93
|
+
/**
|
94
|
+
* Returns the root element of the component
|
95
|
+
*
|
96
|
+
* @protected
|
97
|
+
* @returns {RootElementType} - the root element of component
|
98
|
+
*/
|
99
|
+
get $root() {
|
100
|
+
return this._$root;
|
101
|
+
}
|
102
|
+
constructor($root) {
|
103
|
+
this._$root = void 0;
|
104
|
+
const childConstructor = this.constructor;
|
105
|
+
if (typeof childConstructor.moduleName !== 'string') {
|
106
|
+
throw new InitError(`\`moduleName\` not defined in component`);
|
107
|
+
}
|
108
|
+
if (!($root instanceof childConstructor.elementType)) {
|
109
|
+
throw new ElementError({
|
110
|
+
element: $root,
|
111
|
+
component: childConstructor,
|
112
|
+
identifier: 'Root element (`$root`)',
|
113
|
+
expectedType: childConstructor.elementType.name
|
114
|
+
});
|
115
|
+
} else {
|
116
|
+
this._$root = $root;
|
117
|
+
}
|
118
|
+
childConstructor.checkSupport();
|
119
|
+
this.checkInitialised();
|
120
|
+
const moduleName = childConstructor.moduleName;
|
121
|
+
this.$root.setAttribute(`data-${moduleName}-init`, '');
|
122
|
+
}
|
123
|
+
checkInitialised() {
|
124
|
+
const constructor = this.constructor;
|
125
|
+
const moduleName = constructor.moduleName;
|
126
|
+
if (moduleName && isInitialised(this.$root, moduleName)) {
|
127
|
+
throw new InitError(constructor);
|
128
|
+
}
|
129
|
+
}
|
130
|
+
static checkSupport() {
|
131
|
+
if (!isSupported()) {
|
132
|
+
throw new SupportError();
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* @typedef ChildClass
|
139
|
+
* @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component
|
140
|
+
*/
|
141
|
+
|
142
|
+
/**
|
143
|
+
* @typedef {typeof Component & ChildClass} ChildClassConstructor
|
144
|
+
*/
|
145
|
+
Component.elementType = HTMLElement;
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Service Navigation component
|
149
|
+
*
|
150
|
+
* @preserve
|
151
|
+
*/
|
152
|
+
class ServiceNavigation extends Component {
|
153
|
+
/**
|
154
|
+
* @param {Element | null} $root - HTML element to use for header
|
155
|
+
*/
|
156
|
+
constructor($root) {
|
157
|
+
super($root);
|
158
|
+
this.$menuButton = void 0;
|
159
|
+
this.$menu = void 0;
|
160
|
+
this.menuIsOpen = false;
|
161
|
+
this.mql = null;
|
162
|
+
const $menuButton = this.$root.querySelector('.govuk-js-service-navigation-toggle');
|
163
|
+
if (!$menuButton) {
|
164
|
+
return this;
|
165
|
+
}
|
166
|
+
const menuId = $menuButton.getAttribute('aria-controls');
|
167
|
+
if (!menuId) {
|
168
|
+
throw new ElementError({
|
169
|
+
component: ServiceNavigation,
|
170
|
+
identifier: 'Navigation button (`<button class="govuk-js-service-navigation-toggle">`) attribute (`aria-controls`)'
|
171
|
+
});
|
172
|
+
}
|
173
|
+
const $menu = document.getElementById(menuId);
|
174
|
+
if (!$menu) {
|
175
|
+
throw new ElementError({
|
176
|
+
component: ServiceNavigation,
|
177
|
+
element: $menu,
|
178
|
+
identifier: `Navigation (\`<ul id="${menuId}">\`)`
|
179
|
+
});
|
180
|
+
}
|
181
|
+
this.$menu = $menu;
|
182
|
+
this.$menuButton = $menuButton;
|
183
|
+
this.setupResponsiveChecks();
|
184
|
+
this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());
|
185
|
+
}
|
186
|
+
setupResponsiveChecks() {
|
187
|
+
const breakpoint = getBreakpoint('tablet');
|
188
|
+
if (!breakpoint.value) {
|
189
|
+
throw new ElementError({
|
190
|
+
component: ServiceNavigation,
|
191
|
+
identifier: `CSS custom property (\`${breakpoint.property}\`) on pseudo-class \`:root\``
|
192
|
+
});
|
193
|
+
}
|
194
|
+
this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);
|
195
|
+
if ('addEventListener' in this.mql) {
|
196
|
+
this.mql.addEventListener('change', () => this.checkMode());
|
197
|
+
} else {
|
198
|
+
this.mql.addListener(() => this.checkMode());
|
199
|
+
}
|
200
|
+
this.checkMode();
|
201
|
+
}
|
202
|
+
checkMode() {
|
203
|
+
if (!this.mql || !this.$menu || !this.$menuButton) {
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
if (this.mql.matches) {
|
207
|
+
this.$menu.removeAttribute('hidden');
|
208
|
+
this.$menuButton.setAttribute('hidden', '');
|
209
|
+
} else {
|
210
|
+
this.$menuButton.removeAttribute('hidden');
|
211
|
+
this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
|
212
|
+
if (this.menuIsOpen) {
|
213
|
+
this.$menu.removeAttribute('hidden');
|
214
|
+
} else {
|
215
|
+
this.$menu.setAttribute('hidden', '');
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
handleMenuButtonClick() {
|
220
|
+
this.menuIsOpen = !this.menuIsOpen;
|
221
|
+
this.checkMode();
|
222
|
+
}
|
223
|
+
}
|
224
|
+
ServiceNavigation.moduleName = 'govuk-service-navigation';
|
225
|
+
|
226
|
+
exports.ServiceNavigation = ServiceNavigation;
|
227
|
+
|
228
|
+
}));
|
229
|
+
//# sourceMappingURL=service-navigation.bundle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"service-navigation.bundle.js","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/errors/index.mjs","../../../../src/govuk/component.mjs","../../../../src/govuk/components/service-navigation/service-navigation.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n */\n\n/**\n * Get hash fragment from URL\n *\n * Extract the hash fragment (everything after the hash) from a URL,\n * but not including the hash symbol\n *\n * @private\n * @param {string} url - URL\n * @returns {string | undefined} Fragment from URL, without the hash\n */\nexport function getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined\n }\n\n return url.split('#').pop()\n}\n\n/**\n * Get GOV.UK Frontend breakpoint value from CSS custom property\n *\n * @private\n * @param {string} name - Breakpoint name\n * @returns {{ property: string, value?: string }} Breakpoint object\n */\nexport function getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`\n\n // Get value from `<html>` with breakpoints on CSS :root\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(property)\n\n return {\n property,\n value: value || undefined\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @private\n * @template {HTMLElement} FocusElement\n * @param {FocusElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: FocusElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: FocusElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element)\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n options.onBeforeFocus?.call($element)\n $element.focus()\n}\n\n/**\n * Checks if component is already initialised\n *\n * @internal\n * @param {Element} $root - HTML element to be checked\n * @param {string} moduleName - name of component module\n * @returns {boolean} Whether component is already initialised\n */\nexport function isInitialised($root, moduleName) {\n return (\n $root instanceof HTMLElement &&\n $root.hasAttribute(`data-${moduleName}-init`)\n )\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nexport function isSupported($scope = document.body) {\n if (!$scope) {\n return false\n }\n\n return $scope.classList.contains('govuk-frontend-supported')\n}\n\n/**\n * Check for an array\n *\n * @internal\n * @param {unknown} option - Option to check\n * @returns {boolean} Whether the option is an array\n */\nfunction isArray(option) {\n return Array.isArray(option)\n}\n\n/**\n * Check for an object\n *\n * @internal\n * @template {Partial<Record<keyof ObjectType, unknown>>} [ObjectType=ObjectNested]\n * @param {unknown | ObjectType} option - Option to check\n * @returns {option is ObjectType} Whether the option is an object\n */\nexport function isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option)\n}\n\n/**\n * Format error message\n *\n * @internal\n * @param {ComponentWithModuleName} Component - Component that threw the error\n * @param {string} message - Error message\n * @returns {string} - Formatted error message\n */\nexport function formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`\n}\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * @import { ObjectNested } from './configuration.mjs'\n */\n","import { formatErrorMessage } from '../common/index.mjs'\n\n/**\n * GOV.UK Frontend error\n *\n * A base class for `Error`s thrown by GOV.UK Frontend.\n *\n * It is meant to be extended into specific types of errors\n * to be thrown by our code.\n *\n * @example\n * ```js\n * class MissingRootError extends GOVUKFrontendError {\n * // Setting an explicit name is important as extending the class will not\n * // set a new `name` on the subclass. The `name` property is important\n * // to ensure intelligible error names even if the class name gets\n * // mangled by a minifier\n * name = \"MissingRootError\"\n * }\n * ```\n * @virtual\n */\nexport class GOVUKFrontendError extends Error {\n name = 'GOVUKFrontendError'\n}\n\n/**\n * Indicates that GOV.UK Frontend is not supported\n */\nexport class SupportError extends GOVUKFrontendError {\n name = 'SupportError'\n\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage =\n 'noModule' in HTMLScriptElement.prototype\n ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet'\n : 'GOV.UK Frontend is not supported in this browser'\n\n super(\n $scope\n ? supportMessage\n : 'GOV.UK Frontend initialised without `<script type=\"module\">`'\n )\n }\n}\n\n/**\n * Indicates that a component has received an illegal configuration\n */\nexport class ConfigError extends GOVUKFrontendError {\n name = 'ConfigError'\n}\n\n/**\n * Indicates an issue with an element (possibly `null` or `undefined`)\n */\nexport class ElementError extends GOVUKFrontendError {\n name = 'ElementError'\n\n /**\n * @internal\n * @overload\n * @param {string} message - Element error message\n */\n\n /**\n * @internal\n * @overload\n * @param {ElementErrorOptions} options - Element error options\n */\n\n /**\n * @internal\n * @param {string | ElementErrorOptions} messageOrOptions - Element error message or options\n */\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : ''\n\n // Build message from options\n if (typeof messageOrOptions === 'object') {\n const { component, identifier, element, expectedType } = messageOrOptions\n\n message = identifier\n\n // Append reason\n message += element\n ? ` is not of type ${expectedType ?? 'HTMLElement'}`\n : ' not found'\n\n message = formatErrorMessage(component, message)\n }\n\n super(message)\n }\n}\n\n/**\n * Indicates that a component is already initialised\n */\nexport class InitError extends GOVUKFrontendError {\n name = 'InitError'\n\n /**\n * @internal\n * @param {ComponentWithModuleName | string} componentOrMessage - name of the component module\n */\n constructor(componentOrMessage) {\n const message =\n typeof componentOrMessage === 'string'\n ? componentOrMessage\n : formatErrorMessage(\n componentOrMessage,\n `Root element (\\`$root\\`) already initialised`\n )\n\n super(message)\n }\n}\n\n/**\n * Element error options\n *\n * @internal\n * @typedef {object} ElementErrorOptions\n * @property {string} identifier - An identifier that'll let the user understand which element has an error. This is whatever makes the most sense\n * @property {Element | null} [element] - The element in error\n * @property {string} [expectedType] - The type that was expected for the identifier\n * @property {ComponentWithModuleName} component - Component throwing the error\n */\n\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n","import { isInitialised, isSupported } from './common/index.mjs'\nimport { ElementError, InitError, SupportError } from './errors/index.mjs'\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Element} [RootElementType=HTMLElement]\n */\nexport class Component {\n /**\n * @type {typeof Element}\n */\n static elementType = HTMLElement\n\n // allows Typescript user to work around the lack of types\n // in GOVUKFrontend package, Typescript is not aware of $root\n // in components that extend GOVUKFrontendComponent\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root\n }\n\n /**\n * @protected\n * @type {RootElementType}\n */\n _$root\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n */\n constructor($root) {\n const childConstructor = /** @type {ChildClassConstructor} */ (\n this.constructor\n )\n\n // TypeScript does not enforce that inheriting classes will define a `moduleName`\n // (even if we add a `@virtual` `static moduleName` property to this class).\n // While we trust users to do this correctly, we do a little check to provide them\n // a helpful error message.\n //\n // After this, we'll be sure that `childConstructor` has a `moduleName`\n // as expected of the `ChildClassConstructor` we've cast `this.constructor` to.\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`)\n }\n\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n })\n } else {\n this._$root = /** @type {RootElementType} */ ($root)\n }\n\n childConstructor.checkSupport()\n\n this.checkInitialised()\n\n const moduleName = childConstructor.moduleName\n\n this.$root.setAttribute(`data-${moduleName}-init`, '')\n }\n\n /**\n * Validates whether component is already initialised\n *\n * @private\n * @throws {InitError} when component is already initialised\n */\n checkInitialised() {\n const constructor = /** @type {ChildClassConstructor} */ (this.constructor)\n const moduleName = constructor.moduleName\n\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor)\n }\n }\n\n /**\n * Validates whether components are supported\n *\n * @throws {SupportError} when the components are not supported\n */\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\n","import { getBreakpoint } from '../../common/index.mjs'\nimport { Component } from '../../component.mjs'\nimport { ElementError } from '../../errors/index.mjs'\n\n/**\n * Service Navigation component\n *\n * @preserve\n */\nexport class ServiceNavigation extends Component {\n /** @private */\n $menuButton\n\n /** @private */\n $menu\n\n /**\n * Remember the open/closed state of the nav so we can maintain it when the\n * screen is resized.\n *\n * @private\n */\n menuIsOpen = false\n\n /**\n * A global const for storing a matchMedia instance which we'll use to detect\n * when a screen size change happens. We rely on it being null if the feature\n * isn't available to initially apply hidden attributes\n *\n * @private\n * @type {MediaQueryList | null}\n */\n mql = null\n\n /**\n * @param {Element | null} $root - HTML element to use for header\n */\n constructor($root) {\n super($root)\n\n const $menuButton = this.$root.querySelector(\n '.govuk-js-service-navigation-toggle'\n )\n\n // Headers don't necessarily have a navigation. When they don't, the menu\n // toggle won't be rendered by our macro (or may be omitted when writing\n // plain HTML)\n if (!$menuButton) {\n return this\n }\n\n const menuId = $menuButton.getAttribute('aria-controls')\n if (!menuId) {\n throw new ElementError({\n component: ServiceNavigation,\n identifier:\n 'Navigation button (`<button class=\"govuk-js-service-navigation-toggle\">`) attribute (`aria-controls`)'\n })\n }\n\n const $menu = document.getElementById(menuId)\n if (!$menu) {\n throw new ElementError({\n component: ServiceNavigation,\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n })\n }\n\n this.$menu = $menu\n this.$menuButton = $menuButton\n\n this.setupResponsiveChecks()\n\n this.$menuButton.addEventListener('click', () =>\n this.handleMenuButtonClick()\n )\n }\n\n /**\n * Setup viewport resize check\n *\n * @private\n */\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet')\n\n if (!breakpoint.value) {\n throw new ElementError({\n component: ServiceNavigation,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n })\n }\n\n // Media query list for GOV.UK Frontend desktop breakpoint\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`)\n\n // MediaQueryList.addEventListener isn't supported by Safari < 14 so we need\n // to be able to fall back to the deprecated MediaQueryList.addListener\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode())\n } else {\n // @ts-expect-error Property 'addListener' does not exist\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n this.mql.addListener(() => this.checkMode())\n }\n\n this.checkMode()\n }\n\n /**\n * Sync menu state\n *\n * Uses the global variable menuIsOpen to correctly set the accessible and\n * visual states of the menu and the menu button.\n * Additionally will force the menu to be visible and the menu button to be\n * hidden if the matchMedia is triggered to desktop.\n *\n * @private\n */\n checkMode() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return\n }\n\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden')\n this.$menuButton.setAttribute('hidden', '')\n } else {\n this.$menuButton.removeAttribute('hidden')\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString())\n\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden')\n } else {\n this.$menu.setAttribute('hidden', '')\n }\n }\n }\n\n /**\n * Handle menu button click\n *\n * When the menu button is clicked, change the visibility of the menu and then\n * sync the accessibility state and menu button state\n *\n * @private\n */\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen\n this.checkMode()\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-service-navigation'\n}\n"],"names":["getBreakpoint","name","property","value","window","getComputedStyle","document","documentElement","getPropertyValue","undefined","isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","body","classList","contains","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","SupportError","supportMessage","HTMLScriptElement","prototype","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_$root","childConstructor","elementType","checkSupport","checkInitialised","setAttribute","ServiceNavigation","$menuButton","$menu","menuIsOpen","mql","querySelector","menuId","getAttribute","getElementById","setupResponsiveChecks","addEventListener","handleMenuButtonClick","breakpoint","matchMedia","checkMode","addListener","matches","removeAttribute","toString"],"mappings":"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"}
|
@@ -0,0 +1,221 @@
|
|
1
|
+
function getBreakpoint(name) {
|
2
|
+
const property = `--govuk-frontend-breakpoint-${name}`;
|
3
|
+
const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);
|
4
|
+
return {
|
5
|
+
property,
|
6
|
+
value: value || undefined
|
7
|
+
};
|
8
|
+
}
|
9
|
+
function isInitialised($root, moduleName) {
|
10
|
+
return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);
|
11
|
+
}
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Checks if GOV.UK Frontend is supported on this page
|
15
|
+
*
|
16
|
+
* Some browsers will load and run our JavaScript but GOV.UK Frontend
|
17
|
+
* won't be supported.
|
18
|
+
*
|
19
|
+
* @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support
|
20
|
+
* @returns {boolean} Whether GOV.UK Frontend is supported on this page
|
21
|
+
*/
|
22
|
+
function isSupported($scope = document.body) {
|
23
|
+
if (!$scope) {
|
24
|
+
return false;
|
25
|
+
}
|
26
|
+
return $scope.classList.contains('govuk-frontend-supported');
|
27
|
+
}
|
28
|
+
function formatErrorMessage(Component, message) {
|
29
|
+
return `${Component.moduleName}: ${message}`;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* @typedef ComponentWithModuleName
|
33
|
+
* @property {string} moduleName - Name of the component
|
34
|
+
*/
|
35
|
+
/**
|
36
|
+
* @import { ObjectNested } from './configuration.mjs'
|
37
|
+
*/
|
38
|
+
|
39
|
+
class GOVUKFrontendError extends Error {
|
40
|
+
constructor(...args) {
|
41
|
+
super(...args);
|
42
|
+
this.name = 'GOVUKFrontendError';
|
43
|
+
}
|
44
|
+
}
|
45
|
+
class SupportError extends GOVUKFrontendError {
|
46
|
+
/**
|
47
|
+
* Checks if GOV.UK Frontend is supported on this page
|
48
|
+
*
|
49
|
+
* @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support
|
50
|
+
*/
|
51
|
+
constructor($scope = document.body) {
|
52
|
+
const 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';
|
53
|
+
super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type="module">`');
|
54
|
+
this.name = 'SupportError';
|
55
|
+
}
|
56
|
+
}
|
57
|
+
class ElementError extends GOVUKFrontendError {
|
58
|
+
constructor(messageOrOptions) {
|
59
|
+
let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';
|
60
|
+
if (typeof messageOrOptions === 'object') {
|
61
|
+
const {
|
62
|
+
component,
|
63
|
+
identifier,
|
64
|
+
element,
|
65
|
+
expectedType
|
66
|
+
} = messageOrOptions;
|
67
|
+
message = identifier;
|
68
|
+
message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';
|
69
|
+
message = formatErrorMessage(component, message);
|
70
|
+
}
|
71
|
+
super(message);
|
72
|
+
this.name = 'ElementError';
|
73
|
+
}
|
74
|
+
}
|
75
|
+
class InitError extends GOVUKFrontendError {
|
76
|
+
constructor(componentOrMessage) {
|
77
|
+
const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\`$root\`) already initialised`);
|
78
|
+
super(message);
|
79
|
+
this.name = 'InitError';
|
80
|
+
}
|
81
|
+
}
|
82
|
+
/**
|
83
|
+
* @import { ComponentWithModuleName } from '../common/index.mjs'
|
84
|
+
*/
|
85
|
+
|
86
|
+
class Component {
|
87
|
+
/**
|
88
|
+
* Returns the root element of the component
|
89
|
+
*
|
90
|
+
* @protected
|
91
|
+
* @returns {RootElementType} - the root element of component
|
92
|
+
*/
|
93
|
+
get $root() {
|
94
|
+
return this._$root;
|
95
|
+
}
|
96
|
+
constructor($root) {
|
97
|
+
this._$root = void 0;
|
98
|
+
const childConstructor = this.constructor;
|
99
|
+
if (typeof childConstructor.moduleName !== 'string') {
|
100
|
+
throw new InitError(`\`moduleName\` not defined in component`);
|
101
|
+
}
|
102
|
+
if (!($root instanceof childConstructor.elementType)) {
|
103
|
+
throw new ElementError({
|
104
|
+
element: $root,
|
105
|
+
component: childConstructor,
|
106
|
+
identifier: 'Root element (`$root`)',
|
107
|
+
expectedType: childConstructor.elementType.name
|
108
|
+
});
|
109
|
+
} else {
|
110
|
+
this._$root = $root;
|
111
|
+
}
|
112
|
+
childConstructor.checkSupport();
|
113
|
+
this.checkInitialised();
|
114
|
+
const moduleName = childConstructor.moduleName;
|
115
|
+
this.$root.setAttribute(`data-${moduleName}-init`, '');
|
116
|
+
}
|
117
|
+
checkInitialised() {
|
118
|
+
const constructor = this.constructor;
|
119
|
+
const moduleName = constructor.moduleName;
|
120
|
+
if (moduleName && isInitialised(this.$root, moduleName)) {
|
121
|
+
throw new InitError(constructor);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
static checkSupport() {
|
125
|
+
if (!isSupported()) {
|
126
|
+
throw new SupportError();
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @typedef ChildClass
|
133
|
+
* @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component
|
134
|
+
*/
|
135
|
+
|
136
|
+
/**
|
137
|
+
* @typedef {typeof Component & ChildClass} ChildClassConstructor
|
138
|
+
*/
|
139
|
+
Component.elementType = HTMLElement;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Service Navigation component
|
143
|
+
*
|
144
|
+
* @preserve
|
145
|
+
*/
|
146
|
+
class ServiceNavigation extends Component {
|
147
|
+
/**
|
148
|
+
* @param {Element | null} $root - HTML element to use for header
|
149
|
+
*/
|
150
|
+
constructor($root) {
|
151
|
+
super($root);
|
152
|
+
this.$menuButton = void 0;
|
153
|
+
this.$menu = void 0;
|
154
|
+
this.menuIsOpen = false;
|
155
|
+
this.mql = null;
|
156
|
+
const $menuButton = this.$root.querySelector('.govuk-js-service-navigation-toggle');
|
157
|
+
if (!$menuButton) {
|
158
|
+
return this;
|
159
|
+
}
|
160
|
+
const menuId = $menuButton.getAttribute('aria-controls');
|
161
|
+
if (!menuId) {
|
162
|
+
throw new ElementError({
|
163
|
+
component: ServiceNavigation,
|
164
|
+
identifier: 'Navigation button (`<button class="govuk-js-service-navigation-toggle">`) attribute (`aria-controls`)'
|
165
|
+
});
|
166
|
+
}
|
167
|
+
const $menu = document.getElementById(menuId);
|
168
|
+
if (!$menu) {
|
169
|
+
throw new ElementError({
|
170
|
+
component: ServiceNavigation,
|
171
|
+
element: $menu,
|
172
|
+
identifier: `Navigation (\`<ul id="${menuId}">\`)`
|
173
|
+
});
|
174
|
+
}
|
175
|
+
this.$menu = $menu;
|
176
|
+
this.$menuButton = $menuButton;
|
177
|
+
this.setupResponsiveChecks();
|
178
|
+
this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());
|
179
|
+
}
|
180
|
+
setupResponsiveChecks() {
|
181
|
+
const breakpoint = getBreakpoint('tablet');
|
182
|
+
if (!breakpoint.value) {
|
183
|
+
throw new ElementError({
|
184
|
+
component: ServiceNavigation,
|
185
|
+
identifier: `CSS custom property (\`${breakpoint.property}\`) on pseudo-class \`:root\``
|
186
|
+
});
|
187
|
+
}
|
188
|
+
this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);
|
189
|
+
if ('addEventListener' in this.mql) {
|
190
|
+
this.mql.addEventListener('change', () => this.checkMode());
|
191
|
+
} else {
|
192
|
+
this.mql.addListener(() => this.checkMode());
|
193
|
+
}
|
194
|
+
this.checkMode();
|
195
|
+
}
|
196
|
+
checkMode() {
|
197
|
+
if (!this.mql || !this.$menu || !this.$menuButton) {
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
if (this.mql.matches) {
|
201
|
+
this.$menu.removeAttribute('hidden');
|
202
|
+
this.$menuButton.setAttribute('hidden', '');
|
203
|
+
} else {
|
204
|
+
this.$menuButton.removeAttribute('hidden');
|
205
|
+
this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
|
206
|
+
if (this.menuIsOpen) {
|
207
|
+
this.$menu.removeAttribute('hidden');
|
208
|
+
} else {
|
209
|
+
this.$menu.setAttribute('hidden', '');
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
handleMenuButtonClick() {
|
214
|
+
this.menuIsOpen = !this.menuIsOpen;
|
215
|
+
this.checkMode();
|
216
|
+
}
|
217
|
+
}
|
218
|
+
ServiceNavigation.moduleName = 'govuk-service-navigation';
|
219
|
+
|
220
|
+
export { ServiceNavigation };
|
221
|
+
//# sourceMappingURL=service-navigation.bundle.mjs.map
|