govuk_publishing_components 54.0.1 → 55.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/lib/sticky-element-container.js +117 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +5 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +6 -12
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_back-to-top-link.scss +15 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list-with-body.scss +58 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +46 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -21
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -59
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +57 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +0 -74
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +33 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +8 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_sticky-element-container.scss +23 -0
  15. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  16. data/app/views/govuk_publishing_components/components/_back_to_top_link.html.erb +19 -0
  17. data/app/views/govuk_publishing_components/components/_contents_list_with_body.html.erb +27 -0
  18. data/app/views/govuk_publishing_components/components/_figure.html.erb +28 -0
  19. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +0 -6
  20. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +50 -0
  21. data/app/views/govuk_publishing_components/components/_search.html.erb +1 -4
  22. data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +27 -0
  23. data/app/views/govuk_publishing_components/components/docs/back_to_top_link.yml +19 -0
  24. data/app/views/govuk_publishing_components/components/docs/contents_list_with_body.yml +90 -0
  25. data/app/views/govuk_publishing_components/components/docs/figure.yml +43 -0
  26. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -3
  27. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +43 -0
  28. data/app/views/govuk_publishing_components/components/docs/search.yml +0 -9
  29. data/app/views/govuk_publishing_components/components/docs/summary_banner.yml +28 -0
  30. data/config/locales/ar.yml +11 -3
  31. data/config/locales/az.yml +11 -3
  32. data/config/locales/be.yml +11 -3
  33. data/config/locales/bg.yml +11 -3
  34. data/config/locales/bn.yml +11 -3
  35. data/config/locales/cs.yml +11 -3
  36. data/config/locales/cy.yml +11 -3
  37. data/config/locales/da.yml +11 -3
  38. data/config/locales/de.yml +11 -3
  39. data/config/locales/dr.yml +11 -3
  40. data/config/locales/el.yml +11 -3
  41. data/config/locales/en.yml +11 -3
  42. data/config/locales/es-419.yml +11 -3
  43. data/config/locales/es.yml +11 -3
  44. data/config/locales/et.yml +11 -3
  45. data/config/locales/fa.yml +11 -3
  46. data/config/locales/fi.yml +11 -3
  47. data/config/locales/fr.yml +11 -3
  48. data/config/locales/gd.yml +11 -3
  49. data/config/locales/gu.yml +11 -3
  50. data/config/locales/he.yml +11 -3
  51. data/config/locales/hi.yml +11 -3
  52. data/config/locales/hr.yml +11 -3
  53. data/config/locales/hu.yml +11 -3
  54. data/config/locales/hy.yml +11 -3
  55. data/config/locales/id.yml +11 -3
  56. data/config/locales/is.yml +11 -3
  57. data/config/locales/it.yml +11 -3
  58. data/config/locales/ja.yml +11 -3
  59. data/config/locales/ka.yml +11 -3
  60. data/config/locales/kk.yml +11 -3
  61. data/config/locales/ko.yml +11 -3
  62. data/config/locales/lt.yml +11 -3
  63. data/config/locales/lv.yml +11 -3
  64. data/config/locales/ms.yml +11 -3
  65. data/config/locales/mt.yml +11 -3
  66. data/config/locales/ne.yml +224 -0
  67. data/config/locales/nl.yml +11 -3
  68. data/config/locales/no.yml +11 -3
  69. data/config/locales/pa-pk.yml +11 -3
  70. data/config/locales/pa.yml +11 -3
  71. data/config/locales/pl.yml +11 -3
  72. data/config/locales/ps.yml +11 -3
  73. data/config/locales/pt.yml +11 -3
  74. data/config/locales/ro.yml +11 -3
  75. data/config/locales/ru.yml +11 -3
  76. data/config/locales/si.yml +11 -3
  77. data/config/locales/sk.yml +11 -3
  78. data/config/locales/sl.yml +11 -3
  79. data/config/locales/so.yml +11 -3
  80. data/config/locales/sq.yml +11 -3
  81. data/config/locales/sr.yml +11 -3
  82. data/config/locales/sv.yml +11 -3
  83. data/config/locales/sw.yml +11 -3
  84. data/config/locales/ta.yml +11 -3
  85. data/config/locales/th.yml +11 -3
  86. data/config/locales/tk.yml +11 -3
  87. data/config/locales/tr.yml +11 -3
  88. data/config/locales/uk.yml +11 -3
  89. data/config/locales/ur.yml +11 -3
  90. data/config/locales/uz.yml +11 -3
  91. data/config/locales/vi.yml +11 -3
  92. data/config/locales/zh-hk.yml +11 -3
  93. data/config/locales/zh-tw.yml +11 -3
  94. data/config/locales/zh.yml +11 -3
  95. data/lib/govuk_publishing_components/version.rb +1 -1
  96. data/node_modules/axe-core/README.md +2 -2
  97. data/node_modules/axe-core/axe.js +63 -46
  98. data/node_modules/axe-core/axe.min.js +3 -3
  99. data/node_modules/axe-core/locales/_template.json +1 -1
  100. data/node_modules/axe-core/locales/de.json +19 -19
  101. data/node_modules/axe-core/locales/ko.json +4 -4
  102. data/node_modules/axe-core/package.json +4 -3
  103. data/node_modules/axe-core/sri-history.json +4 -0
  104. metadata +21 -10
  105. data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
  106. data/app/assets/images/govuk_publishing_components/action-link-arrow--light.png +0 -0
  107. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.png +0 -0
  108. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple.png +0 -0
  109. data/app/assets/images/govuk_publishing_components/action-link-arrow.png +0 -0
  110. data/app/assets/images/govuk_publishing_components/search-button.png +0 -0
  111. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +0 -29
