govuk_publishing_components 27.12.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd11f04405f2a42af38607551e706bf8587d8dab56687f9dd7f9f568a76ee9da
4
- data.tar.gz: c365b23d1ce8a71ff06cc0fb2510a9c1f7aadb984a21ccb481256a441aaa0ef6
3
+ metadata.gz: 21c2a281f7de0f79303971394f9cad3102533d7e619f660809078457687552ce
4
+ data.tar.gz: b246c494a88448ab43d2d2230c12a918b2107eda3217f4f44754ee5b2ef0f4de
5
5
  SHA512:
6
- metadata.gz: d4a1581abd6a891e2473feffcdf0a15c18d11536438d89387a6bfff055fa1c874f0cc38ec6f9299fba4f4dcd30ed5d4239d6f5133fac4c0e47dfffb62eca8eea
7
- data.tar.gz: 92c5a4c880e24c071d1ecec8a72fbe6ca1b852e23406e6cf61466930de1a21e49b086a98d12d60451a62b2fcad664ac2b0ea8b8918d8993ab4fb84b153df6ad1
6
+ metadata.gz: a1a5354695ffc567bfa7547af429dfdfa0145e8c009408a4a8200731e2677f883922b228dd4d3623770483ba704eafecfe68c1a895bf2dc6b978ac3da59b5c7c
7
+ data.tar.gz: 344cee88bde5f7c64393028e7020dc62b62eb8794b568b05ecbf94746bb94381bf44cba4627332d8475fadb49cbdc1f79f51598bd7c7194c17eb157a925a0176
@@ -102,7 +102,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
102
102
  // either `desktop` or `mobile` so it can be interpolated to access the
103
103
  // `data-toggle-{desktop|mobile}-group` attribute.
104
104
  var windowSize = function () {
105
- return window.innerWidth >= SETTINGS.breakpoint.desktop ? 'desktop' : 'mobile'
105
+ return document.documentElement.clientWidth >= SETTINGS.breakpoint.desktop ? 'desktop' : 'mobile'
106
106
  }
107
107
 
108
108
  function SuperNavigationMegaMenu ($module) {
@@ -16,7 +16,6 @@
16
16
  @import "govspeak/place";
17
17
  @import "govspeak/stat-headline";
18
18
  @import "govspeak/steps";
19
- @import "govspeak/summary";
20
19
  @import "govspeak/tables";
21
20
  @import "govspeak/typography";
22
21
  @import "govspeak/warning-callout";
@@ -134,7 +134,7 @@ $search-width-or-height: $black-bar-height;
134
134
  background: none;
135
135
  bottom: 0;
136
136
  content: " ";
137
- height: govuk-spacing(1);
137
+ height: 3px;
138
138
  left: govuk-spacing(3);
139
139
  position: absolute;
140
140
  right: govuk-spacing(3);
@@ -284,7 +284,7 @@ $search-width-or-height: $black-bar-height;
284
284
  font-size: govuk-px-to-rem(19px);
285
285
  }
286
286
  font-weight: bold;
287
- margin: govuk-spacing(3) 0 govuk-spacing(3) 0;
287
+ margin: govuk-spacing(3) 0;
288
288
 
289
289
  @include govuk-media-query($from: "desktop") {
290
290
  display: block;
@@ -480,7 +480,7 @@ $search-width-or-height: $black-bar-height;
480
480
  &.gem-c-layout-super-navigation-header__open-button {
481
481
  @include focus-not-focus-visible {
482
482
  &:before {
483
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
483
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
484
484
  }
485
485
  }
486
486
 
@@ -617,6 +617,7 @@ $search-width-or-height: $black-bar-height;
617
617
  cursor: pointer;
618
618
  height: $black-bar-height;
619
619
  padding: 0;
620
+ margin: 0;
620
621
  position: absolute;
621
622
  right: (($search-width-or-height - govuk-spacing(3)) - 1px); // width of the search button (50px) - 15px - 1px to create an overlap between buttons and stop the border appearing to hang off the buttons when they're focused/open
622
623
  top: 0;
@@ -656,6 +657,10 @@ $search-width-or-height: $black-bar-height;
656
657
  }
657
658
  }
