govuk_publishing_components 67.0.1 → 68.0.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/assets/config/govuk_publishing_components_manifest.js +1 -1
- data/app/assets/stylesheets/component_guide/application.scss +12 -18
- data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +6 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_app-promo-banner.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list-with-body.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +14 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_devolved-nations.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +3 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_glance-metric.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +30 -51
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +23 -23
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_pagination.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_search-with-autocomplete.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_secondary-navigation.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_select-with-search.scss +15 -15
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +11 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_sub-navigation-menu.scss +9 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +15 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_tag.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.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 +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_colours.scss +9 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/lib/_link.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/settings/_custom-properties.scss +9 -0
- data/app/assets/stylesheets/govuk_publishing_components/settings/_index.scss +1 -2
- data/app/assets/stylesheets/govuk_publishing_components/specific-components.scss +2 -0
- data/app/views/govuk_publishing_components/components/_cross_service_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_glance_metric.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +20 -18
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +14 -36
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_tag.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_external.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_pdf.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/cross_service_header.yml +0 -1
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +24 -3
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -15
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +1 -3
- data/app/views/govuk_publishing_components/components/docs/tag.yml +4 -8
- data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +4 -13
- data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -1
- data/config/initializers/assets.rb +1 -1
- data/config/locales/cy.yml +4 -4
- data/config/locales/en.yml +4 -4
- data/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb +5 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +1 -1
- data/node_modules/govuk-frontend/dist/govuk/_base.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/_base.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +21 -95
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +22 -95
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +0 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +14 -11
- 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.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +16 -19
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +7 -95
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +12 -19
- data/node_modules/govuk-frontend/dist/govuk/components/button/template.njk +8 -20
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -2
- 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 +19 -9
- 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 +19 -9
- 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 +19 -9
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -6
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -5
- 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 +4 -40
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-with-html.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -2
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +1 -1
- 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.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +28 -37
- 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.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +18 -23
- 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 +25 -38
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +0 -6
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-default.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-full-gds-example.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-three-equal-columns.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-html-content-licence-and-copyright-notice.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-meta.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-text-content-licence-and-copyright-notice.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-one-column.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-two-columns.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta-links-and-meta-content.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-navigation.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-no-content-licence.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-custom-meta.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-meta-links.html +23 -2
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +6 -11
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +85 -457
- 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 +7 -536
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +2 -101
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +7 -6
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +7 -6
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +7 -6
- data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +4 -50
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -5
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +8 -6
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +9 -10
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
- 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.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +12 -6
- 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 -7
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template-default.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -6
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +5 -4
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +50 -71
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +7 -32
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +9 -5
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +7 -8
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +8 -5
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +66 -31
- 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 +6 -18
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-pink.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-turquoise.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +7 -5
- 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 +13 -25
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-all-possible-colours.html +12 -24
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-hint-text-and-additional-states.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +4 -3
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +4 -3
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -17
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +17 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +15 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +17 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss.map +1 -0
- 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 +168 -82
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +8 -7
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +23 -39
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +2 -26
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.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 +1 -2
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +4 -26
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +2 -6
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +0 -2
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +3 -188
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +366 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +8 -254
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +117 -25
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +18 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +3 -14
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -16
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +12 -189
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/template.njk +61 -23
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +1 -1
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -4
- data/node_modules/govuk-frontend/package.json +13 -12
- metadata +14 -56
- data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +0 -3
- data/app/assets/stylesheets/govuk_publishing_components/settings/_colours.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/settings/_typography.scss +0 -1
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +0 -34
- data/node_modules/govuk-frontend/dist/govuk/all.scss +0 -9
- data/node_modules/govuk-frontend/dist/govuk/all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +0 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +0 -39
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/template-input.html +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +0 -238
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -230
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +0 -89
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +0 -54
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +0 -54
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +0 -48
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +0 -29
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html +0 -119
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html +0 -59
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-and-navigation.html +0 -62
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-but-no-service-url.html +0 -34
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name.html +0 -34
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-st-edwards-crown.html +0 -19
- data/node_modules/govuk-frontend/dist/govuk/components/tag/template-light-blue.html +0 -3
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +0 -15
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +0 -9
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +0 -65
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +0 -10
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +0 -25
data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml
CHANGED
|
@@ -16,10 +16,8 @@ accessibility_criteria: |
|
|
|
16
16
|
|
|
17
17
|
Landmarks and Roles in the super navigation header should:
|
|
18
18
|
|
|
19
|
-
*
|
|
19
|
+
* sit within the primary header element (<header>) provided by the page layout
|
|
20
20
|
accessibility_excluded_rules:
|
|
21
|
-
# The header element can not be top level in the examples.
|
|
22
|
-
- landmark-banner-is-top-level
|
|
23
21
|
# Banners will be duplicated in component examples list.
|
|
24
22
|
- duplicate-id
|
|
25
23
|
- duplicate-id-active
|
|
@@ -23,26 +23,22 @@ examples:
|
|
|
23
23
|
data:
|
|
24
24
|
text: Hello world!
|
|
25
25
|
colour: green
|
|
26
|
-
|
|
26
|
+
teal:
|
|
27
27
|
data:
|
|
28
28
|
text: Hello world!
|
|
29
|
-
colour:
|
|
29
|
+
colour: teal
|
|
30
30
|
blue:
|
|
31
31
|
data:
|
|
32
32
|
text: Hello world!
|
|
33
33
|
colour: blue
|
|
34
|
-
light_blue:
|
|
35
|
-
data:
|
|
36
|
-
text: Hello world!
|
|
37
|
-
colour: light-blue
|
|
38
34
|
purple:
|
|
39
35
|
data:
|
|
40
36
|
text: Hello world!
|
|
41
37
|
colour: purple
|
|
42
|
-
|
|
38
|
+
magenta:
|
|
43
39
|
data:
|
|
44
40
|
text: Hello world!
|
|
45
|
-
colour:
|
|
41
|
+
colour: magenta
|
|
46
42
|
red:
|
|
47
43
|
data:
|
|
48
44
|
text: Hello world!
|
|
@@ -8,18 +8,11 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
environment_exists = environment.present?
|
|
11
|
-
deprecated_navigation ||= false
|
|
12
11
|
signout_link ||= false
|
|
13
12
|
%>
|
|
14
13
|
|
|
15
|
-
<% if environment_exists && deprecated_navigation %>
|
|
16
|
-
<div class="gem-c-header__environment">
|
|
17
|
-
<%= render "govuk_publishing_components/components/tag", { text: environment, colour: colour_map[environment.downcase] } %>
|
|
18
|
-
</div>
|
|
19
|
-
<% end %>
|
|
20
|
-
|
|
21
14
|
<div class="govuk-header__logo gem-c-header__logo">
|
|
22
|
-
<a href="<%= logo_link %>" class="govuk-
|
|
15
|
+
<a href="<%= logo_link %>" class="govuk-header__homepage-link">
|
|
23
16
|
<%= render "govuk_publishing_components/components/govuk_logo/govuk_logo" %>
|
|
24
17
|
<% if product_name %>
|
|
25
18
|
<span class="govuk-header__product-name gem-c-header__product-name">
|
|
@@ -27,7 +20,7 @@
|
|
|
27
20
|
</span>
|
|
28
21
|
<% end %>
|
|
29
22
|
</a>
|
|
30
|
-
<% if environment_exists
|
|
23
|
+
<% if environment_exists %>
|
|
31
24
|
<div class="gem-c-header__environment">
|
|
32
25
|
<%= render "govuk_publishing_components/components/tag", { text: environment, colour: colour_map[environment.downcase] } %>
|
|
33
26
|
</div>
|
|
@@ -35,9 +28,7 @@
|
|
|
35
28
|
</div>
|
|
36
29
|
|
|
37
30
|
<% if signout_link %>
|
|
38
|
-
<div class="
|
|
39
|
-
<
|
|
40
|
-
<a class="govuk-header__link govuk-!-font-weight-bold" href="/auth/gds/sign_out">Sign out</a>
|
|
41
|
-
</nav>
|
|
31
|
+
<div class="gem-c-layout-header__signout">
|
|
32
|
+
<a class="gem-c-layout-header__signout-link govuk-!-font-weight-bold" href="/auth/gds/sign_out">Sign out</a>
|
|
42
33
|
</div>
|
|
43
34
|
<% end %>
|
|
@@ -9,7 +9,7 @@ return unless Rails.application.config.respond_to?(:assets)
|
|
|
9
9
|
Rails.application.config.assets.precompile += %w[govuk_publishing_components_manifest.js]
|
|
10
10
|
|
|
11
11
|
Rails.application.config.assets.paths += %W[
|
|
12
|
-
#{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/
|
|
12
|
+
#{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/images
|
|
13
13
|
#{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/fonts
|
|
14
14
|
#{__dir__}/../../node_modules/govuk-frontend/dist
|
|
15
15
|
#{__dir__}/../../node_modules/
|
data/config/locales/cy.yml
CHANGED
|
@@ -80,15 +80,15 @@ cy:
|
|
|
80
80
|
aria_label:
|
|
81
81
|
england:
|
|
82
82
|
end: " a Lloegr"
|
|
83
|
-
middle: "
|
|
83
|
+
middle: "Lloegr"
|
|
84
84
|
start: Loegr
|
|
85
85
|
northern_ireland:
|
|
86
86
|
end: " a Gogledd Iwerddon"
|
|
87
|
-
middle: "
|
|
87
|
+
middle: "Gogledd Iwerddon"
|
|
88
88
|
start: Ogledd Iwerddon
|
|
89
89
|
scotland:
|
|
90
90
|
end: " a'r Alban"
|
|
91
|
-
middle: "
|
|
91
|
+
middle: "yr Alban"
|
|
92
92
|
start: "'r Alban"
|
|
93
93
|
type:
|
|
94
94
|
consultation: Ymgynghoriad ar gyfer %{nation}
|
|
@@ -97,7 +97,7 @@ cy:
|
|
|
97
97
|
publication: Cyhoeddiad ar gyfer %{nation}
|
|
98
98
|
wales:
|
|
99
99
|
end: " a Chymru"
|
|
100
|
-
middle: "
|
|
100
|
+
middle: "Cymru"
|
|
101
101
|
start: Gymru
|
|
102
102
|
feedback:
|
|
103
103
|
close: Cau
|
data/config/locales/en.yml
CHANGED
|
@@ -75,15 +75,15 @@ en:
|
|
|
75
75
|
aria_label: Nation
|
|
76
76
|
england:
|
|
77
77
|
end: " and England"
|
|
78
|
-
middle: "
|
|
78
|
+
middle: "England"
|
|
79
79
|
start: England
|
|
80
80
|
northern_ireland:
|
|
81
81
|
end: " and Northern Ireland"
|
|
82
|
-
middle: "
|
|
82
|
+
middle: "Northern Ireland"
|
|
83
83
|
start: Northern Ireland
|
|
84
84
|
scotland:
|
|
85
85
|
end: " and Scotland"
|
|
86
|
-
middle: "
|
|
86
|
+
middle: "Scotland"
|
|
87
87
|
start: Scotland
|
|
88
88
|
type:
|
|
89
89
|
consultation: Consultation for %{nation}
|
|
@@ -92,7 +92,7 @@ en:
|
|
|
92
92
|
publication: Publication for %{nation}
|
|
93
93
|
wales:
|
|
94
94
|
end: " and Wales"
|
|
95
|
-
middle: "
|
|
95
|
+
middle: "Wales"
|
|
96
96
|
start: Wales
|
|
97
97
|
feedback:
|
|
98
98
|
close: Cancel
|
|
@@ -15,15 +15,16 @@ module GovukPublishingComponents
|
|
|
15
15
|
nation_keys.each_with_index.map { |k, i| name_for_position(k, i, nation_keys.count, use_english_translation) }.join
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def name_for_position(nation, position, total, use_english_translation)
|
|
18
|
+
def name_for_position(nation, position, total, use_english_translation, cy_initial_mutation: true)
|
|
19
19
|
key = if position.zero?
|
|
20
|
-
:start
|
|
20
|
+
cy_initial_mutation ? :start : :middle
|
|
21
21
|
elsif position == (total - 1)
|
|
22
22
|
:end
|
|
23
23
|
else
|
|
24
24
|
:middle
|
|
25
25
|
end
|
|
26
|
-
I18n.t("components.devolved_nations.#{nation}.#{key}", locale: use_english_translation ? :en : nil)
|
|
26
|
+
name = I18n.t("components.devolved_nations.#{nation}.#{key}", locale: use_english_translation ? :en : nil)
|
|
27
|
+
position.zero? || position == (total - 1) ? name : ", #{name}"
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
def ga4_applicable_nations_title_text(remove_connector_word = nil)
|
|
@@ -41,7 +42,7 @@ module GovukPublishingComponents
|
|
|
41
42
|
|
|
42
43
|
url_to_nation_keys.transform_values do |nation_keys|
|
|
43
44
|
nations_text = nation_keys.each_with_index.map { |key, index|
|
|
44
|
-
name_for_position(key, index, nation_keys.count,
|
|
45
|
+
name_for_position(key, index, nation_keys.count, false, cy_initial_mutation: false)
|
|
45
46
|
}.join
|
|
46
47
|
|
|
47
48
|
alternative_content_text(nations_text)
|
|
@@ -37,7 +37,7 @@ imports) if you want to override GOV.UK Frontend with your own styles.
|
|
|
37
37
|
To import add the below to your Sass file:
|
|
38
38
|
|
|
39
39
|
```scss
|
|
40
|
-
@import "node_modules/govuk-frontend/dist/govuk/
|
|
40
|
+
@import "node_modules/govuk-frontend/dist/govuk/index";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[More details on importing styles](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#css)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/govuk/_base.scss"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,qBAAqB;AACrB,uBAAuB","file":"_base.scss","sourcesContent":["@import \"settings/index\";\n@import \"tools/index\";\n@import \"helpers/index\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/govuk/_base.scss"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,qBAAqB;AACrB,uBAAuB;AACvB,iCAAiC","file":"_base.scss","sourcesContent":["@import \"settings/index\";\n@import \"tools/index\";\n@import \"helpers/index\";\n@import \"custom-properties/index\";\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.GOVUKFrontend = global.GOVUKFrontend || {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
const version = '
|
|
7
|
+
const version = '6.0.0';
|
|
8
8
|
|
|
9
9
|
function getBreakpoint(name) {
|
|
10
10
|
const property = `--govuk-breakpoint-${name}`;
|
|
@@ -886,6 +886,7 @@
|
|
|
886
886
|
var _ref, _this$config$maxwords;
|
|
887
887
|
super($root, config);
|
|
888
888
|
this.$textarea = void 0;
|
|
889
|
+
this.count = 0;
|
|
889
890
|
this.$visibleCountMessage = void 0;
|
|
890
891
|
this.$screenReaderCountMessage = void 0;
|
|
891
892
|
this.lastInputTimestamp = null;
|
|
@@ -941,15 +942,22 @@
|
|
|
941
942
|
$textareaDescription.classList.add('govuk-visually-hidden');
|
|
942
943
|
this.$textarea.removeAttribute('maxlength');
|
|
943
944
|
this.bindChangeEvents();
|
|
944
|
-
window.addEventListener('pageshow', () =>
|
|
945
|
+
window.addEventListener('pageshow', () => {
|
|
946
|
+
if (this.$textarea.value !== this.$textarea.textContent) {
|
|
947
|
+
this.updateCount();
|
|
948
|
+
this.updateCountMessage();
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
this.updateCount();
|
|
945
952
|
this.updateCountMessage();
|
|
946
953
|
}
|
|
947
954
|
bindChangeEvents() {
|
|
948
|
-
this.$textarea.addEventListener('
|
|
955
|
+
this.$textarea.addEventListener('input', () => this.handleInput());
|
|
949
956
|
this.$textarea.addEventListener('focus', () => this.handleFocus());
|
|
950
957
|
this.$textarea.addEventListener('blur', () => this.handleBlur());
|
|
951
958
|
}
|
|
952
|
-
|
|
959
|
+
handleInput() {
|
|
960
|
+
this.updateCount();
|
|
953
961
|
this.updateVisibleCountMessage();
|
|
954
962
|
this.lastInputTimestamp = Date.now();
|
|
955
963
|
}
|
|
@@ -976,7 +984,7 @@
|
|
|
976
984
|
this.updateScreenReaderCountMessage();
|
|
977
985
|
}
|
|
978
986
|
updateVisibleCountMessage() {
|
|
979
|
-
const remainingNumber = this.maxLength - this.count
|
|
987
|
+
const remainingNumber = this.maxLength - this.count;
|
|
980
988
|
const isError = remainingNumber < 0;
|
|
981
989
|
this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());
|
|
982
990
|
if (!this.$errorMessage) {
|
|
@@ -994,16 +1002,18 @@
|
|
|
994
1002
|
}
|
|
995
1003
|
this.$screenReaderCountMessage.textContent = this.getCountMessage();
|
|
996
1004
|
}
|
|
997
|
-
|
|
1005
|
+
updateCount() {
|
|
1006
|
+
const text = this.$textarea.value;
|
|
998
1007
|
if (this.config.maxwords) {
|
|
999
1008
|
var _text$match;
|
|
1000
1009
|
const tokens = (_text$match = text.match(/\S+/g)) != null ? _text$match : [];
|
|
1001
|
-
|
|
1010
|
+
this.count = tokens.length;
|
|
1011
|
+
return;
|
|
1002
1012
|
}
|
|
1003
|
-
|
|
1013
|
+
this.count = text.length;
|
|
1004
1014
|
}
|
|
1005
1015
|
getCountMessage() {
|
|
1006
|
-
const remainingNumber = this.maxLength - this.count
|
|
1016
|
+
const remainingNumber = this.maxLength - this.count;
|
|
1007
1017
|
const countType = this.config.maxwords ? 'words' : 'characters';
|
|
1008
1018
|
return this.formatCountMessage(remainingNumber, countType);
|
|
1009
1019
|
}
|
|
@@ -1020,7 +1030,7 @@
|
|
|
1020
1030
|
if (!this.config.threshold) {
|
|
1021
1031
|
return true;
|
|
1022
1032
|
}
|
|
1023
|
-
const currentLength = this.count
|
|
1033
|
+
const currentLength = this.count;
|
|
1024
1034
|
const maxLength = this.maxLength;
|
|
1025
1035
|
const thresholdValue = maxLength * this.config.threshold / 100;
|
|
1026
1036
|
return thresholdValue <= currentLength;
|
|
@@ -1841,89 +1851,6 @@
|
|
|
1841
1851
|
* @import { TranslationPluralForms } from '../../i18n.mjs'
|
|
1842
1852
|
*/
|
|
1843
1853
|
|
|
1844
|
-
/**
|
|
1845
|
-
* Header component
|
|
1846
|
-
*
|
|
1847
|
-
* @preserve
|
|
1848
|
-
*/
|
|
1849
|
-
class Header extends Component {
|
|
1850
|
-
/**
|
|
1851
|
-
* Apply a matchMedia for desktop which will trigger a state sync if the
|
|
1852
|
-
* browser viewport moves between states.
|
|
1853
|
-
*
|
|
1854
|
-
* @param {Element | null} $root - HTML element to use for header
|
|
1855
|
-
*/
|
|
1856
|
-
constructor($root) {
|
|
1857
|
-
super($root);
|
|
1858
|
-
this.$menuButton = void 0;
|
|
1859
|
-
this.$menu = void 0;
|
|
1860
|
-
this.menuIsOpen = false;
|
|
1861
|
-
this.mql = null;
|
|
1862
|
-
const $menuButton = this.$root.querySelector('.govuk-js-header-toggle');
|
|
1863
|
-
if (!$menuButton) {
|
|
1864
|
-
return this;
|
|
1865
|
-
}
|
|
1866
|
-
this.$root.classList.add('govuk-header--with-js-navigation');
|
|
1867
|
-
const menuId = $menuButton.getAttribute('aria-controls');
|
|
1868
|
-
if (!menuId) {
|
|
1869
|
-
throw new ElementError({
|
|
1870
|
-
component: Header,
|
|
1871
|
-
identifier: 'Navigation button (`<button class="govuk-js-header-toggle">`) attribute (`aria-controls`)'
|
|
1872
|
-
});
|
|
1873
|
-
}
|
|
1874
|
-
const $menu = document.getElementById(menuId);
|
|
1875
|
-
if (!$menu) {
|
|
1876
|
-
throw new ElementError({
|
|
1877
|
-
component: Header,
|
|
1878
|
-
element: $menu,
|
|
1879
|
-
identifier: `Navigation (\`<ul id="${menuId}">\`)`
|
|
1880
|
-
});
|
|
1881
|
-
}
|
|
1882
|
-
this.$menu = $menu;
|
|
1883
|
-
this.$menuButton = $menuButton;
|
|
1884
|
-
this.setupResponsiveChecks();
|
|
1885
|
-
this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());
|
|
1886
|
-
}
|
|
1887
|
-
setupResponsiveChecks() {
|
|
1888
|
-
const breakpoint = getBreakpoint('desktop');
|
|
1889
|
-
if (!breakpoint.value) {
|
|
1890
|
-
throw new ElementError({
|
|
1891
|
-
component: Header,
|
|
1892
|
-
identifier: `CSS custom property (\`${breakpoint.property}\`) on pseudo-class \`:root\``
|
|
1893
|
-
});
|
|
1894
|
-
}
|
|
1895
|
-
this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);
|
|
1896
|
-
if ('addEventListener' in this.mql) {
|
|
1897
|
-
this.mql.addEventListener('change', () => this.checkMode());
|
|
1898
|
-
} else {
|
|
1899
|
-
this.mql.addListener(() => this.checkMode());
|
|
1900
|
-
}
|
|
1901
|
-
this.checkMode();
|
|
1902
|
-
}
|
|
1903
|
-
checkMode() {
|
|
1904
|
-
if (!this.mql || !this.$menu || !this.$menuButton) {
|
|
1905
|
-
return;
|
|
1906
|
-
}
|
|
1907
|
-
if (this.mql.matches) {
|
|
1908
|
-
this.$menu.removeAttribute('hidden');
|
|
1909
|
-
this.$menuButton.setAttribute('hidden', '');
|
|
1910
|
-
} else {
|
|
1911
|
-
this.$menuButton.removeAttribute('hidden');
|
|
1912
|
-
this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
|
|
1913
|
-
if (this.menuIsOpen) {
|
|
1914
|
-
this.$menu.removeAttribute('hidden');
|
|
1915
|
-
} else {
|
|
1916
|
-
this.$menu.setAttribute('hidden', '');
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
handleMenuButtonClick() {
|
|
1921
|
-
this.menuIsOpen = !this.menuIsOpen;
|
|
1922
|
-
this.checkMode();
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
Header.moduleName = 'govuk-header';
|
|
1926
|
-
|
|
1927
1854
|
/**
|
|
1928
1855
|
* Notification Banner component
|
|
1929
1856
|
*
|
|
@@ -2655,7 +2582,7 @@
|
|
|
2655
2582
|
}
|
|
2656
2583
|
return;
|
|
2657
2584
|
}
|
|
2658
|
-
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [
|
|
2585
|
+
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [ServiceNavigation], [SkipLink], [Tabs]];
|
|
2659
2586
|
components.forEach(([Component, componentConfig]) => {
|
|
2660
2587
|
createAll(Component, componentConfig, options);
|
|
2661
2588
|
});
|
|
@@ -2788,7 +2715,6 @@
|
|
|
2788
2715
|
exports.ErrorSummary = ErrorSummary;
|
|
2789
2716
|
exports.ExitThisPage = ExitThisPage;
|
|
2790
2717
|
exports.FileUpload = FileUpload;
|
|
2791
|
-
exports.Header = Header;
|
|
2792
2718
|
exports.NotificationBanner = NotificationBanner;
|
|
2793
2719
|
exports.PasswordInput = PasswordInput;
|
|
2794
2720
|
exports.Radios = Radios;
|