govuk_publishing_components 35.20.0 → 35.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1878b4cfefb05ba090334ac9990ead5cd73b519b0dd5086fa15d48715f7fc13
4
- data.tar.gz: 3916e46d02628289d1667218a570c67b7b809c584da24064412cc948be37fd23
3
+ metadata.gz: '096ada32d1ecced73348563a12eaa51f1f722c75f11791baba32d24de329b4ad'
4
+ data.tar.gz: 7c905c2babbe3a999a4a44d2441506b5b38b48edbb78593a9b9212b55549d8da
5
5
  SHA512:
6
- metadata.gz: 764549f50e7ea206131c5cbbbe6ac12e693ed6a8e08c4e27ab2575eac6adf0788a725cda4790b388d58bb3f81884f98e6ff7902b57b906730db6b550cd60acee
7
- data.tar.gz: 1d3a83a6d8fb0e602e5b3fdcb54713f79d83e7266b4aa1fe873c41f941489fcac11edac78e03d7ebf655d35aee37c5c4a7cd0c9fe690ec0305b5f4a68567138b
6
+ metadata.gz: 7bca767187c1d88419a6c36c90a6cfb763773ef81cd1106bf24f2298142bf7f247ca293c05a4bc9c76fe567f326ff36a7cbb7986bc671995512c22b4f2f67461
7
+ data.tar.gz: 715869ba54a39828637ded7125d39462716247acec55b3c71507975fbcbb567a01dfd2ab152a2fe19fac3044ca4c7c0e0b1ea56c9dca6b074ac440abdf4c3e28
@@ -8,7 +8,7 @@ $search-width-or-height: $black-bar-height;
8
8
  $pseudo-underline-height: 3px;
9
9
  $button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
10
10
 
11
- $large-navbar-height: 86px;
11
+ $large-navbar-height: 72px;
12
12
 
13
13
  $pale-blue-colour: #d2e2f1;
14
14
 
@@ -630,6 +630,12 @@ $after-button-padding-left: govuk-spacing(4);
630
630
  color: govuk-colour("white");
631
631
  }
632
632
 
633
+ &:focus-visible {
634
+ &.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
635
+ border-bottom: $pseudo-underline-height solid govuk-colour("black");
636
+ }
637
+ }
638
+
633
639
  @include govuk-media-query($from: "desktop") {
634
640
  border: 0;
635
641
  margin: 0;
@@ -654,15 +660,21 @@ $after-button-padding-left: govuk-spacing(4);
654
660
 
655
661
  // stylelint-disable max-nesting-depth
656
662
  @include focus-not-focus-visible {
657
- border-bottom: none;
663
+ border-bottom: $pseudo-underline-height solid $govuk-brand-colour;
664
+
665
+ &:hover {
666
+ border-bottom: $pseudo-underline-height solid govuk-colour("white");
667
+ }
658
668
  }
659
669
  // stylelint-enable max-nesting-depth
660
670
  }
661
671
 
662
672
  &:focus-visible {
663
673
  &.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
674
+ color: govuk-colour("black");
675
+
664
676
  &:hover {
665
- border-bottom: $pseudo-underline-height solid $govuk-focus-colour;
677
+ border-bottom: $pseudo-underline-height solid govuk-colour("black");
666
678
  color: govuk-colour("black");
667
679
  }
668
680
  }
@@ -679,9 +691,14 @@ $after-button-padding-left: govuk-spacing(4);
679
691
  &.gem-c-layout-super-navigation-header__open-button {
680
692
  &.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
681
693
  &:hover {
682
- border-bottom: $pseudo-underline-height solid govuk-colour("white");
694
+ border-bottom: $pseudo-underline-height solid govuk-colour("light-grey");
683
695
  color: govuk-colour("white");
684
696
  }
697
+
698
+ &:focus-visible {
699
+ border-bottom: $pseudo-underline-height solid govuk-colour("black");
700
+ color: govuk-colour("black");
701
+ }
685
702
  }
686
703
 
687
704
  @include focus-and-focus-visible {
@@ -704,6 +721,10 @@ $after-button-padding-left: govuk-spacing(4);
704
721
  border-bottom-color: govuk-colour("light-grey");
705
722
  color: govuk-colour("light-grey");
706
723
  outline: 1px solid govuk-colour("light-grey"); // overlap the border of the nav menu so it won't appear when menu open
724
+
725
+ &:hover {
726
+ border-bottom: $pseudo-underline-height solid govuk-colour("light-grey");
727
+ }
707
728
  }
708
729
  }
709
730
  }
@@ -726,7 +747,7 @@ $after-button-padding-left: govuk-spacing(4);
726
747
  }
727
748
 
728
749
  .gem-c-layout-super-navigation-header__search-container {
729
- padding-bottom: govuk-spacing(3);
750
+ padding-bottom: govuk-spacing(7);
730
751
  }
731
752
 
732
753
  // Dropdown menu.
@@ -740,7 +761,23 @@ $after-button-padding-left: govuk-spacing(4);
740
761
  padding-top: govuk-spacing(6);
741
762
 
742
763
  @include govuk-media-query($from: "desktop") {
743
- padding-top: govuk-spacing(5);
764
+ padding-top: govuk-spacing(8);
765
+ }
766
+ }
767
+
768
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar {
769
+ @include govuk-media-query($until: "desktop") {
770
+ .gem-c-layout-super-navigation-header__search-items {
771
+ margin: 0 24px;
772
+ }
773
+ }
774
+ }
775
+
776
+ @include govuk-media-query($until: "tablet") {
777
+ // padding to make it the same as the padding for the redesign of the homepage
778
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__column--services-and-information,
779
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__column--government-activity {
780
+ padding: 0 24px;
744
781
  }
745
782
  }
746
783
 
@@ -814,6 +851,11 @@ $after-button-padding-left: govuk-spacing(4);
814
851
  }
815
852
  }
816
853
 
854
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__navigation-second-item-link {
855
+ font-size: 19px;
856
+ font-size: govuk-px-to-rem(19px);
857
+ }
858
+
817
859
  .gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
818
860
  font-size: 16px;
819
861
  font-size: govuk-px-to-rem(16px);
@@ -825,16 +867,27 @@ $after-button-padding-left: govuk-spacing(4);
825
867
  }
826
868
  }
827
869
 
828
- .gem-c-layout-super-navigation-header__navigation-second-item-description {
829
- @include govuk-typography-common;
830
- font-size: 16px;
831
- font-size: govuk-px-to-rem(16px);
832
- font-weight: normal;
833
- margin: govuk-spacing(1) 0 0 0;
870
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button--large-navbar {
871
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
872
+ padding-left: 26px;
873
+ padding-right: 26px;
874
+ }
875
+ }
876
+
877
+ .gem-c-layout-super-navigation-header__search-toggle-button--large-navbar {
878
+ padding-left: 24px;
879
+ padding-right: 24px;
880
+ width: 68px;
881
+ }
882
+
883
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__navigation-second-item-description {
884
+ font-size: 19px;
885
+ font-size: govuk-px-to-rem(19px);
886
+ margin-top: govuk-spacing(2);
834
887
  }
835
888
 
836
889
  .gem-c-layout-super-navigation-header__search-form {
837
- padding: govuk-spacing(2) 0 govuk-spacing(6) 0;
890
+ padding: 0 0 govuk-spacing(8) 0;
838
891
  }
839
892
 
840
893
  // Popular links.
@@ -854,6 +907,11 @@ $after-button-padding-left: govuk-spacing(4);
854
907
  }
855
908
  }
856
909
 
910
+ .gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__popular-link {
911
+ font-size: 19px;
912
+ font-size: govuk-px-to-rem(19px);
913
+ }
914
+
857
915
  .gem-c-layout-super-navigation-header__width-container {
858
916
  @include govuk-media-query($until: "desktop") {
859
917
  margin: 0;
@@ -894,12 +952,12 @@ $after-button-padding-left: govuk-spacing(4);
894
952
  }
895
953
 
896
954
  .gem-c-layout-super-navigation-header__logotype-crown--large-navbar {
897
- height: 36px;
898
- width: 49px;
955
+ height: 32px;
956
+ width: 44px;
899
957
  }
900
958
 
901
959
  .gem-c-header__link--large-navbar:focus {
902
- box-shadow: 0 -4px 0 18px $govuk-focus-colour;
960
+ box-shadow: 0 -6px 0 12px $govuk-focus-colour;
903
961
  border-bottom: $govuk-focus-width solid govuk-colour("black");
904
962
  padding-bottom: 10px;
905
963
  }
@@ -909,17 +967,14 @@ $after-button-padding-left: govuk-spacing(4);
909
967
  }
910
968
 
911
969
  .gem-c-layout-super-navigation-header__header-logo--large-navbar {
912
- height: 35px;
913
- padding-bottom: govuk-spacing(5);
914
- padding-top: govuk-spacing(5);
970
+ height: 32px;
971
+ padding-bottom: govuk-spacing(4);
972
+ padding-top: govuk-spacing(4);
915
973
  }
916
974
 
917
975
  .gem-c-layout-super-navigation-header__search-toggle-button--large-navbar {
918
976
  height: $large-navbar-height;
919
- }
920
-
921
- // to stop the search icon moving on hover
922
- .gem-c-layout-super-navigation-header__search-toggle-button--large-navbar:hover {
977
+ // to stop the search icon moving on hover
923
978
  padding-bottom: 12px;
924
979
  }
925
980
 
@@ -931,3 +986,19 @@ $after-button-padding-left: govuk-spacing(4);
931
986
  height: $large-navbar-height;
932
987
  }
933
988
  }
989
+
990
+ @include govuk-media-query($until: tablet) {
991
+ .gem-c-layout-super-navigation-header__popular-links-heading--large-navbar {
992
+ font-size: 24px;
993
+ font-size: govuk-px-to-rem(24px);
994
+ }
995
+
996
+ // can't disable responsive styling because using override classes
997
+ // from govuk-frontend which are all responsive so have to supply
998
+ // custom class to the label of the search component to turn off
999
+ // the responsive font size
1000
+ .gem-c-layout-super-navigation-header__search-label--large-navbar {
1001
+ font-size: 24px;
1002
+ font-size: govuk-px-to-rem(24px);
1003
+ }
1004
+ }
@@ -65,7 +65,11 @@
65
65
  button_container_classes = %w(gem-c-layout-super-navigation-header__button-container)
66
66
  button_container_classes << "gem-c-layout-super-navigation-header__button-container--large-navbar" if large_navbar
67
67
 
68
+ dropdown_menu_classes = %w(gem-c-layout-super-navigation-header__navigation-dropdown-menu)
69
+ dropdown_menu_classes << "gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar" if large_navbar
68
70
 
71
+ popular_links_heading_classes = %w(govuk-heading-m)
72
+ popular_links_heading_classes << "gem-c-layout-super-navigation-header__popular-links-heading--large-navbar" if large_navbar
69
73
  %>
70
74
  <%= content_tag("header",
71
75
  {
@@ -107,6 +111,11 @@
107
111
  label: logo_link_title,
108
112
  }
109
113
  } do %>
114
+ <% if hide_logo_text %>
115
+ <span class="govuk-visually-hidden">
116
+ <%= logo_text %>
117
+ </span>
118
+ <% end %>
110
119
  <span class="govuk-header__logotype">
111
120
  <!--[if gt IE 8]><!-->