658
659
 
660
+ &:after {
661
+ @include pseudo-underline;
662
+ }
663
+
659
664
  // Open button modifier
660
665
  &.gem-c-layout-super-navigation-header__open-button {
661
666
  // stylelint-disable max-nesting-depth
@@ -663,6 +668,10 @@ $search-width-or-height: $black-bar-height;
663
668
  @include govuk-focused-text;
664
669
  box-shadow: none;
665
670
 
671
+ &:after {
672
+ background-color: $govuk-focus-colour;
673
+ }
674
+
666
675
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
667
676
  color: govuk-colour("black");
668
677
  border-color: $govuk-focus-colour;
@@ -670,7 +679,7 @@ $search-width-or-height: $black-bar-height;
670
679
  @include govuk-media-query($from: 360px) {
671
680
  &:before {
672
681
  @include chevron(govuk-colour("black"), true);
673
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
682
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
674
683
  }
675
684
  }
676
685
  }
@@ -679,14 +688,18 @@ $search-width-or-height: $black-bar-height;
679
688
  @include focus-not-focus-visible {
680
689
  background: govuk-colour("light-grey");
681
690
 
691
+ &:after {
692
+ background-color: $govuk-link-colour;
693
+ }
694
+
682
695
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
683
- color: govuk-colour("black");
696
+ color: $govuk-link-colour;
684
697
  border-color: govuk-colour("light-grey");
685
698
 
686
699
  @include govuk-media-query($from: 360px) {
687
700
  &:before {
688
- @include chevron(govuk-colour("black"));
689
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
701
+ @include chevron($govuk-link-colour);
702
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
690
703
  }
691
704
  }
692
705
  }
@@ -825,96 +838,56 @@ $search-width-or-height: $black-bar-height;
825
838
 
826
839
  // Dropdown menu items.
827
840
  .gem-c-layout-super-navigation-header__dropdown-list-item {
828
- margin: 0 0 0 $chevron-indent-spacing;
829
- padding: govuk-spacing(2) 0;
841
+ box-sizing: border-box;
842
+ padding: 0 0 govuk-spacing(4) 0;
830
843
  position: relative;
831
-
832
- @include govuk-media-query($from: "desktop") {
833
- margin: 0;
834
- padding: govuk-spacing(2) 0;
835
- }
836
844
  }
837
845
 
838
846
  // Navigation menu items.
839
847
  .gem-c-layout-super-navigation-header__navigation-second-items {
840
- margin: 0 auto;
841
- padding: govuk-spacing(2) 0 govuk-spacing(6) 0;
848
+ margin: 0;
849
+ padding: govuk-spacing(6) govuk-spacing(4);
850
+
851
+ & > li {
852
+ margin: 0;
853
+ }
842
854
 
843
855
  @include govuk-media-query($from: "desktop") {
844
- margin-left: (0 - govuk-spacing(3));
845
- margin-right: (0 - govuk-spacing(3));
846
- padding: govuk-spacing(6) 0 govuk-spacing(8) 0;
856
+ margin: 0 (0 - govuk-spacing(3));
857
+ padding: govuk-spacing(7) 0 govuk-spacing(8) 0;
847
858
 
848
859
  & > li {
849
- box-sizing: border-box;
850
- margin: 0 govuk-spacing(3) govuk-spacing(2) govuk-spacing(3);
860
+ margin: 0 govuk-spacing(3);
851
861
  }
852
862
  }
853
863
  }
854
864
 
855
865
  .gem-c-layout-super-navigation-header__navigation-second-items--topics {
856
866
  @include govuk-media-query($from: "desktop") {
857
- @include columns(18, 2, "li");
858
- @include columns-children(18, 2, "li");
867
+ @include columns(17, 2, "li");
868
+ @include columns-children(17, 2, "li");
859
869
  }
860
870
  }
861
871
 
