govuk_publishing_components 37.3.0 → 37.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/component_guide/application.scss +1 -1
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +3 -3
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +2 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +1 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +1 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +1 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +1 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +8 -8
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +2 -2
  14. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -1
  15. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -3
  16. data/app/views/govuk_publishing_components/components/_share_links.html.erb +4 -3
  17. data/app/views/govuk_publishing_components/components/docs/share_links.yml +15 -2
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2555b277de08ff265823e6d39f556e5b11914ce143737ad5e8cd2d41dce344ff
4
- data.tar.gz: 193200e4d2a872523f728817a8ad078f3fbf915a99b0986e10fa6fe1e51b6b5e
3
+ metadata.gz: f7a4d71679bce34c3c53255372e12812f5908a8ffefa866b090b3072d41f3745
4
+ data.tar.gz: db303cecf8d41c5bc9034b456422391432194346d30ed7ba7c02327f90d32634
5
5
  SHA512:
6
- metadata.gz: 926c1dbb856d7e056a3bb230ddf74ef83c3a1684287e2ce10133c0d8c869500f7a8124b6dfdbb1d399c415358e34909bcc3ad69b98661f7d39509e4bafa9bfba
7
- data.tar.gz: 1c0bd5a48a1d14bcc5850a2be305b5fb2890dc51c6fbe45b02d6adcda587599f6cf4070f02183635083d1224c774543ec138dab23aae6276c133319f6cb09ad1
6
+ metadata.gz: a4d729e0d668e689eef1ab993ee9ab48e5a7bfd50876659175d9bee9377e46aac4ace318bd620842534f3cc05764eb850ec0103e6cc890fc3a942b3202f9788d
7
+ data.tar.gz: 52b24d45ec33e237f05defa2dc1fd0fc2bd93be96687f6ab9afb88e9a420ab48120a57bcc70f71fcb76163a3ab83dc330cbd53886e7bdab0ae8d2becfbc525bd
@@ -165,7 +165,7 @@ $gem-guide-border-width: 1px;
165
165
  h3,
166
166
  h4 {
167
167
  margin-top: 0;
168
- margin-bottom: $govuk-gutter / 2;
168
+ margin-bottom: calc($govuk-gutter / 2);
169
169
  }
170
170
 
171
171
  h3 a {
@@ -40,7 +40,7 @@
40
40
  list-style-type: none;
41
41
 
42
42
  @include govuk-media-query($from: tablet) {
43
- padding-top: govuk-spacing(6) / 4;
43
+ padding-top: calc(govuk-spacing(6) / 4);
44
44
  }
45
45
  }
46
46
 
@@ -186,7 +186,7 @@
186
186
  @include govuk-font($size: false);
187
187
  font-size: 16px;
188
188
  font-size: govuk-px-to-rem(16px);
189
- margin: 0 0 (govuk-spacing(3) / 2);
189
+ margin: 0 0 calc(govuk-spacing(3) / 2);
190
190
  color: govuk-colour("dark-grey", $legacy: "grey-1");
191
191
 
192
192
  @include govuk-media-query($from: tablet) {
@@ -196,7 +196,7 @@
196
196
 
197
197
  .gem-c-image-card__description {
198
198
  @include govuk-font($size: 19);
199
- padding-top: (govuk-spacing(3) / 2);
199
+ padding-top: calc(govuk-spacing(3) / 2);
200
200
  word-wrap: break-word;
201
201
  }
202
202
 
@@ -204,7 +204,7 @@
204
204
  @include govuk-font($size: 19);
205
205
  position: relative;
206
206
  z-index: 2;
207
- padding: (govuk-spacing(3) / 2) 0 0 0;
207
+ padding: calc(govuk-spacing(3) / 2) 0 0 0;
208
208
  margin: 0;
209
209
  list-style: none;
210
210
 
@@ -46,7 +46,7 @@ $govuk-modal-wide-breakpoint: $govuk-page-width + $govuk-modal-margin * 2 + $gov
46
46
  bottom: inherit;
47
47
  left: inherit;
48
48
  width: auto;
49
- max-width: $govuk-page-width * 2 / 3;
49
+ max-width: calc($govuk-page-width * (2 / 3));
50
50
  height: auto;
51
51
  margin: $govuk-modal-margin auto;
52
52
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
@@ -34,7 +34,7 @@ $gem-c-print-link-background-height: 18px;
34
34
  }
35
35
 
