govuk_publishing_components 70.0.1 → 70.1.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/_search.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +4 -1
- data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +8 -0
- data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +11 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a208990405169cdf86868f1f1348fdacf2d42112b7bc2f4076bad3fc979fb296
|
|
4
|
+
data.tar.gz: 9be0a018eef194e89559ae804b341b7b9770b47acab3b27fe9d8e039eb9398ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1496a72e47e1a86373ca73e6f8a4a535c5821899af6ab3b5d20f3bd20b618f20d05df9dae456d34f56616bca48600d172a384587b70147b263dce51faa0cdd4f
|
|
7
|
+
data.tar.gz: 053e638e9b073f6a49cbe4f06c3e9d83c04e1ea350c4fc1d1d456401280aeaa635408e43ff0d2ae78e478b262a151f5609fc29dc491f27796a36b58667bbd3d9
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
.gem-c-translation-nav {
|
|
2
2
|
margin-bottom: govuk-spacing(6);
|
|
3
|
-
border-bottom: 1px solid govuk-functional-colour(border);
|
|
4
3
|
color: govuk-functional-colour(text);
|
|
5
4
|
@include govuk-font(16);
|
|
6
5
|
}
|
|
7
6
|
|
|
7
|
+
.gem-c-translation-nav--border {
|
|
8
|
+
border-bottom: 1px solid govuk-functional-colour(border);
|
|
9
|
+
}
|
|
10
|
+
|
|
8
11
|
.gem-c-translation-nav__list {
|
|
9
12
|
list-style: none;
|
|
10
13
|
margin: 0 (- govuk-spacing(2));
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
brand ||= false
|
|
3
3
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
|
4
4
|
translation_helper = GovukPublishingComponents::Presenters::TranslationNavHelper.new(local_assigns)
|
|
5
|
+
omit_border ||= false
|
|
5
6
|
|
|
6
7
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
7
8
|
component_helper.add_class("gem-c-translation-nav govuk-!-display-none-print #{translation_helper.classes} #{brand_helper.brand_class}")
|
|
9
|
+
component_helper.add_class("gem-c-translation-nav--border") unless omit_border
|
|
8
10
|
component_helper.add_aria_attribute({ label: t("common.translations") })
|
|
9
11
|
%>
|
|
10
12
|
<% if translation_helper.has_translations? %>
|
|
@@ -98,6 +98,14 @@ examples:
|
|
|
98
98
|
data:
|
|
99
99
|
label_margin_bottom: 9
|
|
100
100
|
inline_label: false
|
|
101
|
+
with_long_label_text:
|
|
102
|
+
description: |
|
|
103
|
+
Demonstrates how long label text wraps across multiple lines without being clipped.
|
|
104
|
+
|
|
105
|
+
Requires `inline_label` to be false.
|
|
106
|
+
data:
|
|
107
|
+
inline_label: false
|
|
108
|
+
label_text: Search for a licence, permit, or regulation by entering keywords, document title, or reference number
|
|
101
109
|
with_custom_label_class:
|
|
102
110
|
description: |
|
|
103
111
|
Allows adding a custom class to the label of the component.
|
|
@@ -28,6 +28,17 @@ examples:
|
|
|
28
28
|
- locale: 'hi'
|
|
29
29
|
base_path: '/hi'
|
|
30
30
|
text: 'हिंदी'
|
|
31
|
+
omit_border:
|
|
32
|
+
data:
|
|
33
|
+
omit_border: true
|
|
34
|
+
translations:
|
|
35
|
+
- locale: 'en'
|
|
36
|
+
base_path: '/en'
|
|
37
|
+
text: 'English'
|
|
38
|
+
active: true
|
|
39
|
+
- locale: 'hi'
|
|
40
|
+
base_path: '/hi'
|
|
41
|
+
text: 'हिंदी'
|
|
31
42
|
multiple_translations:
|
|
32
43
|
data:
|
|
33
44
|
translations:
|