862
872
  .gem-c-layout-super-navigation-header__navigation-second-items--government-activity {
863
- & > li:first-child {
864
- margin-bottom: govuk-spacing(7);
865
- }
866
-
867
873
  @include govuk-media-query($from: "desktop") {
868
- @include columns(7, 2, "li");
874
+ @include columns(6, 2, "li");
875
+ @include columns-children(6, 2, "li");
869
876
  padding-bottom: 0;
870
877
 
871
- & > li,
872
- & > li:first-child {
873
- margin-bottom: govuk-spacing(4);
874
- }
875
-
876
- @supports (display: grid) {
877
- & > li:first-child {
878
- grid-column: span 2;
879
- }
880
- }
881
-
882
- & > li:first-child {
883
- border-bottom: 1px solid $govuk-border-colour;
884
- padding-bottom: 0;
885
- -ms-grid-column-span: 2;
886
- -ms-grid-column: 1;
887
- -ms-grid-row: 1;
888
- }
889
-
890
- & > li:nth-child(2) {
891
- -ms-grid-column: 1;
892
- -ms-grid-row: 2;
893
- }
894
-
895
- & > li:nth-child(3) {
896
- -ms-grid-column: 1;
897
- -ms-grid-row: 3;
898
- }
899
-
900
- & > li:nth-child(4) {
901
- -ms-grid-column: 1;
902
- -ms-grid-row: 4;
903
- }
904
-
905
- & > li:nth-child(5) {
906
- -ms-grid-column: 2;
907
- -ms-grid-row: 2;
908
- }
909
-
910
- & > li:nth-child(6) {
911
- -ms-grid-column: 2;
912
- -ms-grid-row: 3;
878
+ & > li {
879
+ box-sizing: border-box;
880
+ padding-bottom: govuk-spacing(4);
913
881
  }
914
882
  }
915
883
  }
916
884
 
917
885
  .gem-c-layout-super-navigation-header__navigation-second-item-link {
886
+ font-size: 16px;
887
+ @if $govuk-typography-use-rem {
888
+ font-size: govuk-px-to-rem(16px);
889
+ }
890
+
918
891
  &:after {
919
892
  @include make-selectable-area-bigger;
920
893
  }
@@ -930,9 +903,11 @@ $search-width-or-height: $black-bar-height;
930
903
  }
931
904
 
932
905
  .gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
933
- @include govuk-font($size: 19, $weight: bold);
934
- margin-bottom: 0;
935
- margin-top: govuk-spacing(2);
906
+ font-size: 16px;
907
+ @if $govuk-typography-use-rem {
908
+ font-size: govuk-px-to-rem(16px);
909
+ }
910
+ font-weight: bold;
936
911
  }
937
912
 
938
913
  // Dropdown menu footer links.
@@ -944,28 +919,31 @@ $search-width-or-height: $black-bar-height;
944
919
 
945
920
  .gem-c-layout-super-navigation-header__navigation-second-footer-list {
946
921
  list-style: none;
947
- padding: 0 0 govuk-spacing(8) 0;
922
+ padding: 0 0 govuk-spacing(8) govuk-spacing(4);
948
923
 
949
924
  @include govuk-media-query($from: "desktop") {
950
- margin: 0 (0 - govuk-spacing(3)) 0 (0 - govuk-spacing(3));
951
- padding: govuk-spacing(8) 0 govuk-spacing(9) 0;
952
925
  @include columns(2, 2, "li");
953
926
  @include columns-children(2, 2, "li");
927
+ margin: 0 (0 - govuk-spacing(3));
928
+ padding: govuk-spacing(6) 0 govuk-spacing(7) 0;
954
929
  }
955
930
  }
956
931
 
957
932
  .gem-c-layout-super-navigation-header__navigation-second-footer-item {
958
- padding: govuk-spacing(2) 0 govuk-spacing(2) $chevron-indent-spacing;
933
+ padding: govuk-spacing(2) 0;
959
934
  position: relative;
960
935
 
961
936
  @include govuk-media-query($from: "desktop") {
962
- padding: 0 govuk-spacing(3) 0 govuk-spacing(3);
937
+ padding: 0 govuk-spacing(3);
963
938
  }
964
939
  }
