govuk_publishing_components 66.4.2 → 66.6.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +0 -22
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +83 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +7 -1
  5. data/app/views/govuk_publishing_components/components/_cards.html.erb +1 -0
  6. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +14 -32
  7. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +3 -1
  8. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +231 -221
  9. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +13 -12
  10. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +1 -1
  11. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +8 -17
  12. data/app/views/govuk_publishing_components/components/docs/cards.yml +35 -0
  13. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +0 -19
  14. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +12 -23
  15. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -6
  16. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +8 -0
  17. data/config/locales/en.yml +2 -2
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. data/node_modules/axe-core/axe.d.ts +39 -1
  20. data/node_modules/axe-core/axe.js +1062 -534
  21. data/node_modules/axe-core/axe.min.js +2 -2
  22. data/node_modules/axe-core/gather-internals.js +219 -0
  23. data/node_modules/axe-core/locales/_template.json +5 -0
  24. data/node_modules/axe-core/locales/ja.json +1 -0
  25. data/node_modules/axe-core/locales/{no_NB.json → nb.json} +1 -1
  26. data/node_modules/axe-core/locales/pt_BR.json +1 -1
  27. data/node_modules/axe-core/locales/pt_PT.json +1 -1
  28. data/node_modules/axe-core/locales/zh_CN.json +1 -1
  29. data/node_modules/axe-core/locales/zh_TW.json +1 -1
  30. data/node_modules/axe-core/package.json +11 -6
  31. data/node_modules/axe-core/sri-history.json +4 -0
  32. metadata +4 -3
@@ -2,6 +2,7 @@
2
2
  logo_link ||= "https://www.gov.uk/"
3
3
  logo_link_title ||= t("components.layout_super_navigation_header.logo_link_title")
4
4
 
5
+ phase_banner ||= nil
5
6
  homepage ||= false
6
7
 
7
8
  navigation_links_columns = t("components.layout_super_navigation_header.navigation_links_columns")
@@ -38,241 +39,250 @@
38
39
  component_helper.add_data_attribute({ module: "ga4-event-tracker ga4-link-tracker", ga4_expandable: "" })
39
40
  %>
40
41
  <%= tag.header(**component_helper.all_attributes) do %>
41
- <div class="gem-c-layout-super-navigation-header__container govuk-width-container">
42
- <nav
43
- aria-labelledby="super-navigation-menu-heading"
44
- class="gem-c-layout-super-navigation-header__content"
45
- data-module="super-navigation-mega-menu">
46
- <%= content_tag(:div, {
47
- class: header_logo_classes,
48
- }) do %>
49
- <%= link_to logo_link, {
50
- class: header_link_classes,
51
- data: {
52
- "ga4-link": {
53
- "event_name": "navigation",
54
- "type": "header menu bar",
55
- "external": "false",
56
- "text": "GOV.UK",
57
- "section": "Logo",
58
- "index_link": 1,
59
- "index_section": 0,
60
- "index_section_count": 2,
61
- "index_total": 1,
62
- }.to_json,
63
- },
64
- id: "logo",
65
- aria: {
66
- label: logo_link_title,
67
- },
68
- } do %>
69
- <%= render "govuk_publishing_components/components/govuk_logo/govuk_logo" %>
42
+ <div class="gem-c-layout-super-navigation-header__nav-wrapper">
43
+ <div class="gem-c-layout-super-navigation-header__container govuk-width-container">
44
+ <nav
45
+ aria-labelledby="super-navigation-menu-heading"
46
+ class="gem-c-layout-super-navigation-header__content"
47
+ data-module="super-navigation-mega-menu">
48
+ <%= content_tag(:div, {
49
+ class: header_logo_classes,
50
+ }) do %>
51
+ <%= link_to logo_link, {
52
+ class: header_link_classes,
53
+ data: {
54
+ "ga4-link": {
55
+ "event_name": "navigation",
56
+ "type": "header menu bar",
57
+ "external": "false",
58
+ "text": "GOV.UK",
59
+ "section": "Logo",
60
+ "index_link": 1,
61
+ "index_section": 0,
62
+ "index_section_count": 2,
63
+ "index_total": 1,
64
+ }.to_json,
65
+ },
66
+ id: "logo",
67
+ aria: {
68
+ label: logo_link_title,
69
+ },
70
+ } do %>
71
+ <%= render "govuk_publishing_components/components/govuk_logo/govuk_logo" %>
72
+ <% end %>
70
73
  <% end %>
