govuk_publishing_components 68.3.0 → 69.0.1

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.
Files changed (330) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +98 -139
  3. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +11 -0
  4. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +3 -1
  5. data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +14 -11
  6. data/app/assets/stylesheets/component_guide/application.scss +3 -3
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_add-another.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_app-promo-banner.scss +1 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +1 -1
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +2 -2
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +1 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +4 -4
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +4 -4
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
  25. data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
  27. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -1
  28. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
  29. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
  30. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +1 -1
  31. data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
  32. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
  33. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -1
  34. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +8 -5
  35. data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +1 -1
  36. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -2
  37. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
  38. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +1 -1
  39. data/app/assets/stylesheets/govuk_publishing_components/components/_pagination.scss +1 -1
  40. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
  41. data/app/assets/stylesheets/govuk_publishing_components/components/_password-input.scss +1 -1
  42. data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
  43. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
  44. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
  45. data/app/assets/stylesheets/govuk_publishing_components/components/_select-with-search.scss +1 -1
  46. data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
  47. data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -1
  48. data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
  49. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +1 -1
  50. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +1 -1
  51. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +2 -2
  52. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
  53. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -1
  54. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-card.scss +1 -1
  55. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
  56. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
  57. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
  58. data/app/assets/stylesheets/govuk_publishing_components/components/_tag.scss +1 -1
  59. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
  60. data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +1 -1
  61. data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
  62. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  63. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +22 -10
  64. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
  65. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -1
  66. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_index.scss +0 -1
  67. data/app/views/govuk_publishing_components/components/_date_input.html.erb +16 -10
  68. data/app/views/govuk_publishing_components/components/_metadata.html.erb +81 -74
  69. data/app/views/govuk_publishing_components/components/docs/date_input.yml +23 -0
  70. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +33 -4
  71. data/lib/govuk_publishing_components/version.rb +1 -1
  72. data/node_modules/choices.js/README.md +1 -1
  73. data/node_modules/choices.js/package.json +5 -9
  74. data/node_modules/choices.js/public/assets/scripts/choices.js +32 -23
  75. data/node_modules/choices.js/public/assets/scripts/choices.min.js +2 -2
  76. data/node_modules/choices.js/public/assets/scripts/choices.mjs +32 -23
  77. data/node_modules/choices.js/public/assets/scripts/choices.search-basic.js +31 -22
  78. data/node_modules/choices.js/public/assets/scripts/choices.search-basic.min.js +2 -2
  79. data/node_modules/choices.js/public/assets/scripts/choices.search-basic.mjs +31 -22
  80. data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.js +30 -21
  81. data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.min.js +2 -2
  82. data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.mjs +30 -21
  83. data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.js +30 -21
  84. data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.min.js +2 -2
  85. data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.mjs +30 -21
  86. data/node_modules/choices.js/public/types/src/scripts/choices.d.ts +3 -3
  87. data/node_modules/choices.js/public/types/src/scripts/interfaces/templates.d.ts +1 -1
  88. data/node_modules/choices.js/src/scripts/choices.ts +30 -25
  89. data/node_modules/choices.js/src/scripts/components/dropdown.ts +7 -3
  90. data/node_modules/choices.js/src/scripts/interfaces/templates.ts +1 -1
  91. data/node_modules/choices.js/src/scripts/templates.ts +8 -3
  92. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +1 -1
  93. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +1 -1
  94. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  95. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -1
  96. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss.map +1 -1
  97. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -1
  98. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
  99. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -1
  100. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss.map +1 -1
  101. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +7 -3
  102. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +1 -1
  103. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -1
  104. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss.map +1 -1
  105. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +8 -4
  106. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +1 -1
  107. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -1
  108. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss.map +1 -1
  109. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +3 -1
  110. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +1 -1
  111. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -1
  112. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss.map +1 -1
  113. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -0
  114. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +1 -1
  115. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -1
  116. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss.map +1 -1
  117. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +10 -6
  118. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +1 -1
  119. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +4 -1
  120. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss.map +1 -1
  121. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -0
  122. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +1 -1
  123. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -1
  124. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss.map +1 -1
  125. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +2 -0
  126. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
  127. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -1
  128. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss.map +1 -1
  129. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -1
  130. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
  131. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -1
  132. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss.map +1 -1
  133. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +2 -0
  134. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss.map +1 -1
  135. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +4 -1
  136. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss.map +1 -1
  137. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -1
  138. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +1 -1
  139. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +4 -1
  140. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss.map +1 -1
  141. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +3 -1
  142. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +1 -1
  143. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -1
  144. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss.map +1 -1
  145. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -1
  146. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +1 -1
  147. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -1
  148. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss.map +1 -1
  149. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +4 -1
  150. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
  151. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -1
  152. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss.map +1 -1
  153. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +2 -0
  154. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
  155. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -1
  156. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss.map +1 -1
  157. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +2 -0
  158. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
  159. data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +4 -1
  160. data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss.map +1 -1
  161. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +2 -0
  162. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss.map +1 -1
  163. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +2 -0
  164. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
  165. data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +4 -1
  166. data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss.map +1 -1
  167. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +5 -1
  168. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +1 -1
  169. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -1
  170. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss.map +1 -1
  171. data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -1
  172. data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss.map +1 -1
  173. data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +4 -1
  174. data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss.map +1 -1
  175. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +6 -2
  176. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
  177. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +4 -1
  178. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss.map +1 -1
  179. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +2 -0
  180. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
  181. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -1
  182. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss.map +1 -1
  183. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -1
  184. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
  185. data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +4 -1
  186. data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss.map +1 -1
  187. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -0
  188. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +1 -1
  189. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +4 -1
  190. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss.map +1 -1
  191. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +3 -1
  192. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +1 -1
  193. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +4 -1
  194. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss.map +1 -1
  195. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +14 -10
  196. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
  197. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -1
  198. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss.map +1 -1
  199. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +2 -0
  200. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
  201. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -1
  202. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss.map +1 -1
  203. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -1
  204. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -1
  205. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -1
  206. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +1 -1
  207. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +7 -3
  208. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
  209. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +4 -1
  210. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss.map +1 -1
  211. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +15 -2
  212. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
  213. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +4 -1
  214. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss.map +1 -1
  215. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +4 -1
  216. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +1 -1
  217. data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +4 -1
  218. data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss.map +1 -1
  219. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +5 -2
  220. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +1 -1
  221. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +4 -1
  222. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss.map +1 -1
  223. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +4 -1
  224. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +1 -1
  225. data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +4 -1
  226. data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss.map +1 -1
  227. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +6 -2
  228. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss.map +1 -1
  229. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +4 -1
  230. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss.map +1 -1
  231. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +2 -0
  232. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
  233. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -1
  234. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss.map +1 -1
  235. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -1
  236. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
  237. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +4 -1
  238. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss.map +1 -1
  239. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +4 -0
  240. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss.map +1 -1
  241. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +4 -0
  242. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +1 -1
  243. data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +8 -0
  244. data/node_modules/govuk-frontend/dist/govuk/core/_links.scss.map +1 -1
  245. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +10 -1
  246. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +1 -1
  247. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +5 -0
  248. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +1 -1
  249. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +14 -13
  250. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +1 -1
  251. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +1 -1
  252. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +5 -0
  253. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss.map +1 -1
  254. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  255. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  256. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  257. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +38 -70
  258. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
  259. data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -0
  260. data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss.map +1 -1
  261. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +1 -1
  262. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
  263. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +3 -2
  264. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
  265. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +4 -4
  266. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
  267. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +17 -15
  268. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +1 -1
  269. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +2 -2
  270. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +1 -1
  271. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +19 -13
  272. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +1 -1
  273. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +48 -26
  274. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
  275. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +13 -11
  276. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
  277. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +4 -2
  278. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss.map +1 -1
  279. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +10 -9
  280. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +1 -1
  281. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -0
  282. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +1 -1
  283. data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +3 -0
  284. data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss.map +1 -1
  285. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +5 -1
  286. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss.map +1 -1
  287. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -0
  288. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss.map +1 -1
  289. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +7 -2
  290. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
  291. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +3 -0
  292. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +1 -1
  293. data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +18 -0
  294. data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss.map +1 -1
  295. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +28 -4
  296. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss.map +1 -1
  297. data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +3 -2
  298. data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss.map +1 -1
  299. data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +8 -16
  300. data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss.map +1 -1
  301. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +4 -1
  302. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss.map +1 -1
  303. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +15 -2
  304. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss.map +1 -1
  305. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +3 -2
  306. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss.map +1 -1
  307. data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +13 -5
  308. data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss.map +1 -1
  309. data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +24 -0
  310. data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss.map +1 -0
  311. data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +13 -5
  312. data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss.map +1 -1
  313. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +1 -0
  314. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +1 -1
  315. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +5 -3
  316. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +1 -1
  317. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +4 -2
  318. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +1 -1
  319. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +3 -0
  320. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss.map +1 -1
  321. data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +1 -0
  322. data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss.map +1 -1
  323. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +3 -0
  324. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss.map +1 -1
  325. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +3 -1
  326. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +1 -1
  327. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  328. data/node_modules/govuk-frontend/package.json +7 -7
  329. metadata +4 -3
  330. 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
