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
|
@@ -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
|
/******************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
@@ -351,7 +351,9 @@ var Dropdown = /** @class */ (function () {
|
|
|
351
351
|
*/
|
|
352
352
|
Dropdown.prototype.show = function () {
|
|
353
353
|
addClassesToElement(this.element, this.classNames.activeState);
|
|
354
|
-
this.
|
|
354
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
355
|
+
this.element.setAttribute('aria-expanded', 'true');
|
|
356
|
+
}
|
|
355
357
|
this.isActive = true;
|
|
356
358
|
return this;
|
|
357
359
|
};
|
|
@@ -360,7 +362,9 @@ var Dropdown = /** @class */ (function () {
|
|
|
360
362
|
*/
|
|
361
363
|
Dropdown.prototype.hide = function () {
|
|
362
364
|
removeClassesFromElement(this.element, this.classNames.activeState);
|
|
363
|
-
this.
|
|
365
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
366
|
+
this.element.setAttribute('aria-expanded', 'false');
|
|
367
|
+
}
|
|
364
368
|
this.isActive = false;
|
|
365
369
|
return this;
|
|
366
370
|
};
|
|
@@ -2346,7 +2350,7 @@ class Fuse {
|
|
|
2346
2350
|
this._docs.push(doc);
|
|
2347
2351
|
this._myIndex.add(doc);
|
|
2348
2352
|
}
|
|
2349
|
-
remove(predicate = (
|
|
2353
|
+
remove(predicate = (/* doc, idx */) => false) {
|
|
2350
2354
|
const results = [];
|
|
2351
2355
|
for (let i = 0, len = this._docs.length; i < len; i += 1) {
|
|
2352
2356
|
const doc = this._docs[i];
|
|
@@ -2832,12 +2836,14 @@ var templates = {
|
|
|
2832
2836
|
}
|
|
2833
2837
|
return inp;
|
|
2834
2838
|
},
|
|
2835
|
-
dropdown: function (_a) {
|
|
2839
|
+
dropdown: function (_a, passedElementType) {
|
|
2836
2840
|
var _b = _a.classNames, list = _b.list, listDropdown = _b.listDropdown;
|
|
2837
2841
|
var div = document.createElement('div');
|
|
2838
2842
|
addClassesToElement(div, list);
|
|
2839
2843
|
addClassesToElement(div, listDropdown);
|
|
2840
|
-
|
|
2844
|
+
if (passedElementType !== PassedElementTypes.Text) {
|
|
2845
|
+
div.setAttribute('aria-expanded', 'false');
|
|
2846
|
+
}
|
|
2841
2847
|
return div;
|
|
2842
2848
|
},
|
|
2843
2849
|
notice: function (_a, innerHTML, type) {
|
|
@@ -3212,13 +3218,14 @@ var Choices = /** @class */ (function () {
|
|
|
3212
3218
|
// eslint-disable-next-line no-param-reassign
|
|
3213
3219
|
preventInputFocus = !this._canSearch;
|
|
3214
3220
|
}
|
|
3221
|
+
// to ensure a virtual keyboard trigger as expected, the focus/animation must be started from the input event and not an animation frame which
|
|
3222
|
+
this.dropdown.show();
|
|
3223
|
+
var rect = this.dropdown.element.getBoundingClientRect();
|
|
3224
|
+
this.containerOuter.open(rect.bottom, rect.height);
|
|
3225
|
+
if (!preventInputFocus) {
|
|
3226
|
+
this.input.focus();
|
|
3227
|
+
}
|
|
3215
3228
|
requestAnimationFrame(function () {
|
|
3216
|
-
_this.dropdown.show();
|
|
3217
|
-
var rect = _this.dropdown.element.getBoundingClientRect();
|
|
3218
|
-
_this.containerOuter.open(rect.bottom, rect.height);
|
|
3219
|
-
if (!preventInputFocus) {
|
|
3220
|
-
_this.input.focus();
|
|
3221
|
-
}
|
|
3222
3229
|
_this.passedElement.triggerEvent(EventType.showDropdown);
|
|
3223
3230
|
var activeElement = _this.choiceList.element.querySelector(getClassNamesSelector(_this.config.classNames.selectedState));
|
|
3224
3231
|
if (activeElement !== null && !isScrolledIntoView(activeElement, _this.choiceList.element)) {
|
|
@@ -3353,7 +3360,6 @@ var Choices = /** @class */ (function () {
|
|
|
3353
3360
|
*/
|
|
3354
3361
|
Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices, clearSearchFlag, replaceItems) {
|
|
3355
3362
|
var _this = this;
|
|
3356
|
-
if (choicesArrayOrFetcher === void 0) { choicesArrayOrFetcher = []; }
|
|
3357
3363
|
if (value === void 0) { value = 'value'; }
|
|
3358
3364
|
if (label === void 0) { label = 'label'; }
|
|
3359
3365
|
if (replaceChoices === void 0) { replaceChoices = false; }
|
|
@@ -3373,7 +3379,7 @@ var Choices = /** @class */ (function () {
|
|
|
3373
3379
|
// it's a choices fetcher function
|
|
3374
3380
|
var fetcher_1 = choicesArrayOrFetcher(this);
|
|
3375
3381
|
if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {
|
|
3376
|
-
//
|
|
3382
|
+
// @ts-expect-error wonky typing
|
|
3377
3383
|
// eslint-disable-next-line no-promise-executor-return
|
|
3378
3384
|
return new Promise(function (resolve) { return requestAnimationFrame(resolve); })
|
|
3379
3385
|
.then(function () { return _this._handleLoadingState(true); })
|
|
@@ -3393,6 +3399,7 @@ var Choices = /** @class */ (function () {
|
|
|
3393
3399
|
if (!Array.isArray(fetcher_1)) {
|
|
3394
3400
|
throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof fetcher_1));
|
|
3395
3401
|
}
|
|
3402
|
+
// @ts-expect-error wonky typing
|
|
3396
3403
|
// eslint-disable-next-line no-param-reassign
|
|
3397
3404
|
choicesArrayOrFetcher = fetcher_1;
|
|
3398
3405
|
}
|
|
@@ -3438,6 +3445,7 @@ var Choices = /** @class */ (function () {
|
|
|
3438
3445
|
}
|
|
3439
3446
|
// @todo integrate with Store
|
|
3440
3447
|
this._searcher.reset();
|
|
3448
|
+
// @ts-expect-error wonky typing
|
|
3441
3449
|
return this;
|
|
3442
3450
|
};
|
|
3443
3451
|
Choices.prototype.refresh = function (withEvents, selectFirstOption, deselectAll) {
|
|
@@ -4000,10 +4008,6 @@ var Choices = /** @class */ (function () {
|
|
|
4000
4008
|
var config = this.config;
|
|
4001
4009
|
var canAddItem = true;
|
|
4002
4010
|
var notice = '';
|
|
4003
|
-
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
4004
|
-
canAddItem = false;
|
|
4005
|
-
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
4006
|
-
}
|
|
4007
4011
|
if (canAddItem) {
|
|
4008
4012
|
var foundChoice = this._store.choices.find(function (choice) { return config.valueComparer(choice.value, value); });
|
|
4009
4013
|
if (foundChoice) {
|
|
@@ -4018,6 +4022,10 @@ var Choices = /** @class */ (function () {
|
|
|
4018
4022
|
}
|
|
4019
4023
|
}
|
|
4020
4024
|
}
|
|
4025
|
+
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
4026
|
+
canAddItem = false;
|
|
4027
|
+
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
4028
|
+
}
|
|
4021
4029
|
if (canAddItem) {
|
|
4022
4030
|
notice = resolveNoticeFunction(config.addItemText, value, undefined);
|
|
4023
4031
|
}
|
|
@@ -4337,7 +4345,8 @@ var Choices = /** @class */ (function () {
|
|
|
4337
4345
|
}
|
|
4338
4346
|
}
|
|
4339
4347
|
else {
|
|
4340
|
-
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState))
|
|
4348
|
+
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState)) ||
|
|
4349
|
+
this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.selectedState));
|
|
4341
4350
|
if (currentEl) {
|
|
4342
4351
|
nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);
|
|
4343
4352
|
}
|
|
@@ -4442,8 +4451,8 @@ var Choices = /** @class */ (function () {
|
|
|
4442
4451
|
}
|
|
4443
4452
|
}
|
|
4444
4453
|
else {
|
|
4445
|
-
this.showDropdown();
|
|
4446
4454
|
containerOuter.element.focus();
|
|
4455
|
+
this.showDropdown();
|
|
4447
4456
|
}
|
|
4448
4457
|
}
|
|
4449
4458
|
else if (this._isSelectOneElement &&
|
|
@@ -4713,7 +4722,7 @@ var Choices = /** @class */ (function () {
|
|
|
4713
4722
|
element: templating.itemList(config, isSelectOneElement),
|
|
4714
4723
|
});
|
|
4715
4724
|
this.dropdown = new Dropdown({
|
|
4716
|
-
element: templating.dropdown(config),
|
|
4725
|
+
element: templating.dropdown(config, elementType),
|
|
4717
4726
|
classNames: classNames,
|
|
4718
4727
|
type: elementType,
|
|
4719
4728
|
});
|
|
@@ -4827,7 +4836,7 @@ var Choices = /** @class */ (function () {
|
|
|
4827
4836
|
throw new TypeError("".concat(caller, " called for an element which has multiple instances of Choices initialised on it"));
|
|
4828
4837
|
}
|
|
4829
4838
|
};
|
|
4830
|
-
Choices.version = '11.2.
|
|
4839
|
+
Choices.version = '11.2.4';
|
|
4831
4840
|
return Choices;
|
|
4832
4841
|
}());
|
|
4833
4842
|
|
|
@@ -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() :
|
|
@@ -348,7 +348,9 @@
|
|
|
348
348
|
*/
|
|
349
349
|
Dropdown.prototype.show = function () {
|
|
350
350
|
addClassesToElement(this.element, this.classNames.activeState);
|
|
351
|
-
this.
|
|
351
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
352
|
+
this.element.setAttribute('aria-expanded', 'true');
|
|
353
|
+
}
|
|
352
354
|
this.isActive = true;
|
|
353
355
|
return this;
|
|
354
356
|
};
|
|
@@ -357,7 +359,9 @@
|
|
|
357
359
|
*/
|
|
358
360
|
Dropdown.prototype.hide = function () {
|
|
359
361
|
removeClassesFromElement(this.element, this.classNames.activeState);
|
|
360
|
-
this.
|
|
362
|
+
if (this.type !== PassedElementTypes.Text) {
|
|
363
|
+
this.element.setAttribute('aria-expanded', 'false');
|
|
364
|
+
}
|
|
361
365
|
this.isActive = false;
|
|
362
366
|
return this;
|
|
363
367
|
};
|
|
@@ -1725,12 +1729,14 @@
|
|
|
1725
1729
|
}
|
|
1726
1730
|
return inp;
|
|
1727
1731
|
},
|
|
1728
|
-
dropdown: function (_a) {
|
|
1732
|
+
dropdown: function (_a, passedElementType) {
|
|
1729
1733
|
var _b = _a.classNames, list = _b.list, listDropdown = _b.listDropdown;
|
|
1730
1734
|
var div = document.createElement('div');
|
|
1731
1735
|
addClassesToElement(div, list);
|
|
1732
1736
|
addClassesToElement(div, listDropdown);
|
|
1733
|
-
|
|
1737
|
+
if (passedElementType !== PassedElementTypes.Text) {
|
|
1738
|
+
div.setAttribute('aria-expanded', 'false');
|
|
1739
|
+
}
|
|
1734
1740
|
return div;
|
|
1735
1741
|
},
|
|
1736
1742
|
notice: function (_a, innerHTML, type) {
|
|
@@ -2105,13 +2111,14 @@
|
|
|
2105
2111
|
// eslint-disable-next-line no-param-reassign
|
|
2106
2112
|
preventInputFocus = !this._canSearch;
|
|
2107
2113
|
}
|
|
2114
|
+
// to ensure a virtual keyboard trigger as expected, the focus/animation must be started from the input event and not an animation frame which
|
|
2115
|
+
this.dropdown.show();
|
|
2116
|
+
var rect = this.dropdown.element.getBoundingClientRect();
|
|
2117
|
+
this.containerOuter.open(rect.bottom, rect.height);
|
|
2118
|
+
if (!preventInputFocus) {
|
|
2119
|
+
this.input.focus();
|
|
2120
|
+
}
|
|
2108
2121
|
requestAnimationFrame(function () {
|
|
2109
|
-
_this.dropdown.show();
|
|
2110
|
-
var rect = _this.dropdown.element.getBoundingClientRect();
|
|
2111
|
-
_this.containerOuter.open(rect.bottom, rect.height);
|
|
2112
|
-
if (!preventInputFocus) {
|
|
2113
|
-
_this.input.focus();
|
|
2114
|
-
}
|
|
2115
2122
|
_this.passedElement.triggerEvent(EventType.showDropdown);
|
|
2116
2123
|
var activeElement = _this.choiceList.element.querySelector(getClassNamesSelector(_this.config.classNames.selectedState));
|
|
2117
2124
|
if (activeElement !== null && !isScrolledIntoView(activeElement, _this.choiceList.element)) {
|
|
@@ -2246,7 +2253,6 @@
|
|
|
2246
2253
|
*/
|
|
2247
2254
|
Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices, clearSearchFlag, replaceItems) {
|
|
2248
2255
|
var _this = this;
|
|
2249
|
-
if (choicesArrayOrFetcher === void 0) { choicesArrayOrFetcher = []; }
|
|
2250
2256
|
if (value === void 0) { value = 'value'; }
|
|
2251
2257
|
if (label === void 0) { label = 'label'; }
|
|
2252
2258
|
if (replaceChoices === void 0) { replaceChoices = false; }
|
|
@@ -2266,7 +2272,7 @@
|
|
|
2266
2272
|
// it's a choices fetcher function
|
|
2267
2273
|
var fetcher_1 = choicesArrayOrFetcher(this);
|
|
2268
2274
|
if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {
|
|
2269
|
-
//
|
|
2275
|
+
// @ts-expect-error wonky typing
|
|
2270
2276
|
// eslint-disable-next-line no-promise-executor-return
|
|
2271
2277
|
return new Promise(function (resolve) { return requestAnimationFrame(resolve); })
|
|
2272
2278
|
.then(function () { return _this._handleLoadingState(true); })
|
|
@@ -2286,6 +2292,7 @@
|
|
|
2286
2292
|
if (!Array.isArray(fetcher_1)) {
|
|
2287
2293
|
throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof fetcher_1));
|
|
2288
2294
|
}
|
|
2295
|
+
// @ts-expect-error wonky typing
|
|
2289
2296
|
// eslint-disable-next-line no-param-reassign
|
|
2290
2297
|
choicesArrayOrFetcher = fetcher_1;
|
|
2291
2298
|
}
|
|
@@ -2331,6 +2338,7 @@
|
|
|
2331
2338
|
}
|
|
2332
2339
|
// @todo integrate with Store
|
|
2333
2340
|
this._searcher.reset();
|
|
2341
|
+
// @ts-expect-error wonky typing
|
|
2334
2342
|
return this;
|
|
2335
2343
|
};
|
|
2336
2344
|
Choices.prototype.refresh = function (withEvents, selectFirstOption, deselectAll) {
|
|
@@ -2893,10 +2901,6 @@
|
|
|
2893
2901
|
var config = this.config;
|
|
2894
2902
|
var canAddItem = true;
|
|
2895
2903
|
var notice = '';
|
|
2896
|
-
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
2897
|
-
canAddItem = false;
|
|
2898
|
-
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
2899
|
-
}
|
|
2900
2904
|
if (canAddItem) {
|
|
2901
2905
|
var foundChoice = this._store.choices.find(function (choice) { return config.valueComparer(choice.value, value); });
|
|
2902
2906
|
if (foundChoice) {
|
|
@@ -2911,6 +2915,10 @@
|
|
|
2911
2915
|
}
|
|
2912
2916
|
}
|
|
2913
2917
|
}
|
|
2918
|
+
if (canAddItem && typeof config.addItemFilter === 'function' && !config.addItemFilter(value)) {
|
|
2919
|
+
canAddItem = false;
|
|
2920
|
+
notice = resolveNoticeFunction(config.customAddItemText, value, undefined);
|
|
2921
|
+
}
|
|
2914
2922
|
if (canAddItem) {
|
|
2915
2923
|
notice = resolveNoticeFunction(config.addItemText, value, undefined);
|
|
2916
2924
|
}
|
|
@@ -3230,7 +3238,8 @@
|
|
|
3230
3238
|
}
|
|
3231
3239
|
}
|
|
3232
3240
|
else {
|
|
3233
|
-
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState))
|
|
3241
|
+
var currentEl = this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.highlightedState)) ||
|
|
3242
|
+
this.dropdown.element.querySelector(getClassNamesSelector(this.config.classNames.selectedState));
|
|
3234
3243
|
if (currentEl) {
|
|
3235
3244
|
nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);
|
|
3236
3245
|
}
|
|
@@ -3335,8 +3344,8 @@
|
|
|
3335
3344
|
}
|
|
3336
3345
|
}
|
|
3337
3346
|
else {
|
|
3338
|
-
this.showDropdown();
|
|
3339
3347
|
containerOuter.element.focus();
|
|
3348
|
+
this.showDropdown();
|
|
3340
3349
|
}
|
|
3341
3350
|
}
|
|
3342
3351
|
else if (this._isSelectOneElement &&
|
|
@@ -3606,7 +3615,7 @@
|
|
|
3606
3615
|
element: templating.itemList(config, isSelectOneElement),
|
|
3607
3616
|
});
|
|
3608
3617
|
this.dropdown = new Dropdown({
|
|
3609
|
-
element: templating.dropdown(config),
|
|
3618
|
+
element: templating.dropdown(config, elementType),
|
|
3610
3619
|
classNames: classNames,
|
|
3611
3620
|
type: elementType,
|
|
3612
3621
|
});
|
|
@@ -3720,7 +3729,7 @@
|
|
|
3720
3729
|
throw new TypeError("".concat(caller, " called for an element which has multiple instances of Choices initialised on it"));
|
|
3721
3730
|
}
|
|
3722
3731
|
};
|
|
3723
|
-
Choices.version = '11.2.
|
|
3732
|
+
Choices.version = '11.2.4';
|
|
3724
3733
|
return Choices;
|
|
3725
3734
|
}());
|
|
3726
3735
|
|