govuk_publishing_components 16.8.0 → 16.9.0

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: 1b81e308990c82671b9449aa6b5631f6a1b6b6ed8b7b7e9cd2d44480f47d9d3b
4
- data.tar.gz: 3c5707c0af3c161cd38273c81c8c10e1903e77a6c892c4f6bb6b8d0e4d9ad459
3
+ metadata.gz: 65381cca6e900dadbc2decf3e2aa35ec8885c53925b9f4f528d201929f3441e6
4
+ data.tar.gz: f843c8dc1567810d0636394e61a016b0598e7e668990a0f80aa38f2021055109
5
5
  SHA512:
6
- metadata.gz: 8a393e4807db795ad0c9afe3c6d726e928d351a296a5918f92234393d0c5114d94432da3eac59a722ef80b2813b5a070bcd0ece4952260b543337ecf57c7e045
7
- data.tar.gz: 86bf57bf0feb0cf2eae7630be1d23da91c6aa37307d0d4bd4bf0f9fa8f293a258f0d33dfde08b6d64626f4435999460d876c7da6043e018885cd97f35bd14021
6
+ metadata.gz: 4694feb3408ffdc0f394364c0dec6878945cc15d1a7dd9c6d3b7972d1969cce0d5f8ca83e3082eacfb0f48ba12e4bd012db3b75a9285eb7ef10e4c41423b8653
7
+ data.tar.gz: 74d2c6edb15437ea788d841aa31a51b3cc4e51595afee19d0d87631967808c4b53c6a709f7b5dd7db587b55e16563c88e58f96b16f665b4a2aeed10eac8a4065
@@ -25,26 +25,29 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
25
25
 
26
26
  $(scope).on('change', 'input[type=checkbox]', function(e) {
27
27
  if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
28
- var $checkbox = $(e.target);
29
- var category = $checkbox.data("track-category");
30
- if (typeof category !== "undefined") {
31
- var isChecked = $checkbox.is(":checked");
32
- var uncheckTrackCategory = $checkbox.data("uncheck-track-category");
33
- if (!isChecked && typeof uncheckTrackCategory !== "undefined") {
34
- category = uncheckTrackCategory;
28
+ // where checkboxes are manipulated externally in finders, suppressAnalytics
29
+ // is passed to prevent duplicate GA events
30
+ if(typeof e.suppressAnalytics === 'undefined' || e.suppressAnalytics !== true ) {
31
+ var $checkbox = $(e.target);
32
+ var category = $checkbox.data("track-category");
33
+ if (typeof category !== "undefined") {
34
+ var isChecked = $checkbox.is(":checked");
35
+ var uncheckTrackCategory = $checkbox.data("uncheck-track-category");
36
+ if (!isChecked && typeof uncheckTrackCategory !== "undefined") {
37
+ category = uncheckTrackCategory;
38
+ }
39
+ var action = $checkbox.data("track-action");
40
+ var options = $checkbox.data("track-options");
41
+ if (typeof options !== 'object' || options === null) {
42
+ options = {};
43
+ }
44
+ options['value'] = $checkbox.data("track-value");
45
+ options['label'] = $checkbox.data("track-label");
46
+ GOVUK.analytics.trackEvent(category, action, options);
35
47
  }
36
- var action = $checkbox.data("track-action");
37
- var options = $checkbox.data("track-options");
38
- if (typeof options !== 'object' || options === null) {
39
- options = {};
40
- }
41
- options['value'] = $checkbox.data("track-value");
42
- options['label'] = $checkbox.data("track-label");
43
- GOVUK.analytics.trackEvent(category, action, options);
44
48
  }
45
49
  }
46
50
  });
47
-
48
51
  };
49
52
 
50
53
  this.toggleNestedCheckboxes = function(scope, checkbox) {
@@ -6,6 +6,8 @@
6
6
  @import "govuk-frontend/helpers/all";
7
7
  @import "govuk-frontend/core/all";
8
8
 
9
+ @include _govuk-font-face-nta;
10
+
9
11
  .component-guide-wrapper {
10
12
  padding-bottom: $govuk-gutter * 1.5;
11
13
  }
@@ -1,6 +1,6 @@
1
1
  .gem-c-subscription-links {
2
2
  @include govuk-text-colour;
3
- @include bold-19;
3
+ @include govuk-font(19, $weight: bold);
4
4
 
5
5
  .gem-c-subscription-links__hidden-header {
6
6
  @include govuk-visually-hidden;
@@ -8,21 +8,24 @@
8
8
 
9
9
  .gem-c-subscription-links__list {
10
10
  list-style: none;
11
- margin: 0 (-$gutter-half / 2);
11
+ margin: 0 (-govuk-spacing(3) / 2);
12
12
  padding: 0;
13
13
  }
14
14
 
15
+ .gem-c-subscription-links__list--small {
16
+ @include govuk-font(16);
17
+ }
18
+
15
19
  .gem-c-subscription-links__list-item {
16
20
  display: inline-block;
17
- margin-left: $gutter-half / 2;
18
- margin-right: $gutter-half / 2;
19
- margin-bottom: $gutter-half;
21
+ margin-left: govuk-spacing(2);
22
+ margin-right: govuk-spacing(2);
23
+ margin-bottom: govuk-spacing(3);
20
24
  }
21
25
 
22
26
  .gem-c-subscription-links__link {
23
27
  @extend %govuk-link;
24
28
  text-decoration: none;
25
- padding-left: 28px;
26
29
  background-repeat: no-repeat;
27
30
  background-position: 0 20%;
28
31
 
@@ -33,6 +36,7 @@
33
36
 
34
37
  .gem-c-subscription-links__link--feed {
35
38
  background-image: image-url("govuk_publishing_components/feed-icon-black.png");
39
+ padding-left: govuk-spacing(4);
36
40
 
37
41
  // if this is a toggle, only show if js is enabled
38
42
  &[data-controls] {
@@ -46,16 +50,17 @@
46
50
 
47
51
  .gem-c-subscription-links__link--email-alerts {
48
52
  background-image: image-url("govuk_publishing_components/mail-icon.png");
53
+ padding-left: govuk-spacing(5);
49
54
 
50
55
  @include device-pixel-ratio() {
51
56
  background-image: image-url("govuk_publishing_components/mail-icon-x2.png");
52
- background-size: 20px 14px;
57
+ background-size: govuk-spacing(4) govuk-spacing(3);
53
58
  }
54
59
  }
55
60
 
56
61
  .gem-c-subscription-links__feed-box {
57
- padding: $gutter-half;
58
- margin-bottom: $gutter-half;
62
+ padding: govuk-spacing(3);
63
+ margin-bottom: govuk-spacing(3);
59
64
  background: $grey-3;
60
65
 
61
66
  .js-enabled &.js-hidden {
@@ -6,5 +6,5 @@
6
6
  %>
7
7
 
8
8
  <%= tag.span id: id, class: css_classes do %>
9
- <%= text %>
9
+ <span class="govuk-visually-hidden">Error:</span> <%= text %>
10
10
  <% end %>
@@ -11,12 +11,15 @@
11
11
  css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
12
12
  css_classes << brand_helper.brand_class
13
13
  data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
14
+ hide_heading ||= false
14
15
  %>
15
16
  <% if sl_helper.component_data_is_valid? %>
16
17
  <%= tag.section class: css_classes, data: data do %>
17
- <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
18
+ <% unless hide_heading %>
19
+ <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
20
+ <% end %>
18
21
  <ul
19
- class="gem-c-subscription-links__list"
22
+ class="gem-c-subscription-links__list<%= ' gem-c-subscription-links__list--small' if local_assigns[:small_form] == true %>"
20
23
  <%= "data-module=track-click" if sl_helper.tracking_is_present? %>
21
24
  >
22
25
  <% if sl_helper.email_signup_link.present? %>
@@ -1,5 +1,7 @@
1
1
  name: Subscription links
2
2
  description: Links to ‘Get email alerts’ and ‘Subscribe to feed’
3
+ body: |
4
+ <strong>NOTE: This component includes a h2 heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
3
5
  accessibility_criteria: |
4
6
  Icons in subscription links must be presentational and ignored by screen readers.
5
7
 
@@ -72,3 +74,16 @@ examples:
72
74
  dimension29: 'dimension29feedLink'
73
75
  }
74
76
  }
77
+ as_small_form:
78
+ data:
79
+ email_signup_link: '/foreign-travel-advice/singapore/email-signup'
80
+ feed_link: '/foreign-travel-advice/singapore.atom'
81
+ small_form: true
82
+ without_heading:
83
+ description: |
84
+ By default the component includes an h2 heading. The component could be used anywhere on the page and could mean
85
+ that it produces invalid markup or make the site unaccessible.
86
+ data:
87
+ email_signup_link: '/foreign-travel-advice/singapore/email-signup'
88
+ feed_link: '/foreign-travel-advice/singapore.atom'
89
+ hide_heading: true
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '16.8.0'.freeze
2
+ VERSION = '16.9.0'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
52
- "_shasum": "5a4193d96fc09bcd97b5641b903aa0f0ec6340d0",
52
+ "_shasum": "32c35894b7cab500e11ec0556bead6a803f38f31",
53
53
  "_shrinkwrap": null,
54
54
  "_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
55
55
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
@@ -2,18 +2,18 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "axe-core@^3.2.2",
5
+ "raw": "axe-core@3.2.2",
6
6
  "scope": null,
7
7
  "escapedName": "axe-core",
8
8
  "name": "axe-core",
9
- "rawSpec": "^3.2.2",
10
- "spec": ">=3.2.2 <4.0.0",
11
- "type": "range"
9
+ "rawSpec": "3.2.2",
10
+ "spec": "3.2.2",
11
+ "type": "version"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "axe-core@>=3.2.2 <4.0.0",
16
+ "_from": "axe-core@3.2.2",
17
17
  "_hasShrinkwrap": false,
18
18
  "_id": "axe-core@3.2.2",
19
19
  "_inCache": true,
@@ -30,13 +30,13 @@
30
30
  "_npmVersion": "6.4.1",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "axe-core@^3.2.2",
33
+ "raw": "axe-core@3.2.2",
34
34
  "scope": null,
35
35
  "escapedName": "axe-core",
36
36
  "name": "axe-core",
37
- "rawSpec": "^3.2.2",
38
- "spec": ">=3.2.2 <4.0.0",
39
- "type": "range"
37
+ "rawSpec": "3.2.2",
38
+ "spec": "3.2.2",
39
+ "type": "version"
40
40
  },
41
41
  "_requiredBy": [
42
42
  "/"
@@ -44,7 +44,7 @@
44
44
  "_resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.2.2.tgz",
45
45
  "_shasum": "b06d6e9ae4636d706068843272bfaeed3fe97362",
46
46
  "_shrinkwrap": null,
47
- "_spec": "axe-core@^3.2.2",
47
+ "_spec": "axe-core@3.2.2",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
49
49
  "bugs": {
50
50
  "url": "https://github.com/dequelabs/axe-core/issues"
@@ -2,18 +2,18 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "govuk-frontend@^2.5.1",
5
+ "raw": "govuk-frontend@2.9.0",
6
6
  "scope": null,
7
7
  "escapedName": "govuk-frontend",
8
8
  "name": "govuk-frontend",
9
- "rawSpec": "^2.5.1",
10
- "spec": ">=2.5.1 <3.0.0",
11
- "type": "range"
9
+ "rawSpec": "2.9.0",
10
+ "spec": "2.9.0",
11
+ "type": "version"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "govuk-frontend@>=2.5.1 <3.0.0",
16
+ "_from": "govuk-frontend@2.9.0",
17
17
  "_hasShrinkwrap": false,
18
18
  "_id": "govuk-frontend@2.9.0",
19
19
  "_inCache": true,
@@ -30,13 +30,13 @@
30
30
  "_npmVersion": "6.4.1",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "govuk-frontend@^2.5.1",
33
+ "raw": "govuk-frontend@2.9.0",
34
34
  "scope": null,
35
35
  "escapedName": "govuk-frontend",
36
36
  "name": "govuk-frontend",
37
- "rawSpec": "^2.5.1",
38
- "spec": ">=2.5.1 <3.0.0",
39
- "type": "range"
37
+ "rawSpec": "2.9.0",
38
+ "spec": "2.9.0",
39
+ "type": "version"
40
40
  },
41
41
  "_requiredBy": [
42
42
  "/"
@@ -44,7 +44,7 @@
44
44
  "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.9.0.tgz",
45
45
  "_shasum": "bc3ee6ee124d19e2d1ff4802c9eb7ea15039a205",
46
46
  "_shrinkwrap": null,
47
- "_spec": "govuk-frontend@^2.5.1",
47
+ "_spec": "govuk-frontend@2.9.0",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
49
49
  "author": {
50
50
  "name": "GOV.UK Design System Team",
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: 16.8.0
4
+ version: 16.9.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: 2019-03-26 00:00:00.000000000 Z
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govspeak