71
- <% end %>
72
- <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden">
73
- <%= navigation_menu_heading %>
74
- </h2>
74
+ <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden">
75
+ <%= navigation_menu_heading %>
76
+ </h2>
75
77
 
76
- <%
77
- link = t("components.layout_super_navigation_header.navigation_link")
78
- show_menu_text = show_navigation_menu_text
79
- hide_menu_text = hide_navigation_menu_text
80
- %>
78
+ <%
79
+ link = t("components.layout_super_navigation_header.navigation_link")
80
+ show_menu_text = show_navigation_menu_text
81
+ hide_menu_text = hide_navigation_menu_text
82
+ %>
81
83
 
82
- <div class="gem-c-layout-super-navigation-header__navigation-item">
83
- <%= link_to link[:href], {
84
- class: item_link_classes,
85
- } do %>
86
- <% content_tag(:span, {
87
- class: item_link_inner_classes,
88
- }) do %>
89
- <%= link[:label] %>
84
+ <div class="gem-c-layout-super-navigation-header__navigation-item">
85
+ <%= link_to link[:href], {
86
+ class: item_link_classes,
87
+ } do %>
88
+ <% content_tag(:span, {
89
+ class: item_link_inner_classes,
90
+ }) do %>
91
+ <%= link[:label] %>
92
+ <% end %>
90
93
  <% end %>
91
- <% end %>
92
94
 
