govuk_publishing_components 70.1.0 → 70.2.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.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/icon-notification.svg +1 -0
  3. data/app/assets/images/govuk_publishing_components/icon-print.svg +1 -0
  4. data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +2 -2
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +36 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +12 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +0 -39
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +0 -31
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +0 -65
  10. data/app/views/govuk_publishing_components/components/_intervention.html.erb +2 -2
  11. data/app/views/govuk_publishing_components/components/_metadata.html.erb +3 -0
  12. data/app/views/govuk_publishing_components/components/_print_link.html.erb +10 -16
  13. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +5 -8
  14. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +5 -30
  15. data/app/views/govuk_publishing_components/components/docs/button.yml +8 -0
  16. data/app/views/govuk_publishing_components/components/docs/metadata.yml +4 -0
  17. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +2 -16
  18. data/lib/govuk_publishing_components/presenters/button_helper.rb +8 -0
  19. data/lib/govuk_publishing_components/presenters/subscription_links_helper.rb +3 -10
  20. data/lib/govuk_publishing_components/version.rb +1 -1
  21. metadata +3 -3
  22. data/app/assets/images/govuk_publishing_components/icon-print-2x.png +0 -0
  23. data/app/assets/images/govuk_publishing_components/icon-print.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a208990405169cdf86868f1f1348fdacf2d42112b7bc2f4076bad3fc979fb296
4
- data.tar.gz: 9be0a018eef194e89559ae804b341b7b9770b47acab3b27fe9d8e039eb9398ef
3
+ metadata.gz: d1a6d5f7de8f25961e21640cb7b451099f2c1d5cf7b885b189a6c7f1db6229dd
4
+ data.tar.gz: 319ae2c442a8165da752b22f7572c8efe3c14d35d9243cf6f76a4c238be8b538
5
5
  SHA512:
6
- metadata.gz: 1496a72e47e1a86373ca73e6f8a4a535c5821899af6ab3b5d20f3bd20b618f20d05df9dae456d34f56616bca48600d172a384587b70147b263dce51faa0cdd4f
7
- data.tar.gz: 053e638e9b073f6a49cbe4f06c3e9d83c04e1ea350c4fc1d1d456401280aeaa635408e43ff0d2ae78e478b262a151f5609fc29dc491f27796a36b58667bbd3d9
6
+ metadata.gz: 0ca7d6d4464fc5d4e604619e44f7c4e0cb8c579e12caa9c0d1b15ecc8adf712fc72677244f6253ff43dc60e36c8ddcc0a0ff3e20630d80ccf1eac771d824133e
7
+ data.tar.gz: 8cabc09cbdbe57bdf87a68b141a58e9a199cfc47a6ed844c296a862214392a52444bb5a1c28aab06103250caf50d27c11d0524afdaa5a424527150d513f55f23
@@ -0,0 +1 @@
1
+ <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334"><path fill="currentColor" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z" /></svg>
@@ -0,0 +1 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_30_240)"><path d="M7.86133 1H13.4766V7H4.49219V4.02H7.86133V1ZM4.49219 10H13.4766V17H4.49219V10ZM5.61523 12H12.3535V11H5.61523V12ZM5.61523 14H12.3535V13H5.61523V14ZM5.61523 16H12.3535V15H5.61523V16Z" fill="white"/><path d="M12.3535 16H5.61523V15H12.3535V16ZM14.5996 7H17.9688V14H14.5996V18H3.36914V14H0V7H3.36914V3H4.49219V2H5.61523V1H6.73828V0H14.5996V7ZM13.4766 10H4.49219V17H13.4766V10ZM13.4766 1H7.86133V4.02H4.49219V7H13.4766V1ZM12.3535 13H5.61523V14H12.3535V13ZM12.3535 11H5.61523V12H12.3535V11Z" fill="#0B0C0C"/></g><defs><clipPath id="clip0_30_240"><rect width="17.9688" height="18" fill="white"/></clipPath></defs></svg>
@@ -37,11 +37,11 @@
37
37
  // If response returns active, user has subscribed to notifications
