govuk_publishing_components 66.6.1 → 66.7.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/chart.js +1 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +1 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +8 -11
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_chart.scss +60 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +3 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_high-contrast-outline.scss +8 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_index.scss +1 -0
  9. data/app/views/govuk_publishing_components/component_guide/index.html.erb +1 -0
  10. data/app/views/govuk_publishing_components/components/_chart.html.erb +131 -0
  11. data/app/views/govuk_publishing_components/components/_service_navigation.html.erb +5 -3
  12. data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
  13. data/app/views/govuk_publishing_components/components/_tabs.html.erb +4 -4
  14. data/app/views/govuk_publishing_components/components/docs/chart.yml +425 -0
  15. data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +11 -0
  16. data/app/views/govuk_publishing_components/components/docs/tabs.yml +8 -7
  17. data/config/locales/ar.yml +8 -0
  18. data/config/locales/az.yml +8 -0
  19. data/config/locales/be.yml +8 -0
  20. data/config/locales/bg.yml +8 -0
  21. data/config/locales/bn.yml +8 -0
  22. data/config/locales/cs.yml +8 -0
  23. data/config/locales/cy.yml +8 -0
  24. data/config/locales/da.yml +8 -0
  25. data/config/locales/de.yml +8 -0
  26. data/config/locales/dr.yml +8 -0
  27. data/config/locales/el.yml +8 -0
  28. data/config/locales/en.yml +8 -0
  29. data/config/locales/es-419.yml +8 -0
  30. data/config/locales/es.yml +8 -0
  31. data/config/locales/et.yml +8 -0
  32. data/config/locales/fa.yml +8 -0
  33. data/config/locales/fi.yml +8 -0
  34. data/config/locales/fr.yml +8 -0
  35. data/config/locales/gd.yml +8 -0
  36. data/config/locales/gu.yml +8 -0
  37. data/config/locales/he.yml +8 -0
  38. data/config/locales/hi.yml +8 -0
  39. data/config/locales/hr.yml +8 -0
  40. data/config/locales/hu.yml +8 -0
  41. data/config/locales/hy.yml +8 -0
  42. data/config/locales/id.yml +8 -0
  43. data/config/locales/is.yml +8 -0
  44. data/config/locales/it.yml +8 -0
  45. data/config/locales/ja.yml +8 -0
  46. data/config/locales/ka.yml +8 -0
  47. data/config/locales/kk.yml +8 -0
  48. data/config/locales/ko.yml +8 -0
  49. data/config/locales/ku.yml +8 -0
  50. data/config/locales/ky.yml +8 -0
  51. data/config/locales/lt.yml +8 -0
  52. data/config/locales/lv.yml +8 -0
  53. data/config/locales/ms.yml +8 -0
  54. data/config/locales/mt.yml +8 -0
  55. data/config/locales/ne.yml +8 -0
  56. data/config/locales/nl.yml +8 -0
  57. data/config/locales/no.yml +8 -0
  58. data/config/locales/pa-pk.yml +8 -0
  59. data/config/locales/pa.yml +8 -0
  60. data/config/locales/pl.yml +8 -0
  61. data/config/locales/ps.yml +8 -0
  62. data/config/locales/pt.yml +8 -0
  63. data/config/locales/ro.yml +8 -0
  64. data/config/locales/ru.yml +8 -0
  65. data/config/locales/si.yml +8 -0
  66. data/config/locales/sk.yml +8 -0
  67. data/config/locales/sl.yml +8 -0
  68. data/config/locales/so.yml +8 -0
  69. data/config/locales/sq.yml +8 -0
  70. data/config/locales/sr.yml +8 -0
  71. data/config/locales/sv.yml +8 -0
  72. data/config/locales/sw.yml +8 -0
  73. data/config/locales/ta.yml +8 -0
  74. data/config/locales/th.yml +8 -0
  75. data/config/locales/ti.yml +8 -0
  76. data/config/locales/tk.yml +8 -0
  77. data/config/locales/tr.yml +8 -0
  78. data/config/locales/uk.yml +8 -0
  79. data/config/locales/ur.yml +8 -0
  80. data/config/locales/uz.yml +8 -0
  81. data/config/locales/vi.yml +8 -0
  82. data/config/locales/zh-hk.yml +8 -0
  83. data/config/locales/zh-tw.yml +8 -0
  84. data/config/locales/zh.yml +8 -0
  85. data/lib/govuk_publishing_components/presenters/chart_helper.rb +123 -0
  86. data/lib/govuk_publishing_components/presenters/select_helper.rb +3 -3
  87. data/lib/govuk_publishing_components/version.rb +1 -1
  88. data/lib/govuk_publishing_components.rb +1 -0
  89. data/node_modules/chartkick/LICENSE.txt +22 -0
  90. data/node_modules/chartkick/README.md +593 -0
  91. data/node_modules/chartkick/chart.js/chart.esm.js +5 -0
  92. data/node_modules/chartkick/chart.js/package.json +6 -0
  93. data/node_modules/chartkick/dist/chartkick.esm.js +2562 -0
  94. data/node_modules/chartkick/dist/chartkick.js +2570 -0
  95. data/node_modules/chartkick/dist/chartkick.min.js +2 -0
  96. data/node_modules/chartkick/highcharts/highcharts.esm.js +4 -0
  97. data/node_modules/chartkick/highcharts/package.json +6 -0
  98. data/node_modules/chartkick/package.json +50 -0
  99. metadata +18 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15dc9f3d8df89afd884073edc445ee356db19847cadca1102a003d3a63b02ef3