93
- <%= content_tag(:button, {
94
- aria: {
95
- controls: "super-navigation-menu",
96
- expanded: false,
97
- label: show_menu_text,
98
- },
99
- class: top_toggle_button_classes,
100
- data: {
101
- text_for_hide: hide_menu_text,
102
- text_for_show: show_menu_text,
103
- toggle_desktop_group: "top",
104
- toggle_mobile_group: "top",
105
- ga4_event: {
106
- event_name: "select_content",
107
- type: "header menu bar",
108
- text: link[:label],
109
- index_section: 1,
110
- index_section_count: 2,
111
- section: link[:label],
95
+ <%= content_tag(:button, {
96
+ aria: {
97
+ controls: "super-navigation-menu",
98
+ expanded: false,
99
+ label: show_menu_text,
100
+ },
101
+ class: top_toggle_button_classes,
102
+ data: {
103
+ text_for_hide: hide_menu_text,
104
+ text_for_show: show_menu_text,
105
+ toggle_desktop_group: "top",
106
+ toggle_mobile_group: "top",
107
+ ga4_event: {
108
+ event_name: "select_content",
109
+ type: "header menu bar",
110
+ text: link[:label],
111
+ index_section: 1,
112
+ index_section_count: 2,
113
+ section: link[:label],
114
+ },
112
115
  },
113
- },
114
- hidden: true,
115
- id: "super-navigation-menu-toggle",
116
- type: "button",
116
+ hidden: true,
117
+ id: "super-navigation-menu-toggle",
118
+ type: "button",
119
+ }) do %>
120
+ <%= tag.span link[:label], class: top_toggle_button_inner_classes %>
121
+ <% end %>
122
+ </div>
123
+ <%= content_tag(:div, {
124
+ id: "super-navigation-menu",
125
+ hidden: "",
126
+ class: dropdown_menu_classes,
117
127
  }) do %>
118
- <%= tag.span link[:label], class: top_toggle_button_inner_classes %>
119
- <% end %>
120
- </div>
121
- <%= content_tag(:div, {
122
- id: "super-navigation-menu",
123
- hidden: "",
124
- class: dropdown_menu_classes,
125
- }) do %>
126
- <div class="govuk-grid-row gem-c-layout-super-navigation-header__navigation-items">
128
+ <div class="govuk-grid-row gem-c-layout-super-navigation-header__navigation-items">
127
129
 
128
- <% navigation_links_columns.each_with_index do | column, column_index | %>
129
- <%
130
- case column[:size]
131
- when 2
132
- width_class = "govuk-grid-column-two-thirds-from-desktop"
133
- when 3
134
- width_class = "govuk-grid-column-full-from-desktop"
135
- else
136
- width_class = "govuk-grid-column-one-third-from-desktop"
137
- end
138
- %>
130
+ <% navigation_links_columns.each_with_index do | column, column_index | %>
131
+ <%
132
+ case column[:size]
133
+ when 2
134
+ width_class = "govuk-grid-column-two-thirds-from-desktop"
135
+ when 3
136
+ width_class = "govuk-grid-column-full-from-desktop"
137
+ else
138
+ width_class = "govuk-grid-column-one-third-from-desktop"
139
+ end
140
+ %>
139
141
 
140
- <div class="<%= width_class %> gem-c-layout-super-navigation-header__column--<%= column[:label].downcase.gsub(" ", "-") %>">
141
- <h3 class="govuk-heading-m gem-c-layout-super-navigation-header__column-header">
142
- <%= column[:label] %>
143
- </h3>
144
- <ul class="gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= column[:label].downcase.gsub(" ", "-") %>">
145
- <% index_total = column[:menu_contents].length %>
146
- <% column[:menu_contents].each_with_index do | item, index | %>
147
- <%
148
- has_description = item[:description].present?
149
- link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
150
- link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
151
- %>
152
- <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
153
- <%= link_to item[:label], item[:href], {
154
- class: link_classes,
155
- data: {
156
- ga4_link: {
157
- "event_name": "navigation",
158
- "type": "header menu bar",
159
- "index_section": column_index + 1,
160
- "index_link": index + 1,
161
- "index_section_count": 3,
162
- "index_total": index_total,
163
- "section": column[:label],
142
+ <div class="<%= width_class %> gem-c-layout-super-navigation-header__column--<%= column[:label].downcase.gsub(" ", "-") %>">
143
+ <h3 class="govuk-heading-m gem-c-layout-super-navigation-header__column-header">
144
+ <%= column[:label] %>
145
+ </h3>
146
+ <ul class="gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= column[:label].downcase.gsub(" ", "-") %>">
147
+ <% index_total = column[:menu_contents].length %>
148
+ <% column[:menu_contents].each_with_index do | item, index | %>
149
+ <%
150
+ has_description = item[:description].present?
151
+ link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
152
+ link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
153
+ %>
154
+ <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
155
+ <%= link_to item[:label], item[:href], {
156
+ class: link_classes,
157
+ data: {
158
+ ga4_link: {
159
+ "event_name": "navigation",
160
+ "type": "header menu bar",
161
+ "index_section": column_index + 1,
162
+ "index_link": index + 1,
163
+ "index_section_count": 3,
164
+ "index_total": index_total,
165
+ "section": column[:label],
166
+ },
164
167
  },
165
- },
166
- } %>
167
- <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
168
- </li>
169
- <% end %>
170
- </ul>
171
- </div>
168
+ } %>
169
+ <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
170
+ </li>
171
+ <% end %>
172
+ </ul>
173
+ </div>
174
+ <% end %>
175
+ </div>
176
+ <% end %>
177
+ <div class="gem-c-layout-super-navigation-header__search-item">
178
+ <%= content_tag(:button, {
179
+ id: "super-search-menu-toggle",
180
+ class: search_toggle_button_classes,
181
+ aria: {
182
+ controls: "super-search-menu",
183
+ expanded: "true",
184
+ label: hide_search_menu_text,
185
+ },
186
+ data: {
187
+ "text-for-hide": hide_search_menu_text,
188
+ "text-for-show": show_search_menu_text,
189
+ "toggle-mobile-group": "top",
190
+ "toggle-desktop-group": "top",
191
+ "ga4-event": "#{{
192
+ "event_name": "select_content",
193
+ "type": "header menu bar",
194
+ "text": "Search",
195
+ "index_section": 2,
196
+ "index_section_count": 2,
197
+ "section": "Search",
198
+ }.to_json
199
+ }",
200
+ },
201
+ hidden: true,
202
+ type: "button",
203
+ }) do %>
204
+ <span class="govuk-visually-hidden">
205
+ <%= search_text %>
206
+ </span>
207
+ <%=
208
+ render "govuk_publishing_components/components/search/search_icon", {
209
+ classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon],
210
+ }
211
+ %>
212
+ <span
213
+ aria-hidden="true"
214
+ class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon">
215
+ &times;
216
+ </span>
217
+ <% end %>
218
+
219
+ <%= link_to "/search", {
220
+ class: search_item_link_classes,
221
+ } do %>
222
+ <span class="govuk-visually-hidden">
223
+ <%= search_text %>
224
+ </span>
225
+ <%=
226
+ render "govuk_publishing_components/components/search/search_icon", {
227
+ classes: %w[gem-c-layout-super-navigation-header__search-item-link-icon],
228
+ }
229
+ %>
172
230
  <% end %>
173
231
  </div>
174
- <% end %>
175
- <div class="gem-c-layout-super-navigation-header__search-item">
176
- <%= content_tag(:button, {
177
- id: "super-search-menu-toggle",
178
- class: search_toggle_button_classes,
179
- aria: {
180
- controls: "super-search-menu",
181
- expanded: "true",
182
- label: hide_search_menu_text,
183
- },
184
- data: {
185
- "text-for-hide": hide_search_menu_text,
186
- "text-for-show": show_search_menu_text,
187
- "toggle-mobile-group": "top",
188
- "toggle-desktop-group": "top",
189
- "ga4-event": "#{{
190
- "event_name": "select_content",
191
- "type": "header menu bar",
192
- "text": "Search",
193
- "index_section": 2,
194
- "index_section_count": 2,
195
- "section": "Search",
196
- }.to_json
197
- }",
198
- },
199
- hidden: true,
200
- type: "button",
232
+ <%= content_tag(:div, {
233
+ id: "super-search-menu",
234
+ hidden: "",
235
+ class: dropdown_menu_classes,
201
236
  }) do %>
202
- <span class="govuk-visually-hidden">
203
- <%= search_text %>
204
- </span>
205
- <%=
206
- render "govuk_publishing_components/components/search/search_icon", {
207
- classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon],
208
- }
209
- %>
210
- <span
211
- aria-hidden="true"
212
- class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon">
213
- &times;
214
- </span>
215
- <% end %>
216
-
217
- <%= link_to "/search", {
218
- class: search_item_link_classes,
219
- } do %>
220
- <span class="govuk-visually-hidden">
221
- <%= search_text %>
222
- </span>
223
- <%=
224
- render "govuk_publishing_components/components/search/search_icon", {
225
- classes: %w[gem-c-layout-super-navigation-header__search-item-link-icon],
226
- }
227
- %>
228
- <% end %>
229
- </div>
230
- <%= content_tag(:div, {
231
- id: "super-search-menu",
232
- hidden: "",
233
- class: dropdown_menu_classes,
234
- }) do %>
235
- <div class="gem-c-layout-super-navigation-header__search-container gem-c-layout-super-navigation-header__search-items">
236
- <h3 class="govuk-visually-hidden">
237
- <%= navigation_search_subheading %>
238
- </h3>
239
- <div class="govuk-grid-row">
240
- <div class="govuk-grid-column-full">
241
- <%= tag.form(
242
- class: "gem-c-layout-super-navigation-header__search-form",
243
- id: "search",
244
- data: {
245
- module: "ga4-search-tracker",
246
- ga4_search_type: "header menu bar",
247
- ga4_search_url: "/search/all",
248
- ga4_search_section: "Search GOV.UK",
249
- ga4_search_index_section: 3,
250
- ga4_search_index_section_count: 3,
251
- },
252
- action: "/search/all",
253
- method: "get",
254
- role: "search",
255
- aria: {
256
- label: "Site-wide",
257
- },
258
- ) do %>
259
- <%= render "govuk_publishing_components/components/search_with_autocomplete", {
260
- name: "keywords",
261
- inline_label: false,
262
- label_size: "m",
263
- label_text: search_text,
264
- label_custom_class: "gem-c-layout-super-navigation-header__search-label--large-navbar",
265
- size: "large",
266
- margin_bottom: 0,
267
- disable_corrections: true,
268
- source_url: [Plek.new.website_root, "/api/search/autocomplete.json"].join,
269
- source_key: "suggestions",
270
- } %>
271
- <% end %>
237
+ <div class="gem-c-layout-super-navigation-header__search-container gem-c-layout-super-navigation-header__search-items">
238
+ <h3 class="govuk-visually-hidden">
239
+ <%= navigation_search_subheading %>
240
+ </h3>
241
+ <div class="govuk-grid-row">
242
+ <div class="govuk-grid-column-full">
243
+ <%= tag.form(
244
+ class: "gem-c-layout-super-navigation-header__search-form",
245
+ id: "search",
246
+ data: {
247
+ module: "ga4-search-tracker",
248
+ ga4_search_type: "header menu bar",
249
+ ga4_search_url: "/search/all",
250
+ ga4_search_section: "Search GOV.UK",
251
+ ga4_search_index_section: 3,
252
+ ga4_search_index_section_count: 3,
253
+ },
254
+ action: "/search/all",
255
+ method: "get",
256
+ role: "search",
257
+ aria: {
258
+ label: "Site-wide",
259
+ },
260
+ ) do %>
261
+ <%= render "govuk_publishing_components/components/search_with_autocomplete", {
262
+ name: "keywords",
263
+ inline_label: false,
264
+ label_size: "m",
265
+ label_text: search_text,
266
+ label_custom_class: "gem-c-layout-super-navigation-header__search-label--large-navbar",
267
+ size: "large",
268
+ margin_bottom: 0,
269
+ disable_corrections: true,
270
+ source_url: [Plek.new.website_root, "/api/search/autocomplete.json"].join,
271
+ source_key: "suggestions",
272
+ } %>
273
+ <% end %>
274
+ </div>
272
275
  </div>
