govuk_publishing_components 68.2.0 → 69.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/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +44 -17
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +98 -139
- data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +26 -16
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +12 -11
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +3 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +14 -11
- data/app/assets/stylesheets/component_guide/application.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_add-another.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_app-promo-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +1 -1
- 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 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +6 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +15 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +1 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_pagination.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_password-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_search-with-autocomplete.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_select-with-search.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +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 +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_sub-navigation-menu.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-card.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_tag.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +9 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_form-download.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +3 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +5 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_index.scss +0 -1
- data/app/views/govuk_publishing_components/components/_date_input.html.erb +16 -10
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +81 -74
- data/app/views/govuk_publishing_components/components/_option_select.html.erb +9 -20
- data/app/views/govuk_publishing_components/components/docs/date_input.yml +23 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/choices.js/README.md +1 -1
- data/node_modules/choices.js/package.json +5 -9
- data/node_modules/choices.js/public/assets/scripts/choices.js +32 -23
- data/node_modules/choices.js/public/assets/scripts/choices.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.mjs +32 -23
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.js +31 -22
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.mjs +31 -22
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.js +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.mjs +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.js +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.mjs +30 -21
- data/node_modules/choices.js/public/types/src/scripts/choices.d.ts +3 -3
- data/node_modules/choices.js/public/types/src/scripts/interfaces/templates.d.ts +1 -1
- data/node_modules/choices.js/src/scripts/choices.ts +30 -25
- data/node_modules/choices.js/src/scripts/components/dropdown.ts +7 -3
- data/node_modules/choices.js/src/scripts/interfaces/templates.ts +1 -1
- data/node_modules/choices.js/src/scripts/templates.ts +8 -3
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +7 -3
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +8 -4
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +10 -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/_cookie-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +2 -0
- 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/_error-summary.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -1
- 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.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +2 -0
- 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 +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +6 -2
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +3 -1
- 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/_phase-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +14 -10
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -1
- 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/_service-navigation.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +7 -3
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +15 -2
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +5 -2
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +6 -2
- 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/_task-list.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +10 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +14 -13
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +38 -70
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +4 -4
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +17 -15
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +19 -13
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +48 -26
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +13 -11
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +4 -2
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +10 -9
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +7 -2
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +18 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +28 -4
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +8 -16
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +15 -2
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +13 -5
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +13 -5
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +5 -3
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +4 -2
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +1 -1
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
- data/node_modules/govuk-frontend/package.json +7 -7
- metadata +4 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_grid-helper.scss +0 -145
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
page_history ||= []
|
|
11
11
|
page_history = Array(page_history)
|
|
12
12
|
|
|
13
|
+
history ||= nil
|
|
14
|
+
first_published ||= nil
|
|
15
|
+
last_updated ||= nil
|
|
13
16
|
other ||= nil
|
|
14
17
|
inverse ||= false
|
|
15
18
|
inverse_compress ||= false
|
|
@@ -34,83 +37,87 @@
|
|
|
34
37
|
type: "content history",
|
|
35
38
|
section: "Top",
|
|
36
39
|
}.to_json unless disable_ga4
|
|
40
|
+
|
|
41
|
+
render_component = true if from.any? || part_of.any? || history || first_published || last_updated || page_history.any? || other
|
|
37
42
|
%>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<dl class="gem-c-metadata__list">
|
|
50
|
-
<% if from.any? %>
|
|
51
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.from") %>:</dt>
|
|
52
|
-
<dd class="gem-c-metadata__definition">
|
|
53
|
-
<%= render "govuk_publishing_components/components/metadata/sentence", items: from, toggle_id: "from-#{SecureRandom.hex(4)}" %>
|
|
54
|
-
</dd>
|
|
55
|
-
<% end %>
|
|
56
|
-
<% if part_of.any? %>
|
|
57
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.part_of") %>:</dt>
|
|
58
|
-
<dd class="gem-c-metadata__definition">
|
|
59
|
-
<%= render "govuk_publishing_components/components/metadata/sentence", items: part_of, toggle_id: "part-of-#{SecureRandom.hex(4)}" %>
|
|
60
|
-
</dd>
|
|
61
|
-
<% end %>
|
|
62
|
-
<% if local_assigns.include?(:history) %>
|
|
63
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.history") %>:</dt>
|
|
64
|
-
<dd class="gem-c-metadata__definition"><%= history %></dd>
|
|
65
|
-
<% end %>
|
|
66
|
-
<% if local_assigns.include?(:first_published) && first_published %>
|
|
67
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.published") %>:</dt>
|
|
68
|
-
<dd class="gem-c-metadata__definition"><%= first_published %></dd>
|
|
43
|
+
<% if render_component %>
|
|
44
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
|
45
|
+
<% if title.present? %>
|
|
46
|
+
<%= render "govuk_publishing_components/components/heading", {
|
|
47
|
+
text: sanitize(title),
|
|
48
|
+
font_size: "m",
|
|
49
|
+
inverse:,
|
|
50
|
+
margin_bottom: 2,
|
|
51
|
+
} %>
|
|
52
|
+
<% elsif page_history.any? %>
|
|
53
|
+
<h2 class="govuk-visually-hidden"><%= t("components.metadata.hidden_heading") %></h2>
|
|
69
54
|
<% end %>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
55
|
+
<dl class="gem-c-metadata__list">
|
|
56
|
+
<% if from.any? %>
|
|
57
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.from") %>:</dt>
|
|
58
|
+
<dd class="gem-c-metadata__definition">
|
|
59
|
+
<%= render "govuk_publishing_components/components/metadata/sentence", items: from, toggle_id: "from-#{SecureRandom.hex(4)}" %>
|
|
60
|
+
</dd>
|
|
61
|
+
<% end %>
|
|
62
|
+
<% if part_of.any? %>
|
|
63
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.part_of") %>:</dt>
|
|
64
|
+
<dd class="gem-c-metadata__definition">
|
|
65
|
+
<%= render "govuk_publishing_components/components/metadata/sentence", items: part_of, toggle_id: "part-of-#{SecureRandom.hex(4)}" %>
|
|
66
|
+
</dd>
|
|
67
|
+
<% end %>
|
|
68
|
+
<% if local_assigns.include?(:history) %>
|
|
69
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.history") %>:</dt>
|
|
70
|
+
<dd class="gem-c-metadata__definition"><%= history %></dd>
|
|
71
|
+
<% end %>
|
|
72
|
+
<% if local_assigns.include?(:first_published) && first_published %>
|
|
73
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.published") %>:</dt>
|
|
74
|
+
<dd class="gem-c-metadata__definition"><%= first_published %></dd>
|
|
75
|
+
<% end %>
|
|
76
|
+
<% if local_assigns.include?(:last_updated) && last_updated %>
|
|
77
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated") %>:</dt>
|
|
78
|
+
<dd class="gem-c-metadata__definition">
|
|
79
|
+
<%= last_updated %>
|
|
80
|
+
<% if local_assigns.include?(:see_updates_link) %>
|
|
81
|
+
— <a href="#full-publication-update-history"
|
|
82
|
+
class="gem-c-metadata__definition-link govuk-!-display-none-print js-see-all-updates-link">
|
|
83
|
+
<%= t("components.metadata.see_all_updates") %>
|
|
84
|
+
</a>
|
|
85
|
+
<% end %>
|
|
86
|
+
<% if page_history.any? %>
|
|
87
|
+
<%= render "govuk_publishing_components/components/details", {
|
|
88
|
+
title: t("components.metadata.show_all_updates", locale: :en),
|
|
89
|
+
small: true,
|
|
90
|
+
} do %>
|
|
91
|
+
<ol class="gem-c-metadata__change-history">
|
|
92
|
+
<% page_history.each do |change| %>
|
|
93
|
+
<li class="gem-c-metadata__change-history-item">
|
|
94
|
+
<time class="gem-c-metadata__change-date" datetime="<%= change[:timestamp] %>"><%= change[:display_time] %></time>
|
|
95
|
+
<p class="gem-c-metadata__change-note"><%= change[:note].strip %></p>
|
|
96
|
+
</li>
|
|
97
|
+
<% end %>
|
|
98
|
+
</ol>
|
|
99
|
+
<% end %>
|
|
100
|
+
<% end %>
|
|
101
|
+
</dd>
|
|
102
|
+
<% end %>
|
|
103
|
+
<% if other.present? %>
|
|
104
|
+
<% other.each_with_index do |(title, definition), index| %>
|
|
105
|
+
<%
|
|
106
|
+
definition ||= []
|
|
107
|
+
definition = Array(definition)
|
|
108
|
+
%>
|
|
109
|
+
<% if definition.any? %>
|
|
110
|
+
<dt class="gem-c-metadata__term"><%= title %>:</dt>
|
|
111
|
+
<dd class="gem-c-metadata__definition"
|
|
112
|
+
<% unless disable_ga4 %>
|
|
113
|
+
data-module="ga4-link-tracker"
|
|
114
|
+
data-ga4-link="<%= ga4_object %>"
|
|
115
|
+
<% end %>>
|
|
116
|
+
<%= render "govuk_publishing_components/components/metadata/sentence", items: definition, toggle_id: "#{index}-#{SecureRandom.hex(4)}" %>
|
|
117
|
+
</dd>
|
|
93
118
|
<% end %>
|
|
94
|
-
<% end %>
|
|
95
|
-
</dd>
|
|
96
|
-
<% end %>
|
|
97
|
-
<% if other.present? %>
|
|
98
|
-
<% other.each_with_index do |(title, definition), index| %>
|
|
99
|
-
<%
|
|
100
|
-
definition ||= []
|
|
101
|
-
definition = Array(definition)
|
|
102
|
-
%>
|
|
103
|
-
<% if definition.any? %>
|
|
104
|
-
<dt class="gem-c-metadata__term"><%= title %>:</dt>
|
|
105
|
-
<dd class="gem-c-metadata__definition"
|
|
106
|
-
<% unless disable_ga4 %>
|
|
107
|
-
data-module="ga4-link-tracker"
|
|
108
|
-
data-ga4-link="<%= ga4_object %>"
|
|
109
|
-
<% end %>>
|
|
110
|
-
<%= render "govuk_publishing_components/components/metadata/sentence", items: definition, toggle_id: "#{index}-#{SecureRandom.hex(4)}" %>
|
|
111
|
-
</dd>
|
|
112
119
|
<% end %>
|
|
113
120
|
<% end %>
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
</dl>
|
|
122
|
+
<% end %>
|
|
116
123
|
<% end %>
|
|
@@ -4,35 +4,24 @@
|
|
|
4
4
|
checkboxes_count_id = checkboxes_id + "-count"
|
|
5
5
|
show_filter ||= false
|
|
6
6
|
large ||= false
|
|
7
|
-
%>
|
|
8
|
-
|
|
9
|
-
<% if show_filter %>
|
|
10
|
-
<% filter_id ||= "input-#{SecureRandom.hex(4)}" %>
|
|
11
|
-
<% filter = capture do %>
|
|
12
|
-
<%= tag.label for: filter_id, class: "govuk-label govuk-visually-hidden" do %>
|
|
13
|
-
Filter <%= title %>
|
|
14
|
-
<% end %>
|
|
15
7
|
|
|
16
|
-
|
|
8
|
+
if show_filter
|
|
9
|
+
filter_id ||= "input-#{SecureRandom.hex(4)}"
|
|
10
|
+
filter_attributes = {
|
|
17
11
|
id: filter_id,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} %>
|
|
24
|
-
<% end %>
|
|
25
|
-
<% filter_element = CGI::escapeHTML(filter) %>
|
|
26
|
-
<% end %>
|
|
12
|
+
title: "Filter #{title}",
|
|
13
|
+
describedby: checkboxes_count_id,
|
|
14
|
+
controls: checkboxes_id,
|
|
15
|
+
}
|
|
16
|
+
end
|
|
27
17
|
|
|
28
|
-
<%
|
|
29
18
|
helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
30
19
|
helper.add_class("gem-c-option-select")
|
|
31
20
|
helper.add_data_attribute({ module: "option-select" })
|
|
32
21
|
helper.add_data_attribute({ "closed-on-load": true }) if local_assigns.include?(:closed_on_load) && closed_on_load
|
|
33
22
|
helper.add_data_attribute({ "closed-on-load-mobile": "true" }) if local_assigns.include?(:closed_on_load_mobile) && closed_on_load_mobile
|
|
34
23
|
helper.add_data_attribute({ "input-aria-controls": aria_controls_id }) if local_assigns.include?(:aria_controls_id)
|
|
35
|
-
helper.add_data_attribute({ "filter-
|
|
24
|
+
helper.add_data_attribute({ "filter-attributes": filter_attributes }) if filter_attributes
|
|
36
25
|
helper.add_data_attribute({ "button-data-attributes": button_data_attributes }) if local_assigns.include?(:button_data_attributes)
|
|
37
26
|
|
|
38
27
|
options_container_classes = %w[gem-c-option-select__container js-options-container]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
name: Form date input
|
|
2
2
|
description: Use the date input component to help users enter a memorable date or one they can easily look up.
|
|
3
|
+
uses_component_wrapper_helper: true
|
|
3
4
|
accessibility_criteria: |
|
|
4
5
|
Inputs in the component must:
|
|
5
6
|
|
|
@@ -36,22 +37,44 @@ examples:
|
|
|
36
37
|
with_legend:
|
|
37
38
|
data:
|
|
38
39
|
legend_text: "What is your date of birth?"
|
|
40
|
+
with_legend_level_and_size:
|
|
41
|
+
description: Valid options for level are 1 to 6. Valid options for size are s, m, l and xl.
|
|
42
|
+
data:
|
|
43
|
+
legend_text: "What is your date of birth?"
|
|
44
|
+
legend_heading_level: 2
|
|
45
|
+
legend_size: "l"
|
|
39
46
|
with_hint:
|
|
47
|
+
description: When hint text is rendered each input field takes the value of `hint_id` as a value for the `aria-describedby` attribute
|
|
40
48
|
data:
|
|
41
49
|
legend_text: "What is your date of birth?"
|
|
42
50
|
hint: "For example, 31 3 1980"
|
|
43
51
|
with_error:
|
|
52
|
+
description: When an error message is rendered each input field takes the value of `error_id` as a value for the `aria-describedby` attribute. Note that error_id is optional, if it is not passed one will be generated automatically.
|
|
44
53
|
data:
|
|
45
54
|
legend_text: "What is your date of birth?"
|
|
46
55
|
hint: "For example, 31 3 1980"
|
|
56
|
+
error_id: error_item_id
|
|
47
57
|
error_message: "Error message goes here"
|
|
48
58
|
with_error_items:
|
|
59
|
+
description: When error messages are rendered each input field takes the value of `error_id` as a value for the `aria-describedby` attribute. Note that error_id is optional, if it is not passed one will be generated automatically.
|
|
49
60
|
data:
|
|
50
61
|
legend_text: "What is your date of birth?"
|
|
51
62
|
hint: "For example, 31 3 1980"
|
|
63
|
+
error_id: error_id
|
|
52
64
|
error_items:
|
|
53
65
|
- text: "Error 1"
|
|
54
66
|
- text: "Error 2"
|
|
67
|
+
with_error_id_but_no_message:
|
|
68
|
+
description: For some instances of this component the error message should be rendered separately but an error state is still required. In this scenario an `error_id` can be passed without an `error_message` to highlight the component and set `aria-describedby` correctly.
|
|
69
|
+
data:
|
|
70
|
+
legend_text: "What is your date of birth?"
|
|
71
|
+
hint: "For example, 31 3 1980"
|
|
72
|
+
error_id: error_id
|
|
73
|
+
with_data_attributes:
|
|
74
|
+
data:
|
|
75
|
+
data_attributes:
|
|
76
|
+
module: "some-module"
|
|
77
|
+
other_attribute: "something-else"
|
|
55
78
|
with_custom_items:
|
|
56
79
|
data:
|
|
57
80
|
legend_text: "Beth yw eich dyddiad geni?"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "choices.js",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.4",
|
|
4
4
|
"description": "A vanilla JS customisable text input/select box plugin",
|
|
5
5
|
"main": "./public/assets/scripts/choices.js",
|
|
6
6
|
"module": "./public/assets/scripts/choices.mjs",
|
|
@@ -105,11 +105,9 @@
|
|
|
105
105
|
"@rollup/plugin-replace": "^5.0.7",
|
|
106
106
|
"@rollup/plugin-terser": "^1.0.0",
|
|
107
107
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
108
|
-
"@types/chai": "^4.3.17",
|
|
109
108
|
"@types/node": "^22.12.0",
|
|
110
|
-
"@
|
|
111
|
-
"@
|
|
112
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
109
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
110
|
+
"@vitest/spy": "^4.1.10",
|
|
113
111
|
"autoprefixer": "^10.4.20",
|
|
114
112
|
"bundlesize2": "^0.0.35",
|
|
115
113
|
"chai": "^5.1.1",
|
|
@@ -131,17 +129,15 @@
|
|
|
131
129
|
"postcss-cli": "^11.0.0",
|
|
132
130
|
"prettier": "^3.3.3",
|
|
133
131
|
"rollup": "^4.20.0",
|
|
134
|
-
"rollup-plugin-dev": "^2.0.
|
|
132
|
+
"rollup-plugin-dev": "^2.0.3",
|
|
135
133
|
"sass": "^1.77.8",
|
|
136
|
-
"sinon": "^18.0.0",
|
|
137
|
-
"sinon-chai": "^4.0.0",
|
|
138
134
|
"stylelint": "^16.7.0",
|
|
139
135
|
"stylelint-config-standard": "^36.0.1",
|
|
140
136
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
141
137
|
"tslib": "^2.6.3",
|
|
142
138
|
"typescript": "5.5.x",
|
|
143
139
|
"typescript-eslint": "^8.0.1",
|
|
144
|
-
"vitest": "^
|
|
140
|
+
"vitest": "^4.1.10"
|
|
145
141
|
},
|
|
146
142
|
"dependencies": {
|
|
147
143
|
"fuse.js": "^7.0.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! choices.js v11.2.
|
|
1
|
+
/*! choices.js v11.2.4 | © 2026 Josh Johnson | https://github.com/Choices-js/Choices#readme */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -357,7 +357,9 @@
|
|
|
357
357
|
*/
|
|
358
358
|
Dropdown.prototype.show = function () {
|
|
359
359
|
addClassesToElement(this.element, this.classNames.activeState);
|
|
360
|
-
this.
|
|
360
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
361
|
+
this.element.setAttribute('aria-expanded', 'true');
|
|
362
|
+
}
|
|
361
363
|
this.isActive = true;
|
|
362
364
|
return this;
|
|
363
365
|
};
|
|
@@ -366,7 +368,9 @@
|
|
|
366
368
|
*/
|
|
367
369
|
Dropdown.prototype.hide = function () {
|
|
368
370
|
removeClassesFromElement(this.element, this.classNames.activeState);
|
|
369
|
-
this.
|
|
371
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
372
|
+
this.element.setAttribute('aria-expanded', 'false');
|
|
373
|
+
}
|
|
370
374
|
this.isActive = false;
|
|
371
375
|
return this;
|
|
372
376
|
};
|
|
@@ -2191,7 +2195,7 @@
|
|
|
2191
2195
|
static isSingleMatch(pattern) {
|
|
2192
2196
|
return getMatch(pattern, this.singleRegex);
|
|
2193
2197
|
}
|
|
2194
|
-
search(
|
|
2198
|
+
search(/*text*/) {}
|
|
2195
2199
|
}
|
|
2196
2200
|
function getMatch(pattern, exp) {
|
|
2197
2201
|
const matches = pattern.match(exp);
|
|
@@ -2770,7 +2774,7 @@
|
|
|
2770
2774
|
this._docs.push(doc);
|
|
2771
2775
|
this._myIndex.add(doc);
|
|
2772
2776
|
}
|
|
2773
|
-
remove(predicate = (
|
|
2777
|
+
remove(predicate = (/* doc, idx */) => false) {
|
|
2774
2778
|
const results = [];
|
|
2775
2779
|
for (let i = 0, len = this._docs.length; i < len; i += 1) {
|
|
2776
2780
|
const doc = this._docs[i];
|
|
@@ -3317,12 +3321,14 @@
|
|
|
3317
3321
|
}
|
|
3318
3322
|
return inp;
|
|
3319
3323
|
},
|
|
3320
|
-
dropdown: function (_a) {
|
|
3324
|
+
dropdown: function (_a, passedElementType) {
|
|
3321
3325
|
var _b = _a.classNames, list = _b.list, listDropdown = _b.listDropdown;
|
|
3322
3326
|
var div = document.createElement('div');
|
|
3323
3327
|
addClassesToElement(div, list);
|
|
3324
3328
|
addClassesToElement(div, listDropdown);
|
|
3325
|
-
|
|
3329
|
+
if (passedElementType !== PassedElementTypes.Text) {
|
|
3330
|
+
div.setAttribute('aria-expanded', 'false');
|
|
3331
|
+
}
|
|
3326
3332
|
return div;
|
|
3327
3333
|
},
|
|
3328
3334
|
notice: function (_a, innerHTML, type) {
|
|
@@ -3697,13 +3703,14 @@
|
|
|
3697
3703
|
// eslint-disable-next-line no-param-reassign
|
|
3698
3704
|
preventInputFocus = !this._canSearch;
|
|
3699
3705
|
}
|
|
3706
|
+
// to ensure a virtual keyboard trigger as expected, the focus/animation must be started from the input event and not an animation frame which
|
|
3707
|
+
this.dropdown.show();
|
|
3708
|
+
var rect = this.dropdown.element.getBoundingClientRect();
|
|
3709
|
+
this.containerOuter.open(rect.bottom, rect.height);
|
|
3710
|
+
if (!preventInputFocus) {
|
|
3711
|
+
this.input.focus();
|
|
3712
|
+
}
|
|
3700
3713
|
requestAnimationFrame(function () {
|
|
3701
|
-
_this.dropdown.show();
|
|
3702
|
-
var rect = _this.dropdown.element.getBoundingClientRect();
|
|
3703
|
-
_this.containerOuter.open(rect.bottom, rect.height);
|
|
3704
|
-
if (!preventInputFocus) {
|
|
3705
|
-
_this.input.focus();
|
|
3706
|
-
}
|
|
3707
3714
|
_this.passedElement.triggerEvent(EventType.showDropdown);
|
|
3708
3715
|
var activeElement = _this.choiceList.element.querySelector(getClassNamesSelector(_this.config.classNames.selectedState));
|
|
3709
3716
|
if (activeElement !== null && !isScrolledIntoView(activeElement, _this.choiceList.element)) {
|
|
@@ -3838,7 +3845,6 @@
|
|
|
3838
3845
|
*/
|
|
3839
3846
|
Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices, clearSearchFlag, replaceItems) {
|
|
3840
3847
|
var _this = this;
|
|
3841
|
-
if (choicesArrayOrFetcher === void 0) { choicesArrayOrFetcher = []; }
|
|
3842
3848
|
if (value === void 0) { value = 'value'; }
|
|
3843
3849
|
if (label === void 0) { label = 'label'; }
|
|
3844
3850
|
if (replaceChoices === void 0) { replaceChoices = false; }
|
|
@@ -3858,7 +3864,7 @@
|
|
|
3858
3864
|
// it's a choices fetcher function
|
|
3859
3865
|
var fetcher_1 = choicesArrayOrFetcher(this);
|
|
3860
3866
|
if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {
|
|
3861
|
-
//
|
|
3867
|
+
// @ts-expect-error wonky typing
|
|
3862
3868
|
// eslint-disable-next-line no-promise-executor-return
|
|
3863
3869
|
return new Promise(function (resolve) { return requestAnimationFrame(resolve); })
|
|
3864
3870
|
.then(function () { return _this._handleLoadingState(true); })
|
|
@@ -3878,6 +3884,7 @@
|
|
|
3878
3884
|
if (!Array.isArray(fetcher_1)) {
|
|
3879
3885
|
throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof fetcher_1));
|
|
3880
3886
|
}
|
|
3887
|
+
// @ts-expect-error wonky typing
|
|
3881
3888
|
// eslint-disable-next-line no-param-reassign
|
|
3882
3889
|
choicesArrayOrFetcher = fetcher_1;
|
|
3883
3890
|
}
|
|
@@ -3923,6 +3930,7 @@
|
|
|
3923
3930
|
}
|
|
3924
3931
|
// @todo integrate with Store
|
|
3925
3932
|
this._searcher.reset();
|
|
3933
|
+
// @ts-expect-error wonky typing
|
|
3926
3934
|
return this;
|
|
3927
3935
|
};
|
|
3928
3936
|
Choices.prototype.refresh = function (withEvents, selectFirstOption, deselectAll) {
|
|
@@ -4485,10 +4493,6 @@
|
|
|
4485
4493
|
var config = this.config;
|
|
4486
4494
|
var canAddItem = true;
|
|
4487
4495
|
var notice = '';
|
|
4488
|
-
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
4489
|
-
canAddItem = false;
|
|
4490
|
-
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
4491
|
-
}
|
|
4492
4496
|
if (canAddItem) {
|
|
4493
4497
|
var foundChoice = this._store.choices.find(function (choice) { return config.valueComparer(choice.value, value); });
|
|
4494
4498
|
if (foundChoice) {
|
|
@@ -4503,6 +4507,10 @@
|
|
|
4503
4507
|
}
|
|
4504
4508
|
}
|
|
4505
4509
|
}
|
|
4510
|
+
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
4511
|
+
canAddItem = false;
|
|
4512
|
+
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
4513
|
+
}
|
|
4506
4514
|
if (canAddItem) {
|
|
4507
4515
|
notice = resolveNoticeFunction(config.addItemText, value, undefined);
|
|
4508
4516
|
}
|
|
@@ -4822,7 +4830,8 @@
|
|
|
4822
4830
|
}
|
|
4823
4831
|
}
|
|
4824
4832
|
else {
|
|
4825
|
-
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState))
|
|
4833
|
+
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState)) ||
|
|
4834
|
+
this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.selectedState));
|
|
4826
4835
|
if (currentEl) {
|
|
4827
4836
|
nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);
|
|
4828
4837
|
}
|
|
@@ -4927,8 +4936,8 @@
|
|
|
4927
4936
|
}
|
|
4928
4937
|
}
|
|
4929
4938
|
else {
|
|
4930
|
-
this.showDropdown();
|
|
4931
4939
|
containerOuter.element.focus();
|
|
4940
|
+
this.showDropdown();
|
|
4932
4941
|
}
|
|
4933
4942
|
}
|
|
4934
4943
|
else if (this._isSelectOneElement &&
|
|
@@ -5198,7 +5207,7 @@
|
|
|
5198
5207
|
element: templating.itemList(config, isSelectOneElement),
|
|
5199
5208
|
});
|
|
5200
5209
|
this.dropdown = new Dropdown({
|
|
5201
|
-
element: templating.dropdown(config),
|
|
5210
|
+
element: templating.dropdown(config, elementType),
|
|
5202
5211
|
classNames: classNames,
|
|
5203
5212
|
type: elementType,
|
|
5204
5213
|
});
|
|
@@ -5312,7 +5321,7 @@
|
|
|
5312
5321
|
throw new TypeError("".concat(caller, " called for an element which has multiple instances of Choices initialised on it"));
|
|
5313
5322
|
}
|
|
5314
5323
|
};
|
|
5315
|
-
Choices.version = '11.2.
|
|
5324
|
+
Choices.version = '11.2.4';
|
|
5316
5325
|
return Choices;
|
|
5317
5326
|
}());
|
|
5318
5327
|
|