govuk_publishing_components 29.7.0 → 29.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js +72 -73
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/page-content.js +13 -2
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-click-tracking.js +49 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +0 -1
  7. data/app/assets/javascripts/govuk_publishing_components/modules.js +0 -1
  8. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-measurer.js +37 -0
  9. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +166 -142
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +11 -4
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +20 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +3 -8
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +8 -2
  14. data/app/controllers/govuk_publishing_components/audit_controller.rb +3 -2
  15. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +0 -9
  16. data/app/models/govuk_publishing_components/audit_comparer.rb +92 -34
  17. data/app/views/govuk_publishing_components/audit/_applications.html.erb +20 -9
  18. data/app/views/govuk_publishing_components/component_guide/index.html.erb +3 -21
  19. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  20. data/app/views/govuk_publishing_components/components/_cards.html.erb +13 -11
  21. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +20 -2
  22. data/app/views/govuk_publishing_components/components/_summary_list.html.erb +4 -5
  23. data/app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb +18 -19
  24. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  25. data/app/views/govuk_publishing_components/components/docs/document_list.yml +4 -4
  26. data/app/views/govuk_publishing_components/components/docs/heading.yml +1 -1
  27. data/app/views/govuk_publishing_components/components/docs/image_card.yml +1 -1
  28. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +4 -4
  29. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/share_links.yml +1 -1
  31. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +1 -1
  32. data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +1 -2
  33. data/config/locales/ar.yml +1 -2
  34. data/config/locales/az.yml +1 -2
  35. data/config/locales/be.yml +1 -2
  36. data/config/locales/bg.yml +1 -2
  37. data/config/locales/bn.yml +1 -2
  38. data/config/locales/cs.yml +1 -2
  39. data/config/locales/cy.yml +1 -2
  40. data/config/locales/da.yml +1 -2
  41. data/config/locales/de.yml +1 -2
  42. data/config/locales/dr.yml +1 -2
  43. data/config/locales/el.yml +1 -2
  44. data/config/locales/en.yml +9 -2
  45. data/config/locales/es-419.yml +1 -2
  46. data/config/locales/es.yml +1 -2
  47. data/config/locales/et.yml +1 -2
  48. data/config/locales/fa.yml +1 -2
  49. data/config/locales/fi.yml +1 -2
  50. data/config/locales/fr.yml +1 -2
  51. data/config/locales/gd.yml +1 -2
  52. data/config/locales/gu.yml +1 -2
  53. data/config/locales/he.yml +1 -2
  54. data/config/locales/hi.yml +1 -2
  55. data/config/locales/hr.yml +1 -2
  56. data/config/locales/hu.yml +1 -2
  57. data/config/locales/hy.yml +1 -2
  58. data/config/locales/id.yml +1 -2
  59. data/config/locales/is.yml +1 -2
  60. data/config/locales/it.yml +1 -2
  61. data/config/locales/ja.yml +1 -2
  62. data/config/locales/ka.yml +1 -2
  63. data/config/locales/kk.yml +1 -2
  64. data/config/locales/ko.yml +1 -2
  65. data/config/locales/lt.yml +1 -2
  66. data/config/locales/lv.yml +1 -2
  67. data/config/locales/ms.yml +1 -2
  68. data/config/locales/mt.yml +1 -2
  69. data/config/locales/nl.yml +1 -2
  70. data/config/locales/no.yml +1 -2
  71. data/config/locales/pa-pk.yml +1 -2
  72. data/config/locales/pa.yml +1 -2
  73. data/config/locales/pl.yml +1 -2
  74. data/config/locales/ps.yml +1 -2
  75. data/config/locales/pt.yml +1 -2
  76. data/config/locales/ro.yml +1 -2
  77. data/config/locales/ru.yml +1 -2
  78. data/config/locales/si.yml +1 -2
  79. data/config/locales/sk.yml +1 -2
  80. data/config/locales/sl.yml +1 -2
  81. data/config/locales/so.yml +1 -2
  82. data/config/locales/sq.yml +1 -2
  83. data/config/locales/sr.yml +1 -2
  84. data/config/locales/sv.yml +1 -2
  85. data/config/locales/sw.yml +1 -2
  86. data/config/locales/ta.yml +1 -2
  87. data/config/locales/th.yml +1 -2
  88. data/config/locales/tk.yml +1 -2
  89. data/config/locales/tr.yml +1 -2
  90. data/config/locales/uk.yml +1 -2
  91. data/config/locales/ur.yml +1 -2
  92. data/config/locales/uz.yml +1 -2
  93. data/config/locales/vi.yml +1 -2
  94. data/config/locales/zh-hk.yml +1 -2
  95. data/config/locales/zh-tw.yml +1 -2
  96. data/config/locales/zh.yml +1 -2
  97. data/lib/generators/govuk_publishing_components/templates/_component.html.erb +1 -1
  98. data/lib/govuk_publishing_components/app_helpers/brand_helper.rb +1 -1
  99. data/lib/govuk_publishing_components/presenters/attachment_helper.rb +1 -3
  100. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +35 -16
  101. data/lib/govuk_publishing_components/version.rb +1 -1
  102. data/node_modules/govuk-frontend/govuk/all.js +120 -49
  103. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +2 -2
  104. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -2
  105. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +2 -2
  106. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +6 -16
  107. data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +2 -2
  108. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +120 -49
  109. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +33 -17
  110. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +2 -2
  111. data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +1 -4
  112. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +3 -2
  113. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +22 -10
  114. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  115. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +23 -23
  116. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  117. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +4 -4
  118. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +2 -2
  119. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +3 -3
  120. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +2 -2
  121. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +12 -22
  122. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +13 -3
  123. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  124. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +2 -2
  125. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +4 -13
  126. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +5 -5
  127. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +2 -2
  128. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +2 -2
  129. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +1 -1
  130. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +4 -4
  131. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +2 -2
  132. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -4
  133. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +17 -12
  134. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
  135. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -3
  136. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +2 -2
  137. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +5 -5
  138. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +4 -4
  139. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +2 -2
  140. data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +2 -2
  141. data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +2 -2
  142. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +3 -3
  143. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +7 -5
  144. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -2
  145. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  146. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -3
  147. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +2 -2
  148. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +10 -26
  149. data/node_modules/govuk-frontend/govuk/objects/_template.scss +1 -1
  150. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +0 -4
  151. data/node_modules/govuk-frontend/govuk/tools/_exports.scss +1 -1
  152. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  153. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  154. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +2 -2
  155. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  156. data/node_modules/govuk-frontend/govuk-esm/all.mjs +88 -0
  157. data/node_modules/govuk-frontend/govuk-esm/common.mjs +28 -0
  158. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +374 -0
  159. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +64 -0
  160. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +251 -0
  161. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +164 -0
  162. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +147 -0
  163. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +168 -0
  164. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +52 -0
  165. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +55 -0
  166. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +122 -0
  167. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +94 -0
  168. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +282 -0
  169. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.js +264 -0
  170. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.js +26 -0
  171. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.js +93 -0
  172. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.js +24 -0
  173. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.js +23 -0
  174. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.js +22 -0
  175. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.js +22 -0
  176. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.js +114 -0
  177. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.js +252 -0
  178. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.js +159 -0
  179. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.js +86 -0
  180. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.js +20 -0
  181. data/node_modules/govuk-frontend/package.json +8 -1
  182. metadata +30 -3
