govuk_publishing_components 28.9.0 → 29.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
  4. data/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js +55 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics.js +3 -0
  6. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
  7. data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
  8. data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -6
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
  13. data/app/views/govuk_publishing_components/components/_cards.html.erb +9 -25
  14. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +0 -4
  15. data/app/views/govuk_publishing_components/components/_input.html.erb +3 -0
  16. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
  17. data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -1
  18. data/app/views/govuk_publishing_components/components/_summary_list.html.erb +27 -22
  19. data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
  20. data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
  21. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
  22. data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
  23. data/app/views/govuk_publishing_components/components/docs/cards.yml +12 -6
  24. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
  25. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  26. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  27. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
  28. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -27
  29. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
  30. data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
  31. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
  32. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
  33. data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
  34. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
  35. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
  36. data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
  37. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
  38. data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
  39. data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
  40. data/app/views/govuk_publishing_components/components/docs/input.yml +18 -15
  41. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
  42. data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
  43. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
  44. data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
  45. data/app/views/govuk_publishing_components/components/docs/list.yml +1 -1
  46. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  47. data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
  48. data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
  49. data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
  50. data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
  51. data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
  52. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
  53. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
  54. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
  55. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
  56. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
  57. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  58. data/app/views/govuk_publishing_components/components/docs/summary_list.yml +2 -7
  59. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
  60. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  61. data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
  62. data/config/initializers/assets.rb +15 -45
  63. data/config/locales/en.yml +2 -2
  64. data/lib/govuk_publishing_components/presenters/attachment.rb +3 -7
  65. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -45
  66. data/lib/govuk_publishing_components/version.rb +1 -1
  67. metadata +13 -120
  68. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +0 -27
  69. data/node_modules/jquery/AUTHORS.txt +0 -266
  70. data/node_modules/jquery/LICENSE.txt +0 -36
  71. data/node_modules/jquery/README.md +0 -65
  72. data/node_modules/jquery/bower.json +0 -14
  73. data/node_modules/jquery/dist/jquery.js +0 -11008
  74. data/node_modules/jquery/dist/jquery.min.js +0 -5
  75. data/node_modules/jquery/dist/jquery.min.map +0 -1
  76. data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  77. data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
  78. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  79. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  80. data/node_modules/jquery/package.json +0 -85
  81. data/node_modules/jquery/src/ajax/jsonp.js +0 -100
  82. data/node_modules/jquery/src/ajax/load.js +0 -83
  83. data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
  84. data/node_modules/jquery/src/ajax/parseXML.js +0 -31
  85. data/node_modules/jquery/src/ajax/script.js +0 -95
  86. data/node_modules/jquery/src/ajax/var/location.js +0 -3
  87. data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  88. data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
  89. data/node_modules/jquery/src/ajax/xhr.js +0 -229
  90. data/node_modules/jquery/src/ajax.js +0 -842
  91. data/node_modules/jquery/src/attributes/attr.js +0 -281
  92. data/node_modules/jquery/src/attributes/classes.js +0 -174
  93. data/node_modules/jquery/src/attributes/prop.js +0 -156
  94. data/node_modules/jquery/src/attributes/support.js +0 -70
  95. data/node_modules/jquery/src/attributes/val.js +0 -191
  96. data/node_modules/jquery/src/attributes.js +0 -11
  97. data/node_modules/jquery/src/callbacks.js +0 -232
  98. data/node_modules/jquery/src/core/access.js +0 -65
  99. data/node_modules/jquery/src/core/init.js +0 -140
  100. data/node_modules/jquery/src/core/parseHTML.js +0 -41
  101. data/node_modules/jquery/src/core/ready.js +0 -163
  102. data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
  103. data/node_modules/jquery/src/core.js +0 -529
  104. data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
  105. data/node_modules/jquery/src/css/adjustCSS.js +0 -65
  106. data/node_modules/jquery/src/css/curCSS.js +0 -137
  107. data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
  108. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
  109. data/node_modules/jquery/src/css/showHide.js +0 -45
  110. data/node_modules/jquery/src/css/support.js +0 -184
  111. data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
  112. data/node_modules/jquery/src/css/var/isHidden.js +0 -16
  113. data/node_modules/jquery/src/css/var/rmargin.js +0 -3
  114. data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
  115. data/node_modules/jquery/src/css/var/swap.js +0 -24
  116. data/node_modules/jquery/src/css.js +0 -563
  117. data/node_modules/jquery/src/data/support.js +0 -23
  118. data/node_modules/jquery/src/data/var/acceptData.js +0 -20
  119. data/node_modules/jquery/src/data.js +0 -342
  120. data/node_modules/jquery/src/deferred.js +0 -159
  121. data/node_modules/jquery/src/deprecated.js +0 -34
  122. data/node_modules/jquery/src/dimensions.js +0 -56
  123. data/node_modules/jquery/src/effects/Tween.js +0 -121
  124. data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
  125. data/node_modules/jquery/src/effects/support.js +0 -58
  126. data/node_modules/jquery/src/effects.js +0 -640
  127. data/node_modules/jquery/src/event/ajax.js +0 -20
  128. data/node_modules/jquery/src/event/alias.js +0 -25
  129. data/node_modules/jquery/src/event/support.js +0 -28
  130. data/node_modules/jquery/src/event.js +0 -1134
  131. data/node_modules/jquery/src/exports/amd.js +0 -24
  132. data/node_modules/jquery/src/exports/global.js +0 -26
  133. data/node_modules/jquery/src/intro.js +0 -44
  134. data/node_modules/jquery/src/jquery.js +0 -37
  135. data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
  136. data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
  137. data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
  138. data/node_modules/jquery/src/manipulation/getAll.js +0 -33
  139. data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
  140. data/node_modules/jquery/src/manipulation/support.js +0 -72
  141. data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
  142. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
  143. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  144. data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
  145. data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
  146. data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  147. data/node_modules/jquery/src/manipulation.js +0 -585
  148. data/node_modules/jquery/src/offset.js +0 -219
  149. data/node_modules/jquery/src/outro.js +0 -2
  150. data/node_modules/jquery/src/queue/delay.js +0 -22
  151. data/node_modules/jquery/src/queue.js +0 -144
  152. data/node_modules/jquery/src/selector-sizzle.js +0 -14
  153. data/node_modules/jquery/src/selector.js +0 -1
  154. data/node_modules/jquery/src/serialize.js +0 -125
  155. data/node_modules/jquery/src/support.js +0 -63
  156. data/node_modules/jquery/src/traversing/findFilter.js +0 -100
  157. data/node_modules/jquery/src/traversing/var/dir.js +0 -20
  158. data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
  159. data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
  160. data/node_modules/jquery/src/traversing.js +0 -179
  161. data/node_modules/jquery/src/var/class2type.js +0 -5
  162. data/node_modules/jquery/src/var/concat.js +0 -5
  163. data/node_modules/jquery/src/var/deletedIds.js +0 -3
  164. data/node_modules/jquery/src/var/document.js +0 -3
  165. data/node_modules/jquery/src/var/documentElement.js +0 -5
  166. data/node_modules/jquery/src/var/hasOwn.js +0 -5
  167. data/node_modules/jquery/src/var/indexOf.js +0 -5
  168. data/node_modules/jquery/src/var/pnum.js +0 -3
  169. data/node_modules/jquery/src/var/push.js +0 -5
  170. data/node_modules/jquery/src/var/rcssNum.js +0 -7
  171. data/node_modules/jquery/src/var/rnotwhite.js +0 -3
  172. data/node_modules/jquery/src/var/slice.js +0 -5
  173. data/node_modules/jquery/src/var/support.js +0 -5
  174. data/node_modules/jquery/src/var/toString.js +0 -5
  175. data/node_modules/jquery/src/wrap.js +0 -77
@@ -7,7 +7,7 @@ accessibility_criteria: |
7
7
 
8
8
  An earlier version of the component did not use a heading element – this failed WCAG 2.1 Success Criterion 1.3.1 ("Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.")
9
9
 
10
- An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similiar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
10
+ An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
11
11
  shared_accessibility_criteria:
12
12
  - link
13
13
  examples:
@@ -24,12 +24,12 @@ examples:
24
24
  path: /childcare-parenting/pregnancy-and-birth
25
25
  with_margin_bottom:
26
26
  description: |
27
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 30px.
27
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of `30px`.
28
28
  data:
29
29
  title: 'Learn to practice flexible spacing: step by step'
30
30
  margin_bottom: 9
31
31
  with_unique_tracking:
32
- description: In order to identify the step by step navigation the component is part of, we need to track a unique ID of the navigation in Google Analytics. This ID should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the ID of the step nav that the component links to.
32
+ description: In order to identify the step by step navigation the component is part of, we need to track a unique `ID` of the navigation in Google Analytics. This `ID` should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the `ID` of the step nav that the component links to.
33
33
  data:
34
34
  title: 'With a tracking id'
35
35
  path: '#'
@@ -1,7 +1,7 @@
1
1
  name: Subscription links
2
2
  description: Links to ‘Get emails’ and ‘Subscribe to feed’