273
276
  </div>
274
- </div>
275
- <% end %>
276
- </nav>
277
+ <% end %>
278
+ </nav>
279
+ </div>
277
280
  </div>
281
+ <% if phase_banner %>
282
+ <div class="gem-c-phase-banner-wrapper">
283
+ <div class="govuk-width-container">
284
+ <%= render "govuk_publishing_components/components/phase_banner", phase_banner %>
285
+ </div>
286
+ </div>
287
+ <% end %>
278
288
  <% end %>
@@ -3,7 +3,6 @@
3
3
  history ||= []
4
4
  history = Array(history)
5
5
  last_updated ||= false
6
- link_to_history ||= false
7
6
 
8
7
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
9
8
  component_helper.add_class("gem-c-published-dates")
@@ -20,17 +19,19 @@
20
19
  <% end %>
21
20
  <% if last_updated %>
22
21
  <%= t("components.published_dates.last_updated", date: last_updated) %>
23
- <% if link_to_history && history.empty? %>
24
- <span aria-hidden="true">— </span><a href="#history" class="govuk-link"><%= t("components.published_dates.see_all_updates", locale: :en) %></a>
25
- <% elsif history.any? %>
26
- <a href="#full-history"
27
- class="gem-c-published-dates__toggle govuk-link"
28
- data-controls="full-history"
29
- data-expanded="false"
30
- data-toggled-text="<span aria-hidden='true'>‐ </span><%= t("components.published_dates.hide_all_updates", locale: :en) %>"
31
- data-module="ga4-event-tracker"
32
- data-ga4-event="<%= {event_name: "select_content", type: "content history", section: "Footer"}.to_json %>"
33
- data-ga4-expandable><span aria-hidden="true">+ </span><%= t("components.published_dates.show_all_updates", locale: :en) %></a>
22
+ <% if history.any? %>
23
+ <span aria-hidden="true">&#8212; </span>
24
+ <a
25
+ href="#full-history"
26
+ class="gem-c-published-dates__toggle govuk-link"
27
+ data-controls="full-history"
28
+ data-expanded="false"
29
+ data-toggled-text='<%= t("components.published_dates.hide_all_updates", locale: :en) %>'
30
+ data-module="ga4-event-tracker"
31
+ data-ga4-event='<%= { event_name: "select_content", type: "content history", section: "Footer" }.to_json %>'
32
+ data-ga4-expandable>
33
+ <%= t("components.published_dates.show_all_updates", locale: :en) %>
34
+ </a>
34
35
  <div class="gem-c-published-dates__change-history js-hidden" id="full-history">
35
36
  <ol class="gem-c-published-dates__list">
36
37
  <% history.each do |change| %>
@@ -5,7 +5,7 @@
5
5
  link_href ||= false
6
6
  heading ||= false
7
7
  background ||= false
8
- data ||= false
8
+ data ||= nil
9
9
 
10
10
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
11
11
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -3,7 +3,7 @@ description: "Navigational breadcrumbs, showing page hierarchy"
3
3
  body: |
4
4
  Accepts an array of breadcrumb objects. Each crumb must have a title and a URL.
5
5
 
6
- We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
6
+ We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can omit this option to stop this behaviour.
7
7
  shared_accessibility_criteria:
8
8
  - link
9
9
  accessibility_criteria: |
@@ -20,10 +20,12 @@ examples:
20
20
  data:
21
21
  collapse_on_mobile: true
22
22
  breadcrumbs:
23
- - title: 'Section'
24
- url: '/section'
25
- - title: 'Sub-section'
26
- url: '/section/sub-section'
23
+ - title: 'Home'
24
+ url: '/'
25
+ - title: 'Passports, travel and living abroad'
26
+ url: '/browse/abroad'
27
+ - title: 'Travel abroad'
28
+ url: '/browse/abroad/travel-abroad'
27
29
  inverse:
28
30
  description: On a dark background, such as the header of topic pages