@@ -0,0 +1,20 @@
1
+ (function(undefined) {
2
+
3
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js
4
+ var detect = ('Window' in this)
5
+
6
+ if (detect) return
7
+
8
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always
9
+ if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
10
+ (function (global) {
11
+ if (global.constructor) {
12
+ global.Window = global.constructor;
13
+ } else {
14
+ (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;
15
+ }
16
+ }(this));
17
+ }
18
+
19
+ })
20
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "govuk-frontend",
3
3
  "description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
4
- "version": "4.0.1",
4
+ "version": "4.1.0",
5
5
  "main": "govuk/all.js",
6
+ "module": "govuk-esm/all.mjs",
7
+ "exports": {
8
+ "import": "./govuk-esm/all.mjs"
9
+ },
10
+ "sideEffects": [
11
+ "govuk-esm/vendor/**"
12
+ ],
6
13
  "sass": "govuk/all.scss",
7
14
  "engines": {
8
15
  "node": ">= 4.2.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 29.7.0
4
+ version: 29.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-03 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -433,6 +433,8 @@ files:
433
433
  - app/assets/javascripts/component_guide/vendor/bind-polyfill.js
434
434
  - app/assets/javascripts/component_guide/vendor/matches-polyfill.min.js
435
435
  - app/assets/javascripts/govuk_publishing_components/all_components.js
436
+ - app/assets/javascripts/govuk_publishing_components/analytics-ga4.js
437
+ - app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-click-tracking.js
436
438
  - app/assets/javascripts/govuk_publishing_components/analytics.js
437
439
  - app/assets/javascripts/govuk_publishing_components/analytics/analytics.js
438
440
  - app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
@@ -1541,6 +1543,31 @@ files:
1541
1543
  - node_modules/axe-core/sri-history.json
1542
1544
  - node_modules/axe-core/typings/axe-core/axe-core-tests.ts
1543
1545
  - node_modules/govuk-frontend/README.md
1546
+ - node_modules/govuk-frontend/govuk-esm/all.mjs
1547
+ - node_modules/govuk-frontend/govuk-esm/common.mjs
1548
+ - node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs
1549
+ - node_modules/govuk-frontend/govuk-esm/components/button/button.mjs
1550
+ - node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs
1551
+ - node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs
1552
+ - node_modules/govuk-frontend/govuk-esm/components/details/details.mjs
1553
+ - node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs
1554
+ - node_modules/govuk-frontend/govuk-esm/components/header/header.mjs
1555
+ - node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs
1556
+ - node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs
1557
+ - node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs
1558
+ - node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs
1559
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.js
1560
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.js
1561
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.js
1562
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.js
1563
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.js
1564
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.js
1565
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.js
1566
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.js
1567
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.js
1568
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.js
1569
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.js
1570
+ - node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.js
1544
1571
  - node_modules/govuk-frontend/govuk-prototype-kit.config.json
1545
1572
  - node_modules/govuk-frontend/govuk/_base.scss
1546
1573
  - node_modules/govuk-frontend/govuk/all-ie8.scss
@@ -1891,7 +1918,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1891
1918
  - !ruby/object:Gem::Version
1892
1919
  version: '0'
1893
1920
  requirements: []
1894
- rubygems_version: 3.3.12
1921
+ rubygems_version: 3.3.14
1895
1922
  signing_key:
1896
1923
  specification_version: 4
1897
1924
  summary: A gem to document components in GOV.UK frontend applications