3
3
  body: |
4
- <strong>NOTE: This component includes a h2 heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
4
+ <strong>NOTE: This component includes a `h2` heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
5
5
  accessibility_criteria: |
6
6
  Icons in subscription links must be presentational and ignored by screen readers.
7
7
 
@@ -11,7 +11,7 @@ accessibility_criteria: |
11
11
  - be usable with touch
12
12
  - be recognised by screen readers as a button
13
13
  - announce to screen readers whether they are expanded or collapsed
14
- - show hidden elements by default when Javascript is disabled
14
+ - show hidden elements by default when JavaScript is disabled
15
15
  shared_accessibility_criteria:
16
16
  - link
17
17
  examples:
@@ -20,7 +20,7 @@ examples:
20
20
  email_signup_link: '/foreign-travel-advice/singapore/email-signup'
21
21
  feed_link: '/foreign-travel-advice/singapore.atom'
22
22
  with_margin:
23
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom, although some margin is supplied by the links themselves (so that when they stack on mobile there is space between them).
23
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom, although some margin is supplied by the links themselves (so that when they stack on mobile there is space between them).
24
24
  data:
25
25
  email_signup_link: '/foreign-travel-advice/singapore/email-signup'
26
26
  feed_link: '/foreign-travel-advice/singapore.atom'
@@ -39,7 +39,7 @@ examples:
39
39
  Nullam sed neque quis turpis.
40
40
  with_custom_margin_bottom:
41
41
  description: |