38
38
  if (active === true) {
39
39
  if (customText) {
40
- this.$module.querySelector('.gem-c-single-page-notication-button__text').textContent = customUnsubscribeText
40
+ this.$module.querySelector('.gem-c-button__outline--notification').textContent = customUnsubscribeText
41
41
  }
42
42
  } else {
43
43
  if (customText) {
44
- this.$module.querySelector('.gem-c-single-page-notication-button__text').textContent = customSubscribeText
44
+ this.$module.querySelector('.gem-c-button__outline--notification').textContent = customSubscribeText
45
45
  }
46
46
  }
47
47
  }
@@ -101,6 +101,42 @@
101
101
  }
102
102
  }
103
103
 
104
+ .gem-c-button__outline {
105
+ $gem-c-button-icon-background-width: 18px;
106
+ $gem-c-button-icon-background-height: 18px;
107
+
108
+ border: 1px solid govuk-colour("black", $variant: "tint-25");
109
+ color: govuk-functional-colour(link);
110
+ cursor: pointer;
111
+ background: no-repeat govuk-spacing(2) 50%;
112
+ background-size: $gem-c-button-icon-background-width $gem-c-button-icon-background-height;
113
+ margin: govuk-spacing(0);
114
+ padding: govuk-spacing(2) govuk-spacing(2) govuk-spacing(2) (govuk-spacing(4) + $gem-c-button-icon-background-width);
115
+ text-decoration: none;
116
+ box-shadow: none;
117
+ @include govuk-font(16);
118
+
119
+ &:hover {
120
+ color: govuk-colour("black");
121
+ background-color: govuk-colour("black", $variant: "tint-95");
122
+ }
123
+
124
+ &:focus,
125
+ &:active {
126
+ background-color: govuk-functional-colour(focus);
127
+ border-color: transparent;
128
+ @include govuk-focused-text;
129
+ }
130
+ }
131
+
132
+ .gem-c-button__outline--print {
133
+ background-image: url("govuk_publishing_components/icon-print.svg");
134
+ }
135
+
136
+ .gem-c-button__outline--notification {
137
+ background-image: url("govuk_publishing_components/icon-notification.svg");
138
+ }
139
+
104
140
  @include govuk-media-query($media-type: print) {
105
141
  .gem-c-button {
106
142
  @include govuk-font(16);
@@ -10,6 +10,18 @@
10
10
  }
11
11
  }
12
12
 
13
+ .gem-c-intervention__dismiss-link-text {
14
+ text-decoration: underline;
15
+ }
16
+
17
+ .gem-c-intervention__dismiss-link-text:hover {
18
+ text-decoration-thickness: max(3px, .1875rem, .12em); // Same as .govuk-link
19
+ }
20
+
21
+ .gem-c-intervention__dismiss-link:focus .gem-c-intervention__dismiss-link-text, .gem-c-intervention__dismiss-link:hover {
22
+ text-decoration: none;
23
+ }
24
+
13
25
  .gem-c-intervention--image {
14
26
  border-left: 0;
15
27
  display: flex;
@@ -14,42 +14,3 @@ $gem-c-print-link-background-height: 18px;
14
14
  display: block;
15
15
  }
16
16
  }