4
- data.tar.gz: 729ba4b1052993fa429a1f43cd1ff2f0832a7ad18fddbac4698aff13a04dbaf3
3
+ metadata.gz: c16d1cf3bd614296e1f3de0308090ef90e04a0eabb7f955029e5f6e3f990c6c4
4
+ data.tar.gz: 13457a51304ef1d835190720b19796bc5776069e50f4205cdcc80cc319d6a010
5
5
  SHA512:
6
- metadata.gz: ce997f38b851195443763ffb14970e5d48f5eb5b46db659959152d00e56cc0e183ce702b33972c9597f82922982e21685b2620bbe1fcbf4aa58dabf555e0dfff
7
- data.tar.gz: 755231805c81bea3994908507f771ae0fe37de4d6412c6bd9cc3cba86b98143e9d69d66d5a0e60dd32323be7cc63e4029c86f36522b27905f67ab69f2d351b48
6
+ metadata.gz: 07f145c79d71a24a06d4bc0fb127a46ec82a7788b605577fd42fc66755f47ab63511a8a7f765960374d1795ea505527de8dd64efd9b36fd86d0c675fec49eed8
7
+ data.tar.gz: 0fa242bea70018bdce3e280dd8abfd9afd603b5c0326320ee648a54a281f02bda6eaec7d29bb332e2947c5bf1f8a4b390d8c3f9d730a689ab7b81a283ba676c6
@@ -0,0 +1 @@
1
+ //= require chartkick
@@ -22,6 +22,7 @@
22
22
  @import "components/button";
23
23
  @import "components/cards";
24
24
  @import "components/character-count";
25
+ @import "components/chart";
25
26
  @import "components/checkboxes";
26
27
  @import "components/contents-list";
27
28
  @import "components/contents-list-with-body";
@@ -1,11 +1,8 @@
1
1
  $thumbnail-width: 99px;
2
2
  $thumbnail-height: 140px;
3
3
  $thumbnail-border-width: 5px;
4
- $thumbnail-background: govuk-colour("white");
5
- $thumbnail-border-colour: rgba(11, 12, 12, .1);
6
- $thumbnail-shadow-colour: rgba(11, 12, 12, .4);
7
- $thumbnail-shadow-width: 0 2px 2px;
8
- $thumbnail-icon-border-colour: govuk-colour("mid-grey");
4
+
5
+ @use "sass:color";
9
6
 
10
7
  .gem-c-attachment {
11
8
  position: relative;
@@ -25,17 +22,17 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
25
22
  width: auto; // for IE8
26
23
  max-width: calc($thumbnail-width / 1.5);
27
24
  height: calc($thumbnail-height / 1.5);
28
- border: $thumbnail-border-colour; // for IE9 & IE10
29
- outline: $thumbnail-border-width solid $thumbnail-border-colour;
30
- background: $thumbnail-background;
31
- box-shadow: $thumbnail-shadow-width $thumbnail-shadow-colour;
32
- fill: $thumbnail-icon-border-colour;
33
- stroke: $thumbnail-icon-border-colour;
25
+ background: govuk-colour("white");
26
+ box-shadow: 0 2px 2px rgba(govuk-colour("black"), .4), 0 0 0 5px color.adjust(govuk-colour("black"), $alpha: -0.9);
27
+ fill: govuk-colour("mid-grey");
28
+ stroke: govuk-colour("mid-grey");
34
29
 
35
30
  @include govuk-media-query($from: tablet) {
36
31
  max-width: $thumbnail-width;
37
32
  height: $thumbnail-height;
38
33
  }
34
+
35
+ @include high-contrast-outline;
39
36
  }
40
37
 
41
38
  .gem-c-attachment__details {
@@ -0,0 +1,60 @@
1
+ .gem-c-chart {
2
+ // slight hack to hide the table automatically added by the charts JS
3
+ // not needed as we already output the table manually in the component
4
+ svg + div:has(table) {
5
+ display: none;
6
+ }
7
+
8
+ .google-visualization-tooltip {
9
+ background-color: govuk-colour("black");
10
+ box-shadow: none;
11
+ border: 0;
12
+
13
+ span {
14
+ color: govuk-colour("white");
15
+ @include govuk-font($size: 16, $weight: bold);
16
+ }
17
+ }
18
+ }
19
+
20
+ .gem-c-chart__table-wrapper {
21
+ overflow: auto;
22
+ }
23
+
24
+ .gem-c-chart__table {
25
+ margin-top: govuk-spacing(3);
26
+
27
+ .govuk-table {
28
+ margin: 0;
29
+ }
30
+
31
+ .govuk-table .govuk-table__header {
32
+ text-align: center;
33
+ }
34
+
35
+ .govuk-table .govuk-table__cell {
36
+ text-align: center;
37
+ }
38
+ }
39
+
40
+ .gem-c-chart .gem-c-chart__a11y-note-link {
41
+ display: none;
42
+ margin-bottom: govuk-spacing(2);
43
+ }
44
+
45
+ .gem-c-chart__heading {
46
+ // Ensure heading content width is constrained to two thirds on desktop
47
+ @include govuk-media-query($from: "desktop") {
48
+ max-width: 66.6667%;
49
+ }
50
+ }
51
+
52
+ .js-enabled {
53
+ .gem-c-chart .gem-c-chart__a11y-note-link {
54
+ display: inline;
55
+ }
56
+
57
+ .gem-c-chart .gem-c-chart__a11y-note-link:focus-within {
58
+ display: inline-block;
59
+ }
60
+ }
@@ -39,8 +39,9 @@
39
39
  width: $thumbnail-width;
40
40
  height: 140px;
41
41
  background: govuk-colour("white");
42
- outline: $govuk-border-width solid color.adjust(govuk-colour("black"), $alpha: -0.9);
43
- box-shadow: 0 2px 2px rgba(govuk-colour("black"), .4);
42
+ box-shadow: 0 2px 2px rgba(govuk-colour("black"), .4), 0 0 0 5px color.adjust(govuk-colour("black"), $alpha: -0.9);
43
+
44
+ @include high-contrast-outline;
44
45
  }
45
46
 
