govuk_publishing_components 67.1.0 → 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/_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 +1 -1
- 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 +1 -1
- data/app/views/govuk_publishing_components/components/_tag.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -15
- 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/govuk/components/button/_index.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,2BAA2B;AAC3B,GAAG;;AAEH,qCAAqC;AACrC,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,+DAA+D;;AAE/D,+BAA+B;AAC/B,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,yDAAyD;;AAEzD,8CAA8C;AAC9C,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,uEAAuE;;AAEvE,wCAAwC;AACxC,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,+DAA+D;;AAE/D;EACE,qDAAqD;EACrD,oDAAoD;EACpD,kEAAkE;EAClE,mEAAmE;;EAEnE,4BAA4B;EAC5B,0DAA0D;EAC1D,0DAA0D;EAC1D,sFAAsF;EACtF,uFAAuF;;EAEvF,0BAA0B;EAC1B,iDAAiD;EACjD,wDAAwD;EACxD,kFAAkF;EAClF,mFAAmF;;EAEnF,0BAA0B;EAC1B,qEAAqE;EACrE,oEAAoE;EACpE,sFAAsF;EACtF,wFAAwF;;EAExF,6EAA6E;EAC7E,0EAA0E;EAC1E,gDAAgD;EAChD,qDAAqD;;EAErD;IACE,kDAAkD;;IAElD,sBAAsB;IACtB,qBAAqB;IACrB,kBAAkB;IAClB,WAAW;IACX,aAAa;IACb,eAAe;IACf,cAAc;IACd,+EAA+E,EAAE,IAAI;IACrF;uFACmF,EAAE,IAAI;IACzF,0DAA0D;IAC1D,gBAAgB;IAChB,gCAAgC;IAChC,sCAAsC;IACtC,+DAA+D,EAAE,IAAI;IACrE,kBAAkB;IAClB,mBAAmB;IACnB,eAAe;IACf,wBAAwB;;IAExB;MACE,WAAW;IACb;;IAEA,mDAAmD;IACnD;;;;MAIE,gCAAgC;MAChC,qBAAqB;IACvB;;IAEA,wCAAwC;IACxC;MACE,UAAU;MACV,SAAS;IACX;;IAEA;MACE,4CAA4C;IAC9C;;IAEA;MACE,4DAA4D;MAC5D,wBAAwB;IAC1B;;IAEA;MACE,iCAAiC;MACjC,6CAA6C;MAC7C,+CAA+C;IACjD;;IAEA;MACE,iCAAiC;MACjC,+BAA+B;MAC/B,qCAAqC;MACrC,4CAA4C;IAC9C;;IAEA,oEAAoE;IACpE,wEAAwE;;IAExE,qEAAqE;IACrE,yDAAyD;IACzD;MACE,WAAW;MACX,cAAc;;MAEd,kBAAkB;;MAElB,sCAAsC;MACtC,wCAAwC;MACxC,iEAAiE;MACjE,uCAAuC;;MAEvC,uBAAuB;IACzB;;IAEA,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IACzE,4DAA4D;IAC5D,CAAC;IACD,yEAAyE;IACzE,2EAA2E;IAC3E,iCAAiC;IACjC,CAAC;IACD,IAAI;IACJ;MACE,8DAA8D;IAChE;EACF;;EAEA;IACE,cAAc;;IAEd;MACE,sCAAsC;MACtC,mBAAmB;IACrB;;IAEA;MACE,MAAM;MACN,+DAA+D,EAAE,IAAI;IACvE;EACF;;EAEA;IACE,gDAAgD;IAChD,yEAAyE;;IAEzE;;;;;MAKE,0CAA0C;IAC5C;;IAEA;MACE,sDAAsD;;MAEtD;QACE,gDAAgD;MAClD;IACF;EACF;;EAEA;IACE,8CAA8C;IAC9C,uEAAuE;;IAEvE;;;;;MAKE,wCAAwC;IAC1C;;IAEA;MACE,oDAAoD;;MAEpD;QACE,8CAA8C;MAChD;IACF;EACF;;EAEA;IACE,8CAA8C;IAC9C,uEAAuE;;IAEvE;;;;;MAKE,wCAAwC;IAC1C;;IAEA;MACE,oDAAoD;;MAEpD;QACE,8CAA8C;MAChD;IACF;EACF;;EAEA;IACE,qCAAqC;IACrC,oDAAoD;;IAEpD,oBAAoB;IACpB,gBAAgB;;IAEhB,uBAAuB;EACzB;;EAEA;IACE,6BAA6B;;IAE7B;MACE,6BAA6B;IAC/B;IACA,sBAAsB;IACtB,cAAc;IACd,kBAAkB;IAClB,wEAAwE;IACxE,mDAAmD;IACnD,yBAAyB;EAC3B;AACF","file":"_index.scss","sourcesContent":["////\n/// @group components/button\n////\n\n/// Button component background colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-button-background-colour: govuk-colour(\"green\") !default;\n\n/// Button component text colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-button-text-colour: govuk-colour(\"white\") !default;\n\n/// Inverted button component background colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-inverse-button-background-colour: govuk-colour(\"white\") !default;\n\n/// Inverted button component text colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-inverse-button-text-colour: $govuk-brand-colour !default;\n\n@include govuk-exports(\"govuk/component/button\") {\n $govuk-button-colour: $govuk-button-background-colour;\n $govuk-button-text-colour: $govuk-button-text-colour;\n $govuk-button-hover-colour: govuk-shade($govuk-button-colour, 20%);\n $govuk-button-shadow-colour: govuk-shade($govuk-button-colour, 60%);\n\n // Secondary button variables\n $govuk-secondary-button-colour: govuk-colour(\"light-grey\");\n $govuk-secondary-button-text-colour: govuk-colour(\"black\");\n $govuk-secondary-button-hover-colour: govuk-shade($govuk-secondary-button-colour, 10%);\n $govuk-secondary-button-shadow-colour: govuk-shade($govuk-secondary-button-colour, 40%);\n\n // Warning button variables\n $govuk-warning-button-colour: govuk-colour(\"red\");\n $govuk-warning-button-text-colour: govuk-colour(\"white\");\n $govuk-warning-button-hover-colour: govuk-shade($govuk-warning-button-colour, 20%);\n $govuk-warning-button-shadow-colour: govuk-shade($govuk-warning-button-colour, 60%);\n\n // Inverse button variables\n $govuk-inverse-button-colour: $govuk-inverse-button-background-colour;\n $govuk-inverse-button-text-colour: $govuk-inverse-button-text-colour;\n $govuk-inverse-button-hover-colour: govuk-tint($govuk-inverse-button-text-colour, 90%);\n $govuk-inverse-button-shadow-colour: govuk-shade($govuk-inverse-button-text-colour, 30%);\n\n // Because the shadow (s0) is visually 'part of' the button, we need to reduce\n // the height of the button to compensate by adjusting its padding (s1) and\n // increase the bottom margin to include it (s2).\n $button-shadow-size: $govuk-border-width-form-element;\n\n .govuk-button {\n @include govuk-font($size: 19, $line-height: 19px);\n\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n width: 100%;\n margin-top: 0;\n margin-right: 0;\n margin-left: 0;\n @include govuk-responsive-margin(6, \"bottom\", $adjustment: $button-shadow-size); // s2\n padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2)\n (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1\n border: $govuk-border-width-form-element solid transparent;\n border-radius: 0;\n color: $govuk-button-text-colour;\n background-color: $govuk-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0\n text-align: center;\n vertical-align: top;\n cursor: pointer;\n -webkit-appearance: none;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: auto;\n }\n\n // Ensure that any global link styles are overridden\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-button-text-colour;\n text-decoration: none;\n }\n\n // Fix unwanted button padding in Firefox\n &::-moz-focus-inner {\n padding: 0;\n border: 0;\n }\n\n &:hover {\n background-color: $govuk-button-hover-colour;\n }\n\n &:active {\n // Bump the button down so it looks like its being pressed in\n top: $button-shadow-size;\n }\n\n &:focus {\n border-color: $govuk-focus-colour;\n outline: $govuk-focus-width solid transparent;\n box-shadow: inset 0 0 0 1px $govuk-focus-colour;\n }\n\n &:focus:not(:active):not(:hover) {\n border-color: $govuk-focus-colour;\n color: $govuk-focus-text-colour;\n background-color: $govuk-focus-colour;\n box-shadow: 0 2px 0 $govuk-focus-text-colour;\n }\n\n // The following adjustments do not work for <input type=\"button\"> as\n // non-container elements cannot include pseudo elements (i.e. ::before).\n\n // Use a pseudo element to expand the click target area to include the\n // button's shadow as well, in case users try to click it.\n &::before {\n content: \"\";\n display: block;\n\n position: absolute;\n\n top: -$govuk-border-width-form-element;\n right: -$govuk-border-width-form-element;\n bottom: -($govuk-border-width-form-element + $button-shadow-size);\n left: -$govuk-border-width-form-element;\n\n background: transparent;\n }\n\n // When the button is active it is shifted down by $button-shadow-size to\n // denote a 'pressed' state. If the user happened to click at the very top\n // of the button, their mouse is no longer over the button (because it has\n // 'moved beneath them') and so the click event is not fired.\n //\n // This corrects that by shifting the top of the pseudo element so that it\n // continues to cover the area that the user originally clicked, which means\n // the click event is still fired.\n //\n // 🎉\n &:active::before {\n top: -($govuk-border-width-form-element + $button-shadow-size);\n }\n }\n\n .govuk-button[disabled] {\n opacity: (0.5);\n\n &:hover {\n background-color: $govuk-button-colour;\n cursor: not-allowed;\n }\n\n &:active {\n top: 0;\n box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0\n }\n }\n\n .govuk-button--secondary {\n background-color: $govuk-secondary-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-secondary-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-secondary-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-secondary-button-colour;\n }\n }\n }\n\n .govuk-button--warning {\n background-color: $govuk-warning-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-warning-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-warning-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-warning-button-colour;\n }\n }\n }\n\n .govuk-button--inverse {\n background-color: $govuk-inverse-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-inverse-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-inverse-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-inverse-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-inverse-button-colour;\n }\n }\n }\n\n .govuk-button--start {\n @include govuk-typography-weight-bold;\n @include govuk-font-size($size: 24, $line-height: 1);\n\n display: inline-flex;\n min-height: auto;\n\n justify-content: center;\n }\n\n .govuk-button__start-icon {\n margin-left: govuk-spacing(1);\n\n @media #{govuk-from-breakpoint(desktop)} {\n margin-left: govuk-spacing(2);\n }\n vertical-align: middle;\n flex-shrink: 0;\n align-self: center;\n // Work around SVGs not inheriting color from parent in forced color mode\n // (https://github.com/w3c/csswg-drafts/issues/6310)\n forced-color-adjust: auto;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/govuk/components/button/_index.scss"],"names":[],"mappings":"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","file":"_index.scss","sourcesContent":["////\n/// @group components/button\n////\n\n/// Button component background colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-button-background-colour: govuk-colour(\"green\") !default;\n\n/// Button component text colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-button-text-colour: govuk-colour(\"white\") !default;\n\n/// Inverted button component background colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-inverse-button-background-colour: govuk-colour(\"white\") !default;\n\n/// Inverted button component text colour\n///\n/// @type Colour\n/// @access public\n\n$govuk-inverse-button-text-colour: govuk-functional-colour(brand) !default;\n\n@include govuk-exports(\"govuk/component/button\") {\n $govuk-button-colour: $govuk-button-background-colour;\n $govuk-button-text-colour: $govuk-button-text-colour;\n $govuk-button-hover-colour: govuk-colour(\"green\", $variant: \"shade-25\");\n $govuk-button-shadow-colour: govuk-colour(\"green\", $variant: \"shade-50\");\n\n // Secondary button variables\n $govuk-secondary-button-colour: govuk-colour(\"black\", $variant: \"tint-95\");\n $govuk-secondary-button-text-colour: govuk-colour(\"black\");\n $govuk-secondary-button-hover-colour: govuk-colour(\"black\", $variant: \"tint-80\");\n $govuk-secondary-button-shadow-colour: govuk-colour(\"black\", $variant: \"tint-50\");\n\n // Warning button variables\n $govuk-warning-button-colour: govuk-colour(\"red\");\n $govuk-warning-button-text-colour: govuk-colour(\"white\");\n $govuk-warning-button-hover-colour: govuk-colour(\"red\", $variant: \"shade-25\");\n $govuk-warning-button-shadow-colour: govuk-colour(\"red\", $variant: \"shade-50\");\n\n // Inverse button variables\n $govuk-inverse-button-colour: $govuk-inverse-button-background-colour;\n $govuk-inverse-button-text-colour: $govuk-inverse-button-text-colour;\n $govuk-inverse-button-hover-colour: govuk-colour(\"blue\", $variant: \"tint-95\");\n $govuk-inverse-button-shadow-colour: govuk-colour(\"blue\", $variant: \"shade-50\");\n\n // Because the shadow (s0) is visually 'part of' the button, we need to reduce\n // the height of the button to compensate by adjusting its padding (s1) and\n // increase the bottom margin to include it (s2).\n $button-shadow-size: $govuk-border-width-form-element;\n\n .govuk-button {\n @include govuk-font($size: 19, $line-height: 19px);\n\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n width: 100%;\n margin-top: 0;\n margin-right: 0;\n margin-left: 0;\n @include govuk-responsive-margin(6, \"bottom\", $adjustment: $button-shadow-size); // s2\n padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2)\n (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1\n border: $govuk-border-width-form-element solid transparent;\n border-radius: 0;\n color: $govuk-button-text-colour;\n background-color: $govuk-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0\n text-align: center;\n vertical-align: top;\n cursor: pointer;\n -webkit-appearance: none;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: auto;\n }\n\n // Ensure that any global link styles are overridden\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-button-text-colour;\n text-decoration: none;\n }\n\n // Fix unwanted button padding in Firefox\n &::-moz-focus-inner {\n padding: 0;\n border: 0;\n }\n\n &:hover {\n background-color: $govuk-button-hover-colour;\n }\n\n &:active {\n // Bump the button down so it looks like its being pressed in\n top: $button-shadow-size;\n }\n\n &:focus {\n border-color: govuk-functional-colour(focus);\n outline: $govuk-focus-width solid transparent;\n box-shadow: inset 0 0 0 1px govuk-functional-colour(focus);\n }\n\n &:focus:not(:active):not(:hover) {\n border-color: govuk-functional-colour(focus);\n color: govuk-functional-colour(focus-text);\n background-color: govuk-functional-colour(focus);\n box-shadow: 0 2px 0 govuk-functional-colour(focus-text);\n }\n\n // Use a pseudo element to expand the click target area to include the\n // button's shadow as well, in case users try to click it.\n &::before {\n content: \"\";\n display: block;\n\n position: absolute;\n\n top: -$govuk-border-width-form-element;\n right: -$govuk-border-width-form-element;\n bottom: -($govuk-border-width-form-element + $button-shadow-size);\n left: -$govuk-border-width-form-element;\n\n background: transparent;\n }\n\n // When the button is active it is shifted down by $button-shadow-size to\n // denote a 'pressed' state. If the user happened to click at the very top\n // of the button, their mouse is no longer over the button (because it has\n // 'moved beneath them') and so the click event is not fired.\n //\n // This corrects that by shifting the top of the pseudo element so that it\n // continues to cover the area that the user originally clicked, which means\n // the click event is still fired.\n //\n // 🎉\n &:active::before {\n top: -($govuk-border-width-form-element + $button-shadow-size);\n }\n }\n\n .govuk-button[disabled] {\n opacity: (0.5);\n\n &:hover {\n background-color: $govuk-button-colour;\n cursor: not-allowed;\n }\n\n &:active {\n top: 0;\n box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0\n }\n }\n\n .govuk-button--secondary {\n background-color: $govuk-secondary-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-secondary-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-secondary-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-secondary-button-colour;\n }\n }\n }\n\n .govuk-button--warning {\n background-color: $govuk-warning-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-warning-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-warning-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-warning-button-colour;\n }\n }\n }\n\n .govuk-button--inverse {\n background-color: $govuk-inverse-button-colour;\n box-shadow: 0 $button-shadow-size 0 $govuk-inverse-button-shadow-colour;\n\n &,\n &:link,\n &:visited,\n &:active,\n &:hover {\n color: $govuk-inverse-button-text-colour;\n }\n\n &:hover {\n background-color: $govuk-inverse-button-hover-colour;\n\n &[disabled] {\n background-color: $govuk-inverse-button-colour;\n }\n }\n }\n\n .govuk-button--start {\n @include govuk-typography-weight-bold;\n @include govuk-font-size($size: 24, $line-height: 1);\n\n display: inline-flex;\n min-height: auto;\n\n justify-content: center;\n }\n\n .govuk-button__start-icon {\n margin-left: govuk-spacing(1);\n\n @media #{govuk-from-breakpoint(desktop)} {\n margin-left: govuk-spacing(2);\n }\n vertical-align: middle;\n flex-shrink: 0;\n align-self: center;\n // Work around SVGs not inheriting color from parent in forced color mode\n // (https://github.com/w3c/csswg-drafts/issues/6310)\n forced-color-adjust: auto;\n }\n}\n"]}
|
|
@@ -48,19 +48,6 @@
|
|
|
48
48
|
"screenshot": true,
|
|
49
49
|
"html": "<button type=\"submit\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg>\n</button>"
|
|
50
50
|
},
|
|
51
|
-
{
|
|
52
|
-
"name": "input",
|
|
53
|
-
"options": {
|
|
54
|
-
"element": "input",
|
|
55
|
-
"name": "start-now",
|
|
56
|
-
"text": "Start now"
|
|
57
|
-
},
|
|
58
|
-
"hidden": false,
|
|
59
|
-
"description": "",
|
|
60
|
-
"pageTemplateOptions": {},
|
|
61
|
-
"screenshot": false,
|
|
62
|
-
"html": "<input value=\"Start now\" type=\"submit\" name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">"
|
|
63
|
-
},
|
|
64
51
|
{
|
|
65
52
|
"name": "secondary",
|
|
66
53
|
"options": {
|
|
@@ -105,7 +92,6 @@
|
|
|
105
92
|
{
|
|
106
93
|
"name": "attributes",
|
|
107
94
|
"options": {
|
|
108
|
-
"element": "button",
|
|
109
95
|
"text": "Submit",
|
|
110
96
|
"attributes": {
|
|
111
97
|
"aria-controls": "test-target-element",
|
|
@@ -121,23 +107,7 @@
|
|
|
121
107
|
{
|
|
122
108
|
"name": "link attributes",
|
|
123
109
|
"options": {
|
|
124
|
-
"
|
|
125
|
-
"text": "Submit",
|
|
126
|
-
"attributes": {
|
|
127
|
-
"aria-controls": "test-target-element",
|
|
128
|
-
"data-tracking-dimension": 123
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"hidden": true,
|
|
132
|
-
"description": "",
|
|
133
|
-
"pageTemplateOptions": {},
|
|
134
|
-
"screenshot": false,
|
|
135
|
-
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"test-target-element\" data-tracking-dimension=\"123\">\n Submit\n</a>"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "input attributes",
|
|
139
|
-
"options": {
|
|
140
|
-
"element": "input",
|
|
110
|
+
"href": "/",
|
|
141
111
|
"text": "Submit",
|
|
142
112
|
"attributes": {
|
|
143
113
|
"aria-controls": "test-target-element",
|
|
@@ -148,13 +118,12 @@
|
|
|
148
118
|
"description": "",
|
|
149
119
|
"pageTemplateOptions": {},
|
|
150
120
|
"screenshot": false,
|
|
151
|
-
"html": "<
|
|
121
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"test-target-element\" data-tracking-dimension=\"123\">\n Submit\n</a>"
|
|
152
122
|
},
|
|
153
123
|
{
|
|
154
124
|
"name": "classes",
|
|
155
125
|
"options": {
|
|
156
126
|
"text": "Submit",
|
|
157
|
-
"element": "button",
|
|
158
127
|
"classes": "app-button--custom-modifier"
|
|
159
128
|
},
|
|
160
129
|
"hidden": true,
|
|
@@ -166,34 +135,20 @@
|
|
|
166
135
|
{
|
|
167
136
|
"name": "link classes",
|
|
168
137
|
"options": {
|
|
138
|
+
"href": "/",
|
|
169
139
|
"text": "Submit",
|
|
170
|
-
"element": "a",
|
|
171
|
-
"classes": "app-button--custom-modifier"
|
|
172
|
-
},
|
|
173
|
-
"hidden": true,
|
|
174
|
-
"description": "",
|
|
175
|
-
"pageTemplateOptions": {},
|
|
176
|
-
"screenshot": false,
|
|
177
|
-
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</a>"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"name": "input classes",
|
|
181
|
-
"options": {
|
|
182
|
-
"text": "Submit",
|
|
183
|
-
"element": "input",
|
|
184
140
|
"classes": "app-button--custom-modifier"
|
|
185
141
|
},
|
|
186
142
|
"hidden": true,
|
|
187
143
|
"description": "",
|
|
188
144
|
"pageTemplateOptions": {},
|
|
189
145
|
"screenshot": false,
|
|
190
|
-
"html": "<
|
|
146
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</a>"
|
|
191
147
|
},
|
|
192
148
|
{
|
|
193
149
|
"name": "name",
|
|
194
150
|
"options": {
|
|
195
151
|
"text": "Submit",
|
|
196
|
-
"element": "button",
|
|
197
152
|
"name": "start-now"
|
|
198
153
|
},
|
|
199
154
|
"hidden": true,
|
|
@@ -206,7 +161,6 @@
|
|
|
206
161
|
"name": "type",
|
|
207
162
|
"options": {
|
|
208
163
|
"text": "Submit",
|
|
209
|
-
"element": "button",
|
|
210
164
|
"type": "button"
|
|
211
165
|
},
|
|
212
166
|
"hidden": true,
|
|
@@ -215,23 +169,9 @@
|
|
|
215
169
|
"screenshot": false,
|
|
216
170
|
"html": "<button type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
|
217
171
|
},
|
|
218
|
-
{
|
|
219
|
-
"name": "input type",
|
|
220
|
-
"options": {
|
|
221
|
-
"text": "Submit",
|
|
222
|
-
"element": "input",
|
|
223
|
-
"type": "button"
|
|
224
|
-
},
|
|
225
|
-
"hidden": true,
|
|
226
|
-
"description": "",
|
|
227
|
-
"pageTemplateOptions": {},
|
|
228
|
-
"screenshot": false,
|
|
229
|
-
"html": "<input value=\"Submit\" type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">"
|
|
230
|
-
},
|
|
231
172
|
{
|
|
232
173
|
"name": "explicit link",
|
|
233
174
|
"options": {
|
|
234
|
-
"element": "a",
|
|
235
175
|
"href": "/",
|
|
236
176
|
"text": "Continue"
|
|
237
177
|
},
|
|
@@ -241,36 +181,22 @@
|
|
|
241
181
|
"screenshot": false,
|
|
242
182
|
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Continue\n</a>"
|
|
243
183
|
},
|
|
244
|
-
{
|
|
245
|
-
"name": "no href",
|
|
246
|
-
"options": {
|
|
247
|
-
"text": "Submit",
|
|
248
|
-
"element": "a"
|
|
249
|
-
},
|
|
250
|
-
"hidden": true,
|
|
251
|
-
"description": "",
|
|
252
|
-
"pageTemplateOptions": {},
|
|
253
|
-
"screenshot": false,
|
|
254
|
-
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</a>"
|
|
255
|
-
},
|
|
256
184
|
{
|
|
257
185
|
"name": "value",
|
|
258
186
|
"options": {
|
|
259
187
|
"text": "Submit",
|
|
260
|
-
"element": "button",
|
|
261
188
|
"value": "start"
|
|
262
189
|
},
|
|
263
190
|
"hidden": true,
|
|
264
191
|
"description": "",
|
|
265
192
|
"pageTemplateOptions": {},
|
|
266
193
|
"screenshot": false,
|
|
267
|
-
"html": "<button
|
|
194
|
+
"html": "<button type=\"submit\" value=\"start\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
|
268
195
|
},
|
|
269
196
|
{
|
|
270
197
|
"name": "html",
|
|
271
198
|
"options": {
|
|
272
199
|
"text": "Submit",
|
|
273
|
-
"element": "button",
|
|
274
200
|
"html": "Start <em>now</em>"
|
|
275
201
|
},
|
|
276
202
|
"hidden": true,
|
|
@@ -317,20 +243,19 @@
|
|
|
317
243
|
"name": "id",
|
|
318
244
|
"options": {
|
|
319
245
|
"text": "Submit",
|
|
320
|
-
"element": "input",
|
|
321
246
|
"id": "submit"
|
|
322
247
|
},
|
|
323
248
|
"hidden": true,
|
|
324
249
|
"description": "",
|
|
325
250
|
"pageTemplateOptions": {},
|
|
326
251
|
"screenshot": false,
|
|
327
|
-
"html": "<
|
|
252
|
+
"html": "<button type=\"submit\" class=\"govuk-button\" data-module=\"govuk-button\" id=\"submit\">\n Submit\n</button>"
|
|
328
253
|
},
|
|
329
254
|
{
|
|
330
255
|
"name": "start link",
|
|
331
256
|
"options": {
|
|
332
|
-
"text": "Start now link button",
|
|
333
257
|
"href": "/",
|
|
258
|
+
"text": "Start now link button",
|
|
334
259
|
"isStartButton": true
|
|
335
260
|
},
|
|
336
261
|
"hidden": true,
|
|
@@ -339,19 +264,6 @@
|
|
|
339
264
|
"screenshot": false,
|
|
340
265
|
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now link button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg>\n</a>"
|
|
341
266
|
},
|
|
342
|
-
{
|
|
343
|
-
"name": "input disabled",
|
|
344
|
-
"options": {
|
|
345
|
-
"element": "input",
|
|
346
|
-
"text": "Explicit input button disabled",
|
|
347
|
-
"disabled": true
|
|
348
|
-
},
|
|
349
|
-
"hidden": true,
|
|
350
|
-
"description": "",
|
|
351
|
-
"pageTemplateOptions": {},
|
|
352
|
-
"screenshot": false,
|
|
353
|
-
"html": "<input value=\"Explicit input button disabled\" type=\"submit\" disabled aria-disabled=\"true\" class=\"govuk-button\" data-module=\"govuk-button\">"
|
|
354
|
-
},
|
|
355
267
|
{
|
|
356
268
|
"name": "prevent double click",
|
|
357
269
|
"options": {
|
|
@@ -1,70 +1,63 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"name": "element",
|
|
4
|
-
"type": "string",
|
|
5
|
-
"required": false,
|
|
6
|
-
"description": "HTML element for the button component – `input`, `button` or `a`. In most cases you will not need to set this as it will be configured automatically if `href` is provided.",
|
|
7
|
-
"deprecated": "5.1.0"
|
|
8
|
-
},
|
|
9
2
|
{
|
|
10
3
|
"name": "text",
|
|
11
4
|
"type": "string",
|
|
12
5
|
"required": true,
|
|
13
|
-
"description": "If `html` is set, this is not required. Text for the
|
|
6
|
+
"description": "If `html` is set, this is not required. Text for the button. If `html` is provided, the `text` option will be ignored."
|
|
14
7
|
},
|
|
15
8
|
{
|
|
16
9
|
"name": "html",
|
|
17
10
|
"type": "string",
|
|
18
11
|
"required": true,
|
|
19
|
-
"description": "If `text` is set, this is not required. HTML for the
|
|
12
|
+
"description": "If `text` is set, this is not required. HTML for the button. If `html` is provided, the `text` option will be ignored."
|
|
20
13
|
},
|
|
21
14
|
{
|
|
22
|
-
"name": "
|
|
15
|
+
"name": "type",
|
|
23
16
|
"type": "string",
|
|
24
17
|
"required": false,
|
|
25
|
-
"description": "
|
|
18
|
+
"description": "Type of the button, determining its behaviour in forms – `\"button\"`, `\"submit\"` or `\"reset\"`. Defaults to `\"submit\"`. This has no effect if `href` is set."
|
|
26
19
|
},
|
|
27
20
|
{
|
|
28
|
-
"name": "
|
|
21
|
+
"name": "name",
|
|
29
22
|
"type": "string",
|
|
30
23
|
"required": false,
|
|
31
|
-
"description": "
|
|
24
|
+
"description": "Name of the button, sent when a form is submitted. This has no effect if `href` is set."
|
|
32
25
|
},
|
|
33
26
|
{
|
|
34
27
|
"name": "value",
|
|
35
28
|
"type": "string",
|
|
36
29
|
"required": false,
|
|
37
|
-
"description": "Value
|
|
30
|
+
"description": "Value of the button, sent when a form is submitted. This has no effect if `href` is set."
|
|
38
31
|
},
|
|
39
32
|
{
|
|
40
33
|
"name": "disabled",
|
|
41
34
|
"type": "boolean",
|
|
42
35
|
"required": false,
|
|
43
|
-
"description": "Whether the button
|
|
36
|
+
"description": "Whether the button should be disabled. `disabled` and `aria-disabled` attributes will be set automatically. This has no effect if `href` is set."
|
|
44
37
|
},
|
|
45
38
|
{
|
|
46
39
|
"name": "href",
|
|
47
40
|
"type": "string",
|
|
48
41
|
"required": false,
|
|
49
|
-
"description": "The URL that the button
|
|
42
|
+
"description": "The URL that the button should link to."
|
|
50
43
|
},
|
|
51
44
|
{
|
|
52
45
|
"name": "classes",
|
|
53
46
|
"type": "string",
|
|
54
47
|
"required": false,
|
|
55
|
-
"description": "Classes to add to the button
|
|
48
|
+
"description": "Classes to add to the button."
|
|
56
49
|
},
|
|
57
50
|
{
|
|
58
51
|
"name": "attributes",
|
|
59
52
|
"type": "object",
|
|
60
53
|
"required": false,
|
|
61
|
-
"description": "HTML attributes (for example data attributes) to add to the button
|
|
54
|
+
"description": "HTML attributes (for example data attributes) to add to the button."
|
|
62
55
|
},
|
|
63
56
|
{
|
|
64
57
|
"name": "preventDoubleClick",
|
|
65
58
|
"type": "boolean",
|
|
66
59
|
"required": false,
|
|
67
|
-
"description": "Prevent accidental double clicks on submit buttons from submitting forms multiple times."
|
|
60
|
+
"description": "Prevent accidental double clicks on submit buttons from submitting forms multiple times. This has no effect if `href` is set."
|
|
68
61
|
},
|
|
69
62
|
{
|
|
70
63
|
"name": "isStartButton",
|
|
@@ -11,17 +11,6 @@
|
|
|
11
11
|
{% set classNames = classNames + " govuk-button--start" %}
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
14
|
-
{#- Determine type of element to use, if not explicitly set #}
|
|
15
|
-
{%- if params.element %}
|
|
16
|
-
{% set element = params.element | lower %}
|
|
17
|
-
{% else %}
|
|
18
|
-
{% if params.href %}
|
|
19
|
-
{% set element = 'a' %}
|
|
20
|
-
{% else %}
|
|
21
|
-
{% set element = 'button' %}
|
|
22
|
-
{% endif %}
|
|
23
|
-
{% endif -%}
|
|
24
|
-
|
|
25
14
|
{%- macro _startIcon() %}
|
|
26
15
|
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
|
|
27
16
|
treat it as an interactive element - without this it will be
|
|
@@ -35,24 +24,23 @@
|
|
|
35
24
|
|
|
36
25
|
{%- set commonAttributes %} class="{{ classNames }}" data-module="govuk-button" {{- govukAttributes(params.attributes) -}} {% if params.id %} id="{{ params.id }}"{% endif %}{% endset %}
|
|
37
26
|
|
|
38
|
-
{#- Define common attributes we can use for both button and input types #}
|
|
39
|
-
|
|
40
|
-
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %}{% if params.disabled %} disabled aria-disabled="true"{% endif %}{% if params.preventDoubleClick !== undefined %} data-prevent-double-click="{{ params.preventDoubleClick }}"{% endif %}{% endset %}
|
|
41
|
-
|
|
42
27
|
{#- Actually create a button... or a link! #}
|
|
43
28
|
|
|
44
|
-
{%- if
|
|
29
|
+
{%- if params.href %}
|
|
45
30
|
<a href="{{ params.href if params.href else '#' }}" role="button" draggable="false" {{- commonAttributes | safe }}>
|
|
46
31
|
{{ params.html | safe | trim | indent(2) if params.html else params.text }}
|
|
47
32
|
{{- _startIcon() | safe if params.isStartButton }}
|
|
48
33
|
</a>
|
|
49
34
|
|
|
50
|
-
{%-
|
|
51
|
-
<button
|
|
35
|
+
{%- else %}
|
|
36
|
+
<button type="{{ params.type if params.type else 'submit' }}"
|
|
37
|
+
{%- if params.value %} value="{{ params.value }}"{% endif %}
|
|
38
|
+
{%- if params.name %} name="{{ params.name }}"{% endif %}
|
|
39
|
+
{%- if params.disabled %} disabled aria-disabled="true"{% endif %}
|
|
40
|
+
{%- if params.preventDoubleClick !== undefined %} data-prevent-double-click="{{ params.preventDoubleClick }}"{% endif %}
|
|
41
|
+
{{- commonAttributes | safe }}>
|
|
52
42
|
{{ params.html | safe | trim | indent(2) if params.html else params.text }}
|
|
53
43
|
{{- _startIcon() | safe if params.isStartButton }}
|
|
54
44
|
</button>
|
|
55
45
|
|
|
56
|
-
{%- elseif element == 'input' %}
|
|
57
|
-
<input value="{{ params.text }}" type="{{ params.type if params.type else 'submit' }}" {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
|
|
58
46
|
{%- endif %}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// show the error state. This presents feedback to the user that the value
|
|
17
17
|
// has become invalid without needing to see the counter.
|
|
18
18
|
.govuk-textarea--error:focus {
|
|
19
|
-
border-color:
|
|
20
|
-
box-shadow: inset 0 0 0 $govuk-border-width-form-element
|
|
19
|
+
border-color: govuk-functional-colour(error);
|
|
20
|
+
box-shadow: inset 0 0 0 $govuk-border-width-form-element govuk-functional-colour(error);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/govuk/components/character-count/_index.scss"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uBAAuB;AACvB,wBAAwB;AACxB,2BAA2B;;AAE3B;EACE;IACE,6CAA6C;;IAE7C;;MAEE,+BAA+B;IACjC;;IAEA,0EAA0E;IAC1E,yEAAyE;IACzE,wDAAwD;IACxD;MACE,
|
|
1
|
+
{"version":3,"sources":["../../../../src/govuk/components/character-count/_index.scss"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uBAAuB;AACvB,wBAAwB;AACxB,2BAA2B;;AAE3B;EACE;IACE,6CAA6C;;IAE7C;;MAEE,+BAA+B;IACjC;;IAEA,0EAA0E;IAC1E,yEAAyE;IACzE,wDAAwD;IACxD;MACE,4CAA4C;MAC5C,uFAAuF;IACzF;EACF;;EAEA;IACE,mCAAmC;IACnC,aAAa;IACb,gBAAgB;;IAEhB;MACE,mEAAmE;MACnE,cAAc;MACd,uEAAuE;MACvE,yDAAyD;MACzD,wEAAwE;MACxE,gBAAgB;IAClB;EACF;;EAEA;IACE,kBAAkB;EACpB;AACF","file":"_index.scss","sourcesContent":["@import \"../error-message/index\";\n@import \"../hint/index\";\n@import \"../label/index\";\n@import \"../textarea/index\";\n\n@include govuk-exports(\"govuk/component/character-count\") {\n .govuk-character-count {\n @include govuk-responsive-margin(6, \"bottom\");\n\n .govuk-form-group,\n .govuk-textarea {\n margin-bottom: govuk-spacing(1);\n }\n\n // If the textarea enters the error state whilst the user is focused on it,\n // show the error state. This presents feedback to the user that the value\n // has become invalid without needing to see the counter.\n .govuk-textarea--error:focus {\n border-color: govuk-functional-colour(error);\n box-shadow: inset 0 0 0 $govuk-border-width-form-element govuk-functional-colour(error);\n }\n }\n\n .govuk-character-count__message {\n @include govuk-font-tabular-numbers;\n margin-top: 0;\n margin-bottom: 0;\n\n &::after {\n // Zero-width space that will reserve vertical space when no hint is\n // provided as:\n // - setting a min-height is not possible without a magic number because\n // the line-height is set by the `govuk-font` call above\n // - using `:empty` is not possible as the hint macro outputs line breaks\n content: \"\\200B\";\n }\n }\n\n .govuk-character-count__message--disabled {\n visibility: hidden;\n }\n}\n"]}
|
data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js
CHANGED
|
@@ -419,6 +419,7 @@
|
|
|
419
419
|
var _ref, _this$config$maxwords;
|
|
420
420
|
super($root, config);
|
|
421
421
|
this.$textarea = void 0;
|
|
422
|
+
this.count = 0;
|
|
422
423
|
this.$visibleCountMessage = void 0;
|
|
423
424
|
this.$screenReaderCountMessage = void 0;
|
|
424
425
|
this.lastInputTimestamp = null;
|
|
@@ -474,15 +475,22 @@
|
|
|
474
475
|
$textareaDescription.classList.add('govuk-visually-hidden');
|
|
475
476
|
this.$textarea.removeAttribute('maxlength');
|
|
476
477
|
this.bindChangeEvents();
|
|
477
|
-
window.addEventListener('pageshow', () =>
|
|
478
|
+
window.addEventListener('pageshow', () => {
|
|
479
|
+
if (this.$textarea.value !== this.$textarea.textContent) {
|
|
480
|
+
this.updateCount();
|
|
481
|
+
this.updateCountMessage();
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
this.updateCount();
|
|
478
485
|
this.updateCountMessage();
|
|
479
486
|
}
|
|
480
487
|
bindChangeEvents() {
|
|
481
|
-
this.$textarea.addEventListener('
|
|
488
|
+
this.$textarea.addEventListener('input', () => this.handleInput());
|
|
482
489
|
this.$textarea.addEventListener('focus', () => this.handleFocus());
|
|
483
490
|
this.$textarea.addEventListener('blur', () => this.handleBlur());
|
|
484
491
|
}
|
|
485
|
-
|
|
492
|
+
handleInput() {
|
|
493
|
+
this.updateCount();
|
|
486
494
|
this.updateVisibleCountMessage();
|
|
487
495
|
this.lastInputTimestamp = Date.now();
|
|
488
496
|
}
|
|
@@ -509,7 +517,7 @@
|
|
|
509
517
|
this.updateScreenReaderCountMessage();
|
|
510
518
|
}
|
|
511
519
|
updateVisibleCountMessage() {
|
|
512
|
-
const remainingNumber = this.maxLength - this.count
|
|
520
|
+
const remainingNumber = this.maxLength - this.count;
|
|
513
521
|
const isError = remainingNumber < 0;
|
|
514
522
|
this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());
|
|
515
523
|
if (!this.$errorMessage) {
|
|
@@ -527,16 +535,18 @@
|
|
|
527
535
|
}
|
|
528
536
|
this.$screenReaderCountMessage.textContent = this.getCountMessage();
|
|
529
537
|
}
|
|
530
|
-
|
|
538
|
+
updateCount() {
|
|
539
|
+
const text = this.$textarea.value;
|
|
531
540
|
if (this.config.maxwords) {
|
|
532
541
|
var _text$match;
|
|
533
542
|
const tokens = (_text$match = text.match(/\S+/g)) != null ? _text$match : [];
|
|
534
|
-
|
|
543
|
+
this.count = tokens.length;
|
|
544
|
+
return;
|
|
535
545
|
}
|
|
536
|
-
|
|
546
|
+
this.count = text.length;
|
|
537
547
|
}
|
|
538
548
|
getCountMessage() {
|
|
539
|
-
const remainingNumber = this.maxLength - this.count
|
|
549
|
+
const remainingNumber = this.maxLength - this.count;
|
|
540
550
|
const countType = this.config.maxwords ? 'words' : 'characters';
|
|
541
551
|
return this.formatCountMessage(remainingNumber, countType);
|
|
542
552
|
}
|
|
@@ -553,7 +563,7 @@
|
|
|
553
563
|
if (!this.config.threshold) {
|
|
554
564
|
return true;
|
|
555
565
|
}
|
|
556
|
-
const currentLength = this.count
|
|
566
|
+
const currentLength = this.count;
|
|
557
567
|
const maxLength = this.maxLength;
|
|
558
568
|
const thresholdValue = maxLength * this.config.threshold / 100;
|
|
559
569
|
return thresholdValue <= currentLength;
|