@@ -0,0 +1,23 @@
1
+ .govuk-frontend-supported .sticky-element {
2
+ position: absolute;
3
+ bottom: 0;
4
+
5
+ &--stuck-to-window {
6
+ bottom: 0;
7
+ position: fixed;
8
+ }
9
+
10
+ &--enabled {
11
+ transition: opacity, .3s, ease;
12
+ opacity: 1;
13
+
14
+ @include govuk-media-query($until: tablet) {
15
+ position: static;
16
+ }
17
+ }
18
+
19
+ &--hidden {
20
+ opacity: 0;
21
+ pointer-events: none;
22
+ }
23
+ }
@@ -51,7 +51,7 @@ module GovukPublishingComponents
51
51
  end
52
52
 
53
53
  def display_preview?
54
- component[:display_preview].nil? ? true : component[:display_preview]
54
+ component[:display_preview].nil? || component[:display_preview]
55
55
  end
56
56
 
57
57
  def uses_component_wrapper_helper?
@@ -0,0 +1,19 @@
1
+ <%
2
+ add_gem_component_stylesheet("back-to-top-link")
3
+
4
+ text ||= t("components.back_to_top_link.contents", default: "Contents")
5
+
6
+ if href.blank? || text.blank?
7
+ raise ArgumentError, "The back_to_top_link component requires text and a href"
8
+ end
9
+
10
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
11
+ component_helper.add_class("govuk-link gem-c-back-to-top-link govuk-!-display-none-print")
12
+ %>
13
+
14
+ <%= link_to href, **component_helper.all_attributes do %>
15
+ <svg class="gem-c-back-to-top-link__icon" xmlns="http://www.w3.org/2000/svg" width="13" height="17" viewBox="0 0 13 17" aria-hidden="true" focusable="false">
16
+ <path fill="currentColor" d="M6.5 0L0 6.5 1.4 8l4-4v12.7h2V4l4.3 4L13 6.4z"/>
17
+ </svg>
18
+ <%= text %>
19
+ <% end %>
@@ -0,0 +1,27 @@
1
+ <% add_gem_component_stylesheet("contents-list-with-body") %>
2
+ <% block = yield %>
3
+ <% unless block.empty? %>
4
+ <%
5
+ contents ||= []
6
+ id ||= "contents"
7
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
8
+ component_helper.set_id(id)
9
+ component_helper.add_class("gem-c-contents-list-with-body")
10
+ component_helper.add_data_attribute({ module: "sticky-element-container" }) if contents.any?
11
+ %>
12
+ <%= tag.div(**component_helper.all_attributes) do %>
13
+ <% if contents.any? %>
14
+ <div class="gem-c-contents-list-with-body__list-container">
15
+ <%= render 'govuk_publishing_components/components/contents_list', contents: contents %>
16
+ </div>
17
+ <% end %>
18
+ <%= block %>
19
+ <% if contents.any? %>
20
+ <div data-sticky-element class="gem-c-contents-list-with-body__link-wrapper">
21
+ <div class="gem-c-contents-list-with-body__link-container">
22
+ <%= render 'govuk_publishing_components/components/back_to_top_link', href: "#contents" %>
23
+ </div>
24
+ </div>
25
+ <% end %>
26
+ <% end %>
27
+ <% end %>
@@ -0,0 +1,28 @@
1
+ <%
2
+ add_gem_component_stylesheet("figure")
3
+ alt ||= ""
4
+ caption ||= ""
5
+ credit ||= ""
6
+ local_assigns[:lang] ||= "en"
7
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
8
+ component_helper.add_class("gem-c-figure")
9
+ %>
10
+ <%= tag.figure(**component_helper.all_attributes) do %>
11
+ <% if src.present? %>
12
+ <img class="gem-c-figure__image" src="<%= src %>" alt="<%= alt %>">
13
+ <% end %>
14
+ <% if caption.present? || credit.present? %>
15
+ <figcaption class="gem-c-figure__figcaption">
16
+ <% if caption.present? %>
17
+ <p class="gem-c-figure__figcaption-text">
18
+ <%= caption %>
19
+ </p>
20
+ <% end %>
21
+ <% if credit.present? %>
22
+ <p class="gem-c-figure__figcaption-text">
23
+ <%= I18n.t("components.figure.image_credit", credit: credit) %>
24
+ </p>
25
+ <% end %>
26
+ </figcaption>
27
+ <% end %>
28
+ <% end %>
@@ -7,7 +7,6 @@
7
7
  navigation_items ||= []
