govuk_publishing_components 46.2.0 → 46.3.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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +4 -1
- data/app/views/govuk_publishing_components/components/_copy_to_clipboard.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +9 -1
- data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +10 -11
- data/app/views/govuk_publishing_components/components/_signup_link.html.erb +7 -7
- data/app/views/govuk_publishing_components/components/docs/reorderable_list.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/share_links.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83a3dfdc9379f4de2ca4154e431ce705e4981c3dd0f5e8a2b824891c071658ad
|
4
|
+
data.tar.gz: 1d3c875c0741f0445b07e48727c8e098f4d5f322d10daa45df32eda43e6090c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d3c513e69a24cda08fa258fe6c4dadc51262ef218784db2e2922bf672612ed83ef91b0640bcf7dd31a8af9773943f83baa584593d605278f5feb943668c6635
|
7
|
+
data.tar.gz: a1ecef4ece0afa905f15b37d6799300e516589f4f34297a7272ba4a6870f820d48a3115255467479b10b743b109fbb8eaece38a060b38f01a42812a13b48365a
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -317,7 +317,7 @@
|
|
317
317
|
label: "Site-wide",
|
318
318
|
}
|
319
319
|
) do %>
|
320
|
-
|
320
|
+
<% search_options = {
|
321
321
|
name: "keywords",
|
322
322
|
inline_label: false,
|
323
323
|
label_size: "m",
|
@@ -327,6 +327,14 @@
|
|
327
327
|
margin_bottom: 0,
|
328
328
|
disable_corrections: true,
|
329
329
|
} %>
|
330
|
+
<% if ENV["GOVUK_DISABLE_SEARCH_AUTOCOMPLETE"] %>
|
331
|
+
<%= render "govuk_publishing_components/components/search", search_options %>
|
332
|
+
<% else %>
|
333
|
+
<%= render "govuk_publishing_components/components/search_with_autocomplete", search_options.merge({
|
334
|
+
source_url: [Plek.new.website_root, "/api/search/autocomplete.json"].join,
|
335
|
+
source_key: "suggestions",
|
336
|
+
}) %>
|
337
|
+
<% end %>
|
330
338
|
<% end %>
|
331
339
|
</div>
|
332
340
|
</div>
|
@@ -3,11 +3,13 @@
|
|
3
3
|
|
4
4
|
items ||= []
|
5
5
|
input_name ||= "ordering"
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
+
component_helper.add_class("gem-c-reorderable-list")
|
9
|
+
component_helper.add_data_attribute({ module: "reorderable-list" })
|
8
10
|
%>
|
9
11
|
|
10
|
-
<%= tag.ol
|
12
|
+
<%= tag.ol(**component_helper.all_attributes) do %>
|
11
13
|
<% items.each_with_index do |item, index| %>
|
12
14
|
<%= tag.li class: "gem-c-reorderable-list__item" do %>
|
13
15
|
<%= tag.div class: "gem-c-reorderable-list__wrapper" do %>
|
@@ -14,19 +14,18 @@
|
|
14
14
|
black_icons ||= false
|
15
15
|
black_links ||= false
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
((data_attributes[:module] ||= "") << " " << "ga4-link-tracker").strip! if track_as_sharing || track_as_follow
|
17
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
18
|
+
component_helper.add_class("gem-c-share-links govuk-!-display-none-print")
|
19
|
+
component_helper.add_class("gem-c-share-links--stacked") if stacked
|
20
|
+
component_helper.add_class("gem-c-share-links--columns") if columns
|
21
|
+
component_helper.add_class("gem-c-share-links--flexbox") if flexbox
|
22
|
+
component_helper.add_class("gem-c-share-links--square-icons") if square_icons
|
23
|
+
component_helper.add_class("gem-c-share-links--black-icons") if black_icons
|
24
|
+
component_helper.add_class("gem-c-share-links--black-links") if black_links
|
25
|
+
component_helper.add_data_attribute({ module: "ga4-link-tracker" }) if track_as_sharing || track_as_follow
|
27
26
|
%>
|
28
27
|
<% if links.any? %>
|
29
|
-
<%= tag.div(
|
28
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
30
29
|
<% if title %>
|
31
30
|
<h2 class="govuk-heading-s"><%= title %></h2>
|
32
31
|
<% end %>
|
@@ -10,14 +10,14 @@
|
|
10
10
|
data ||= false
|
11
11
|
|
12
12
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
14
|
+
component_helper.add_class("gem-c-signup-link govuk-!-display-none-print")
|
15
|
+
component_helper.add_class(shared_helper.get_margin_bottom)
|
16
|
+
component_helper.add_class("gem-c-signup-link--link-only") unless heading
|
17
|
+
component_helper.add_class("gem-c-signup-link--with-background-and-border") if background
|
18
18
|
%>
|
19
19
|
<% if link_text && link_href %>
|
20
|
-
|
20
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
21
21
|
<div class="gem-c-signup-link__inner govuk-width-container">
|
22
22
|
<svg class="gem-c-signup-link__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334">
|
23
23
|
<path fill="black" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z"/>
|
@@ -28,5 +28,5 @@
|
|
28
28
|
data: data
|
29
29
|
}) %>
|
30
30
|
</div>
|
31
|
-
|
31
|
+
<% end %>
|
32
32
|
<% end %>
|
@@ -4,6 +4,7 @@ accessibility_criteria: |
|
|
4
4
|
- the component must use the correct heading level for the page
|
5
5
|
- text should have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
6
6
|
- the icon must not be focusable or shown to screenreaders
|
7
|
+
uses_component_wrapper_helper: true
|
7
8
|
shared_accessibility_criteria:
|
8
9
|
- link
|
9
10
|
examples:
|
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: 46.
|
4
|
+
version: 46.3.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: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: climate_control
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: dartsass-rails
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|