42
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). The default margins for the component are inherited from the [notification-banner](https://github.com/alphagov/govuk-frontend/blob/main/package/govuk/components/notification-banner/_index.scss) styles defined in the Design System.
42
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). The default margins for the component are inherited from the [notification-banner](https://github.com/alphagov/govuk-frontend/blob/main/package/govuk/components/notification-banner/_index.scss) styles defined in the Design System.
43
43
  data:
44
44
  message: Message to alert the user to a successful action goes here
45
45
  margin_bottom: 3
@@ -1,6 +1,6 @@
1
1
  name: Summary list
2
2
  description: Use the summary list to summarise information, for example, a user’s responses at the end of a form.
3
- body: This component extends the [Summary list component in the Design System](https://design-system.service.gov.uk/components/summary-list/) allowing the rendering of multiple groups of lists, and actions at the group level.
3
+ body: This component extends the [Summary list component in the GOV.UK Design System](https://design-system.service.gov.uk/components/summary-list/) allowing the rendering of multiple groups of lists, and actions at the group level.
4
4
  accessibility_criteria: |
5
5
  Action links in the component must:
6
6
 
@@ -102,18 +102,13 @@ examples:
102
102
  heading_level: 2
103
103
  heading_size: l
104
104
 
105
- with_edit_on_individual_items:
105
+ with_edit_on_some_individual_items:
106
106
  description: For all links shown in the component, see the <a href="/component-guide/summary_list/with_customised_links">with customised links example</a> for guidance.
107
107
  data:
108
108
  title: "Title, summary and body"
109
109
  items:
110
110
  - field: "Title"
111
111
  value: "Ethical standards for public service providers"
112
- edit:
113
- href: "edit-title"
114
- text: "Edit"
115
- data_attributes:
116
- gtm: "edit-title"
117
112
  - field: "Summary"
118
113
  value: "Find out more about our reviews on the subject of ethical standards for public service providers, including our 2014 report, 2015 guidance and 2018 follow-up publication."
119
114
  edit:
@@ -2,7 +2,7 @@ name: Table
2
2
  description: A table component to make information easier to compare and scan for users.
3
3
  accessibility_criteria: |
4
4
  Accessible tables need HTML markup that indicates header cells and data cells and defines their relationship. Assistive technologies use this information to provide context to users.
5
- Header cells must be marked up with <th>, and data cells with <td> to make tables accessible.
5
+ Header cells must be marked up with `<th>`, and data cells with `<td>` to make tables accessible.
6
6
  For more complex tables, explicit associations is needed using scope attributes.
7
7
  shared_accessibility_criteria:
8
8
  - link
@@ -28,7 +28,7 @@ examples:
28
28
  name: "emergency-name"
29
29
  id: "emergency-id"
30
30
  with_margin_bottom:
31
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to a margin bottom of 6 (30px).
31
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to a margin bottom of 6 (30px).
32
32
  data:
33
33
  margin_bottom: 9
34
34
  label:
@@ -47,7 +47,7 @@ examples:
47
47
  average_title_length: long
48
48
  with_margin_bottom:
49
49
  description: |
50
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 50px.
50
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 50px.
51
51
 
52
52
  This margin is responsive at certain sizes, see the link above for more detail. Note also that the component has a (responsive) top margin set as well, which cannot be modified.
53
53
  data:
@@ -1,50 +1,13 @@
1
1
  return unless Rails.application.config.respond_to?(:assets)
2
2
 
3
- # GOV.UK Publishing Components assets
4
- Rails.application.config.assets.precompile += %w[
5
- component_guide/accessibility-test.js
6
- component_guide/application.js
7
- component_guide/filter-components.js
8
- component_guide/print.css
9
- govuk_publishing_components/rum-loader.js
10
- govuk_publishing_components/vendor/lux/lux-reporter.js
11
- govuk_publishing_components/vendor/lux/lux-measurer.js
12
- govuk_publishing_components/all_components.js
13
- govuk_publishing_components/dependencies.js
14
- govuk_publishing_components/ie.js
15
- govuk_publishing_components/modules.js
16
- govuk_publishing_components/vendor/modernizr.js
17
- govuk_publishing_components/analytics.js
18
- govuk_publishing_components/component_guide.css
19
- govuk_publishing_components/favicon-development.png
20
- govuk_publishing_components/favicon-example.png
21
- govuk_publishing_components/favicon-integration.png
22
- govuk_publishing_components/favicon-production.png
23
- govuk_publishing_components/favicon-staging.png
24
- govuk_publishing_components/govuk-logo.png
25
- govuk_publishing_components/govuk-schema-placeholder-1x1.png
26
- govuk_publishing_components/govuk-schema-placeholder-4x3.png
27
- govuk_publishing_components/govuk-schema-placeholder-16x9.png
28
- govuk_publishing_components/search-button.png
29
- govuk_publishing_components/icon-file-download.svg
30
- govuk_publishing_components/icon-important.svg
31
- govuk_publishing_components/crests/*.png
32
- govuk_publishing_components/take-action-amber.svg
33
- govuk_publishing_components/take-action-green.svg
34
- govuk_publishing_components/take-action-red.svg
35
- ]
36
-
37
- # GOV.UK Frontend assets
38
- Rails.application.config.assets.precompile += %w[
39
- govuk-logotype-crown.png
40
- favicon.ico
41
- govuk-opengraph-image.png
42
- govuk-mask-icon.svg
43
- govuk-apple-touch-icon-180x180.png
44
- govuk-apple-touch-icon-167x167.png
45
- govuk-apple-touch-icon-152x152.png
46
- govuk-apple-touch-icon.png
47
- ]
3
+ # Include the govuk_publishing_components manifest into list of assets to
4
+ # be pre-compiled. This allows that the same Sprockets manifest to be used 0
5
+ # with Sprockets 3 and 4 without applications needing to manually require it.
6
+ #
7
+ # In future we may want applications to link directly to this from their
8
+ # manifest file as the use of `config.assets.precompile` is discouraged
9
+ # from version 4: https://github.com/rails/sprockets/blob/58cca17aa447fcee17703e4ab4dbfaab630e7ed4/UPGRADING.md
10
+ Rails.application.config.assets.precompile += %w[govuk_publishing_components_manifest.js]
48
11
 
49
12
  Rails.application.config.assets.paths += %W[
50
13
  #{__dir__}/../../node_modules/govuk-frontend/govuk/assets/images
@@ -52,3 +15,10 @@ Rails.application.config.assets.paths += %W[
52
15
  #{__dir__}/../../node_modules/govuk-frontend/
53
16
  #{__dir__}/../../node_modules/
54
17
  ]
18
+
19
+ # We've experienced segmentation faults when pre-compiling assets with libsass.
20
+ # Disabling Sprockets 4's export_concurrent setting seems to resolve the issues
21
+ # see: https://github.com/rails/sprockets/issues/633
22
+ Rails.application.config.assets.configure do |env|
23
+ env.export_concurrent = false if env.respond_to?(:export_concurrent=)
24
+ end
@@ -177,10 +177,10 @@ en:
177
177
  navigation_search_heading: Search and popular pages
178
178
  navigation_search_subheading: Search
179
179
  popular_links:
180
+ - label: 'Invasion of Ukraine'
181
+ href: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
180
182
  - label: 'Coronavirus (COVID-19)'
181
183
  href: "/coronavirus"
182
- - label: 'Brexit: check what you need to do'
183
- href: "/brexit"
184
184
  - label: Find a job
185
185
  href: "/find-a-job"
186
186
  - label: 'Personal tax account: sign in'
@@ -1,15 +1,11 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class Attachment
4
- # DfE, DWP, DHSC, HMRC, DVSA and PHE are taking part in a pilot to use a form
4
+ # Various departments are taking part in a pilot to use a form
5
5
  # rather than direct email for users to request accessible formats. When the pilot
6
6
  # scheme is rolled out further this can be removed.
7
- EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[alternative.formats@education.gov.uk
8
- accessible.formats@dwp.gov.uk
9
- publications@dhsc.gov.uk
10
- different.format@hmrc.gov.uk
11
- gov.uk.publishing@dvsa.gov.uk
12
- publications@phe.gov.uk].freeze
7
+ # Currently the pilot is paused so there are no participants.
8
+ EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
13
9
 
14
10
  delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
15
11
 
@@ -108,51 +108,6 @@ module GovukPublishingComponents
108
108
  false
109
109
  end
110
110
 
111
- def brexit_cta_taxon_allow_list
112
- # Overseas businesses: exporting to the UK
113
- # Exporting goods and services
114
- # Exporting
115
- # Manufacturing, wholesaling, importing and exporting medicines
116
- # Importing goods and services
117
- # Importing
118
- # Manufacturing, wholesaling, importing and exporting medicines
119
- %w[
120
- 2f8b848d-23c8-4f42-a41a-df1f81c64d0f
121
- 8af13fba-d969-4d87-a02e-2e71783d47be
122
- efa9782b-a3d0-4ca0-9c92-3b89748175b7
123
- f441e630-2bba-4bbd-8c1b-22ae61cc00c2
124
- 4788b4b8-2642-47ca-bfc2-bd7e8705a1da
125
- d74faafc-781d-4087-8e0c-be4216180059
126
- f441e630-2bba-4bbd-8c1b-22ae61cc00c2
127
- ]
128
- end
129
-
130
- def brexit_cta_taxon_allow_list?
131
- taxons = content_item.dig("links", "taxons").to_a
132
- taxons.each do |taxon|
133
- if brexit_cta_taxon_allow_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_allow_list)
134
- return true
135
- end
136
- end
137
- false
138
- end
139
-
140
- def parent_taxon_include?(taxon, taxon_list)
141
- if taxon.present?
142
- if taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_list.include?(taxon_item["content_id"]) }
143
- return true
144
- end
145
-
146
- taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| parent_taxon_include?(taxon_item, taxon_list) }
147
- else
148
- false
149
- end
150
- end
151
-
152
- def show_brexit_cta?
153
- brexit_cta_taxon_allow_list?
154
- end
155
-
156
111
  def content_tagged_to_current_step_by_step?
157
112
  # TODO: remove indirection here
158
113
  step_nav_helper.show_header?
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "28.9.0".freeze
2
+ VERSION = "29.0.0".freeze
3
3
  end
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: 28.9.0
4
+ version: 29.0.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-03-04 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: sprockets
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "<"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '4'
103
+ version: '3'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "<"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '4'
110
+ version: '3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '2'
173
+ version: '3'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '2'
180
+ version: '3'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: i18n-coverage
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: '1.5'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: '0'
236
+ version: '1.5'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rake
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -437,6 +437,7 @@ files:
437
437
  - app/assets/javascripts/govuk_publishing_components/analytics/analytics.js
438
438
  - app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
439
439
  - app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js
440
+ - app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js
440
441
  - app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js
441
442
  - app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js
442
443
  - app/assets/javascripts/govuk_publishing_components/analytics/ecommerce.js
@@ -492,7 +493,7 @@ files:
492
493
  - app/assets/javascripts/govuk_publishing_components/lib/toggle.js
493
494
  - app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js
494
495
  - app/assets/javascripts/govuk_publishing_components/modules.js
495
- - app/assets/javascripts/govuk_publishing_components/rum-loader.js.erb
496
+ - app/assets/javascripts/govuk_publishing_components/rum-loader.js
496
497
  - app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js
497
498
  - app/assets/javascripts/govuk_publishing_components/vendor/json2.js
498
499
  - app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-measurer.js
@@ -728,7 +729,6 @@ files:
728
729
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
729
730
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
730
731
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
731
- - app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
732
732
  - app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
733
733
  - app/views/govuk_publishing_components/components/docs/accordion.yml
734
734
  - app/views/govuk_publishing_components/components/docs/action_link.yml
@@ -1865,113 +1865,6 @@ files:
1865
1865
  - node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js
1866
1866
  - node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js
1867
1867
  - node_modules/govuk-frontend/package.json
1868
- - node_modules/jquery/AUTHORS.txt
1869
- - node_modules/jquery/LICENSE.txt
1870
- - node_modules/jquery/README.md
1871
- - node_modules/jquery/bower.json
1872
- - node_modules/jquery/dist/jquery.js
1873
- - node_modules/jquery/dist/jquery.min.js
1874
- - node_modules/jquery/dist/jquery.min.map
1875
- - node_modules/jquery/external/sizzle/LICENSE.txt
1876
- - node_modules/jquery/external/sizzle/dist/sizzle.js
1877
- - node_modules/jquery/external/sizzle/dist/sizzle.min.js
1878
- - node_modules/jquery/external/sizzle/dist/sizzle.min.map
1879
- - node_modules/jquery/package.json
1880
- - node_modules/jquery/src/ajax.js
1881
- - node_modules/jquery/src/ajax/jsonp.js
1882
- - node_modules/jquery/src/ajax/load.js
1883
- - node_modules/jquery/src/ajax/parseJSON.js
1884
- - node_modules/jquery/src/ajax/parseXML.js
1885
- - node_modules/jquery/src/ajax/script.js
1886
- - node_modules/jquery/src/ajax/var/location.js
1887
- - node_modules/jquery/src/ajax/var/nonce.js
1888
- - node_modules/jquery/src/ajax/var/rquery.js
1889
- - node_modules/jquery/src/ajax/xhr.js
1890
- - node_modules/jquery/src/attributes.js
1891
- - node_modules/jquery/src/attributes/attr.js
1892
- - node_modules/jquery/src/attributes/classes.js
1893
- - node_modules/jquery/src/attributes/prop.js
1894
- - node_modules/jquery/src/attributes/support.js
1895
- - node_modules/jquery/src/attributes/val.js
1896
- - node_modules/jquery/src/callbacks.js
1897
- - node_modules/jquery/src/core.js
1898
- - node_modules/jquery/src/core/access.js
1899
- - node_modules/jquery/src/core/init.js
1900
- - node_modules/jquery/src/core/parseHTML.js
1901
- - node_modules/jquery/src/core/ready.js
1902
- - node_modules/jquery/src/core/var/rsingleTag.js
1903
- - node_modules/jquery/src/css.js
1904
- - node_modules/jquery/src/css/addGetHookIf.js
1905
- - node_modules/jquery/src/css/adjustCSS.js
1906
- - node_modules/jquery/src/css/curCSS.js
1907
- - node_modules/jquery/src/css/defaultDisplay.js
1908
- - node_modules/jquery/src/css/hiddenVisibleSelectors.js
1909
- - node_modules/jquery/src/css/showHide.js
1910
- - node_modules/jquery/src/css/support.js
1911
- - node_modules/jquery/src/css/var/cssExpand.js
1912
- - node_modules/jquery/src/css/var/isHidden.js
1913
- - node_modules/jquery/src/css/var/rmargin.js
1914
- - node_modules/jquery/src/css/var/rnumnonpx.js
1915
- - node_modules/jquery/src/css/var/swap.js
1916
- - node_modules/jquery/src/data.js
1917
- - node_modules/jquery/src/data/support.js
1918
- - node_modules/jquery/src/data/var/acceptData.js
1919
- - node_modules/jquery/src/deferred.js
1920
- - node_modules/jquery/src/deprecated.js
1921
- - node_modules/jquery/src/dimensions.js
1922
- - node_modules/jquery/src/effects.js
1923
- - node_modules/jquery/src/effects/Tween.js
1924
- - node_modules/jquery/src/effects/animatedSelector.js
1925
- - node_modules/jquery/src/effects/support.js
1926
- - node_modules/jquery/src/event.js
1927
- - node_modules/jquery/src/event/ajax.js
1928
- - node_modules/jquery/src/event/alias.js
1929
- - node_modules/jquery/src/event/support.js
1930
- - node_modules/jquery/src/exports/amd.js
1931
- - node_modules/jquery/src/exports/global.js
1932
- - node_modules/jquery/src/intro.js
1933
- - node_modules/jquery/src/jquery.js
1934
- - node_modules/jquery/src/manipulation.js
1935
- - node_modules/jquery/src/manipulation/_evalUrl.js
1936
- - node_modules/jquery/src/manipulation/buildFragment.js
1937
- - node_modules/jquery/src/manipulation/createSafeFragment.js
1938
- - node_modules/jquery/src/manipulation/getAll.js
1939
- - node_modules/jquery/src/manipulation/setGlobalEval.js
1940
- - node_modules/jquery/src/manipulation/support.js
1941
- - node_modules/jquery/src/manipulation/var/nodeNames.js
1942
- - node_modules/jquery/src/manipulation/var/rcheckableType.js
1943
- - node_modules/jquery/src/manipulation/var/rleadingWhitespace.js
1944
- - node_modules/jquery/src/manipulation/var/rscriptType.js
1945
- - node_modules/jquery/src/manipulation/var/rtagName.js
1946
- - node_modules/jquery/src/manipulation/wrapMap.js
1947
- - node_modules/jquery/src/offset.js
1948
- - node_modules/jquery/src/outro.js
1949
- - node_modules/jquery/src/queue.js
1950
- - node_modules/jquery/src/queue/delay.js
1951
- - node_modules/jquery/src/selector-sizzle.js
1952
- - node_modules/jquery/src/selector.js
1953
- - node_modules/jquery/src/serialize.js
1954
- - node_modules/jquery/src/support.js
1955
- - node_modules/jquery/src/traversing.js
1956
- - node_modules/jquery/src/traversing/findFilter.js
1957
- - node_modules/jquery/src/traversing/var/dir.js
1958
- - node_modules/jquery/src/traversing/var/rneedsContext.js
1959
- - node_modules/jquery/src/traversing/var/siblings.js
1960
- - node_modules/jquery/src/var/class2type.js
1961
- - node_modules/jquery/src/var/concat.js
1962
- - node_modules/jquery/src/var/deletedIds.js
1963
- - node_modules/jquery/src/var/document.js
1964
- - node_modules/jquery/src/var/documentElement.js
1965
- - node_modules/jquery/src/var/hasOwn.js
1966
- - node_modules/jquery/src/var/indexOf.js
1967
- - node_modules/jquery/src/var/pnum.js
1968
- - node_modules/jquery/src/var/push.js
1969
- - node_modules/jquery/src/var/rcssNum.js
1970
- - node_modules/jquery/src/var/rnotwhite.js
1971
- - node_modules/jquery/src/var/slice.js
1972
- - node_modules/jquery/src/var/support.js
1973
- - node_modules/jquery/src/var/toString.js
1974
- - node_modules/jquery/src/wrap.js
1975
1868
  - node_modules/sortablejs/LICENSE
1976
1869
  - node_modules/sortablejs/README.md
1977
1870
  - node_modules/sortablejs/Sortable.js
@@ -1999,7 +1892,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1999
1892
  - !ruby/object:Gem::Version
2000
1893
  version: '0'
2001
1894
  requirements: []
2002
- rubygems_version: 3.3.8
1895
+ rubygems_version: 3.3.10
2003
1896
  signing_key:
2004
1897
  specification_version: 4
2005
1898
  summary: A gem to document components in GOV.UK frontend applications
@@ -1,27 +0,0 @@
1
- <% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
2
- <%
3
- title = t("components.related_navigation.transition.title")
4
- link_text = t("components.related_navigation.transition.link_text")
5
- link_path = t("components.related_navigation.transition.link_path")
6
- lang = shared_helper.t_locale("components.related_navigation.transition.title")
7
- %>
8
-
9
- <% data_attributes = {
10
- "module": "gem-track-click",
11
- "track-category": "relatedLinkClicked",
12
- "track-action": "1.0 Transition",
13
- "track-label": link_path,
14
- "track-dimension": link_text,
15
- "track-dimension-index": "29",
16
- } %>
17
-
18
- <%= tag.div class: "gem-c-contextual-sidebar__cta gem-c-contextual-sidebar__cta--brexit" do %>
19
- <%= tag.h2 title, class: "gem-c-contextual-sidebar__heading govuk-heading-s" %>
20
- <%= tag.p class: "gem-c-contextual-sidebar__text govuk-body" do %>
21
- <%= link_to link_text,
22
- link_path,
23
- class: "govuk-link",
24
- data: data_attributes,
25
- lang: lang %>
26
- <% end %>
27
- <% end %>