- <%= tag.div(**component_helper.all_attributes) do %>
39
- <% if title.present? %>
40
- <%= render "govuk_publishing_components/components/heading", {
41
- text: sanitize(title),
42
- font_size: "m",
43
- inverse:,
44
- margin_bottom: 2,
45
- } %>
46
- <% elsif page_history.any? %>
47
- <h2 class="govuk-visually-hidden"><%= t("components.metadata.hidden_heading") %></h2>
48
- <% end %>
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
- <% if local_assigns.include?(:last_updated) && last_updated %>
71
- <dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated") %>:</dt>
72
- <dd class="gem-c-metadata__definition">
73
- <%= last_updated %>
74
- <% if local_assigns.include?(:see_updates_link) %>
75
- &#8212; <a href="#full-publication-update-history"
76
- class="gem-c-metadata__definition-link govuk-!-display-none-print js-see-all-updates-link">
77
- <%= t("components.metadata.see_all_updates") %>
78
- </a>
79
- <% end %>
80
- <% if page_history.any? %>
81
- <%= render "govuk_publishing_components/components/details", {
82
- title: t("components.metadata.show_all_updates", locale: :en),
83
- small: true,
84
- } do %>
85
- <ol class="gem-c-metadata__change-history">
86
- <% page_history.each do |change| %>
87
- <li class="gem-c-metadata__change-history-item">
88
- <time class="gem-c-metadata__change-date" datetime="<%= change[:timestamp] %>"><%= change[:display_time] %></time>
89
- <p class="gem-c-metadata__change-note"><%= change[:note].strip %></p>
90
- </li>
91
- <% end %>
92
- </ol>
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
+ &#8212; <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
- <% end %>
115
- </dl>
121
+ </dl>
122
+ <% end %>
116
123
  <% end %>