17
-
18
- .gem-c-print-link__link,
19
- .gem-c-print-link__button {
20
- background: url("govuk_publishing_components/icon-print.png") no-repeat govuk-spacing(2) 50%;
21
- background-size: $gem-c-print-link-background-width $gem-c-print-link-background-height;
22
- padding: govuk-spacing(2) govuk-spacing(2) govuk-spacing(2) (govuk-spacing(4) + $gem-c-print-link-background-width);
23
- text-decoration: none;
24
-
25
- @include govuk-device-pixel-ratio($ratio: 2) {
26
- background-image: url("govuk_publishing_components/icon-print-2x.png");
27
- }
28
-
29
- &:hover {
30
- background-color: govuk-colour("black", $variant: "tint-95");
31
- }
32
- }
33
-
34
- .gem-c-print-link__link {
35
- box-shadow: inset 0 0 0 1px govuk-colour("black", $variant: "tint-25");
36
-
37
- &:focus {
38
- border: 0;
39
- box-shadow: 0 $govuk-focus-width govuk-functional-colour(text);
40
- }
41
- }
42
-
43
- .gem-c-print-link__button {
44
- border: 1px solid govuk-colour("black", $variant: "tint-25");
45
- color: govuk-functional-colour(link);
46
- cursor: pointer;
47
- margin: govuk-spacing(0);
48
- @include govuk-font(16);
49
-
50
- &:focus {
51
- background-color: govuk-functional-colour(focus);
52
- border-color: transparent;
53
- @include govuk-focused-text;
54
- }
55
- }
@@ -1,34 +1,3 @@
1
- .gem-c-single-page-notification-button__submit {
2
- padding: govuk-spacing(2);
3
- margin: govuk-spacing(0);
4
- border: 1px solid govuk-colour("black", $variant: "tint-25");
5
- color: govuk-functional-colour(link);
6
- cursor: pointer;
7
- background: none;
8
- @include govuk-font(16);
9
-
10
- &:focus {
11
- border-color: transparent;
12
- @include govuk-focused-text;
13
- }
14
-
15
- &:hover {
16
- background-color: govuk-colour("black", $variant: "tint-95");
17
- color: govuk-functional-colour(link-hover);
18
-
19
- &:focus {
20
- color: govuk-functional-colour(text);
21
- box-shadow: 0 $govuk-focus-width govuk-functional-colour(text);
22
- }
23
- }
24
- }
25
-
26
- .gem-c-single-page-notification-button__icon {
27
- color: govuk-colour("black");
28
- vertical-align: top;
29
- margin-right: govuk-spacing(1);
30
- }
31
-
32
1
  .govuk-frontend-supported .gem-c-single-page-notification-button.js-personalisation-enhancement {
33
2
  opacity: 0;
34
3
 
@@ -53,60 +53,6 @@
53
53
  }
54
54
  }
55
55
 
56
- .gem-c-subscription-links__item--button {
57
- cursor: pointer;
58
- display: none;
59
- padding: govuk-spacing(2);
60
- border: 1px solid $gem-quiet-button-colour;
61
- background-color: $gem-secondary-button-background-colour;
62
- @include govuk-font(19, $weight: bold);
63
-
64
- .govuk-frontend-supported & {
65
- display: inline-block;
66
- }
67
-
68
- &:not(.brand__color) {
69
- color: govuk-functional-colour(link);
70
- }
71
-
72
- &:hover {
73
- color: govuk-functional-colour(link-hover);
74
- }
75
-
76
- &:visited,
77
- &:active,
78
- &:focus {
79
- text-decoration: none;
80
- }
81
-
82
- &:focus {
83
- color: govuk-functional-colour(focus-text);
84
- border: 1px solid govuk-functional-colour(focus);
85
- outline: 3px solid transparent;
86
- }
87
-
88
- &:hover:not(:focus) {
89
- background-color: $gem-secondary-button-hover-background-colour;
90
- text-decoration: none;
91
- }
92
- }
93
-
94
- .gem-c-subscription-links__feed-box {
95
- padding: govuk-spacing(3);
96
- margin-bottom: govuk-spacing(3);
97
- background: govuk-colour("black", $variant: "tint-95");
98
-
99
- .govuk-frontend-supported &.js-hidden {
100
- display: none;
101
- }
102
- }
103
-
104
- .gem-c-subscription-links__feed-hidden-description {
105
- .govuk-frontend-supported & {
106
- @include govuk-visually-hidden;
107
- }
108
- }
109
-
110
56
  .gem-c-subscription-links__icon {
111
57
  margin-right: govuk-spacing(1);
112
58
  color: govuk-colour("black");
@@ -116,14 +62,3 @@
116
62
  transform: scale(.9);
117
63
  transform-origin: bottom left;
118
64
  }
