govuk_publishing_components 61.0.3 → 61.1.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 +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +0 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +39 -32
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +7 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34fc86f0b6984bcd2bb2d4669470ff8268cdc8fedb85addeef526236c3f5abcf
|
4
|
+
data.tar.gz: db1347382632d01113fe792d9b2b4b42758417ea2b2a6aeb8fec94dc73d9c8ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe96b53f6e688e0b36555eaeda6ac50b7c9760d4db8db8519920b5d3e07fc59046ec8bdb9a4477f671182ac9820ec4ed16006e4edb9552dd5b3f68b09a2cff9c
|
7
|
+
data.tar.gz: 735c8823a24e2d7de30b3874886bb0a21b39cce18c9bb02daa197834ae4e8912ce9671b64b03c1e3d5d94420ea79037ce35df4768e8deb15fb4343110b898027
|
@@ -36,13 +36,6 @@
|
|
36
36
|
// e.g. 'AB123456A', 'AB 12 34 56 A', 'ab 123456 a', 'ab 12 34 56 a', 'AB+12+34+56+A'
|
37
37
|
var NATIONAL_INSURANCE_NUMBER = /[A-CEGHJ-OPR-TW-Z]{2}(\s+|\++)?(\d{2}(\s+|\++)?){3}[A-D]/gi
|
38
38
|
|
39
|
-
var UK_MOBILE_NUMBER = /07\d{3}[\s%20+]?\d{6,8}/g // 07123 123456 or 07123123456 or 07123+123456 or 07123%20123456
|
40
|
-
var UK_MOBILE_NUMBER_INTERNATIONAL = /(\+|%2B)?447\d{3}[\s%20+]?\d{6,8}/gi // +447123 123456 or +447123123456 or +447123%20123456 or +447123+123456 or %2B447123123456. Plus at start is optional.
|
41
|
-
var UK_LANDLINE_NUMBER = /0[1246]\d{1}[\s%20+]?\d{3,6}[\s%20+]?\d{4,6}/g // 020 123 1234 or 020 1234 1234 or 0201231234 or 02012341234 or 020+123+1234 or 020+1234+1234 or 020%20123%201234 or 020%201234%201234
|
42
|
-
var UK_LANDLINE_NUMBER_2 = /0[1246]\d{3}[\s%20+]\d{6,8}/g // 02123 123456 or 02123+123456 or 02123%20123456
|
43
|
-
var UK_LANDLINE_NUMBER_INTERNATIONAL = /(\+|%2B)?44[1246]\d{1}[\s%20+]?\d{3,6}[\s%20+]?\d{4,6}/g // // +4420 123 1234 or +4420 1234 1234 or +4420+123+1234 or +4420%20123%201234 or %2B4420 123 1234. Plus at start is optional.
|
44
|
-
var UK_LANDLINE_NUMBER_INTERNATIONAL_2 = /(\+|%2B)?44[1246]\d{3}[\s%20+]\d{6,8}/g // +442123 123456 or +442123%20123456 or +442123+123456 or %2B442123+123456. Plus at start is optional.
|
45
|
-
|
46
39
|
function shouldStripDates () {
|
47
40
|
var metas = document.querySelectorAll('meta[name="govuk:ga4-strip-dates"]')
|
48
41
|
return metas.length > 0
|
@@ -116,13 +109,6 @@
|
|
116
109
|
stripped = stripped.replace(VISA_PATTERN_GWF, '[gwf number]')
|
117
110
|
stripped = stripped.replace(VISA_PATTERN_GB, '[gb eori number]')
|
118
111
|
stripped = stripped.replace(NATIONAL_INSURANCE_NUMBER, '[ni number]')
|
119
|
-
stripped = stripped.replace(UK_LANDLINE_NUMBER, '[phone number]')
|
120
|
-
stripped = stripped.replace(UK_LANDLINE_NUMBER_2, '[phone number]')
|
121
|
-
stripped = stripped.replace(UK_LANDLINE_NUMBER_INTERNATIONAL, '[phone number]')
|
122
|
-
stripped = stripped.replace(UK_LANDLINE_NUMBER_INTERNATIONAL_2, '[phone number]')
|
123
|
-
stripped = stripped.replace(UK_MOBILE_NUMBER, '[phone number]')
|
124
|
-
stripped = stripped.replace(UK_MOBILE_NUMBER_INTERNATIONAL, '[phone number]')
|
125
|
-
|
126
112
|
stripped = this.stripQueryStringParameters(stripped)
|
127
113
|
|
128
114
|
if (this.stripDatePII === true) {
|
@@ -12,40 +12,37 @@
|
|
12
12
|
display: table-cell;
|
13
13
|
line-height: 1;
|
14
14
|
width: 36px;
|
15
|
+
vertical-align: middle;
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
@include govuk-media-query($from: tablet) {
|
18
|
+
width: 45px;
|
19
|
+
}
|
20
|
+
}
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
.gem-c-action-link__svg {
|
23
|
+
height: 28px;
|
24
|
+
vertical-align: middle;
|
25
|
+
width: 28px;
|
26
|
+
|
27
|
+
.gem-c-action-link__icon__circle {
|
28
|
+
fill: #eeefef;
|
23
29
|
|
24
|
-
|
25
|
-
|
26
|
-
fill: LinkText;
|
27
|
-
}
|
28
|
-
// stylelint-enable max-nesting-depth
|
30
|
+
@media (forced-colors: active) {
|
31
|
+
fill: LinkText;
|
29
32
|
}
|
33
|
+
}
|
30
34
|
|
31
|
-
|
32
|
-
|
35
|
+
.gem-c-action-link__icon__arrow {
|
36
|
+
fill: #000000;
|
33
37
|
|
34
|
-
|
35
|
-
|
36
|
-
fill: Canvas;
|
37
|
-
}
|
38
|
-
// stylelint-enable max-nesting-depth
|
38
|
+
@media (forced-colors: active) {
|
39
|
+
fill: Canvas;
|
39
40
|
}
|
40
41
|
}
|
41
42
|
|
42
43
|
@include govuk-media-query($from: tablet) {
|
43
|
-
|
44
|
-
|
45
|
-
svg {
|
46
|
-
height: 35px;
|
47
|
-
width: 35px;
|
48
|
-
}
|
44
|
+
height: 35px;
|
45
|
+
width: 35px;
|
49
46
|
}
|
50
47
|
}
|
51
48
|
|
@@ -53,18 +50,16 @@
|
|
53
50
|
padding-top: 2px;
|
54
51
|
width: 30px;
|
55
52
|
|
56
|
-
|
53
|
+
.gem-c-action-link__svg {
|
57
54
|
height: 25px;
|
58
55
|
width: 25px;
|
56
|
+
}
|
59
57
|
|
60
|
-
|
61
|
-
|
58
|
+
.gem-c-action-link__icon__arrow {
|
59
|
+
fill: #272828;
|
62
60
|
|
63
|
-
|
64
|
-
|
65
|
-
fill: currentcolor;
|
66
|
-
}
|
67
|
-
// stylelint-enable max-nesting-depth
|
61
|
+
@media (forced-colors: active) {
|
62
|
+
fill: currentcolor;
|
68
63
|
}
|
69
64
|
}
|
70
65
|
}
|
@@ -75,6 +70,18 @@
|
|
75
70
|
@include govuk-font(19, $weight: bold, $line-height: 1.3);
|
76
71
|
}
|
77
72
|
|
73
|
+
.gem-c-action-link--large {
|
74
|
+
.gem-c-action-link__icon {
|
75
|
+
height: 40px;
|
76
|
+
width: 56px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.gem-c-action-link__svg {
|
80
|
+
height: 40px;
|
81
|
+
width: 40px;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
78
85
|
@include govuk-media-query($media-type: print) {
|
79
86
|
.gem-c-action-link {
|
80
87
|
* {
|
@@ -7,6 +7,7 @@
|
|
7
7
|
inverse ||= false
|
8
8
|
simple ||= false
|
9
9
|
simple_light ||= false
|
10
|
+
large ||= false
|
10
11
|
|
11
12
|
link_classes = %w(govuk-link gem-c-action-link__link gem-print-force-link-styles)
|
12
13
|
link_classes << "govuk-link--inverse" if inverse
|
@@ -15,12 +16,13 @@
|
|
15
16
|
component_helper.add_class("gem-c-action-link")
|
16
17
|
component_helper.add_class("gem-c-action-link--inverse") if inverse
|
17
18
|
component_helper.add_class("gem-c-action-link--simple") if simple
|
19
|
+
component_helper.add_class("gem-c-action-link--large") if large
|
18
20
|
%>
|
19
21
|
<% if text.present? %>
|
20
22
|
<%= tag.div(**component_helper.all_attributes) do %>
|
21
23
|
<% if simple || simple_light %>
|
22
24
|
<span class="gem-c-action-link__icon gem-c-action-link__icon--simple" hidden>
|
23
|
-
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" viewBox="0 0 23 23">
|
25
|
+
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" viewBox="0 0 23 23" class="gem-c-action-link__svg">
|
24
26
|
<g class="gem-c-action-link__icon__arrow">
|
25
27
|
<path d="M14.943 11.795 10.44 7.292 11.733 6l5.795 5.795-5.795 5.795-1.293-1.292 4.503-4.503Z" />
|
26
28
|
<path d="M3.956 10.881h11.485v1.828H3.956v-1.828Z" />
|
@@ -29,7 +31,7 @@
|
|
29
31
|
</span>
|
30
32
|
<% elsif %>
|
31
33
|
<span class="gem-c-action-link__icon" hidden>
|
32
|
-
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" viewBox="0 0 27 27">
|
34
|
+
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" viewBox="0 0 27 27" class="gem-c-action-link__svg">
|
33
35
|
<circle class="gem-c-action-link__icon__circle" cx="13.5" cy="13.5" r="13.5" />
|
34
36
|
<g class="gem-c-action-link__icon__arrow">
|
35
37
|
<path d="m17.701 13.526-3.827-3.828L14.973 8.6l4.926 4.926-4.926 4.926-1.099-1.099 3.827-3.827Z" />
|
@@ -25,3 +25,10 @@ examples:
|
|
25
25
|
text: Getting financial help and keeping your business safe
|
26
26
|
href: "/financial-help"
|
27
27
|
simple: true
|
28
|
+
large:
|
29
|
+
description: For use on the GOV.UK homepage popular links.
|
30
|
+
data:
|
31
|
+
text: This way for cookies
|
32
|
+
href: "/cookies"
|
33
|
+
large: true
|
34
|
+
|