965
940
 
966
941
  .gem-c-layout-super-navigation-header__navigation-second-footer-link {
967
- @include govuk-font($size: 19, $weight: normal);
968
942
  display: inline-block;
943
+ font-size: 16px;
944
+ @if $govuk-typography-use-rem {
945
+ font-size: govuk-px-to-rem(16px);
946
+ }
969
947
  margin: govuk-spacing(1) 0;
970
948
 
971
949
  &:after {
@@ -974,9 +952,21 @@ $search-width-or-height: $black-bar-height;
974
952
 
975
953
  @include govuk-media-query($from: "desktop") {
976
954
  display: inline;
977
- font-weight: bold;
978
955
  padding: 0;
956
+
957
+ &:after {
958
+ content: none;
959
+ }
960
+ }
961
+ }
962
+
963
+ .gem-c-layout-super-navigation-header__navigation-second-item-description {
964
+ font-size: 16px;
965
+ @if $govuk-typography-use-rem {
966
+ font-size: govuk-px-to-rem(16px);
979
967
  }
968
+ font-weight: normal;
969
+ margin: govuk-spacing(1) 0 0 0;
980
970
  }
981
971
 
982
972
  // Search dropdown.
@@ -1004,12 +994,34 @@ $search-width-or-height: $black-bar-height;
1004
994
  }
1005
995
 
1006
996
  // Popular links.
997
+ .gem-c-layout-super-navigation-header__popular-item {
998
+ position: relative;
999
+ padding: govuk-spacing(1) 0;
1000
+ }
1001
+
1007
1002
  .gem-c-layout-super-navigation-header__popular-link {
1008
- padding: govuk-spacing(2) 0;
1009
1003
  display: inline-block;
1004
+ font-size: 16px;
1005
+ @if $govuk-typography-use-rem {
1006
+ font-size: govuk-px-to-rem(16px);
1007
+ }
1008
+ padding: 0;
1009
+
1010
+ &:after {
1011
+ @include make-selectable-area-bigger;
1012
+ }
1010
1013
 
1011
1014
  @include govuk-media-query($from: "desktop") {
1012
- margin: govuk-spacing(1) 0;
1013
- padding: 0;
1015
+ &:after {
1016
+ content: none;
1017
+ }
1018
+ }
1019
+ }
1020
+
1021
+ // To be used with .govuk-width-container - we only need the margins from
1022
+ // desktop onwards.
1023
+ .gem-c-layout-super-navigation-header__width-container {
1024
+ @include govuk-media-query($until: "desktop") {
1025
+ margin: 0;
1014
1026
  }
1015
1027
  }
@@ -2,7 +2,7 @@
2
2
  margin-bottom: govuk-spacing(3);
3
3
 
4
4
  @include govuk-media-query($from: tablet) {
5
- margin-bottom: govuk-spacing(6) * 1.5;
5
+ margin-bottom: govuk-spacing(7);
6
6
  }
7
7
  }
8
8
 
@@ -10,7 +10,7 @@
10
10
  margin-top: govuk-spacing(3);
11
11
 
12
12
  @include govuk-media-query($from: tablet) {
13
- margin-top: govuk-spacing(6) * 1.5;
13
+ margin-top: govuk-spacing(7);
14
14
  }
15
15
  }
16
16
 
@@ -17,3 +17,12 @@ $gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
17
17
  $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
18
18
 
19
19
  $gem-hover-dark-background: #dddcdb;
20
+
21
+ $govuk-colours-organisations: map-merge(
22
+ $govuk-colours-organisations,
23
+ (
24
+ "department-for-levelling-up-housing-and-communities": (
25
+ colour: #012169,
26
+ ),
27
+ )
28
+ );
@@ -133,7 +133,7 @@
133
133
  class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
134
134
  id="super-navigation-menu__section-<%= unique_id %>"