119
-
120
- .gem-c-subscription-links--with-feed-box {
121
- .gem-c-subscription-links__item--link {
122
- padding: govuk-spacing(2) govuk-spacing(2) govuk-spacing(2) 0;
123
- border: 1px solid transparent;
124
-
125
- &:focus {
126
- border-bottom-color: transparent;
127
- }
128
- }
129
- }
@@ -70,7 +70,7 @@
70
70
 
71
71
  <% if dismiss_text %>
72
72
  <%= tag.p class: "govuk-body govuk-!-display-none-print", data: dismiss_data_attributes do %>
73
- <%= tag.a class: "govuk-link js-dismiss-link", href: dismiss_href, data: dismiss_link_data_attributes do %>
73
+ <%= tag.a class: "govuk-link govuk-link--no-underline gem-c-intervention__dismiss-link js-dismiss-link", href: dismiss_href, data: dismiss_link_data_attributes do %>
74
74
  <svg class="gem-c-intervention__dismiss-icon"
75
75
  width="19" height="19" viewBox="0 0 19 19"
76
76
  aria-hidden="true"
@@ -79,7 +79,7 @@
79
79
  <path d="M13.3477 5.4209L9.67383 9.09473L6 5.4209" />
80
80
  <path d="M6 13.4209L9.67383 9.74707L13.3477 13.4209" />
81
81
  </svg>
82
- <%= dismiss_text %>
82
+ <span class="gem-c-intervention__dismiss-link-text"><%= dismiss_text %></span>
83
83
  <% end %>
84
84
  <% end %>
85
85
  <% end %>
@@ -9,6 +9,7 @@
9
9
 
10
10
  page_history ||= []
11
11
  page_history = Array(page_history)
12
+ page_history_details_ga4 ||= {}
12
13
 
13
14
  history ||= nil
14
15
  first_published ||= nil
@@ -89,6 +90,8 @@
89
90
  title: t("components.metadata.show_all_updates", locale: :en),
90
91
  small: true,
91
92
  inverse: inverse,
93
+ ga4_attributes: page_history_details_ga4,
94
+ disable_ga4: disable_ga4,
92
95
  } do %>
93
96
  <ol class="gem-c-metadata__change-history">
94
97
  <% page_history.each do |change| %>
@@ -2,7 +2,7 @@
2
2
  text ||= t("components.print_link.text")
3
3
  href ||= nil
4
4
  child_data_attributes ||= {}
5
- require_js ||= href.nil?
5
+ require_js = href.nil?
6
6
  local_assigns[:margin_bottom] ||= 3
7
7
 
8
8
  ((child_data_attributes[:module] ||= "") << " " << (require_js ? "print-link" : "button")).strip!
@@ -16,19 +16,13 @@
16
16
  component_helper.add_class("gem-c-print-link--show-without-js") unless require_js
17
17
  %>
18
18
  <%= tag.div(**component_helper.all_attributes) do %>
19
- <% if require_js %>
20
- <%= content_tag(:button, text, {
21
- class: child_classes,
22
- data: child_data_attributes,
23
- }) %>
24
- <% else %>
25
- <%= link_to(
26
- text,
27
- href,
28
- class: child_classes,
29
- rel: "alternate",
30
- data: child_data_attributes,
31
- role: "button",
32
- ) %>
33
- <% end %>
19
+ <%= render "govuk_publishing_components/components/button", {
20
+ text: text,
21
+ href: href,
22
+ type: "button",
23
+ print_button: true,
24
+ data_attributes: child_data_attributes,
25
+ rel: "alternate",
26
+ margin_bottom: 0,
27
+ } %>
34
28
  <% end %>
