govuk_publishing_components 23.7.2 → 23.7.7

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: 4b65d39a36c66fce7a8137823bfc36e49e0da0a079aca53915b3d45285cae845
4
- data.tar.gz: 34d3d5d5e175fa52e7ee61e5f259828a60d767d8b19bcc5c002010b3448a531c
3
+ metadata.gz: 4bcf906c61bd12c5c7a7eaa0f3a948c0e17cf23b3590e4640ea3b91fd8b20494
4
+ data.tar.gz: 367dd5afad155e02d182cb8b4b48dc6740a24b7888111b947c4cc486d963bfad
5
5
  SHA512:
6
- metadata.gz: 64e67eaa447d97a8e42304b59c836e08131bde424cff2dac6631fae05bf035aa793d90a6987fd5af1777a6fe00e50d71f5cc176d9fc992ad8e0159ea649792f9
7
- data.tar.gz: 59b458f62f226e28be467e1ae9c8eb4e7b5fde87dfbb09fdfe7eeb40c83190f91ecc1a3702973e459000bcb62318d5f30420c431a3b138ef28dc3807669f57a4
6
+ metadata.gz: 1b5fe1817e673d9d5a2bffcecccf1434d34f1b13643df275fccca45a2f478b4a56f9e27b486713faa6fa5bb48c21a4999b293d5b6aabec468a899a28345bcfef
7
+ data.tar.gz: 8086257659e01ac460d9fdf0cde17fc20378bc24bfcb35bfa00cea04247c2ebacc3237d72f4fe1a2e027c1433fb93c2f65be07fc0fbefcfd7d09c9bd499c9b8e
data/README.md CHANGED
@@ -22,6 +22,7 @@ Components should be added to this gem if they are required in more than one app
22
22
  - [Run the component guide](/docs/run-component-guide.md)
23
23
  - [Move a component from an application to the gem](/docs/moving-components-upstream-into-this-gem.md)
24
24
  - [Publish/release a new version of the gem](/docs/publishing-to-rubygems.md)
25
+ - [Keep this gem in sync with the Design System](/docs/upgrade-govuk-frontend.md)
25
26
 
26
27
  ## Architecture / structure
27
28
 