135
135
  >
136
- <div class="govuk-width-container">
136
+ <div class="govuk-width-container gem-c-layout-super-navigation-header__width-container">
137
137
  <div class="govuk-grid-row">
138
138
  <div class="govuk-grid-column-one-third-from-desktop">
139
139
  <% if link[:description].present? %>
@@ -163,7 +163,7 @@
163
163
  track_dimension_index: "29",
164
164
  }
165
165
  } %>
166
- <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0 govuk-!-margin-top-1" if has_description %>
166
+ <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
167
167
  </li>
168
168
  <% end %>
169
169
  </ul>
@@ -11,9 +11,11 @@
11
11
  direction_class = ""
12
12
  direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
13
13
 
14
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
14
15
  classes = %w(gem-c-metadata)
15
16
  classes << "direction-#{direction}" if local_assigns.include?(:direction)
16
17
  classes << "gem-c-metadata--inverse" if inverse
18
+ classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
17
19
  %>
18
20
  <%= content_tag :div, class: classes, data: { module: "gem-toggle" } do %>
19
21
  <dl data-module="gem-track-click">
@@ -811,12 +811,6 @@ examples:
811
811
  <div class="place">
812
812
  <p>This is a place</p>
813
813
  </div>
814
- summary:
815
- data:
816
- block: |
817
- <div class="summary">
818
- <p>This is a summary</p>
819
- </div>
820
814
  buttons:
821
815
  data:
822
816
  block: |
@@ -357,3 +357,10 @@ examples:
357
357
  Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
358
358
  context:
359
359
  dark_background: true
360
+ with_custom_margin_bottom:
361
+ description: |
362
+ The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to the `margin-bottom` values defined in the [responsive-bottom-margin mixin](https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss#L1)
363
+ data:
364
+ first_published: 14 June 2014
365
+ last_updated: 10 September 2015
366
+ margin_bottom: 2
@@ -125,8 +125,6 @@ en:
125
125
  href: "/browse/benefits"
126
126
  - label: Births, death, marriages and care
127
127
  href: "/browse/births-deaths-marriages"
128
- - label: Brexit
129
- href: "/brexit"
130
128
  - label: Business and self-employed
131
129
  href: "/browse/business"
132
130
  - label: Childcare and parenting
@@ -179,7 +177,7 @@ en:
179
177
  description: Consultations and strategy
180
178
  - label: Transparency
181
179
  href: "/search/transparency-and-freedom-of-information-releases"
182
- description: Government data, Freedom of Information releases and corporate reports
180
+ description: Data, Freedom of Information releases and corporate reports
183
181
  footer_links:
184
182
  - label: How government works
185
183
  href: "/government/how-government-works"
@@ -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 checker start page
115
- brexit_start_page_content_id = "58d093a1-787d-4f36-a568-86da23a7b884"
116
- page_content_id = content_item["content_id"]
117
- tagged_to_brexit? && (page_content_id != brexit_start_page_content_id)
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
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.12.0".freeze
2
+ VERSION = "27.13.0".freeze
3
3
  end
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: 27.12.0
4
+ version: 27.13.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: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2021-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -624,7 +624,6 @@ files:
624
624
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss
625
625
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss
626
626
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss
627
- - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss
628
627
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss
629
628
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss
630
629
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss
@@ -1,27 +0,0 @@
1
- .govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
2
- .gem-c-govspeak {
3
- .summary {
4
- margin: 0 0 2em;
5
- padding: 0;
6
- color: $govuk-text-colour;
7
-
8
- p {
9
- @include govuk-font($size: 19);
10
- }
11
-
12
- @include govuk-media-query($until: tablet) {
13
- margin: 0 0 2em;
14
- padding: 0;
15
- }
16
-
17
- p,
18
- h2 {
19
- border: 0;
20
- margin: 0 .75em 0 0;
21
- }
22
-
23
- h2 {
24
- line-height: 1.35em;
25
- }
26
- }
27
- }