8
8
  product_name ||= nil
9
9
  remove_bottom_border ||= false
10
- search ||= false
11
10
  width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
12
11
  logo_link ||= "/"
13
12
 
@@ -34,11 +33,6 @@
34
33
  <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
35
34
  </div>
36
35
  <% end %>
37
- <% if search %>
38
- <div class="govuk-grid-column-one-half gem-c-layout-header__search govuk-!-display-none-print">
39
- <%= render "govuk_publishing_components/components/layout_header/search" %>
40
- </div>
41
- <% end %>
42
36
  </div>
43
37
  </div>
44
38
  <% end %>
@@ -0,0 +1,50 @@
1
+ <%
2
+ add_gem_component_stylesheet("published-dates")
3
+
4
+ published ||= false
5
+ history ||= []
6
+ history = Array(history)
7
+ last_updated ||= false
8
+ link_to_history ||= false
9
+
10
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
11
+ component_helper.add_class("gem-c-published-dates")
12
+ component_helper.add_class("gem-c-published-dates--history") if history.any?
13
+ component_helper.set_id("full-publication-update-history") if history.any?
14
+ component_helper.add_data_attribute({ module: "gem-toggle" }) if history.any?
15
+ component_helper.set_lang("en")
16
+ %>
17
+ <% if published || last_updated %>
18
+ <%= tag.div(**component_helper.all_attributes) do %>
19
+ <h2 class="govuk-visually-hidden"><%= t('components.published_dates.hidden_heading') %></h2>
20
+ <% if published %>
21
+ <%= t('components.published_dates.published', date: published) %>
22
+ <% end %>
23
+ <% if last_updated %>
24
+ <% if published %><br /><% end %><%= t('components.published_dates.last_updated', date: last_updated) %>
25
+ <% if link_to_history && history.empty? %>
26
+ &mdash; <a href="#history" class="gem-c-published-dates__history-link govuk-link"><%= t('components.published_dates.see_all_updates', locale: :en) %></a>
27
+ <% elsif history.any? %>
28
+ <a href="#full-history"
29
+ class="gem-c-published-dates__toggle govuk-link"
30
+ data-controls="full-history"
31
+ data-expanded="false"
32
+ data-toggled-text="&#45;&nbsp;<%= t('components.published_dates.hide_all_updates', locale: :en) %>"
33
+ data-module="ga4-event-tracker"
34
+ data-ga4-event="<%= {event_name: "select_content", type: "content history", section: "Footer"}.to_json %>"
35
+ data-ga4-expandable
36
+ >&#43;&nbsp;<%= t('components.published_dates.show_all_updates', locale: :en) %></a>
37
+ <div class="gem-c-published-dates__change-history js-hidden" id="full-history">
38
+ <ol class="gem-c-published-dates__list">
39
+ <% history.each do |change| %>
40
+ <li class="gem-c-published-dates__change-item">
41
+ <time class="gem-c-published-dates__change-date timestamp" datetime="<%= change[:timestamp] %>"><%= change[:display_time] %></time>
42
+ <p class="gem-c-published-dates__change-note"><%= change[:note].strip %></p>
43
+ </li>
44
+ <% end %>
45
+ </ol>
46
+ </div>
47
+ <% end %>
48
+ <% end %>
49
+ <% end %>
50
+ <% end %>
@@ -15,7 +15,6 @@
15
15
  label_custom_class ||= nil