112
121
  <%= content_tag(:svg, {
@@ -270,10 +279,11 @@
270
279
  <% end %>
271
280
  </div>
272
281
 
273
- <div
274
- id="super-navigation-menu-<%= unique_id %>" hidden
275
- class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
276
- >
282
+ <%= content_tag(:div, {
283
+ id: "super-navigation-menu-#{unique_id}",
284
+ hidden: "",
285
+ class: dropdown_menu_classes,
286
+ }) do %>
277
287
  <div class="govuk-width-container">
278
288
  <div class="govuk-grid-row gem-c-layout-super-navigation-header__navigation-items">
279
289
 
@@ -330,9 +340,13 @@
330
340
  <% end %>
331
341
  </div>
332
342
  </div>
333
- </div>
343
+ <% end %>
334
344
 
335
- <div id="super-search-menu" hidden class="gem-c-layout-super-navigation-header__navigation-dropdown-menu">
345
+ <%= content_tag(:div, {
346
+ id: "super-search-menu",
347
+ hidden: "",
348
+ class: dropdown_menu_classes,
349
+ }) do %>
336
350
  <div class="govuk-width-container gem-c-layout-super-navigation-header__search-container gem-c-layout-super-navigation-header__search-items">
337
351
  <h3 class="govuk-visually-hidden">
338
352
  <%= navigation_search_subheading %>
@@ -345,6 +359,7 @@
345
359
  data-module="ga4-form-tracker"
346
360
  data-ga4-form='{ "event_name": "search", "type": "header menu bar", "section": "Search GOV.UK", "action": "search", "url": "/search/all" }'
347
361
  data-ga4-form-include-text
362
+ data-ga4-form-no-answer-undefined
348
363
  action="/search"
349
364
  method="get"
350
365
  role="search"
@@ -354,7 +369,9 @@
354
369
  inline_label: false,
355
370
  label_size: "m",
356
371
  label_text: search_text,
372
+ label_custom_class: "gem-c-layout-super-navigation-header__search-label--large-navbar",
357
373
  size: "large",
374
+ margin_bottom: 0,
358
375
  data_attributes: {
359
376
  track_category: "headerClicked",
360
377
  track_action: "searchSubmitted",
@@ -368,7 +385,11 @@
368
385
  </div>
369
386
  <div class="govuk-grid-row">
370
387
  <div class="govuk-grid-column-full">
371
- <h3 class="govuk-heading-m"><%= popular_links_heading %></h3>
388
+ <%= content_tag(:h3, {
389
+ class: popular_links_heading_classes
390
+ }) do %>
391
+ <%= popular_links_heading %>
392
+ <% end %>
372
393
  <ul class="govuk-list">
373
394
  <% index_total = popular_links.length %>
374
395
  <% popular_links.each_with_index do | popular_link, index | %>
@@ -401,7 +422,7 @@
401
422
  </div>
402
423
  </div>
403
424
  </div>
404
- </div>
425
+ <% end %>
405
426
  </nav>
406
427
  </div>
407
428
  <% end %>
@@ -11,6 +11,7 @@
11
11
  label_margin_bottom ||= nil
12
12
  label_size ||= nil
13
13
  label_text ||= t("components.search_box.label")
14
+ label_custom_class ||= nil
14
15
  name ||= "q"
15
16
  homepage ||= false
16
17
  no_border ||= false
@@ -42,6 +43,7 @@
42
43
  label_classes << "gem-c-search__label"
43
44
  end
44
45
  label_classes << "govuk-!-margin-bottom-#{label_margin_bottom}" if [*1..9].include?(label_margin_bottom) and local_assigns.include?(:inline_label)
46
+ label_classes << label_custom_class if label_custom_class
45
47
 
46
48
  tag_label = capture do
47
49
  tag.label(for: id, class: label_classes) do
@@ -108,3 +108,8 @@ examples:
108
108
  data:
109
109
  label_margin_bottom: 9
110
110
  inline_label: false
111
+ with_custom_label_class:
112
+ description: |
113
+ Allows adding a custom class to the label of the component.
114
+ data:
115
+ label_custom_class: "govuk-heading-xl"
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "35.20.0".freeze
2
+ VERSION = "35.20.1".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: 35.20.0
4
+ version: 35.20.1
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: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2023-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config