36
36
  .gem-c-print-link__link {
37
- box-shadow: inset 0 0 0 1px $govuk-border-colour;
37
+ box-shadow: inset 0 0 0 1px govuk-colour("dark-grey");
38
38
 
39
39
  &:focus {
40
40
  border: 0;
@@ -43,7 +43,7 @@ $gem-c-print-link-background-height: 18px;
43
43
  }
44
44
 
45
45
  .gem-c-print-link__button {
46
- border: 1px solid $govuk-border-colour;
46
+ border: 1px solid govuk-colour("dark-grey");
47
47
  color: $govuk-link-colour;
48
48
  cursor: pointer;
49
49
  margin: govuk-spacing(0);
@@ -108,7 +108,7 @@ $large-input-size: 50px;
108
108
 
109
109
  @mixin icon-positioning($container-size) {
110
110
  $icon-dimension: 20px;
111
- $icon-position: ($container-size - $icon-dimension) / 2;
111
+ $icon-position: calc(($container-size - $icon-dimension) / 2);
112
112
 
113
113
  display: block;
114
114
  pointer-events: none;
@@ -18,7 +18,7 @@ $share-button-height: 30px;
18
18
  padding-left: ($share-button-width + govuk-spacing(2));
19
19
  padding-right: govuk-spacing(2);
20
20
  margin-bottom: govuk-spacing(2);
21
- font-size: $share-button-height / 2;
21
+ font-size: calc($share-button-height / 2);
22
22
  }
23
23
 
24
24
  .gem-c-share-links__link {
@@ -3,7 +3,7 @@
3
3
  .gem-c-single-page-notification-button__submit {
4
4
  padding: govuk-spacing(2);
5
5
  margin: govuk-spacing(0);
6
- border: 1px solid $govuk-border-colour;
6
+ border: 1px solid govuk-colour("dark-grey");
7
7
  color: $govuk-link-colour;
8
8
  cursor: pointer;
9
9
  background: none;
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  .gem-c-step-nav-related__pretitle {
35
- margin-bottom: govuk-spacing(6) / 4;
35
+ margin-bottom: calc(govuk-spacing(6) / 4);
36
36
  }
37
37
  }
38
38
 
@@ -260,8 +260,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
260
260
  z-index: 6;
261
261
  bottom: 0;
262
262
  left: 0;
263
- margin-left: $number-circle-size / 4;
264
- width: $number-circle-size / 2;
263
+ margin-left: calc($number-circle-size / 4);
264
+ width: calc($number-circle-size / 2);
265
265
  height: 0;
266
266
  border-bottom: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
267
267
  }
@@ -278,8 +278,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
278
278
  .gem-c-step-nav--large & {
279
279
  @include govuk-media-query($from: tablet) {
280
280
  &::before {
281
- margin-left: $number-circle-size-large / 4;
282
- width: $number-circle-size-large / 2;
281
+ margin-left: calc($number-circle-size-large / 4);
282
+ width: calc($number-circle-size-large / 2);
283
283
  }
284
284
 
285
285
  &::after {
@@ -508,9 +508,9 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
508
508
  z-index: 5;
509
509
  top: .6em; // position the dot to align with the first row of text in the link
510
510
  left: -(govuk-spacing(6) + govuk-spacing(3));
511
- margin-top: -($stroke-width / 2);
512
- margin-left: ($number-circle-size / 2);
513
- width: $number-circle-size / 2;
511
+ margin-top: - calc($stroke-width / 2);
512
+ margin-left: calc($number-circle-size / 2);
513
+ width: calc($number-circle-size / 2);
514
514
  height: $stroke-width;
515
515
  background: govuk-colour("black");
516
516
  }
@@ -519,7 +519,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
519
519
  @include govuk-media-query($from: tablet) {
520
520
  &::before {
521
521
  left: -(govuk-spacing(9));
522
- margin-left: ($number-circle-size-large / 2);
522
+ margin-left: calc($number-circle-size-large / 2);
523
523
  }
524
524
  }
525
525
  }
@@ -8,7 +8,7 @@ $table-header-background-colour: govuk-colour("light-grey", $legacy: "grey-3");
8
8
  $sort-link-active-colour: govuk-colour("white");
9
9
  $sort-link-arrow-size: 14px;
10
10
  $sort-link-arrow-size-small: 8px;
11
- $sort-link-arrow-spacing: $sort-link-arrow-size / 2;
11
+ $sort-link-arrow-spacing: calc($sort-link-arrow-size / 2);
12
12
  $table-row-hover-background-colour: rgba(43, 140, 196, .2);
13
13
  $table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4");
14
14
 
@@ -23,10 +23,10 @@
23
23
  padding-left: $icon-size;
24
24
 
25
25
  // Center the icon around the baseline
26
- padding-top: ($icon-size - $line-height-mobile) / 2;
26
+ padding-top: calc(($icon-size - $line-height-mobile) / 2);
27
27
 
28
28
  @include govuk-media-query($from: tablet) {
29
- padding-top: ($icon-size - $line-height-tablet) / 2;
29
+ padding-top: calc(($icon-size - $line-height-tablet) / 2);
30
30
  }
31
31
 
32
32
  p {
@@ -3,7 +3,7 @@
3
3
 
4
4
  @include govuk-font($size: 16);
5
5
 
6
- $gutter-two-thirds: $govuk-gutter - ($govuk-gutter / 3);
6
+ $gutter-two-thirds: $govuk-gutter - calc($govuk-gutter / 3);
7
7
 
8
8
  ol,
9
9
  ul,
@@ -99,12 +99,10 @@
99
99
  <%= javascript_tag nonce: true do -%>
100
100
  document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
101
101
  <% end -%>
102
+ <%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>
102
103
  <%= render "govuk_publishing_components/components/skip_link", {
103
104
  href: "#content"
104
105
  } %>
105
-
106
- <%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>
107
-
108
106
  <% unless omit_header %>
109
107
  <% if show_explore_header %>
110
108
  <% if homepage %>
@@ -5,6 +5,7 @@
5
5
  title ||= false
6
6
  track_as_sharing ||= false
7
7
  track_as_follow ||= false
8
+ ga4_data ||= {}
8
9
  stacked ||= false
9
10
  columns ||= false
10
11
 
@@ -57,15 +58,15 @@
57
58
  'index_link': index + 1,
58
59
  'index_total': links.length,
59
60
  'text': link[:icon],
60
- }
61
+ }.merge(ga4_data)
61
62
  end
62
63
  if track_as_follow
63
64
  ga4_link_data = {
64
65
  'event_name': 'navigation',
65
66
  'type': 'follow us',
66
67
  'index_link': index + 1,
67
- 'index_total': links.length
68
- }
68
+ 'index_total': links.length,
69
+ }.merge(ga4_data)
69
70
  end
70
71
  %>
71
72
  <%
@@ -107,9 +107,16 @@ examples:
107
107
  }