29
31
  data:
@@ -67,16 +69,6 @@ examples:
67
69
  url: '/service-manual'
68
70
  - title: 'Agile Delivery'
69
71
  url: '/service-manual/agile-delivery'
70
- real:
71
- data:
72
- collapse_on_mobile: true
73
- breadcrumbs:
74
- - title: 'Home'
75
- url: '/'
76
- - title: 'Passports, travel and living abroad'
77
- url: '/browse/abroad'
78
- - title: 'Travel abroad'
79
- url: '/browse/abroad/travel-abroad'
80
72
  long_taxon:
81
73
  description: This is an example of a breadcrumb with long taxons to demonstrate the wrapping behaviour and touch target area on mobile
82
74
  data:
@@ -89,9 +81,8 @@ examples:
89
81
  - title: 'Education of disadvantaged children appended with some extra long content to make this a very very very very long taxon'
90
82
  url: '/education'
91
83
  stop_collapsing_on_mobile:
92
- description: We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
84
+ description: We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can omit this option to stop this behaviour.
93
85
  data:
94
- collapse_on_mobile: false
95
86
  breadcrumbs:
96
87
  - title: 'Home'
97
88
  url: '/'
@@ -114,6 +114,41 @@ examples:
114
114
  text: Citizenship and living in the&nbsp;UK
115
115
  path: http://www.gov.uk
116
116
  description: Voting, community participation, life in the UK, international projects
117
+ auto_layout:
118
+ description: |
119
+ Automatically adjusts the number of columns used by the component based on the container size, as well as the screen size. Based on the size of the govuk-grid. If the component is in a full width container, it will show three columns - in a two thirds container, two columns - in a one third, one column.
120
+
121
+ The example below shows how it appears in a two thirds column.
122
+ data:
123
+ columns: auto
124
+ heading: Services and information
125
+ items:
126
+ - link:
127
+ text: Benefits
128
+ path: http://www.gov.uk
129
+ description: Includes eligibility, appeals, tax credits and Universal Credit
130
+ - link:
131
+ text: Births, deaths, marriages and&nbsp;care
132
+ path: http://www.gov.uk
133
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
134
+ - link:
135
+ text: Business and self-employed
136
+ path: http://www.gov.uk
137
+ description: Tools and guidance for businesses
138
+ - link:
139
+ text: Childcare and parenting
140
+ path: http://www.gov.uk
141
+ description: Includes giving birth, fostering, adopting, benefits for children, childcare and schools
142
+ - link:
143
+ text: Citizenship and living in the&nbsp;UK
144
+ path: http://www.gov.uk
145
+ description: Voting, community participation, life in the UK, international projects
146
+ embed: |
147
+ <div class="govuk-grid-row">
148
+ <div class="govuk-grid-column-two-thirds">
149
+ <%= component %>
150
+ </div>
151
+ </div>
117
152
  custom_heading_levels:
118
153
  description: |
119
154
  Override default heading level by passing through `heading_level` parameter (defaults to `<h2>`).