16
16
  name ||= "q"
17
17
  homepage ||= false
18
- no_border ||= false
19
18
  size ||= ""
20
19
  value ||= ""
21
20
  local_assigns[:margin_bottom] ||= 6
@@ -24,9 +23,7 @@
24
23
  component_helper.add_data_attribute({ module: "gem-toggle-input-class-on-focus" })
25
24
  component_helper.add_class("gem-c-search govuk-!-display-none-print")
26
25
  component_helper.add_class("gem-c-search--large") if size == "large"
27
- component_helper.add_class("gem-c-search--large-on-mobile") if size == "large-mobile"
28
26
  component_helper.add_class("gem-c-search--homepage") if homepage
29
- component_helper.add_class("gem-c-search--no-border") if no_border
30
27
  component_helper.add_class("gem-c-search--on-govuk-blue") if local_assigns[:on_govuk_blue].eql?(true)
31
28
  component_helper.add_class("gem-c-search--on-white") unless local_assigns[:on_govuk_blue].eql?(true)
32
29
  component_helper.add_class("gem-c-search--separate-label") if local_assigns.include?(:inline_label) or local_assigns.include?(:label_size)
@@ -34,7 +31,7 @@
34
31
  label_classes = []
35
32
  if (shared_helper.valid_heading_size?(label_size))
36
33
  label_classes << "govuk-label govuk-label--#{label_size}"
37
- label_classes << "gem-c-search__label--white" if no_border || homepage
34
+ label_classes << "gem-c-search__label--white" if homepage
38
35
  else
39
36
  label_classes << "gem-c-search__label"
40
37
  end