@@ -39,13 +40,13 @@ There are 2 types of helper classes in this app:
39
40
  GOV.UK Publishing Components also makes [GOV.UK Design System](https://design-system.service.gov.uk/) styles and components available to GOV.UK's frontend applications. This gem consumes [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend) via [Yarn](https://classic.yarnpkg.com/).
40
41
 
41
42
  ## Browser and assistive technology support
43
+
42
44
  GOV.UK Publishing Components shares the same standards in terms of browser and assistive technology support with [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend#browser-and-assistive-technology-support).
43
45
 
44
46
  ## Documentation
45
47
 
46
48
  [See the rubydoc.info documentation](http://www.rubydoc.info/gems/govuk_publishing_components)
47
49
 
48
-
49
50
  ## Working locally
50
51
 
51
52
  ### Install dependencies
@@ -8,6 +8,11 @@
8
8
  var POSTCODE_PATTERN = /[A-PR-UWYZ][A-HJ-Z]?[0-9][0-9A-HJKMNPR-Y]?(?:[\s+]|%20)*[0-9][ABD-HJLNPQ-Z]{2}/gi
9
9
  var DATE_PATTERN = /\d{4}(-?)\d{2}(-?)\d{2}/g
10
10
 
11
+ // specific URL parameters to be redacted from accounts URLs
12
+ var RESET_PASSWORD_TOKEN_PATTERN = /reset_password_token=[a-zA-Z0-9-]+/g
13
+ var UNLOCK_TOKEN_PATTERN = /unlock_token=[a-zA-Z0-9-]+/g
14
+ var STATE_PATTERN = /state=.[^&]+/g
15
+
11
16
  function shouldStripDates () {
12
17
  return ($('meta[name="govuk:static-analytics:strip-dates"]').length > 0)
13
18
  }
@@ -35,6 +40,10 @@
35
40
 
36
41
  pii.prototype.stripPIIFromString = function (string) {
37
42
  var stripped = string.replace(EMAIL_PATTERN, '[email]')
43
+ stripped = stripped.replace(RESET_PASSWORD_TOKEN_PATTERN, 'reset_password_token=[reset_password_token]')
44
+ stripped = stripped.replace(UNLOCK_TOKEN_PATTERN, 'unlock_token=[unlock_token]')
45
+ stripped = stripped.replace(STATE_PATTERN, 'state=[state]')
46
+
38
47
  if (this.stripDatePII === true) {
39
48
  stripped = stripped.replace(DATE_PATTERN, '[date]')
40
49
  }
@@ -215,8 +215,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
215
215
  return !isNaN(parseFloat(val))
216
216
  },
217
217
  stripValue: function (val) {
218
- var re = new RegExp('\\,|£|%|[a-z]', 'gi')
219
- return val.replace(re, '')
218
+ return val.replace(/,|£|%|[a-z]/gi, '')
220
219
  },
221
220
  returnMax: function (values) {
222
221
  var max = 0
@@ -9,6 +9,7 @@
9
9
  @import "govuk_publishing_components/components/helpers/variables";
10
10
  @import "govuk_publishing_components/components/helpers/brand-colours";
11
11
  @import "govuk_publishing_components/components/helpers/link";
12
+ @import "govuk_publishing_components/components/helpers/px-to-em";
12
13
  @import "govuk_publishing_components/components/mixins/govuk-template-link-focus-override";
13
14
  @import "govuk_publishing_components/components/mixins/media-down";
14
15
  @import "govuk_publishing_components/components/mixins/margins";
@@ -39,7 +39,7 @@ $large-input-size: 50px;
39
39
  padding: 6px;
40
40
  margin: 0;
41
41
  width: 100%;
42
- height: $input-size;
42
+ height: em(34, 16);
43
43
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
44
44
  background: govuk-colour("white");
45
45
  border-radius: 0; //otherwise iphones apply an automatic border radius
@@ -40,7 +40,7 @@ $share-button-height: 32px;
40
40
  left: 0;
41
41
  width: $share-button-width;
42
42
  height: $share-button-height;
43
- vertical-align: top;
43
+ line-height: $share-button-height;
44
44
  }
45
45
 
46
46
  .direction-rtl {
@@ -61,7 +61,7 @@ $share-button-height: 32px;
61
61
  }
62
62
  }
63
63
 
64
- $column-width: 150px;
64
+ $column-width: 9.5em;
65
65
 
66
66
  .gem-c-share-links--columns {
67
67
  .gem-c-share-links__list {
@@ -152,7 +152,7 @@
152
152
  }
153
153
 
154
154
  .mc-value-overflow {
155
- text-indent: -99999px !important;
155
+ text-indent: -99999px !important; // stylelint-disable-line declaration-no-important
156
156
  }
157
157
 
158
158
  // Bar labels
@@ -178,7 +178,7 @@
178
178
 
179
179
  .mc-stacked-total {
180
180
  padding: $bar-padding 0;
181
- background-color: transparent !important;
181
+ background-color: transparent !important; // stylelint-disable-line declaration-no-important
182
182
  color: govuk-colour("black");
183
183
  display: inline-block;
184
184
  text-indent: 5px;
@@ -12,10 +12,10 @@
12
12
 
13
13
  @for $i from 1 through 30 {
14
14
  &:nth-child(#{$i}) {
15
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Ccircle cx='125' cy='125' r='100' fill='black' /%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' alignment-baseline='middle' font-family='sans-serif' font-size='100px' fill='white'%3E#{$i}%3C/text%3E%3C/svg%3E");
15
+ background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 250 250' preserveAspectRatio='xMinYMin meet'%3E%3Cg%3E%3Ccircle r='50%25' cx='50%25' cy='50%25' class='circle-back'%3E%3C/circle%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='nta,arial,sans-serif' font-size='8rem' fill='%23ffffff'%3E#{$i}%3C/text%3E%3C/g%3E%3C/svg%3E ");
16
16
  background-repeat: no-repeat;
17
- background-position: left 10px;
18
- background-size: 35px 35px;
17
+ background-position: .2em .7em;
18
+ background-size: 1.4em 1.4em;
19
19
  }
20
20
  }
21
21
  }
@@ -9,6 +9,6 @@
9
9
  &:link:focus,
10
10
  &:visited:focus {
11
11
  @include govuk-focused-text;
12
- color: govuk-colour("black") !important;
12
+ color: govuk-colour("black") !important; // stylelint-disable-line declaration-no-important
13
13
  }
14
14
  }
@@ -6,12 +6,12 @@
6
6
 
7
7
  // Open all of the accordion sections.
8
8
  .govuk-accordion__section-content {
9
- display: block !important;
9
+ display: block !important; // stylelint-disable-line declaration-no-important
10
10
  }
11
11
 
12
12
  // Change the colour from the blue link colour to black.
13
13
  .govuk-accordion__section-button {
14
- color: govuk-colour("black") !important;
14
+ color: govuk-colour("black") !important; // stylelint-disable-line declaration-no-important
15
15
  }
16
16
 
17
17
  // Change the summary subheading size.
@@ -27,5 +27,5 @@
27
27
  // Hide the unusable "Open all" button and the "+" icons.
28
28
  .govuk-accordion__open-all,
29
29
  .govuk-accordion__icon {
30
- display: none !important;
30
+ display: none !important; // stylelint-disable-line declaration-no-important
31
31
  }
@@ -1,5 +1,5 @@
1
1
  name: Subscription links
2
- description: Links to ‘Get email alerts’ and ‘Subscribe to feed’
2
+ description: Links to ‘Get emails’ and ‘Subscribe to feed’
3
3
  body: |
4
4
  <strong>NOTE: This component includes a h2 heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
5
5
  accessibility_criteria: |
@@ -92,7 +92,7 @@ en:
92
92
  step_by_step_nav_related:
93
93
  part_of: "Part of"
94
94
  subscription_links:
95
- email_signup_link_text: "Get email alerts"
95
+ email_signup_link_text: "Get emails"
96
96
  feed_link_text: "Subscribe to feed"
97
97
  subscriptions: "Subscriptions"
98
98
  summary_list:
@@ -14,13 +14,13 @@ module GovukPublishingComponents
14
14
  def email_signup_link_text
15
15
  return @local_assigns[:email_signup_link_text] if @local_assigns[:email_signup_link_text]
16
16
 
17
- I18n.t("govuk_component.subscription_links.email_signup_link_text", default: "Get email alerts")
17
+ I18n.t("components.subscription_links.email_signup_link_text")
18
18
  end
19
19
 
20
20
  def feed_link_text
21
21
  return @local_assigns[:feed_link_text] if @local_assigns[:feed_link_text]
22
22
 
23
- I18n.t("govuk_component.subscription_links.feed_link_text", default: "Subscribe to feed")
23
+ I18n.t("components.subscription_links.feed_link_text")
24
24
  end
25
25
 
26
26
  def component_data_is_valid?
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "23.7.2".freeze
2
+ VERSION = "23.7.7".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: 23.7.2
4
+ version: 23.7.7
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: 2020-11-23 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config