@@ -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?"
@@ -634,7 +634,32 @@ examples:
634
634
  <td>row 3</td><td>2</td>
635
635
  </tr>
636
636
  <tr>
637
- <td>row 4</td><td>48</td>
637
+ <td>row 4</td><td>No data</td>
638
+ </tr>
639
+ </tbody>
640
+ </table>
641
+ negative_charts:
642
+ description: |
643
+ Charts can contain positive and negative values if the 'mc-negative' class is added to the table.
644
+ data:
645
+ block: |
646
+ <table class='js-barchart-table mc-auto-outdent mc-negative'>
647
+ <caption>Calorie Gain/Loss by Superhero</caption>
648
+ <tbody>
649
+ <tr>
650
+ <td>Hulk</td><td>6000</td>
651
+ </tr>
652
+ <tr>
653
+ <td>Thor</td><td>5000</td>
654
+ </tr>
655
+ <tr>
656
+ <td>Spiderman</td><td>-2000</td>
657
+ </tr>
658
+ <tr>
659
+ <td>Iron Man</td><td>No data</td>
660
+ </tr>
661
+ <tr>
662
+ <td>Black Widow</td><td>-1500</td>
638
663
  </tr>
639
664
  </tbody>
640
665
  </table>
@@ -686,9 +711,9 @@ examples:
686
711
  <tr><th>Some Data</th><th>YES</th><th>NO</th><th>MAYBE</th></tr>