@@ -0,0 +1,27 @@
1
+ <%
2
+ add_gem_component_stylesheet("summary-banner")
3
+
4
+ title ||= false
5
+ text ||= false
6
+ secondary_text ||= false
7
+ local_assigns[:margin_bottom] ||= 7
8
+
9
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
10
+ component_helper.add_class("gem-c-summary-banner")
11
+ component_helper.add_aria_attribute({ label: "Notice" })
12
+ component_helper.set_lang("en")
13
+ component_helper.add_data_attribute({ module: "ga4-link-tracker" })
14
+ component_helper.add_data_attribute({ ga4_track_links_only: "" })
15
+ component_helper.add_data_attribute({ ga4_link: { event_name: "navigation", type: "callout" } })
16
+ %>
17
+ <% if title.present? && text.present? %>
18
+ <%= tag.section(**component_helper.all_attributes) do %>
19
+ <h2 class="gem-c-summary-banner__title govuk-heading-m"><%= title %></h2>
20
+ <p class="gem-c-summary-banner__text">
21
+ <%= text %>
22
+ </p>
23
+ <% if secondary_text %>
24
+ <p class="gem-c-summary-banner__text"><%= secondary_text %></p>
25
+ <% end %>
26
+ <% end %>
27
+ <% end %>
@@ -0,0 +1,19 @@
1
+ name: Back to top link
2
+ description: An anchor link intended to allow users to return to the top of the content.
3
+ shared_accessibility_criteria:
4
+ - link
5
+ uses_component_wrapper_helper: true
6
+ examples:
7
+ default:
8
+ data:
9
+ href: "#wrapper"
10
+ with_different_text:
11
+ description: By default, the component render with the text "Contents".
12
+ data:
13
+ href: "#wrapper"
14
+ text: "Back to top"
15
+ right_to_left:
16
+ data:
17
+ href: "#wrapper"
18
+ context:
19
+ right_to_left: true
@@ -0,0 +1,90 @@
1
+ name: Contents list with body
2
+ description: Combines contents-list and back-to-top components with block of body markup
3
+ body: |
4
+ Wraps the HTML/ERB block passed with a content list and back to top link.
5
+
6
+ Expects one argument:
7
+
8
+ * `contents` - The contents to build a contents list, if this item is empty the contents-list and back-to-top links are excluded but the block passed is still rendered.
9
+
10
+ accessibility_criteria: |
11
+ - The component must have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA.
12
+ - The component embeds contents-list and back-to-top-link components. Please see the relevant accessibility criteria:
13
+
14
+ * [back-to-top-link](/component-guide/back_to_top_link)
15
+ * [contents-list](/component-guide/contents_list)
16
+ shared_accessibility_criteria:
17
+ - link
18
+ uses_component_wrapper_helper: true
19
+ examples:
20
+ default:
21
+ data:
22
+ contents:
23
+ - href: "#reference-unless-undertakings-accepted"
24
+ text: Reference unless undertakings accepted
25
+ - href: "#notice-of-extension-of-the-preliminary-assessment-period"
26
+ text: Notice of extension of the preliminary assessment period
27
+ - href: "#invitation-to-comment-closes-13-november-2017"
28
+ text: "Invitation to comment: closes 13 November 2017"
29
+ - href: "#launch-of-merger-inquiry"
30
+ text: Launch of merger inquiry
31
+ block: |
32
+ <div class="govuk-govspeak direction-ltr">
33
+ <h2 id="statutory-timetable">Statutory timetable</h2>
34
+ <table>
35
+ <thead>
36
+ <tr>
37
+ <th>Phase 1 date</th>
38
+ <th>Action</th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <tr>
43
+ <td>3 January 2018</td>
44
+ <td>Decision announced</td>
45
+ </tr>
46
+ <tr>
47
+ <td>30 October to 13 November 2017</td>
48
+ <td>Invitation to comment</td>
49
+ </tr>
50
+ <tr>
51
+ <td>27 October 2017</td>
52
+ <td>Launch of merger inquiry</td>
53
+ </tr>
54
+ </tbody>
55
+ </table>
56
+
57
+ <h2 id="phase-1">Phase 1</h2>
58
+
59
+ <h3 id="reference-unless-undertakings-accepted">Reference unless undertakings accepted</h3>
60
+
61
+ <p>3 January 2018: The CMA has decided, on the information currently available to it, that it is or may be the case that this merger may be expected to result in a substantial lessening of competition within a market or markets in the United Kingdom. This merger will be referred for a phase 2 investigation unless the parties offer acceptable undertakings to address these competition concerns. The full text of the decision will be available shortly.</p>
62
+ <ul>
63
+ <li>Press release: <a href="https://www.gov.uk/government/news/shoppers-could-face-higher-prices-due-to-soft-drink-merger">Shoppers could face higher prices due to soft drink merger</a> (3.1.18)</li>
64
+ </ul>
65
+ <h3 id="notice-of-extension-of-the-preliminary-assessment-period">Notice of extension of the preliminary assessment period</h3>
66
+ <ul>
67
+ <li>
68
+ <span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/5a311ebfe5274a4936ee7776/refresco-notice-of-termination-of-extension.pdf">Notice of termination of extension (Refresco) </a></span> (13.12.17)</li>
69
+ <li>
70
+ <span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/5a26693240f0b659d1fca8d0/refresco-extension-notice.pdf">Notice of extension (Refresco) </a></span> (5.12.17)</li>
71
+ </ul>
72
+ <h3 id="invitation-to-comment-closes-13-november-2017">Invitation to comment: closes 13 November 2017</h3>
73
+ <p>30 October 2017: The Competition and Markets Authority (CMA) is considering whether it is or may be the case that this transaction, if carried into effect, will result in the creation of a relevant merger situation under the merger provisions of the Enterprise Act 2002 and, if so, whether the creation of that situation may be expected to result in a substantial lessening of competition within any market or markets in the United Kingdom for goods or services.</p>
74
+ <h3 id="launch-of-merger-inquiry">Launch of merger inquiry</h3>
75
+ <p>27 October 2017: The CMA announced the launch of its merger inquiry by notice to the parties.</p>
76
+ <ul>
77
+ <li>
78
+ <span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/59f6f28d40f0b66bbc806ed1/notice_of_commencement_of_initial_period.pdf">Commencement of initial period notice</a></span> (30.10.17)</li>
79
+ </ul>
80
+ <h3 id="contact">Contact</h3>
81
+ <p>Please send written representations about any competition issues to:</p>
82
+ <div class="address"><div class="adr org fn"><p>
83
+ <br>Competition and Markets Authority
84
+ <br>Victoria House
85
+ <br>Southampton Row
86
+ <br>London
87
+ <br>WC1B 4AD
88
+ <br>
89
+ </p></div></div>
90
+ </div>
@@ -0,0 +1,43 @@
1
+ name: Figure
2
+ description: A figure containing an image that never exceeds the component’s width
3
+ body: |
4
+ A figure should be used for images that are referenced within a page, but which can be moved around without affecting the flow of the page [(see guidance here)](https://developer.mozilla.org/en/docs/Web/HTML/Element/figure)
5
+
6
+ Examples:
7
+
8
+ - [Case Study containing an image](https://www.gov.uk/government/case-studies/2013-elections-in-swaziland)
9
+ accessibility_criteria: |
10
+ The figure must:
11
+
12
+ - provide an informative text description, as alt text or caption
13
+
14
+ uses_component_wrapper_helper: true
15
+ examples:
16
+ default:
17
+ data:
18
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
19
+ figure_with_alt_text:
20
+ data:
21
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
22
+ alt: 'An image of the lords chamber'
23
+ figure_with_caption:
24
+ data:
25
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
26
+ alt: 'An image of the lords chamber'
27
+ caption: 'The Lords Chamber'
28
+ right_to_left_with_caption:
29
+ data:
30
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/image_data/file/31637/s300_Visas_-_Website.jpg'
31
+ alt: 'تأشيرات'
32
+ caption: 'تأشيرات'
33
+ context:
34
+ right_to_left: true
35
+ figure_with_credit:
36
+ data:
37
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
38
+ credit: Wallis Crankled
39
+ figure_with_caption_and_credit:
40
+ data:
41
+ src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
42
+ caption: The Lords Chamber
43
+ credit: Wallis Crankled
@@ -63,9 +63,6 @@ examples:
63
63
  description: This is useful for pages where a large full-width banner is the first thing to appear on the page, for example, the [GOV.UK homepage](https://www.gov.uk)
64
64
  data:
65
65
  remove_bottom_border: true
66
- with_search_bar:
67
- data:
68
- search: true
69
66
  with_custom_logo_link:
70
67
  description: The header logo links to root by default. This option allows us to override that in certain instances.
71
68
  data:
@@ -0,0 +1,43 @@
1
+ name: Published dates
2
+ description: Dates to reflect when content was published and updated
3
+ accessibility_criteria: |
4
+ The published dates component must:
5
+
6
+ - indicate to users that the full history section can be expanded and collapsed
7
+ - inform the user of the state of the full history section (expanded or collapsed)
8
+ - be usable with a keyboard
9
+ shared_accessibility_criteria:
10
+ - link
11
+ uses_component_wrapper_helper: true
12
+ examples:
13
+ default:
14
+ data:
15
+ published: 1st January 1990
16
+ just_last_updated_date:
17
+ data:
18
+ last_updated: 20th October 2016
19
+ with_last_updated_date:
20
+ data:
21
+ published: 1st January 1990
22
+ last_updated: 20th October 2016
23
+ link_to_page_history:
24
+ description: This will set up a link to a '#history' anchor on the page. This can be used to link to another instance of this component, see [Display Page History example](/component-guide/published_dates/display_page_history)
25
+ data:
26
+ published: 1st January 1990
27
+ last_updated: 20th October 2016
28
+ link_to_history: true
29
+ display_page_history:
30
+ description: This will set up an expandable section on the page, with a top border, to let users toggle the display of the page history.
31
+ data:
32
+ published: 1st January 1990
33
+ last_updated: 20th October 2016
34
+ history:
35
+ - display_time: 1st January 1990
36
+ note: First published
37
+ timestamp: 1990-01-01T15:42:37.000+00:00
38
+ - display_time: 20th July 1995
39
+ note: Updated to include information for 1994
40
+ timestamp: 1995-07-20T15:42:37.000+00:00
41
+ - display_time: 14th October 2000
42
+ note: Updated information on pupil premium reviews and what information schools need to publish on their websites.
43
+ timestamp: 2000-10-14T15:42:37.000+00:00
@@ -22,12 +22,6 @@ examples:
22
22
  stop_the_label_appearing_inline:
23
23
  data:
24
24
  inline_label: false
25
- no_border:
26
- description: Sometimes we don't need the grey border surrounding the input field, such as when the component is used on a black background
27
- data:
28
- no_border: true
29
- context:
30
- black_background: true
31
25
  for_use_on_govuk_blue_background:
32
26
  data:
33
27
  on_govuk_blue: true
@@ -54,9 +48,6 @@ examples:
54
48
  large_version:
55
49
  data:
56
50
  size: "large"
57
- large_version_on_mobile_only:
58
- data:
59
- size: "large-mobile"
60
51
  change_field_name:
61
52
  description: To be used if you need to change the default name 'q'
62
53
  data:
@@ -0,0 +1,28 @@
1
+ name: Summary banner
2
+ description: A page banner that is currently used on consultations and calls for evidence to display a summary or other important information.
3
+ body: |
4
+ This component requires title and text attribute values passed to it, otherwise it will not render. This reflects how the component is currently used. If the component needed to become more flexible and work for other use cases, please raise an issue or a pull request in the gem.
5
+
6
+ Real world examples:
7
+
8
+ - [consultation](https://www.gov.uk/government/consultations/environmental-assessment-levels-for-the-amine-based-carbon-capture-process)
9
+ - [call for evidence](https://www.gov.uk/government/calls-for-evidence/financial-services-growth-and-competitiveness-strategy)
10
+ accessibility_criteria: |
11
+ The banner must:
12
+
13
+ - be visually distinct from other content on the page
14
+ - have an accessible name that describes the banner as a notice
15
+ - have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
16
+ uses_component_wrapper_helper: true
17
+ examples:
18
+ default:
19
+ data:
20
+ title: Summary
21
+ text: This call for evidence will inform the development of the financial services sector plan, a key part of the government’s modern industrial strategy.
22
+ with_secondary_text:
23
+ description: This example shows how the consultation and call for evidence templates use the secondary text to display dates.
24
+ data:
25
+ title: Summary
26
+ text: This call for evidence will inform the development of the financial services sector plan, a key part of the government’s modern industrial strategy.
27
+ secondary_text: This consultation ran from<br><strong class="consultation-date"><time datetime="2024-11-05T11:00:00.000+00:00">11am on 5 November 2024</time> to
28
+ <time datetime="2024-12-03T17:00:00.000+00:00">5pm on 3 December 2024</time></strong>
@@ -31,6 +31,8 @@ ar:
31
31
  request_format_text: قد لا يكون هذا الملف مناسبًا لمستخدمي التكنولوجيا المساعدة.
32
32
  back_link:
33
33
  back: عودة
34
+ back_to_top_link:
35
+ contents: المحتويات
34
36
  character_count:
35
37
  body: يمكنك إدخال عدد حتى %{number} %{type}
36
38
  type:
@@ -90,6 +92,8 @@ ar:
90
92
  what_doing: ماذا كنت تفعل؟
91
93
  what_wrong: ما الخطأ الذي وقع؟
92
94
  'yes': نعم ‏  ‏
95
+ figure:
96
+ image_credit: 'حقوق ملكية الصورة: %{credit}'
93
97
  intervention:
94
98
  accessible_link_text_suffix:
95
99
  layout_footer:
@@ -109,10 +113,7 @@ ar:
109
113
  manage:
110
114
  link_text:
111
115
  layout_header:
112
- hide_button: إخفاء البحث
113
116
  menu: القائمة
114
- search_button: البحث في GOV.UK
115
- show_button: إظهار البحث
116
117
  top_level: أفضل مستوى
117
118
  layout_super_navigation_header:
118
119
  logo_link_title:
@@ -160,6 +161,13 @@ ar:
160
161
  previous:
161
162
  print_link:
162
163
  text: طباعة هذه الصفحة
164
+ published_dates:
165
+ hidden_heading:
166
+ hide_all_updates: إخفاء كافة التحديثات
167
+ last_updated: تاريخ آخر تحديث %{date}
168
+ published: تاريخ النشر %{date}
169
+ see_all_updates: اطلع على كل التحديثات
170
+ show_all_updates: إظهار كل التحديثات
163
171
  radio:
164
172
  or: أو
165
173
  related_footer_navigation:
@@ -27,6 +27,8 @@ az:
27
27
  request_format_text: Bu fayl köməkçi texnologiya istifadəçiləri üçün uyğun olmaya bilər.
28
28
  back_link:
29
29
  back: Geriyə
30
+ back_to_top_link:
31
+ contents: Məzmunlar
30
32
  character_count:
31
33
  body: "%{number} %{type} qədər"
32
34
  type:
@@ -87,6 +89,8 @@ az:
87
89
  what_doing: Nə edirdiniz?
88
90
  what_wrong: Hansı yanlışlıq oldu?
89
91
  'yes': Bəli
92
+ figure:
93
+ image_credit: 'Təqdim edilmiş qrafik material: %{credit}'
90
94
  intervention:
91
95
  accessible_link_text_suffix:
92
96
  layout_footer:
@@ -106,10 +110,7 @@ az:
106
110
  manage:
107
111
  link_text:
108
112
  layout_header:
109
- hide_button: Axtarışı gizlət
110
113
  menu: Menyu
111
- search_button: GOV.UK-də axtarış
112
- show_button: Axtarışı göstər
113
114
  top_level: Yüksək səviyyəli
114
115
  layout_super_navigation_header:
115
116
  logo_link_title:
@@ -157,6 +158,13 @@ az:
157
158
  previous:
158
159
  print_link:
159
160
  text: Bu səhifəni çap et
161
+ published_dates:
162
+ hidden_heading:
163
+ hide_all_updates: bütün yenilmələri gizlət
164
+ last_updated: 'Son yenilənmə: %{date}'
165
+ published: 'Dərc edilib: %{date}'
166
+ see_all_updates: bütün yeniləmələrə baxın
167
+ show_all_updates: bütün yeniləmələri göstər
160
168
  radio:
161
169
  or: və ya
162
170
  related_footer_navigation:
@@ -29,6 +29,8 @@ be:
29
29
  request_format_text: Гэты файл можа быць непрыдатным для карыстальнікаў дапаможных тэхналогій.
30
30
  back_link:
31
31
  back: Назад
32
+ back_to_top_link:
33
+ contents: Змест
32
34
  character_count:
33
35
  body: Вы можаце ўвесці да %{number} %{type}
34
36
  type:
@@ -93,6 +95,8 @@ be:
93
95
  what_doing: Што вы рабiлi?
94
96
  what_wrong: Што пайшло не так?
95
97
  'yes': Так
98
+ figure:
99
+ image_credit: 'Крэдыт выявы: %{credit}'
96
100
  intervention:
97
101
  accessible_link_text_suffix:
98
102
  layout_footer:
@@ -112,10 +116,7 @@ be:
112
116
  manage:
113
117
  link_text:
114
118
  layout_header:
115
- hide_button: Схаваць вынікі пошуку
116
119
  menu: Меню
117
- search_button: Шукаць GOV.UK
118
- show_button: Паказаць вынікі пошуку
119
120
  top_level: Верхні ўзровень
120
121
  layout_super_navigation_header:
121
122
  logo_link_title:
@@ -163,6 +164,13 @@ be:
163
164
  previous:
164
165
  print_link:
165
166
  text: Надрукаваць гэтую странiцу
167
+ published_dates:
168
+ hidden_heading:
169
+ hide_all_updates: схаваць усе абнаўленні
170
+ last_updated: Апошняе абнаўленне %{date}
171
+ published: Апублікавана %{date}
172
+ see_all_updates: паглядзець усе абнаўленні
173
+ show_all_updates: паказаць усе абнаўленні
166
174
  radio:
167
175
  or: або
168
176
  related_footer_navigation: