govuk_publishing_components 65.1.1 → 65.2.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: b8421678343bb40c9ee8e546ca65299cda8e4bb703979a2c3ca1604e8966b87a
4
- data.tar.gz: 6c81db1b7aed47aaca271beaaf0211cbc2565fb136fb2798af621f0465889b79
3
+ metadata.gz: beb3d328490fb627467136f56fc0c83f725548975246922aafb5397215eb8091
4
+ data.tar.gz: f46ab3c7a3fd4d8e85fb619aa718a22f3cec20e13f994e509075b8e073812195
5
5
  SHA512:
6
- metadata.gz: 782d6eb963bf3c7e5495fa6e39ee9959b4078ea23eb908835c74c3950e603bbecae7e9bb0c9bb01351bcae027222bd927a3782b857b0dbdc5fbc8d2e7f33d767
7
- data.tar.gz: c5f772f69b48a63341335d40a6722873d0d3fa7bf337693abcef88fdaee5d35e841711f99b71080f3d2b72497786cd63363255703b6ed21c1d6c6df315989431
6
+ metadata.gz: 7d6e745560189104f1b2e8095acad39a9ff8219b395e7a8a53ec1db403179d91d89c22a708dcc45079a8ef97cc5ce365bb18eed129aed938b921d6dada563712
7
+ data.tar.gz: 9212657d0fac9c8f33b00a648250f3202885a4c3645640f583bb3acd47efea909733463e4946603bab80348b4cd81e4c645039615bfd427b859f6d24a369591f
@@ -1 +1,35 @@
1
1
  @import "govuk/components/details/details";
2
+
3
+ .gem-c-details--black {
4
+ .govuk-details__summary {
5
+ color: govuk-colour("black");
6
+ }
7
+
8
+ .govuk-details__text {
9
+ border-color: govuk-colour("black");
10
+ }
11
+
12
+ .govuk-link {
13
+ @include govuk-link-common;
14
+ @include govuk-link-style-default;
15
+ }
16
+ }
17
+
18
+ .gem-c-details--inverse {
19
+ .govuk-details__summary,
20
+ .govuk-details__text {
21
+ color: govuk-colour("white");
22
+
23
+ &:focus {
24
+ color: govuk-colour("black");
25
+ }
26
+ }
27
+
28
+ .govuk-details__text {
29
+ border-color: govuk-colour("white");
30
+ }
31
+
32
+ .govuk-link {
33
+ @include govuk-link-style-inverse;
34
+ }
35
+ }
@@ -5,6 +5,8 @@
5
5
  @ga4[:index_section] += 1 unless disable_ga4
6
6
  ga4_attributes ||= {}
7
7
  local_assigns[:margin_bottom] ||= 3
8
+ theme ||= nil
9
+ inverse ||= false
8
10
 
9
11
  unless disable_ga4
10
12
  ga4_event = {
@@ -21,6 +23,8 @@
21
23
 
22
24
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
23
25
  component_helper.add_class("gem-c-details govuk-details")
26
+ component_helper.add_class("gem-c-details--black") if theme == "black"
27
+ component_helper.add_class("gem-c-details--inverse") if inverse
24
28
  component_helper.add_data_attribute({ module: "ga4-event-tracker" }) unless disable_ga4
25
29
  component_helper.add_data_attribute({ ga4_event: ga4_event }) unless disable_ga4
26
30
  component_helper.set_open(open)
@@ -66,3 +66,19 @@ examples:
66
66
  open: true
67
67
  block: |
68
68
  We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.
69
+ with_black_theme:
70
+ description: Used against our light blue header colour.
71
+ data:
72
+ title: Help with nationality
73
+ theme: black
74
+ block: |
75
+ We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post. <a href="#" class="govuk-link">Example link</a>
76
+ on_a_dark_background:
77
+ description: For use against a dark background.
78
+ context:
79
+ dark_background: true
80
+ data:
81
+ title: Help with nationality
82
+ inverse: true
83
+ block: |
84
+ We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post. <a href="#" class="govuk-link">Example link</a>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "65.1.1".freeze
2
+ VERSION = "65.2.0".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: 65.1.1
4
+ version: 65.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev