govuk_publishing_components 34.6.0 → 34.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +6 -4
- data/app/assets/javascripts/govuk_publishing_components/load-analytics.js +6 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +12 -0
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +18 -1
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +22 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +0 -7
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/all.js +4029 -3792
- data/node_modules/govuk-frontend/govuk/all.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +52 -51
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/common/index.js +153 -145
- data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +324 -321
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/common.js +154 -146
- data/node_modules/govuk-frontend/govuk/common.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +23 -4
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2059 -1654
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +11 -11
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +19 -19
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +21 -10
- data/node_modules/govuk-frontend/govuk/components/button/button.js +927 -917
- data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2050 -2040
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1155 -1147
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +23 -23
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/details/details.js +800 -799
- data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1058 -1045
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +646 -998
- data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +760 -752
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +61 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1110 -1107
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1017 -1014
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +318 -23
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +110 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +72 -28
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1392 -1264
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/i18n.js +363 -364
- data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +242 -241
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +13 -12
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +17 -16
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +547 -546
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +37 -36
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +251 -250
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +21 -20
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +198 -197
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +198 -197
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +106 -105
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +400 -399
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +239 -238
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +72 -71
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +14 -13
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +17 -16
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -0
- data/node_modules/govuk-frontend/govuk-esm/all.mjs +2 -2
- data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +17 -10
- data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +3 -1
- data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +135 -52
- data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +11 -9
- data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +10 -7
- data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +24 -18
- data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +23 -16
- data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +15 -11
- data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +3 -2
- data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +3 -4
- data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +10 -9
- data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +5 -3
- data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +165 -38
- data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +9 -11
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +35 -3
@@ -1,16 +1,19 @@
|
|
1
1
|
@include govuk-exports("govuk/component/back-link") {
|
2
|
+
// Component font-size on the Frontend (used for calculations)
|
3
|
+
$font-size: 16;
|
2
4
|
|
3
5
|
// Size of chevron (excluding border)
|
4
|
-
$chevron-size: 7px;
|
6
|
+
$chevron-size: govuk-em(7px, $font-size);
|
5
7
|
|
6
8
|
// Size of chevron border
|
7
|
-
$chevron-border-width: 1px;
|
9
|
+
$chevron-border-min-width: 1px;
|
10
|
+
$chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
|
8
11
|
|
9
12
|
// Colour of chevron
|
10
13
|
$chevron-border-colour: $govuk-secondary-text-colour;
|
11
14
|
|
12
15
|
.govuk-back-link {
|
13
|
-
@include govuk-typography-responsive($size:
|
16
|
+
@include govuk-typography-responsive($size: $font-size);
|
14
17
|
@include govuk-link-common;
|
15
18
|
@include govuk-link-style-text;
|
16
19
|
|
@@ -21,7 +24,7 @@
|
|
21
24
|
margin-bottom: govuk-spacing(3);
|
22
25
|
|
23
26
|
// Allow space for the arrow
|
24
|
-
padding-left: 14px;
|
27
|
+
padding-left: govuk-em(14px, $font-size);
|
25
28
|
}
|
26
29
|
|
27
30
|
// Prepend left pointing chevron
|
@@ -35,14 +38,15 @@
|
|
35
38
|
@if $govuk-use-legacy-font {
|
36
39
|
// Begin adjustments for font baseline offset
|
37
40
|
// These should be removed when legacy font support is dropped
|
38
|
-
|
39
|
-
|
41
|
+
$offset: govuk-em(1px, $font-size);
|
42
|
+
top: $offset * -1;
|
43
|
+
bottom: $offset;
|
40
44
|
} @else {
|
41
45
|
top: 0;
|
42
46
|
bottom: 0;
|
43
47
|
}
|
44
48
|
|
45
|
-
left: 3px;
|
49
|
+
left: govuk-em(3px, $font-size);
|
46
50
|
|
47
51
|
width: $chevron-size;
|
48
52
|
height: $chevron-size;
|
@@ -56,9 +60,16 @@
|
|
56
60
|
transform: rotate(225deg);
|
57
61
|
|
58
62
|
border: solid;
|
59
|
-
border-width: $chevron-border-width $chevron-border-width 0 0;
|
63
|
+
border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
|
60
64
|
border-color: $chevron-border-colour;
|
61
65
|
|
66
|
+
@supports (border-width: unquote("max(0px)")) {
|
67
|
+
border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
|
68
|
+
|
69
|
+
// Ensure that the chevron never gets smaller than 16px
|
70
|
+
font-size: unquote("max(#{$font-size * 1px}, 1em)");
|
71
|
+
}
|
72
|
+
|
62
73
|
// Fall back to a less than sign for IE8
|
63
74
|
@include govuk-if-ie8 {
|
64
75
|
content: "\003c"; // Less than sign (<)
|
@@ -85,15 +96,4 @@
|
|
85
96
|
bottom: -14px;
|
86
97
|
left: 0;
|
87
98
|
}
|
88
|
-
|
89
|
-
@if $govuk-use-legacy-font {
|
90
|
-
// Begin adjustments for font baseline offset
|
91
|
-
// These should be removed when legacy font support is dropped
|
92
|
-
.govuk-back-link:before {
|
93
|
-
$offset: 1px;
|
94
|
-
|
95
|
-
top: $offset * -1;
|
96
|
-
bottom: $offset;
|
97
|
-
}
|
98
|
-
}
|
99
99
|
}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
@include govuk-exports("govuk/component/breadcrumbs") {
|
2
|
+
// Component font-size on the Frontend (used for calculations)
|
3
|
+
$font-size: 16;
|
2
4
|
|
3
5
|
// Size of chevron (excluding border)
|
4
|
-
$chevron-size: 7px;
|
6
|
+
$chevron-size: govuk-em(7px, $font-size);
|
5
7
|
|
6
8
|
// Size of chevron border
|
7
|
-
$chevron-border-width: 1px;
|
9
|
+
$chevron-border-min-width: 1px;
|
10
|
+
$chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
|
8
11
|
|
9
12
|
// Colour of chevron
|
10
13
|
$chevron-border-colour: $govuk-secondary-text-colour;
|
@@ -13,10 +16,10 @@
|
|
13
16
|
// of length 8 (7px + 1px border):
|
14
17
|
//
|
15
18
|
// √(8² + 8²) * 0.5 ≅ 5.655
|
16
|
-
$chevron-altitude-calculated: 5.655px;
|
19
|
+
$chevron-altitude-calculated: govuk-em(5.655px, $font-size);
|
17
20
|
|
18
21
|
.govuk-breadcrumbs {
|
19
|
-
@include govuk-font($size:
|
22
|
+
@include govuk-font($size: $font-size);
|
20
23
|
@include govuk-text-colour;
|
21
24
|
|
22
25
|
margin-top: govuk-spacing(3);
|
@@ -40,8 +43,8 @@
|
|
40
43
|
|
41
44
|
// Add both margin and padding such that the chevron appears centrally
|
42
45
|
// between each breadcrumb item
|
43
|
-
margin-left: govuk-spacing(2);
|
44
|
-
padding-left: govuk-spacing(2) + $chevron-altitude-calculated;
|
46
|
+
margin-left: govuk-em(govuk-spacing(2), $font-size);
|
47
|
+
padding-left: govuk-em(govuk-spacing(2), $font-size) + $chevron-altitude-calculated;
|
45
48
|
|
46
49
|
float: left;
|
47
50
|
|
@@ -55,8 +58,9 @@
|
|
55
58
|
@if $govuk-use-legacy-font {
|
56
59
|
// Begin adjustments for font baseline offset
|
57
60
|
// These should be removed when legacy font support is dropped
|
58
|
-
|
59
|
-
|
61
|
+
$offset: govuk-em(1px, $font-size);
|
62
|
+
top: $offset * -1;
|
63
|
+
bottom: $offset;
|
60
64
|
} @else {
|
61
65
|
top: 0;
|
62
66
|
bottom: 0;
|
@@ -78,9 +82,16 @@
|
|
78
82
|
transform: rotate(45deg);
|
79
83
|
|
80
84
|
border: solid;
|
81
|
-
border-width: $chevron-border-width $chevron-border-width 0 0;
|
85
|
+
border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
|
82
86
|
border-color: $chevron-border-colour;
|
83
87
|
|
88
|
+
@supports (border-width: unquote("max(0px)")) {
|
89
|
+
border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
|
90
|
+
|
91
|
+
// Ensure that the chevron never gets smaller than 16px
|
92
|
+
font-size: unquote("max(#{$font-size * 1px}, 1em)");
|
93
|
+
}
|
94
|
+
|
84
95
|
// Fall back to a greater than sign for IE8
|
85
96
|
@include govuk-if-ie8 {
|
86
97
|
content: "\003e"; // Greater than sign (>)
|
@@ -122,7 +133,7 @@
|
|
122
133
|
}
|
123
134
|
|
124
135
|
&:before {
|
125
|
-
top: 6px;
|
136
|
+
top: govuk-em(6px, $font-size);
|
126
137
|
margin: 0;
|
127
138
|
}
|
128
139
|
}
|