@@ -18,9 +18,6 @@
18
18
  component_helper.add_class("govuk-!-display-none-print")
19
19
  component_helper.add_data_attribute({ module: ga4_data_attributes[:module] }) if ga4_data_attributes
20
20
  %>
21
- <% button_text = capture do %>
22
- <svg class="gem-c-single-page-notification-button__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334"><path fill="currentColor" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z" /></svg><span class="gem-c-single-page-notication-button__text"><%= spnb_helper.button_text %></span>
23
- <% end %>
24
21
  <%= tag.div(**component_helper.all_attributes) do %>
25
22
  <%= tag.form action: spnb_helper.form_action, method: "POST" do %>
26
23
  <input type="hidden" name="base_path" value="<%= spnb_helper.base_path %>">
@@ -28,12 +25,12 @@
28
25
  <input type="hidden" name="<%= spnb_helper.skip_account_param %>" value="true">
29
26
  <input type="hidden" name="link" value="<%= spnb_helper.base_path %>">
30
27
  <% end %>
31
- <%= content_tag(:button, button_text, {
32
- class: "gem-c-single-page-notification-button__submit",
33
- type: "submit",
34
- data: {
28
+ <%= render "govuk_publishing_components/components/button", {
29
+ text: spnb_helper.button_text,
30
+ notification_button: true,
31
+ data_attributes: {
35
32
  ga4_link: ga4_link_data_attributes,
36
33
  },
37
- }) %>
34
+ } %>
38
35
  <% end %>
39
36
  <% end if spnb_helper.base_path %>
@@ -1,13 +1,8 @@
1
1
  <%
2
- brand ||= false
3
- brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
-
5
2
  sl_helper = GovukPublishingComponents::Presenters::SubscriptionLinksHelper.new(local_assigns)
6
3
 
7
4
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
8
- component_helper.add_class("gem-c-subscription-links govuk-!-display-none-print #{brand_helper.brand_class}")
9
- component_helper.add_class("gem-c-subscription-links--with-feed-box") if sl_helper.feed_link_box_value
10
- component_helper.add_data_attribute({ module: "gem-toggle" }) if sl_helper.feed_link_box_value
5
+ component_helper.add_class("gem-c-subscription-links govuk-!-display-none-print")
11
6
 
12
7
  hide_heading ||= false
13
8
 
@@ -27,46 +22,26 @@
27
22
  </svg><%= sl_helper.email_signup_link_text %>
28
23
  <% end %>
29
24
  <%= link_to email_link_text, sl_helper.email_signup_link, {
30
- class: "govuk-link gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
25
+ class: "govuk-link gem-c-subscription-links__item gem-c-subscription-links__item--link",
31
26
  data: sl_helper.email_signup_link_data_attributes,
32
27
  lang: email_signup_link_text_locale,
33
28
  } %>
34
29
  </li>
35
30
  <% end %>
36
31
 
37
- <% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
32
+ <% if sl_helper.feed_link %>
38
33
  <li class="gem-c-subscription-links__list-item<%= " gem-c-subscription-links__list-item--small" if local_assigns[:small_form] == true %>">
39
34
  <% feed_link_text = capture do %>
40
35
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z" />
41
36
  </svg><%= sl_helper.feed_link_text %>
42
37
  <% end %>
43
- <%= tag.button(feed_link_text,
44
- class: "govuk-link govuk-link--no-underline gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
45
- data: sl_helper.feed_link_data_attributes,
46
- lang: feed_link_text_locale,
47
- ) if sl_helper.feed_link_box_value %>
48
38
  <%= link_to(feed_link_text, sl_helper.feed_link,
49
- class: "govuk-link gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
39
+ class: "govuk-link gem-c-subscription-links__item gem-c-subscription-links__item--link",
50
40
  data: sl_helper.feed_link_data_attributes,
51
41
  lang: feed_link_text_locale
52
- ) unless sl_helper.feed_link_box_value %>
42
+ ) %>
53
43
  </li>
54
44
  <% end %>
55
45
  </ul>
56
-
57
- <% if sl_helper.feed_link_box_value %>
58
- <div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
59
- <h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
60
- <div lang="en">
61
- <%= render "govuk_publishing_components/components/input", {
62
- label: {
63
- text: t("components.subscription_links.feed_link_label"),
64
- },
65
- name: "feed-reader-box",
66
- value: feed_link_box_value,
67
- } %>
68
- </div>
69
- </div>
70
- <% end %>
71
46
  <% end %>
72
47
  <% end %>
@@ -64,6 +64,14 @@ examples:
64
64
  data:
65
65
  text: Secondary solid button
66
66
  secondary_solid: true
67
+ print_button:
68
+ data:
69
+ text: Print this page
70
+ print_button: true
71
+ notification_button:
72
+ data:
73
+ text: Get emails about this page
74
+ notification_button: true
67
75
  destructive_button:
68
76
  data:
69
77
  text: Destructive button
@@ -42,6 +42,8 @@ examples:
42
42
  This will set up an expandable section on the page, with a top border, to let users toggle the display of the page history. It also includes a hidden H2 heading of 'Updates to this page'. This heading will not be included if one is passed to the component using the `title` option.
43
43
 
44
44
  This example includes an expandable 'part of' section to show both toggling elements working together in one component instance.
45
+
46
+ GA4 attributes can also be passed to the 'Show all updates' details component to override the default tracking attributes on that component using `page_history_details_ga4`.
45
47
  data:
46
48
  border_top: true
47
49
  part_of:
@@ -68,6 +70,8 @@ examples:
68
70
  - display_time: 14th October 2000
69
71
  note: Updated information on pupil premium reviews and what information schools need to publish on their websites.
70
72
  timestamp: 2000-10-14T15:42:37.000+00:00
73
+ page_history_details_ga4:
74
+ section: Footer
71
75
  extensive:
72
76
  data:
73
77
  from:
@@ -32,20 +32,6 @@ examples:
32
32
  email_signup_link_text: 'Get notifications'
33
33
  feed_link: '/foreign-travel-advice/singapore.atom'
34
34
  feed_link_text: 'View feed'
35
- with_copyable_feed_link:
36
- description: |
37
- This option changes the feed link to a toggle control, which opens a hidden element containing an input prepopulated with the value passed to the component, usually a URL to an atom feed. This uses the [form input](/component-guide/input) component.
38
-
39
- Note that this option overrides the feed_link option, so if both are passed feed_link is ignored. Note that a value for email_signup_link can also be passed as normal.
40
- data:
41
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
42
- feed_link_box_value: 'https://www.gov.uk/government/organisations/attorney-generals-office.atom'
43
- with_number_10_branding:
44
- description: Organisation [colour branding](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/component_branding.md) can be added to the component as shown.
45
- data:
46
- brand: 'prime-ministers-office-10-downing-street'
47
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
48
- feed_link: '/foreign-travel-advice/singapore.atom'
49
35
  with_data_attributes_on_links:
50
36
  description: Data attributes can be passed for each link as shown.
51
37
  data:
@@ -53,9 +39,9 @@ examples:
53
39
  email_signup_link_data_attributes: {
54
40
  an_attribute: some_value
55
41
  }
56
- feed_link_box_value: 'https://www.gov.uk/government/organisations/attorney-generals-office.atom'
42
+ feed_link: '/foreign-travel-advice/singapore.atom'
57
43
  feed_link_data_attributes: {
58
- an_attribute: some_value
44
+ an_attribute: some_other_value
59
45
  }
60
46
  as_small_form:
61
47
  data:
@@ -19,6 +19,8 @@ module GovukPublishingComponents
19
19
  :secondary,
20
20
  :secondary_quiet,
21
21
  :secondary_solid,
22
+ :print_button,
23
+ :notification_button,
22
24
  :destructive,
23
25
  :name,
24
26
  :value,
