govuk_publishing_components 27.10.4 → 27.13.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/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +6 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +246 -113
- data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +30 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss +5 -0
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +9 -0
- data/app/models/govuk_publishing_components/shared_accessibility_criteria.rb +17 -0
- data/app/views/govuk_publishing_components/components/_input.html.erb +35 -22
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +31 -43
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +23 -0
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +4 -5
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +0 -6
- data/app/views/govuk_publishing_components/components/docs/input.yml +10 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +7 -0
- data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +32 -0
- data/app/views/govuk_publishing_components/components/search/_search_icon.html.erb +5 -5
- data/config/locales/ar.yml +0 -3
- data/config/locales/az.yml +0 -3
- data/config/locales/be.yml +0 -3
- data/config/locales/bg.yml +0 -3
- data/config/locales/bn.yml +0 -3
- data/config/locales/cs.yml +0 -3
- data/config/locales/cy.yml +0 -3
- data/config/locales/da.yml +0 -3
- data/config/locales/de.yml +0 -3
- data/config/locales/dr.yml +0 -3
- data/config/locales/el.yml +0 -3
- data/config/locales/en.yml +8 -9
- data/config/locales/es-419.yml +0 -3
- data/config/locales/es.yml +0 -3
- data/config/locales/et.yml +0 -3
- data/config/locales/fa.yml +0 -3
- data/config/locales/fi.yml +0 -3
- data/config/locales/fr.yml +0 -3
- data/config/locales/gd.yml +0 -3
- data/config/locales/gu.yml +0 -3
- data/config/locales/he.yml +0 -3
- data/config/locales/hi.yml +0 -3
- data/config/locales/hr.yml +0 -3
- data/config/locales/hu.yml +0 -3
- data/config/locales/hy.yml +0 -3
- data/config/locales/id.yml +0 -3
- data/config/locales/is.yml +0 -3
- data/config/locales/it.yml +0 -3
- data/config/locales/ja.yml +0 -3
- data/config/locales/ka.yml +0 -3
- data/config/locales/kk.yml +0 -3
- data/config/locales/ko.yml +0 -3
- data/config/locales/lt.yml +0 -3
- data/config/locales/lv.yml +0 -3
- data/config/locales/ms.yml +0 -3
- data/config/locales/mt.yml +0 -3
- data/config/locales/nl.yml +0 -3
- data/config/locales/no.yml +0 -3
- data/config/locales/pa-pk.yml +0 -3
- data/config/locales/pa.yml +0 -3
- data/config/locales/pl.yml +0 -3
- data/config/locales/ps.yml +0 -3
- data/config/locales/pt.yml +0 -3
- data/config/locales/ro.yml +0 -3
- data/config/locales/ru.yml +0 -3
- data/config/locales/si.yml +0 -3
- data/config/locales/sk.yml +0 -3
- data/config/locales/sl.yml +0 -3
- data/config/locales/so.yml +0 -3
- data/config/locales/sq.yml +0 -3
- data/config/locales/sr.yml +0 -3
- data/config/locales/sv.yml +0 -3
- data/config/locales/sw.yml +0 -3
- data/config/locales/ta.yml +0 -3
- data/config/locales/th.yml +0 -3
- data/config/locales/tk.yml +0 -3
- data/config/locales/tr.yml +0 -3
- data/config/locales/uk.yml +0 -3
- data/config/locales/ur.yml +0 -3
- data/config/locales/uz.yml +0 -3
- data/config/locales/vi.yml +0 -3
- data/config/locales/zh-hk.yml +0 -3
- data/config/locales/zh-tw.yml +0 -3
- data/config/locales/zh.yml +0 -3
- data/lib/govuk_publishing_components/presenters/button_helper.rb +1 -0
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +15 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +0 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +3 -3
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -4
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +9 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +6 -6
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +14 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +8 -8
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +5 -5
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +2 -1
- data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +3 -3
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +1 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +4 -4
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +6 -6
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -7
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +13 -1
- data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +14 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +8 -8
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +3 -3
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +7 -7
- data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +4 -4
- data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +5 -5
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +2 -2
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +22 -4
- data/node_modules/govuk-frontend/govuk/overrides/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +20 -0
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +7 -18
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss +0 -27
- data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +0 -33
data/config/locales/fr.yml
CHANGED
data/config/locales/gd.yml
CHANGED
data/config/locales/gu.yml
CHANGED
data/config/locales/he.yml
CHANGED
data/config/locales/hi.yml
CHANGED
data/config/locales/hr.yml
CHANGED
data/config/locales/hu.yml
CHANGED
data/config/locales/hy.yml
CHANGED
data/config/locales/id.yml
CHANGED
data/config/locales/is.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ka.yml
CHANGED
data/config/locales/kk.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/ms.yml
CHANGED
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED
data/config/locales/pa.yml
CHANGED
data/config/locales/pl.yml
CHANGED
data/config/locales/ps.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
|
@@ -66,6 +66,7 @@ module GovukPublishingComponents
|
|
|
66
66
|
options[:name] = name if name.present? && value.present?
|
|
67
67
|
options[:value] = value if name.present? && value.present?
|
|
68
68
|
options[:aria] = { label: aria_label } if aria_label
|
|
69
|
+
options[:draggable] = false if link?
|
|
69
70
|
options
|
|
70
71
|
end
|
|
71
72
|
|
|
@@ -111,10 +111,10 @@ module GovukPublishingComponents
|
|
|
111
111
|
def show_brexit_related_links?
|
|
112
112
|
# If tagged directly to /brexit or /world/brexit
|
|
113
113
|
# Or if tagged to a taxon which has /brexit as a parent
|
|
114
|
-
# And is not the brexit
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
tagged_to_brexit?
|
|
114
|
+
# And is not the brexit hub pages
|
|
115
|
+
return false if brexit_hub_pages.include?(content_item["content_id"])
|
|
116
|
+
|
|
117
|
+
tagged_to_brexit?
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
def brexit_cta_document_exceptions
|
|
@@ -179,6 +179,17 @@ module GovukPublishingComponents
|
|
|
179
179
|
4ca8698b-4a24-45ff-baea-7633cc24b679
|
|
180
180
|
ed73581f-9bf8-48b5-bb66-935581a255e3
|
|
181
181
|
15f1c594-af1d-4f16-97cc-ad4d12017509
|
|
182
|
+
] + brexit_hub_pages
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# we don't want to show the standard Brexit sidebar nav on
|
|
186
|
+
# https://www.gov.uk/guidance/brexit-guidance-for-individuals-and-families or
|
|
187
|
+
# https://www.gov.uk/guidance/brexit-guidance-for-businesses
|
|
188
|
+
# as it might result in circular journeys
|
|
189
|
+
def brexit_hub_pages
|
|
190
|
+
%w[
|
|
191
|
+
91cd6143-69d5-4f27-99ff-a52fb0d51c78
|
|
192
|
+
6555e0bf-c270-4cf9-a0c5-d20b95fab7f1
|
|
182
193
|
]
|
|
183
194
|
end
|
|
184
195
|
|
|
@@ -8,7 +8,6 @@ require "govuk_publishing_components/presenters/shared_helper"
|
|
|
8
8
|
require "govuk_publishing_components/presenters/attachment"
|
|
9
9
|
require "govuk_publishing_components/presenters/breadcrumbs"
|
|
10
10
|
require "govuk_publishing_components/presenters/breadcrumb_selector"
|
|
11
|
-
require "govuk_publishing_components/presenters/brexit_cta_helper"
|
|
12
11
|
require "govuk_publishing_components/presenters/button_helper"
|
|
13
12
|
require "govuk_publishing_components/presenters/contextual_navigation"
|
|
14
13
|
require "govuk_publishing_components/presenters/devolved_nations_helper"
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"name": "id",
|
|
4
4
|
"type": "string",
|
|
5
5
|
"required": true,
|
|
6
|
-
"description": "Must be
|
|
6
|
+
"description": "Must be unique across the domain of your service (as the expanded state of individual instances of the component persists across page loads using [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)). Used as an `id` in the HTML for the accordion as a whole, and also as a prefix for the `id`s of the section contents and the buttons that open them, so that those `id`s can be the target of `aria-labelledby` and `aria-control` attributes."
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"name": "headingLevel",
|
|
10
10
|
"type": "integer",
|
|
11
11
|
"required": false,
|
|
12
|
-
"description": "Heading level, from 1 to 6
|
|
12
|
+
"description": "Heading level, from `1` to `6`. Default is `2`."
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "classes",
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
"name": "text",
|
|
4
4
|
"type": "string",
|
|
5
5
|
"required": false,
|
|
6
|
-
"description": "Text to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to
|
|
6
|
+
"description": "Text to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to 'Back'."
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"name": "html",
|
|
10
10
|
"type": "string",
|
|
11
11
|
"required": false,
|
|
12
|
-
"description": "HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to
|
|
12
|
+
"description": "HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to 'Back'."
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "href",
|
|
16
16
|
"type": "string",
|
|
17
17
|
"required": true,
|
|
18
|
-
"description": "The value of the link href attribute."
|
|
18
|
+
"description": "The value of the link's `href` attribute."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "classes",
|
|
@@ -158,10 +158,6 @@
|
|
|
158
158
|
cursor: default;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
&:focus {
|
|
162
|
-
outline: none;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
161
|
&:active {
|
|
166
162
|
top: 0;
|
|
167
163
|
box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
|
|
@@ -270,6 +266,9 @@
|
|
|
270
266
|
-webkit-align-self: center;
|
|
271
267
|
-ms-flex-item-align: center;
|
|
272
268
|
align-self: center;
|
|
269
|
+
// Work around SVGs not inheriting color from parent in forced color mode
|
|
270
|
+
// (https://github.com/w3c/csswg-drafts/issues/6310)
|
|
271
|
+
forced-color-adjust: auto;
|
|
273
272
|
}
|
|
274
273
|
|
|
275
274
|
@if $govuk-use-legacy-font {
|