687
712
  </thead>
688
713
  <tbody>
689
- <tr><th>Testing One</th><td>5</td><td>6</td><td>11</td></tr>
690
- <tr><th>Testing Two</th><td>6</td><td>2</td><td>8</td></tr>
691
- <tr><th>Testing Three</th><td>3</td><td>9</td><td>12</td></tr>
714
+ <tr><th>Testing One</th><td>No data</td><td>7</td><td>6</td></tr>
715
+ <tr><th>Testing Two</th><td>6</td><td>2</td><td>No data</td></tr>
716
+ <tr><th>Testing Three</th><td>3</td><td>No data</td><td>9</td></tr>
692
717
  </tbody>
693
718
  </table>
694
719
  chart_stacked:
@@ -700,6 +725,7 @@ examples:
700
725
  <th scope="col">Colours</th>
701
726
  <th scope="col">Fruits</th>
702
727
  <th scope="col">Vegetables</th>
728
+ <th scope="col">Chocolates</th>
703
729
  <th scope="col">Beans</th>
704
730
  <th scope="col">Nuts</th>
705
731
  <th scope="col">Total</th>
@@ -709,6 +735,7 @@ examples:
709
735
  <tr>
710
736
  <td>Red</td>
711
737
  <td>23</td>
738
+ <td> No data</td>
712
739
  <td>9</td>
713
740
  <td>2</td>
714
741
  <td>1</td>
@@ -717,6 +744,7 @@ examples:
717
744
  <tr>
718
745
  <td>Green</td>
719
746
  <td>5</td>
747
+ <td>No data</td>
720
748
  <td>33</td>
721
749
  <td>8</td>
722
750
  <td>0</td>
@@ -727,6 +755,7 @@ examples:
727
755
  <td>2</td>
728
756
  <td>10</td>
729
757
  <td>0</td>
758
+ <td>No data</td>
730
759
  <td>15</td>
731
760
  <td>27</td>
732
761
  </tr>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "68.3.0".freeze
2
+ VERSION = "69.0.1".freeze
3
3
  end
@@ -1100,7 +1100,7 @@ choices.disable();
1100
1100
 
1101
1101
  **Usage:** Remove each selectable item.
1102
1102
 
1103
- ## removeChoice(value: string);
1103
+ ### removeChoice(value: string);
1104
1104
 
1105
1105
  **Input types affected:** `text`, `select-multiple`, `select-one`
1106
1106
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "choices.js",
3
- "version": "11.2.3",
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
- "@types/sinon": "^17.0.3",
111
- "@types/sinon-chai": "^3.2.12",
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.5",
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": "^3.2.4"
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.3 | © 2026 Josh Johnson | https://github.com/Choices-js/Choices#readme */
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.element.setAttribute('aria-expanded', 'true');
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.element.setAttribute('aria-expanded', 'false');
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( /*text*/) {}
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 = ( /* doc, idx */) => false) {
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
- div.setAttribute('aria-expanded', 'false');
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
- // that's a promise
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.3';
5324
+ Choices.version = '11.2.4';
5316
5325
  return Choices;
5317
5326
  }());
5318
5327