46
47
  svg {
@@ -0,0 +1,8 @@
1
+ @mixin high-contrast-outline {
2
+ color-scheme: dark;
3
+
4
+ @media (forced-colors: active) {
5
+ outline: 5px solid currentcolor;
6
+ forced-color-adjust: auto;
7
+ }
8
+ }
@@ -1,4 +1,5 @@
1
1
  @import "grid-helper";
2
+ @import "high-contrast-outline";
2
3
  @import "margins";
3
4
  @import "prefixed-transform";
4
5
  @import "scale";
@@ -13,6 +13,7 @@
13
13
  <li><a href="/component-guide/audit">View component audits</a></li>
14
14
  <li><a href="/component-guide/applications">View application information</a></li>
15
15
  </ul>
16
+ <p>These components are maintained for www.gov.uk and GOV.UK Publishing services and have not been tested in other contexts. You are still free to use them if you are not developing for GOV.UK or GOV.UK Publishing, however you will need to do work to ensure they function in your code's ecosystem. We cannot provide support on using these components in your service.</p>
16
17
  </div>
17
18
 
18
19
  <div data-module="filter-list" data-filter-label="Search components">
@@ -0,0 +1,131 @@
1
+ <%
2
+ heading_level ||= 2
3
+ table_direction ||= "vertical"
4
+ rows ||= []
5
+ keys ||= []
6
+ chart_type ||= "line"
7
+ download_link ||= false
8
+ heading ||= nil
9
+ description ||= nil
10
+ source ||= false
11
+
12
+ if !heading || !description
13
+ raise ArgumentError, "A heading and description must be provided for accessibility purposes."
14
+ end
15
+
16
+ local_assigns[:margin_bottom] ||= 3
17
+
18
+ chart_id = "chart-id-#{SecureRandom.hex(4)}"
19
+ table_id = "table-id-#{SecureRandom.hex(4)}"
20
+
21
+ @include_script ||= OpenStruct.new(script_included: false)
22
+
23
+ chart_helper = GovukPublishingComponents::Presenters::ChartHelper.new(local_assigns)
24
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
25
+ component_helper.add_class("gem-c-chart")
26
+
27
+ require "chartkick"
28
+ Chartkick.options[:html] = '<div id="%{id}"><noscript><p class="govuk-body">This chart uses JavaScript to work. To view the chart, turn on JavaScript in your browser’s settings.</p></noscript></div>'
29
+ %>
30
+ <% if rows.length > 0 && keys.length > 0 %>
31
+ <% unless @include_script[:script_included] %>
32
+ <%= javascript_include_tag "https://www.gstatic.com/charts/loader.js" %>
33
+ <% @include_script[:script_included] = true %>
34
+ <% end %>
35
+ <%= tag.div(**component_helper.all_attributes) do %>
36
+ <div class="gem-c-chart__heading">
37
+ <%= render "govuk_publishing_components/components/heading", {
38
+ text: heading,
39
+ heading_level: heading_level,
40
+ margin_bottom: 2,
41
+ } %>
42
+ <%= content_tag :p, description, class: "gem-c-chart__a11y-note-1 govuk-body" %>
43
+ </div>
44
+
45
+ <%= content_tag :div, id: chart_id, class: "gem-c-chart__chart" do %>
46
+ <div class="govuk-visually-hidden">
47
+ <%= content_tag :div, t("components.chart.accessibility_html"), class: "gem-c-chart__a11y-note-2" %>
48
+ </div>
49
+ <span class="gem-c-chart__a11y-note-link">
50
+ <%= render "govuk_publishing_components/components/skip_link", {
51
+ text: t("components.chart.accessibility_link", heading: heading),
52
+ href: "##{table_id}",
53
+ } %>
54
+ </span>
55
+
56
+ <% if chart_type == "column" %>
57
+ <%= column_chart(chart_helper.chart_format_data, colors: chart_helper.brand_colours, library: chart_helper.chart_options) %>
58
+ <% elsif chart_type == "bar" %>
59
+ <%= bar_chart(chart_helper.chart_format_data, colors: chart_helper.brand_colours, library: chart_helper.chart_options) %>
60
+ <% else %>
61
+ <%= line_chart(chart_helper.chart_format_data, colors: chart_helper.brand_colours, library: chart_helper.chart_options) %>
62
+ <% end %>
63
+ <% end %>
64
+
65
+ <%= content_tag :p, t("components.chart.source", source: source), class: "gem-c-chart__source govuk-body" if source %>
66
+ <div class="gem-c-chart__table" id="<%= table_id %>">
67
+ <%= render("govuk_publishing_components/components/details",
68
+ title: t("components.chart.table_dropdown"),
69
+ ) do %>
70
+ <div class="gem-c-chart__table-wrapper">
71
+ <table class="govuk-table">
72
+ <caption class="govuk-visually-hidden">
73
+ <%= t("components.chart.accessibility_heading", heading: heading) %>
74
+ </caption>
75
+ <thead class="govuk-table__head">
76
+ <tr class="govuk-table__row">
77
+ <td class="govuk-table__cell"></td>
78
+ <% if table_direction == "horizontal" %>
79
+ <% keys.each do |key| %>
80
+ <th class="govuk-table__header" scope="col">
81
+ <%= key %>
82
+ </th>
83
+ <% end %>
84
+ <% else %>
85
+ <% rows.each do |row| %>
86
+ <th class="govuk-table__header govuk-table__header--stacked" scope="row">
87
+ <%= row[:label] %>
88
+ </th>
89
+ <% end %>
90
+ <% end %>
91
+ </tr>
92
+ </thead>
93
+ <tbody class="govuk-table__body">
94
+ <% if table_direction == "horizontal" %>
95
+ <% rows.each do |row| %>
96
+ <tr class="govuk-table__row">
97
+ <th class="govuk-table__header" scope="row"><%= row[:label] %></th>
98
+ <% row[:values].each do |value| %>
99
+ <td class="govuk-table__cell govuk-table__cell--numeric">
100
+ <%= number_with_delimiter value %>
101
+ </td>
102
+ <% end %>
103
+ </tr>
104
+ <% end %>
105
+ <% else %>
106
+ <% keys.each_with_index do |key, index| %>
107
+ <tr>
108
+ <th class="govuk-table__header" scope="row">
109
+ <%= key %>
110
+ </th>
111
+ <% rows.each do |row| %>
112
+ <td class="govuk-table__cell govuk-table__cell--numeric">
113
+ <%= number_with_delimiter row[:values][index] %>
114
+ </td>
115
+ <% end %>
116
+ </tr>
117
+ <% end %>
118
+ <% end %>
119
+ </tbody>
120
+ </table>
121
+ </div>
122
+ <% end %>
123
+ </div>
124
+
125
+ <% if download_link %>
126
+ <p class="govuk-body">
127
+ <%= link_to "Download chart data", download_link, class: "govuk-link" %>
128
+ </p>
129
+ <% end %>
130
+ <% end %>
131
+ <% end %>
@@ -3,6 +3,7 @@
3
3
  service_name_url ||= nil
4
4
  navigation_items ||= []
5
5
  navigation_aria_label ||= t("components.layout_header.menu")
6
+ toggle_text ||= t("components.service_navigation.menu_toggle")
6
7
  inverse ||= false
7
8
  collapse_navigation_on_mobile = local_assigns.fetch(:collapse_navigation_on_mobile, navigation_items.length > 1)
8
9
 
@@ -13,6 +14,7 @@
13
14
  component_helper.add_data_attribute({ module: "govuk-service-navigation" })
14
15
 
15
16
  full_width ||= false
17
+ nav_id = "navigation-#{SecureRandom.hex(4)}"
16
18
  %>
17
19
  <% if service_name.present? || navigation_items.present? %>
18
20
  <% service_navigation_content = capture do %>
@@ -31,11 +33,11 @@
31
33
  <% if navigation_items.present? %>
32
34
  <nav aria-label="<%= navigation_aria_label %>" class="govuk-service-navigation__wrapper">
33
35
  <% if collapse_navigation_on_mobile %>
34
- <button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="navigation" hidden aria-hidden="true">
35
- Menu
36
+ <button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="<%= nav_id %>" hidden aria-hidden="true">
37
+ <%= toggle_text %>
36
38
  </button>
37
39
  <% end %>
38
- <ul class="govuk-service-navigation__list" id="navigation">
40
+ <ul class="govuk-service-navigation__list" id="<%= nav_id %>">
39
41
  <% navigation_items.each do |nav| %>
40
42
  <%
41
43
  nav_classes = %w(govuk-service-navigation__item)
@@ -103,7 +103,7 @@
103
103
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" width="0" height="0" class="gem-c-share-links__svg">
104
104
  <path fill="currentColor" d="M12.2,24h0c-3.6,0-6.3-1.2-8.2-3.5-1.6-2.1-2.5-4.9-2.5-8.5h0c0-3.6.9-6.4,2.5-8.5C5.8,1.2,8.6,0,12.2,0h0c2.7,0,5,.7,6.8,2.1,1.7,1.3,2.9,3.1,3.5,5.5l-2,.6c-1.1-4-3.9-6-8.3-6s-5.1.9-6.5,2.7c-1.3,1.7-2,4.1-2.1,7.2,0,3.1.7,5.5,2.1,7.2,1.4,1.8,3.6,2.7,6.5,2.7s4.4-.6,5.8-2,1.6-3.6,1.1-4.8c-.3-.7-.9-1.3-1.6-1.7-.2,1.4-.6,2.4-1.3,3.3-.9,1.1-2.1,1.7-3.7,1.8-1.2,0-2.4-.2-3.3-.8-1.1-.7-1.7-1.7-1.8-3,0-1.2.4-2.3,1.3-3.1.9-.8,2.1-1.2,3.6-1.3,1.1,0,2.1,0,3,.1-.1-.7-.4-1.3-.7-1.8-.5-.6-1.3-.9-2.4-.9h0c-.8,0-2,.2-2.7,1.3l-1.8-1.2c1-1.5,2.6-2.3,4.5-2.3h0c3.2,0,5.1,2,5.3,5.4.1,0,.2,0,.3.1,1.5.7,2.6,1.8,3.2,3.1.8,1.8.9,4.8-1.5,7.2-1.9,1.8-4.1,2.6-7.3,2.6h0ZM13.2,12.3h-.7c-1.8.1-3,.9-2.9,2.1,0,1.3,1.5,1.8,2.8,1.8s2.8-.5,3.1-3.7c-.7-.1-1.4-.2-2.2-.2h-.1Z" />
105
105
  </svg>
106
- <% elsif link[:icon] == 'twitter' %>
106
+ <% elsif link[:icon] == 'twitter' || link[:icon] == 'x' %>
107
107
  <svg viewBox="0 0 1200 1227" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" width="0" height="0" class="gem-c-share-links__svg">
108
108
  <path fill="currentColor" d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" />
109
109
  </svg>
@@ -26,7 +26,7 @@
26
26
  <% tabs.each_with_index do |tab, index| %>
27
27
  <li class="govuk-tabs__list-item <%= "govuk-tabs__list-item--selected" if tab[:active] %>">
28
28
  <%
29
- tab[:tab_data_attributes] ||= {}
29
+ data_attributes = tab[:tab_data_attributes] || {}
30
30
  unless disable_ga4
31
31
  ga4_attributes = {
32
32
  event_name: "select_content",
@@ -36,8 +36,8 @@
36
36
  index_section_count: tabs.length,
37
37
  }
38
38
  ga4_attributes[:event_name] = "navigation" if as_links
39
- tab[:tab_data_attributes][:ga4_link] = ga4_attributes if as_links
40
- tab[:tab_data_attributes][:ga4_event] = ga4_attributes unless as_links
39
+ data_attributes[:ga4_link] = ga4_attributes if as_links
40
+ data_attributes[:ga4_event] = ga4_attributes unless as_links
41
41
  end
42
42
 
43
43
  tab_link = "##{tab[:id]}"
@@ -46,7 +46,7 @@
46
46
  <%= link_to(tab[:label],
47
47
  tab_link,
48
48
  class: "govuk-tabs__tab",
49
- data: tab[:tab_data_attributes]) %>
49
+ data: data_attributes) %>
50
50
  </li>
51
51
  <% end %>
52
52
  </ul>