govuk_publishing_components 61.0.0 → 61.0.1

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: 1ed4c252ddb03034566d7db1aa134674a94f446b3b6cbce35695257693135f00
4
- data.tar.gz: 1506f9b01c5752425ff4677d625e6b1827b480b1ec83d3065348bc687aae695b
3
+ metadata.gz: a3debff87d704a1f1714654c1c760afac536d24bce1a6c39f766aadf81a03f46
4
+ data.tar.gz: 9d6f03250416fe1614ffdc353aec47fbe22ba63ada8445febbe51dff717f26f4
5
5
  SHA512:
6
- metadata.gz: 7bc368fb2da6960a529e6ddb831393e2120e01c096bd232dd9ba17e03ac510182c36bf41a70b1693a73e8d97b0106548d9f0ddc62738e390e98d37cde2d81e94
7
- data.tar.gz: 885e0f620686121a3106856d9a817c278a161b5db79d308921cbf20d09b021597d7a0c82905ad616a57787ef54855963e968593b238009035a5a50755a1c5e11
6
+ metadata.gz: a9a7cee32c1ad61c3dcf0d235697611821a5d7cbd564d5e0b07bd8e1fd5fb74eeb51e251b99c25b2507d114399009e7e404de65837387bb54dc5ddeb85fdaf32
7
+ data.tar.gz: 003c979bdb12a103e2701dc8459026f475bc4bc77294e58b7d148125d535cfedfffd751c3ab52245eeb84ecd3dac64ef9b8b217375fa9430d1636d5a65a58ba2
@@ -1,8 +1,10 @@
1
1
  @import "govuk_publishing_components/individual_component_support";
2
2
 
3
- .gem-c-heading,
4
- .gem-c-heading__text {
5
- margin: 0;
3
+ .gem-c-heading {
4
+ // needs to be this specific to override govuk-heading
5
+ .gem-c-heading__text {
6
+ margin: 0;
7
+ }
6
8
  }
7
9
 
8
10
  .gem-c-heading--padding {
@@ -19,13 +19,10 @@ $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
19
19
 
20
20
  $gem-hover-dark-background: #dddcdb;
21
21
 
22
- // Dart Sass 1.79.0 introduced support for CSS Color Level 4 color spaces.
23
- // Consequently, the `govuk-tint` mixin now outputs rgb values with floating-point precision,
24
- // leading to unsupported property value warnings in some browsers, such as Safari 11.1.1.
25
- // To maintain compatibility, we're defining equivalent hex color values as variables.
26
-
27
- $govuk-blue-tint-95: #f4f8fb; // govuk-tint(govuk-colour("blue"), 95%)
28
- $govuk-blue-tint-80: #d2e2f1; // govuk-tint(govuk-colour("blue"), 80%)
29
- $govuk-blue-tint-50: #8eb8dc; // govuk-tint(govuk-colour("blue"), 50%)
22
+ // Brand refresh
23
+
24
+ $govuk-blue-tint-95: govuk-tint($govuk-brand-colour, 95%);
25
+ $govuk-blue-tint-80: govuk-tint(govuk-colour("blue"), 80%);
26
+ $govuk-blue-tint-50: govuk-tint(govuk-colour("blue"), 50%);
30
27
 
31
28
  $govuk-rebrand-template-background-colour: $govuk-blue-tint-95;
@@ -5,9 +5,12 @@
5
5
  service_name_url ||= nil
6
6
  navigation_items ||= []
7
7
  navigation_aria_label ||= t("components.layout_header.menu")
8
+ inverse ||= false
9
+ collapse_navigation_on_mobile = local_assigns.fetch(:collapse_navigation_on_mobile, navigation_items.length > 1)
8
10
 
9
11
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
10
12
  component_helper.add_class("gem-c-service-navigation govuk-service-navigation")
13
+ component_helper.add_class("govuk-service-navigation--inverse") if inverse
11
14
  component_helper.add_aria_attribute({ label: "Service information" }) if service_name.present?
12
15
  component_helper.add_data_attribute({ module: "govuk-service-navigation" })
13
16
 
@@ -29,9 +32,11 @@
29
32
 
30
33
  <% if navigation_items.present? %>
31
34
  <nav aria-label="<%= navigation_aria_label %>" class="govuk-service-navigation__wrapper">
32
- <button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="navigation" hidden>
33
- Menu
34
- </button>
35
+ <% if collapse_navigation_on_mobile %>
36
+ <button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="navigation" hidden>
37
+ Menu
38
+ </button>
39
+ <% end %>
35
40
  <ul class="govuk-service-navigation__list" id="navigation">
36
41
  <% navigation_items.each do |nav| %>
37
42
  <%
@@ -74,3 +74,32 @@ examples:
74
74
  - text: Navigation item 2
75
75
  href: "#"
76
76
  full_width: true
77
+ inverse:
78
+ data:
79
+ navigation_items:
80
+ - text: Navigation item 1
81
+ href: "#"
82
+ active: true
83
+ - text: Navigation item 2
84
+ href: "#"
85
+ inverse: true
86
+ with_navigation_links_and_collapse_navigation_on_mobile_set_to_false:
87
+ data:
88
+ navigation_items:
89
+ - text: Navigation item 1
90
+ href: "#"
91
+ active: true
92
+ - text: Navigation item 2
93
+ href: "#"
94
+ collapse_navigation_on_mobile: false
95
+ with_a_single_navigation_item:
96
+ data:
97
+ navigation_items:
98
+ - text: Navigation item 1
99
+ href: "#"
100
+ with_a_single_navigation_item_and_collapse_navigation_on_mobile:
101
+ data:
102
+ navigation_items:
103
+ - text: Navigation item 1
104
+ href: "#"
105
+ collapse_navigation_on_mobile: true
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "61.0.0".freeze
2
+ VERSION = "61.0.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 61.0.0
4
+ version: 61.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev