govuk_publishing_components 29.2.0 → 29.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js +1 -0
  3. data/app/assets/stylesheets/component_guide/application.scss +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +2 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +2 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +3 -3
  15. data/app/views/govuk_publishing_components/components/_intervention.html.erb +0 -2
  16. data/config/locales/en.yml +2 -2
  17. data/lib/govuk_publishing_components/presenters/attachment.rb +5 -2
  18. data/lib/govuk_publishing_components/presenters/meta_tags.rb +4 -2
  19. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +0 -34
  20. data/lib/govuk_publishing_components/version.rb +1 -1
  21. metadata +3 -4
  22. data/app/assets/javascripts/govuk_publishing_components/components/intervention.js +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 966bb67ed287fd8f755238732b57bacee7913faa29effa54f69a64c3f7dae03f
4
- data.tar.gz: 84876bd7eec64af2b9b514f4da5b075dd220bcd2566903eff1c1130ddb05f039
3
+ metadata.gz: 3aa5e0fc0a38b75525aa2915acb8986988d4311a46a84aa9baaa5e3ca546ea21
4
+ data.tar.gz: 94a1d71770c10fc48dc306ebe1e9857680649bab32c5017ebf921a8b550617bd
5
5
  SHA512:
6
- metadata.gz: 8e994cd04b7a498b550c83d276cb71fbdc4983180b3cdebe6bb92e04a5dc6adf5fa7f9b8043c451063f433d1e3d28517746374937158409631e6405d3d64a179
7
- data.tar.gz: 91905f09481b56158cef17108e3a3d86c0de65ad8e05e6d1c3af29925ce06fee38b6e0cbaad21db7f20fe867644dd91c7daca1db1a1fcfbe74aa56dc36ddec12
6
+ metadata.gz: 9ca1d951afe78053a1e8213c5a55cc90bf09c826a33d76703e5549bd9734a202c591d468b59b4205b3c3f7a128270c20db128bf6604f3ec91905b70f28ae9bcf
7
+ data.tar.gz: f37fb440c117ff86a76376a4aa2733be0defbda0157b6c0e1b38078f2cc100f93eb33f880d29e69d98a637c2d98aef51dbd2f2a4bf3a07375ac25d4d38809c78
@@ -57,6 +57,7 @@
57
57
  'rendering-application': { dimension: 20 },
58
58
  'search-autocomplete-status': { dimension: 21 },
59
59
  'navigation-legacy': { dimension: 30, defaultValue: 'none' },
60
+ 'navigation-list-type': { dimension: 31, defaultValue: 'none' },
60
61
  'navigation-page-type': { dimension: 32, defaultValue: 'none' },
61
62
  'taxon-slug': { dimension: 56, defaultValue: 'other' },
62
63
  'taxon-id': { dimension: 57, defaultValue: 'other' },
@@ -139,7 +139,7 @@ $gem-guide-border-width: 1px;
139
139
  position: absolute;
140
140
  top: 0;
141
141
  left: 0;
142
- padding: .21053em .78947em;
142
+ padding: .2105em .7894em;
143
143
  background: $govuk-border-colour;
144
144
  color: govuk-colour("black");
145
145
  font-weight: bold;
@@ -1,7 +1,7 @@
1
1
  @import "govuk/components/checkboxes/checkboxes";
2
2
 
3
3
  .govuk-checkboxes--nested {
4
- margin-left: -(govuk-spacing(4) + 2px); //22px
4
+ margin-left: -(govuk-spacing(4) + 2px); // 22px
5
5
  box-sizing: border-box;
6
6
  border-left-style: solid;
7
7
  border-left-width: 4px;
@@ -17,7 +17,7 @@
17
17
 
18
18
  .govuk-checkboxes__conditional {
19
19
  margin-top: govuk-spacing(2);
20
- margin-left: -(govuk-spacing(4) + 2px); //22px
20
+ margin-left: -(govuk-spacing(4) + 2px); // 22px
21
21
  }
22
22
 
23
23
  .gem-c-checkboxes__list {
@@ -19,7 +19,7 @@
19
19
  .gem-c-contextual-sidebar__cta {
20
20
  border-top: 2px solid $govuk-brand-colour;
21
21
  margin-bottom: govuk-spacing(6);
22
- background-color: govuk-colour('light-grey', $legacy: 'grey-4');
22
+ background-color: govuk-colour("light-grey", $legacy: "grey-4");
23
23
  display: block;
24
24
  padding: 0 govuk-spacing(3) govuk-spacing(3);
25
25
  text-decoration: none;
@@ -9,7 +9,7 @@ $pseudo-underline-height: 3px;
9
9
  $button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
10
10
 
11
11
  @mixin chevron($colour, $update: false) {
12
- @if ($update == true) {
12
+ @if $update == true {
13
13
  border-bottom-color: $colour;
14
14
  border-right-color: $colour;
15
15
  } @else {
@@ -103,7 +103,7 @@ $govuk-modal-wide-breakpoint: $govuk-page-width + $govuk-modal-margin * 2 + $gov
103
103
  }
104
104
 
105
105
  .gem-c-modal-dialogue__logotype-crown {
106
- fill: currentColor;
106
+ fill: currentcolor;
107
107
  vertical-align: middle;
108
108
  }
109
109
 
@@ -55,13 +55,13 @@
55
55
  .gem-c-organisation-logo__name {
56
56
  position: relative;
57
57
  top: 3px;
58
- font-family: "HelveticaNeue", "Helvetica Neue", "Arial", "Helvetica", sans-serif;
58
+ font-family: HelveticaNeue, "Helvetica Neue", Arial, Helvetica, sans-serif;
59
59
  }
60
60
 
61
61
  .gem-c-organisation-logo__link {
62
62
  @include govuk-link-common;
63
63
  @include govuk-link-style-text;
64
- font-family: "HelveticaNeue", "Helvetica Neue", "Arial", "Helvetica", sans-serif;
64
+ font-family: HelveticaNeue, "Helvetica Neue", Arial, Helvetica, sans-serif;
65
65
 
66
66
  &:hover {
67
67
  color: $govuk-link-hover-colour;
@@ -19,12 +19,12 @@
19
19
  }
20
20
 
21
21
  .gem-c-reorderable-list__item--chosen {
22
- background-color: govuk-colour('light-grey');
22
+ background-color: govuk-colour("light-grey");
23
23
  outline: 2px dotted $govuk-border-colour;
24
24
  }
25
25
 
26
26
  .gem-c-reorderable-list__item--drag {
27
- background-color: govuk-colour('white');
27
+ background-color: govuk-colour("white");
28
28
  list-style-type: none;
29
29
 
30
30
  .gem-c-reorderable-list__actions {
@@ -76,7 +76,7 @@ $large-input-size: 50px;
76
76
  padding: govuk-em(6, 16);
77
77
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
78
78
  background: govuk-colour("white");
79
- border-radius: 0; //otherwise iphones apply an automatic border radius
79
+ border-radius: 0; // otherwise iphones apply an automatic border radius
80
80
  box-sizing: border-box;
81
81
  -webkit-appearance: none;
82
82
  -moz-appearance: none;
@@ -160,7 +160,7 @@ $large-input-size: 50px;
160
160
  background: govuk-colour("white");
161
161
  }
162
162
 
163
- //general class applied to search input and button wrapper
163
+ // general class applied to search input and button wrapper
164
164
  .gem-c-search__item {
165
165
  position: relative;
166
166
  display: table-cell;
@@ -3,7 +3,7 @@ $number-circle-size: 30px;
3
3
  $number-circle-size-large: 35px;
4
4
  $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
5
5
 
6
- @mixin step-nav-vertical-line ($line-style: solid) {
6
+ @mixin step-nav-vertical-line($line-style: solid) {
7
7
  content: "";
8
8
  position: absolute;
9
9
  z-index: 2;
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  .gem-c-summary-list--wide-title {
43
- @include govuk-media-query($from: 'tablet') {
43
+ @include govuk-media-query($from: "tablet") {
44
44
  .govuk-summary-list__key {
45
45
  width: 60%;
46
46
  }
@@ -101,7 +101,7 @@
101
101
  }
102
102
 
103
103
  .gem-c-govspeak--inverse {
104
- color: govuk-colour('white');
104
+ color: govuk-colour("white");
105
105
 
106
106
  a {
107
107
  @include govuk-link-common;
@@ -3,10 +3,10 @@
3
3
  @import "components/helpers/govuk-frontend-settings";
4
4
  @import "govuk/base";
5
5
 
6
- @import 'components/mixins/margins';
6
+ @import "components/mixins/margins";
7
7
  // TODO: remove this focus override when govuk_template is no longer used
8
- @import 'components/mixins/govuk-template-link-focus-override';
9
- @import 'components/mixins/css3';
8
+ @import "components/mixins/govuk-template-link-focus-override";
9
+ @import "components/mixins/css3";
10
10
 
11
11
  $gem-secondary-button-colour: #00823b;
12
12
  $gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%);
@@ -6,9 +6,7 @@
6
6
  hide ||= false
7
7
  new_tab ||= false
8
8
 
9
-
10
9
  data_attributes ||= {}
11
- data_attributes[:module] = 'intervention'
12
10
  suggestion_data_attributes ||= {}
13
11
  dismiss_data_attributes ||= {}
14
12
 
@@ -177,8 +177,8 @@ en:
177
177
  navigation_search_heading: Search and popular pages
178
178
  navigation_search_subheading: Search
179
179
  popular_links:
180
- - label: 'Invasion of Ukraine'
181
- href: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
180
+ - label: 'Moving to the UK from Ukraine'
181
+ href: "/guidance/move-to-the-uk-if-youre-from-ukraine"
182
182
  - label: 'Coronavirus (COVID-19)'
183
183
  href: "/coronavirus"
184
184
  - label: Find a job
@@ -4,8 +4,11 @@ module GovukPublishingComponents
4
4
  # Various departments are taking part in a pilot to use a form
5
5
  # rather than direct email for users to request accessible formats. When the pilot
6
6
  # scheme is rolled out further this can be removed.
7
- # Currently the HMRC are participating in the pilot.
8
- EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
7
+ # Currently DfE, DWP and DVSA are participating in the pilot.
8
+ EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com
9
+ alternative.formats@education.gov.uk
10
+ accessible.formats@dwp.gov.uk
11
+ gov.uk.publishing@dvsa.gov.uk].freeze
9
12
 
10
13
  delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
11
14
 
@@ -1,6 +1,8 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class MetaTags
4
+ FORMATS_THAT_MIGHT_INCLUDE_POSTCODES = %w[smart_answer finder local_transaction place special_route transaction].freeze
5
+
4
6
  attr_reader :content_item, :details, :links, :local_assigns, :request
5
7
 
6
8
  def initialize(content_item, local_assigns, request)
@@ -31,6 +33,7 @@ module GovukPublishingComponents
31
33
  meta_tags["govuk:schema-name"] = content_item[:schema_name] if content_item[:schema_name]
32
34
  meta_tags["govuk:content-id"] = content_item[:content_id] if content_item[:content_id]
33
35
  meta_tags["govuk:navigation-page-type"] = content_item[:navigation_page_type] if content_item[:navigation_page_type]
36
+ meta_tags["govuk:navigation-list-type"] = content_item[:navigation_list_type] if content_item[:navigation_list_type]
34
37
  meta_tags["govuk:section"] = content_item[:section] if content_item[:section]
35
38
  meta_tags["govuk:withdrawn"] = "withdrawn" if content_item[:withdrawn_notice].present?
36
39
  meta_tags["govuk:content-has-history"] = "true" if has_content_history?
@@ -148,8 +151,7 @@ module GovukPublishingComponents
148
151
  # document_type
149
152
  return local_assigns[:strip_postcode_pii] if local_assigns.key?(:strip_postcode_pii)
150
153
 
151
- formats_that_might_include_postcodes = %w[smart_answer finder]
152
- formats_that_might_include_postcodes.include?(content_item[:document_type])
154
+ FORMATS_THAT_MIGHT_INCLUDE_POSTCODES.include?(content_item[:document_type])
153
155
  end
154
156
  end
155
157
  end
@@ -2,40 +2,6 @@ module GovukPublishingComponents
2
2
  module Presenters
3
3
  class PublicLayoutHelper
4
4
  FOOTER_NAV = [
5
- {
6
- title: "Coronavirus (COVID-19)",
7
- columns: 2,
8
- items: [
9
- {
10
- href: "/coronavirus",
11
- text: "Coronavirus (COVID-19): guidance and support",
12
- attributes: {
13
- data: {
14
- track_category: "footerClicked",
15
- track_action: "coronavirusLinks",
16
- track_label: "Coronavirus (COVID-19): guidance and support",
17
- },
18
- },
19
- },
20
- ],
21
- },
22
- {
23
- title: "Brexit",
24
- columns: 1,
25
- items: [
26
- {
27
- href: "/brexit",
28
- text: "Check what you need to do",
29
- attributes: {
30
- data: {
31
- track_category: "footerClicked",
32
- track_action: "transitionLinks",
33
- track_label: "Check what you need to do",
34
- },
35
- },
36
- },
37
- ],
38
- },
39
5
  {
40
6
  title: "Services and information",
41
7
  columns: 2,
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "29.2.0".freeze
2
+ VERSION = "29.5.0".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: 29.2.0
4
+ version: 29.5.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: 2022-04-01 00:00:00.000000000 Z
11
+ date: 2022-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -464,7 +464,6 @@ files:
464
464
  - app/assets/javascripts/govuk_publishing_components/components/error-summary.js
465
465
  - app/assets/javascripts/govuk_publishing_components/components/feedback.js
466
466
  - app/assets/javascripts/govuk_publishing_components/components/govspeak.js
467
- - app/assets/javascripts/govuk_publishing_components/components/intervention.js
468
467
  - app/assets/javascripts/govuk_publishing_components/components/layout-header.js
469
468
  - app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
470
469
  - app/assets/javascripts/govuk_publishing_components/components/metadata.js
@@ -1891,7 +1890,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1891
1890
  - !ruby/object:Gem::Version
1892
1891
  version: '0'
1893
1892
  requirements: []
1894
- rubygems_version: 3.3.10
1893
+ rubygems_version: 3.3.12
1895
1894
  signing_key:
1896
1895
  specification_version: 4
1897
1896
  summary: A gem to document components in GOV.UK frontend applications
@@ -1,17 +0,0 @@
1
- window.GOVUK = window.GOVUK || {}
2
- window.GOVUK.Modules = window.GOVUK.Modules || {};
3
-
4
- (function (Modules) {
5
- function Intervention ($module) {
6
- this.$module = $module
7
- }
8
-
9
- Intervention.prototype.init = function () {
10
- if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
11
- // Send a tracking event when this component is shown
12
- window.GOVUK.analytics.trackEvent('interventionBanner', 'interventionShown')
13
- }
14
- }
15
-
16
- Modules.Intervention = Intervention
17
- })(window.GOVUK.Modules)