govuk_publishing_components 60.2.1 → 61.0.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/vendor/lux/lux-reporter.js +704 -594
- data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +51 -40
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +0 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_select-with-search.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +9 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_content-block.scss +27 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_css3.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -3
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +222 -237
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +69 -0
- data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +0 -11
- data/lib/govuk_publishing_components/presenters/translation_nav_helper.rb +0 -6
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_govuk-template-link-focus-override.scss +0 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_media-down.scss +0 -22
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss +0 -5
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
@import "govuk_publishing_components/components/helpers/brand-colours";
|
10
10
|
@import "govuk_publishing_components/components/helpers/link";
|
11
|
-
@import "govuk_publishing_components/components/mixins/govuk-template-link-focus-override";
|
12
|
-
@import "govuk_publishing_components/components/mixins/media-down";
|
13
11
|
@import "govuk_publishing_components/components/mixins/margins";
|
14
12
|
@import "govuk_publishing_components/components/mixins/css3";
|
15
13
|
|
data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss
CHANGED
@@ -8,10 +8,10 @@ $logo-height: 30px;
|
|
8
8
|
$toggle-border-height: 3px;
|
9
9
|
|
10
10
|
.gem-c-rebranded-one-login-header {
|
11
|
-
@include govuk-font($size: 16);
|
12
11
|
color: govuk-colour("white");
|
13
12
|
position: relative;
|
14
13
|
background: $govuk-brand-colour;
|
14
|
+
@include govuk-font($size: 16);
|
15
15
|
}
|
16
16
|
|
17
17
|
.gem-c-rebranded-one-login-header__container {
|
@@ -58,11 +58,11 @@ $toggle-border-height: 3px;
|
|
58
58
|
.gem-c-rebranded-one-login-header__link--homepage {
|
59
59
|
// Font size needs to be set on the link so that the box sizing is correct
|
60
60
|
// in Firefox
|
61
|
-
@include govuk-font($size: false, $weight: bold);
|
62
61
|
display: inline;
|
63
62
|
margin-right: govuk-spacing(2);
|
64
63
|
font-size: 30px; // We don't have a mixin that produces 30px font size
|
65
64
|
line-height: 1;
|
65
|
+
@include govuk-font($size: false, $weight: bold);
|
66
66
|
|
67
67
|
@include govuk-media-query($from: tablet) {
|
68
68
|
&:focus {
|
@@ -97,9 +97,9 @@ $toggle-border-height: 3px;
|
|
97
97
|
.gem-c-rebranded-one-login-header__nav__link {
|
98
98
|
&:link,
|
99
99
|
&:visited {
|
100
|
+
text-decoration: none;
|
100
101
|
@include govuk-typography-common;
|
101
102
|
@include govuk-link-style-inverse;
|
102
|
-
text-decoration: none;
|
103
103
|
|
104
104
|
&:hover {
|
105
105
|
text-decoration: underline;
|
@@ -278,7 +278,6 @@ $toggle-border-height: 3px;
|
|
278
278
|
|
279
279
|
.gem-c-rebranded-cross-service-header__toggle {
|
280
280
|
display: none;
|
281
|
-
@include govuk-font($size: 16, $weight: bold);
|
282
281
|
position: absolute;
|
283
282
|
right: 0;
|
284
283
|
top: 0;
|
@@ -289,6 +288,7 @@ $toggle-border-height: 3px;
|
|
289
288
|
color: inherit;
|
290
289
|
padding: $toggle-padding $toggle-padding calc($toggle-padding + 1px) $toggle-padding;
|
291
290
|
margin-right: -(govuk-spacing(3));
|
291
|
+
@include govuk-font($size: 16, $weight: bold);
|
292
292
|
|
293
293
|
@mixin toggle-button-focus {
|
294
294
|
color: $govuk-focus-text-colour;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
@import "govuk_publishing_components/individual_component_support";
|
2
2
|
@import "govuk/components/header/header";
|
3
|
-
@import "mixins/
|
3
|
+
@import "mixins/css3";
|
4
4
|
@import "mixins/grid-helper";
|
5
5
|
|
6
6
|
$chevron-breakpoint: 360px;
|
@@ -107,23 +107,14 @@ $search-icon-height: 20px;
|
|
107
107
|
|
108
108
|
.gem-c-layout-super-navigation-header__container {
|
109
109
|
position: relative;
|
110
|
-
|
111
|
-
|
112
|
-
.
|
113
|
-
|
114
|
-
}
|
115
|
-
|
116
|
-
.gem-c-layout-super-navigation-header__button-container {
|
117
|
-
top: -$navbar-height;
|
118
|
-
position: absolute;
|
119
|
-
right: 0;
|
120
|
-
|
121
|
-
@include govuk-media-query($until: "tablet") {
|
122
|
-
margin-right: govuk-spacing(-3);
|
123
|
-
}
|
110
|
+
// the background color is set again on the nav container to ensure the menu buttons are still
|
111
|
+
// visible when the text scale is increased
|
112
|
+
// related issue: https://github.com/alphagov/govuk_publishing_components/issues/4208
|
113
|
+
background: $govuk-brand-colour;
|
124
114
|
|
125
|
-
|
126
|
-
|
115
|
+
// add a transparent bottom border for forced-color modes
|
116
|
+
@media (forced-colors: active) {
|
117
|
+
border-bottom: 1px solid transparent;
|
127
118
|
}
|
128
119
|
}
|
129
120
|
|
@@ -132,20 +123,39 @@ $search-icon-height: 20px;
|
|
132
123
|
line-height: 1;
|
133
124
|
padding-bottom: 12px;
|
134
125
|
padding-top: 16px;
|
126
|
+
flex-grow: 1;
|
127
|
+
flex-shrink: 0;
|
128
|
+
|
129
|
+
// remove the right margin from the govuk-logo to ensure the super nav menu buttons
|
130
|
+
// do not wrap onto a new line when the screen width is 360px ($chevron-breakpoint)
|
131
|
+
// govuk-frontend includes spacing to the right of the logo to offset it from the product name
|
132
|
+
// as we do not include a product name in the super navigation menu, we can set the right margin to 0
|
133
|
+
.govuk-header__link--homepage {
|
134
|
+
margin-right: 0;
|
135
|
+
}
|
135
136
|
}
|
136
137
|
|
137
138
|
.gem-c-layout-super-navigation-header__content {
|
138
139
|
width: 100%;
|
140
|
+
display: flex;
|
141
|
+
flex-wrap: wrap;
|
139
142
|
}
|
140
143
|
|
141
144
|
.gem-c-layout-super-navigation-header__navigation-item,
|
142
145
|
.gem-c-layout-super-navigation-header__search-item {
|
143
|
-
display: block;
|
144
|
-
float: left;
|
146
|
+
display: inline-block;
|
145
147
|
margin: 0;
|
146
148
|
padding: 0;
|
147
149
|
}
|
148
150
|
|
151
|
+
.gem-c-layout-super-navigation-header__search-item {
|
152
|
+
margin-right: -15px;
|
153
|
+
|
154
|
+
@include govuk-media-query($from: "desktop") {
|
155
|
+
margin-right: 0;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
149
159
|
// Top level navigation links and search link, used when JavaScript is not available
|
150
160
|
.gem-c-layout-super-navigation-header__navigation-item-link,
|
151
161
|
.gem-c-layout-super-navigation-header__search-item-link {
|
@@ -159,11 +169,6 @@ $search-icon-height: 20px;
|
|
159
169
|
@include govuk-link-common;
|
160
170
|
@include govuk-link-style-no-visited-state;
|
161
171
|
|
162
|
-
@include govuk-media-query($from: "desktop") {
|
163
|
-
display: block;
|
164
|
-
margin: 0;
|
165
|
-
}
|
166
|
-
|
167
172
|
&::after {
|
168
173
|
@include pseudo-underline;
|
169
174
|
}
|
@@ -180,7 +185,6 @@ $search-icon-height: 20px;
|
|
180
185
|
&:link,
|
181
186
|
&:visited {
|
182
187
|
color: govuk-colour("white");
|
183
|
-
float: left;
|
184
188
|
font-size: 16px;
|
185
189
|
font-size: govuk-px-to-rem(16px);
|
186
190
|
height: govuk-spacing(4);
|
@@ -354,12 +358,6 @@ $search-icon-height: 20px;
|
|
354
358
|
}
|
355
359
|
}
|
356
360
|
}
|
357
|
-
|
358
|
-
@include govuk-media-query($from: "desktop") {
|
359
|
-
display: block;
|
360
|
-
float: left;
|
361
|
-
right: 0;
|
362
|
-
}
|
363
361
|
}
|
364
362
|
|
365
363
|
// JS available - targets the "Menu" toggle button
|
@@ -546,19 +544,30 @@ $search-icon-height: 20px;
|
|
546
544
|
|
547
545
|
// JS available - dropdown menu
|
548
546
|
.gem-c-layout-super-navigation-header__navigation-dropdown-menu {
|
547
|
+
width: 100%;
|
548
|
+
order: 1; // Ensure the dropdown menu appears after the super navigation buttons which have a default order of 0
|
549
549
|
background: $govuk-rebrand-template-background-colour;
|
550
|
-
border-bottom: 1px govuk-colour("mid-grey") solid;
|
551
550
|
padding-top: govuk-spacing(6);
|
552
551
|
|
553
|
-
@include govuk-media-query($until: 300px) {
|
554
|
-
padding-top: 80px;
|
555
|
-
}
|
556
|
-
|
557
552
|
@include govuk-media-query($from: "desktop") {
|
558
553
|
padding-top: govuk-spacing(8);
|
559
554
|
}
|
560
555
|
}
|
561
556
|
|
557
|
+
// Ensure the dropdown menu background is offset from the menu height and
|
558
|
+
// takes up the full screen width
|
559
|
+
.govuk-frontend-supported .gem-c-layout-super-navigation-header {
|
560
|
+
&::before {
|
561
|
+
content: "";
|
562
|
+
position: absolute;
|
563
|
+
top: $navbar-height;
|
564
|
+
bottom: 0;
|
565
|
+
width: 100%;
|
566
|
+
background: $govuk-rebrand-template-background-colour;
|
567
|
+
box-shadow: 0 1px govuk-colour("mid-grey");
|
568
|
+
}
|
569
|
+
}
|
570
|
+
|
562
571
|
// JS available - styles the links in the dropdown menu
|
563
572
|
.gem-c-layout-super-navigation-header__dropdown-list-item {
|
564
573
|
box-sizing: border-box;
|
@@ -694,11 +703,13 @@ $search-icon-height: 20px;
|
|
694
703
|
.gem-c-layout-super-navigation-header__header-logo {
|
695
704
|
padding: 10px 0 !important; // stylelint-disable-line declaration-no-important
|
696
705
|
}
|
697
|
-
}
|
698
706
|
|
699
|
-
//
|
700
|
-
.
|
701
|
-
|
707
|
+
// Hide menu links, buttons and dropdown
|
708
|
+
.gem-c-layout-super-navigation-header__navigation-item,
|
709
|
+
.gem-c-layout-super-navigation-header__search-item,
|
710
|
+
.gem-c-layout-super-navigation-header__navigation-dropdown-menu {
|
711
|
+
display: none;
|
712
|
+
}
|
702
713
|
}
|
703
714
|
|
704
715
|
// stylelint-enable max-nesting-depth
|
@@ -50,8 +50,6 @@
|
|
50
50
|
@include govuk-media-query($from: tablet) {
|
51
51
|
line-height: 1.28;
|
52
52
|
}
|
53
|
-
|
54
|
-
@include govuk-template-link-focus-override;
|
55
53
|
}
|
56
54
|
|
57
55
|
.gem-c-related-navigation__link--truncated-links {
|
@@ -70,19 +68,10 @@
|
|
70
68
|
|
71
69
|
.gem-c-related-navigation__section-link {
|
72
70
|
font-weight: bold;
|
73
|
-
|
74
|
-
@include govuk-template-link-focus-override;
|
75
71
|
}
|
76
72
|
|
77
73
|
.gem-c-related-navigation__section-link--other {
|
78
74
|
font-weight: normal;
|
79
|
-
|
80
|
-
@include govuk-template-link-focus-override;
|
81
|
-
}
|
82
|
-
|
83
|
-
.gem-c-related-navigation__section-link--footer {
|
84
|
-
|
85
|
-
@include govuk-template-link-focus-override;
|
86
75
|
}
|
87
76
|
|
88
77
|
.gem-c-related-navigation__section-link--inline {
|
@@ -16,7 +16,7 @@ $choices-border-radius-item: 0 !default;
|
|
16
16
|
$choices-z-index: 2 !default;
|
17
17
|
$choices-button-dimension: 12px !default;
|
18
18
|
|
19
|
-
@import "mixins/
|
19
|
+
@import "mixins/css3";
|
20
20
|
@import "govuk/components/label/label";
|
21
21
|
@import "choices.js/src/styles/choices";
|
22
22
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
.gem-c-translation-nav {
|
4
4
|
margin-bottom: govuk-spacing(6);
|
5
5
|
border-bottom: 1px solid $govuk-border-colour;
|
6
|
-
@include responsive-top-margin;
|
7
6
|
@include govuk-text-colour;
|
8
7
|
@include govuk-font(16);
|
9
8
|
}
|
@@ -49,7 +48,3 @@
|
|
49
48
|
border-right: 0;
|
50
49
|
border-left: 0;
|
51
50
|
}
|
52
|
-
|
53
|
-
.gem-c-translation-nav--no-margin-top {
|
54
|
-
margin-top: 0;
|
55
|
-
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
// - alphagov/govspeak: ✔︎
|
7
7
|
|
8
8
|
// stylelint-disable max-nesting-depth
|
9
|
+
@use "sass:color";
|
9
10
|
|
10
11
|
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
|
11
12
|
.gem-c-govspeak {
|
@@ -38,7 +39,7 @@
|
|
38
39
|
width: $thumbnail-width;
|
39
40
|
height: 140px;
|
40
41
|
background: govuk-colour("white");
|
41
|
-
outline: $govuk-border-width solid
|
42
|
+
outline: $govuk-border-width solid color.adjust(govuk-colour("black"), $alpha: -0.9);
|
42
43
|
box-shadow: 0 2px 2px rgba(govuk-colour("black"), .4);
|
43
44
|
}
|
44
45
|
|
@@ -10,6 +10,7 @@
|
|
10
10
|
// https://github.com/alphagov/magna-charta/blob/master/demo/stylesheets/magna-charta.css
|
11
11
|
|
12
12
|
// stylelint-disable max-nesting-depth
|
13
|
+
@use "sass:list";
|
13
14
|
|
14
15
|
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
|
15
16
|
.gem-c-govspeak {
|
@@ -92,9 +93,9 @@
|
|
92
93
|
}
|
93
94
|
|
94
95
|
// Key colours
|
95
|
-
@for $i from 0 to length($bar-colours) {
|
96
|
+
@for $i from 0 to list.length($bar-colours) {
|
96
97
|
.mc-key-#{$i + 1} {
|
97
|
-
border-left-color: nth($bar-colours, $i + 1);
|
98
|
+
border-left-color: list.nth($bar-colours, $i + 1);
|
98
99
|
}
|
99
100
|
}
|
100
101
|
}
|
@@ -150,10 +151,10 @@
|
|
150
151
|
}
|
151
152
|
|
152
153
|
// Bar colours
|
153
|
-
@for $i from 0 to length($bar-colours) {
|
154
|
+
@for $i from 0 to list.length($bar-colours) {
|
154
155
|
.mc-bar-#{$i + 1} {
|
155
|
-
background-color: nth($bar-colours, $i + 1);
|
156
|
-
color: nth($bar-text-colours, $i + 1);
|
156
|
+
background-color: list.nth($bar-colours, $i + 1);
|
157
|
+
color: list.nth($bar-text-colours, $i + 1);
|
157
158
|
}
|
158
159
|
}
|
159
160
|
|
@@ -211,15 +212,15 @@
|
|
211
212
|
}
|
212
213
|
|
213
214
|
// Charts with multiple columns get different coloured bars
|
214
|
-
$len: length($bar-colours);
|
215
|
+
$len: list.length($bar-colours);
|
215
216
|
|
216
217
|
@for $i from 0 to $len {
|
217
218
|
.mc-tr .mc-td.mc-bar-cell.mc-bar-#{$i + 1} {
|
218
|
-
background-color: nth($bar-colours, $i + 1);
|
219
|
+
background-color: list.nth($bar-colours, $i + 1);
|
219
220
|
}
|
220
221
|
|
221
222
|
.mc-tr .mc-th.mc-key-#{$i + 1} {
|
222
|
-
border-left-color: nth($bar-colours, $i + 1);
|
223
|
+
border-left-color: list.nth($bar-colours, $i + 1);
|
223
224
|
}
|
224
225
|
}
|
225
226
|
|
data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_content-block.scss
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
@import "govuk/core/lists";
|
2
|
+
@import "govuk/core/typography";
|
3
|
+
|
4
|
+
.content-block,
|
5
|
+
.content-block__contact-key,
|
6
|
+
.content-block__contact-value,
|
7
|
+
.content-block__contact-list {
|
8
|
+
margin: 0;
|
9
|
+
padding: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
.content-block__contact-list {
|
13
|
+
.content-block__contact-key {
|
14
|
+
@extend %govuk-heading-m;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.content-block__contact-list--nested {
|
19
|
+
.content-block__contact-key {
|
20
|
+
@extend %govuk-heading-s;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.content-block .content-block__list {
|
25
|
+
@extend %govuk-list;
|
26
|
+
margin-left: 0;
|
27
|
+
}
|
@@ -3,3 +3,9 @@
|
|
3
3
|
-ms-transform: scale($size); // IE 9
|
4
4
|
transform: scale($size); // Firefox 16+, IE 10+, Opera
|
5
5
|
}
|
6
|
+
|
7
|
+
@mixin prefixed-transform($translateY: 0, $rotate: 0, $scale: 1) {
|
8
|
+
-webkit-transform: translateY($translateY) rotate($rotate) scale($scale);
|
9
|
+
-ms-transform: translateY($translateY) rotate($rotate) scale($scale);
|
10
|
+
transform: translateY($translateY) rotate($rotate) scale($scale);
|
11
|
+
}
|
@@ -5,16 +5,3 @@
|
|
5
5
|
margin-bottom: govuk-spacing(7);
|
6
6
|
}
|
7
7
|
}
|
8
|
-
|
9
|
-
@mixin responsive-top-margin {
|
10
|
-
margin-top: govuk-spacing(3);
|
11
|
-
|
12
|
-
@include govuk-media-query($from: tablet) {
|
13
|
-
margin-top: govuk-spacing(7);
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
@mixin responsive-vertical-margins {
|
18
|
-
@include responsive-bottom-margin;
|
19
|
-
@include responsive-top-margin;
|
20
|
-
}
|
@@ -4,9 +4,6 @@
|
|
4
4
|
@import "govuk/base";
|
5
5
|
|
6
6
|
@import "components/mixins/margins";
|
7
|
-
// TODO: remove this focus override when govuk_template is no longer used
|
8
|
-
@import "components/mixins/govuk-template-link-focus-override";
|
9
|
-
@import "components/mixins/css3";
|
10
7
|
|
11
8
|
$govuk-suppressed-warnings: (
|
12
9
|
organisation-colours
|