govuk_publishing_components 64.1.1 → 64.2.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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js +0 -2
  3. data/app/assets/javascripts/govuk_publishing_components/components/select-with-search.js +33 -0
  4. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +3 -3
  5. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +16 -13
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +4 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +2 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +5 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -13
  10. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +0 -20
  11. data/app/controllers/govuk_publishing_components/applications_page_controller.rb +5 -2
  12. data/app/controllers/govuk_publishing_components/audit_controller.rb +3 -2
  13. data/app/models/govuk_publishing_components/applications_page.rb +39 -4
  14. data/app/views/govuk_publishing_components/applications_page/_table-content.html.erb +9 -0
  15. data/app/views/govuk_publishing_components/applications_page/show.html.erb +1 -0
  16. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +8 -8
  17. data/app/views/govuk_publishing_components/components/_service_navigation.html.erb +1 -1
  18. data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -2
  19. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -8
  20. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +2 -4
  21. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +7 -7
  22. data/app/views/govuk_publishing_components/components/docs/heading.yml +1 -1
  23. data/app/views/govuk_publishing_components/components/docs/modal_dialogue.yml +1 -1
  24. data/app/views/govuk_publishing_components/components/docs/table.yml +2 -2
  25. data/app/views/govuk_publishing_components/components/docs/tabs.yml +2 -6
  26. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +2 -3
  27. data/lib/govuk_publishing_components/presenters/pagination_helper.rb +1 -1
  28. data/lib/govuk_publishing_components/version.rb +1 -1
  29. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +31 -3
  30. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  31. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +31 -3
  32. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  33. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +5 -0
  35. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +8 -0
  37. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +95 -23
  39. data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-default.html +22 -22
  41. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-full-gds-example.html +22 -22
  42. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-three-equal-columns.html +22 -22
  43. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-html-content-licence-and-copyright-notice.html +17 -17
  44. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-meta.html +22 -22
  45. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-text-content-licence-and-copyright-notice.html +17 -17
  46. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-one-column.html +22 -22
  47. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-two-columns.html +22 -22
  48. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta-links-and-meta-content.html +22 -22
  49. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-navigation.html +22 -22
  50. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-no-content-licence.html +16 -0
  51. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-custom-meta.html +20 -0
  52. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-meta-links.html +59 -0
  53. data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +30 -28
  54. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +12 -0
  55. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
  56. data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +31 -9
  57. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-default.html +3 -3
  58. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-first-page.html +3 -3
  59. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-last-page.html +3 -3
  60. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-link-and-item-text.html +3 -3
  61. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-many-pages.html +9 -9
  62. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template.njk +3 -1
  63. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +1 -1
  64. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
  65. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +18 -18
  66. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +30 -2
  67. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  68. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +30 -2
  69. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  70. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +30 -2
  71. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
  72. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +1 -1
  73. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse.html +1 -1
  74. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item-and-collapsenavigationonmobile-set-to-true.html +1 -1
  75. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +1 -1
  76. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +1 -1
  77. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +1 -1
  78. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +1 -1
  79. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +1 -1
  80. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +1 -1
  81. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +4 -0
  82. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
  83. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  84. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  85. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  86. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  87. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  88. data/node_modules/govuk-frontend/dist/govuk/macros/attributes.njk +30 -14
  89. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +1 -1
  90. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +1 -1
  91. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  92. data/node_modules/govuk-frontend/package.json +1 -1
  93. metadata +5 -2
@@ -1,4 +1,4 @@
1
- const version = '5.13.0';
1
+ const version = '5.14.0';
2
2
 
3
3
  function getBreakpoint(name) {
4
4
  const property = `--govuk-breakpoint-${name}`;
@@ -2249,9 +2249,9 @@ class ServiceNavigation extends Component {
2249
2249
  }
2250
2250
  if (this.mql.matches) {
2251
2251
  this.$menu.removeAttribute('hidden');
2252
- this.$menuButton.setAttribute('hidden', '');
2252
+ setAttributes(this.$menuButton, attributesForHidingButton);
2253
2253
  } else {
2254
- this.$menuButton.removeAttribute('hidden');
2254
+ removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));
2255
2255
  this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
2256
2256
  if (this.menuIsOpen) {
2257
2257
  this.$menu.removeAttribute('hidden');
@@ -2266,6 +2266,34 @@ class ServiceNavigation extends Component {
2266
2266
  }
2267
2267
  }
2268
2268
  ServiceNavigation.moduleName = 'govuk-service-navigation';
2269
+ const attributesForHidingButton = {
2270
+ hidden: '',
2271
+ 'aria-hidden': 'true'
2272
+ };
2273
+
2274
+ /**
2275
+ * Sets a group of attributes on the given element
2276
+ *
2277
+ * @param {Element} $element - The element to set the attribute on
2278
+ * @param {{[attributeName: string]: string}} attributes - The attributes to set
2279
+ */
2280
+ function setAttributes($element, attributes) {
2281
+ for (const attributeName in attributes) {
2282
+ $element.setAttribute(attributeName, attributes[attributeName]);
2283
+ }
2284
+ }
2285
+
2286
+ /**
2287
+ * Removes a list of attributes from the given element
2288
+ *
2289
+ * @param {Element} $element - The element to remove the attributes from
2290
+ * @param {string[]} attributeNames - The names of the attributes to remove
2291
+ */
2292
+ function removeAttributes($element, attributeNames) {
2293
+ for (const attributeName of attributeNames) {
2294
+ $element.removeAttribute(attributeName);
2295
+ }
2296
+ }
2269
2297
 
2270
2298
  /**
2271
2299
  * Skip link component