108
108
  ]
109
109
  track_as_sharing_links:
110
- description: Where the component is used to allow users to share content on social media, tracking can be added that uses [Social Interactions](https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions) in UA. If this option is not included, it is assumed the component is simply linking to social media pages and the extra options are omitted from the tracking call in UA. In GA4, when this is set to true, a JSON is added to a data-attribute called data-ga4-link, which is detected by ga4-link-tracker.js and pushed to the dataLayer.
110
+ description: |
111
+ Where the component is used to allow users to share content on social media, tracking can be added that uses [Social Interactions](https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions) in UA.
112
+ If this option is not included, it is assumed the component is simply linking to social media pages and the extra options are omitted from the tracking call in UA.
113
+ In GA4, when this is set to true, a JSON is added to a data-attribute called data-ga4-link, which is detected by ga4-link-tracker.js and pushed to the dataLayer.
114
+ Most of the tracking values are added by default, but if you need to add more GA4 values or override defaults, you can pass a ga4_data object.
111
115
  data:
112
116
  track_as_sharing: true
117
+ ga4_data: {
118
+ optional_extra_values: "go here"
119
+ }
113
120
  links: [
114
121
  {
115
122
  href: 'share',
@@ -123,9 +130,15 @@ examples:
123
130
  },
124
131
  ]
125
132
  track_as_follow_links:
126
- description: Where the component is used to allow users to follow us on social media, tracking can be added. When this is set to true, a JSON is added to a data-attribute called data-ga4-link, which is detected by ga4-link-tracker.js and pushed to the dataLayer.
133
+ description: |
134
+ Where the component is used to allow users to follow us on social media, tracking can be added.
135
+ When this is set to true, a JSON is added to a data-attribute called data-ga4-link, which is detected by ga4-link-tracker.js and pushed to the dataLayer.
136
+ Most of the tracking values are added by default, but if you need to add more GA4 values or override defaults, you can pass a ga4_data object.
127
137
  data:
128
138
  track_as_follow: true
139
+ ga4_data: {
140
+ optional_extra_values: "go here"
141
+ }
129
142
  links: [
130
143
  {
131
144
  href: 'follow',
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "37.3.0".freeze
2
+ VERSION = "37.3.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: 37.3.0
4
+ version: 37.3.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: 2024-02-06 00:00:00.000000000 Z
11
+ date: 2024-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config