@@ -51,6 +53,8 @@ module GovukPublishingComponents
51
53
  @secondary = local_assigns[:secondary]
52
54
  @secondary_quiet = local_assigns[:secondary_quiet]
53
55
  @secondary_solid = local_assigns[:secondary_solid]
56
+ @print_button = local_assigns[:print_button]
57
+ @notification_button = local_assigns[:notification_button]
54
58
  @destructive = local_assigns[:destructive]
55
59
  @name = local_assigns[:name]
56
60
  @value = local_assigns[:value]
@@ -125,6 +129,10 @@ module GovukPublishingComponents
125
129
  css_classes << "gem-c-button--secondary-quiet" if secondary_quiet
126
130
  css_classes << "govuk-button--secondary" if secondary_solid
127
131
  css_classes << "govuk-button--warning" if destructive
132
+
133
+ css_classes = %w[gem-c-button__outline gem-c-button__outline--print] if print_button
134
+ css_classes = %w[gem-c-button__outline gem-c-button__outline--notification] if notification_button
135
+
128
136
  if margin_bottom && !info_text
129
137
  margin_class = get_margin_bottom(margin_bottom, false)
130
138
  css_classes << margin_class
@@ -1,14 +1,12 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class SubscriptionLinksHelper
4
- attr_reader :feed_box_id, :email_signup_link, :email_signup_link_data_attributes, :feed_link_box_value
4
+ attr_reader :email_signup_link, :email_signup_link_data_attributes
5
5
 
6
6
  def initialize(local_assigns)
7
7
  @local_assigns = local_assigns
8
- @feed_box_id = "feed-reader-#{SecureRandom.hex(2)}"
9
8
  @email_signup_link = @local_assigns[:email_signup_link]
10
9
  @email_signup_link_data_attributes = @local_assigns[:email_signup_link_data_attributes]
11
- @feed_link_box_value = @local_assigns[:feed_link_box_value]
12
10
  end
13
11
 
14
12
  def email_signup_link_text
@@ -24,7 +22,7 @@ module GovukPublishingComponents
24
22
  end
25
23
 
26
24
  def component_data_is_valid?
27
- email_signup_link.present? || feed_link.present? || feed_link_box_value.present?
25
+ email_signup_link.present? || feed_link.present?
28
26
  end
29
27
 
30
28
  def tracking_is_present?
@@ -32,16 +30,11 @@ module GovukPublishingComponents
32
30
  end
33
31
 
34
32
  def feed_link
35
- return "#" if feed_link_box_value
36
-
37
33
  @local_assigns[:feed_link]
38
34
  end
39
35
 
40
36
  def feed_link_data_attributes
41
- data = @local_assigns[:feed_link_data_attributes] || {}
42
- data[:controls] = feed_box_id if feed_link_box_value
43
- data[:expanded] = "false" if feed_link_box_value
44
- data
37
+ @local_assigns[:feed_link_data_attributes] || {}
45
38
  end
46
39
  end
47
40
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "70.1.0".freeze
2
+ VERSION = "70.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 70.1.0
4
+ version: 70.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -456,8 +456,8 @@ files:
456
456
  - app/assets/images/govuk_publishing_components/icon-close.svg
457
457
  - app/assets/images/govuk_publishing_components/icon-file-download.svg
458
458
  - app/assets/images/govuk_publishing_components/icon-important.svg
459
- - app/assets/images/govuk_publishing_components/icon-print-2x.png
460
- - app/assets/images/govuk_publishing_components/icon-print.png
459
+ - app/assets/images/govuk_publishing_components/icon-notification.svg
460
+ - app/assets/images/govuk_publishing_components/icon-print.svg
461
461
  - app/assets/images/govuk_publishing_components/icon-search.svg
462
462
  - app/assets/images/govuk_publishing_components/image-card-srcset/cop26-170.jpg
463
463
  - app/assets/images/govuk_publishing_components/image-card-srcset/cop26-240.jpg