govuk_publishing_components 35.10.0 → 35.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d14e21647dbbbe8c13a60c4ec7aaf3e1058cf97d9e52abb27e749eb63ec0725
4
- data.tar.gz: 76f8f7c6c2b641eb874b59f5b73b4c43c21ee3b834c36bd35a2e561fb25993e8
3
+ metadata.gz: bc2a2a38c6182ba05ad0863d7f1b4d47bda4c31726559b42d3e9095fc7d984a7
4
+ data.tar.gz: 5bfaa98a5688a6e4d6c7f37a3f1b9099bbdb96e051dd83371da64f67040a723a
5
5
  SHA512:
6
- metadata.gz: 0e55ee7ba5da82893c875901e389f4017d8f0b3a30ed3da20d1f9eda6fca500447a0efe4d0cbc78b37c2c4a422e2a74131ece944c95fcbc8d55dbe143046b4db
7
- data.tar.gz: 77f9962cda4b334df7d09c40d5c57f17881de115b3feabc5081202ad2179a193d943303548881375502f7adeb484ddb12caca2b3280adb95bbee7264949dc05a
6
+ metadata.gz: cee017c867881cb78d2c39357c94a6400d4abf6bd725cd8a2449c44044460ab260d6bd7fab87c6246e4ca8340417e04c1855108ad32329bca72d1e846801aaa1
7
+ data.tar.gz: 917e293b5ae5ae0b228f7b66bbae838913213fb8fe4eccf82d92a0d2ae87344b85328e9f2f83296c9de13d22a24c72829e60158c64366dddb8b8d2d4e0332dea
@@ -67,6 +67,13 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
67
67
  &:last-of-type {
68
68
  margin-bottom: 0;
69
69
  }
70
+
71
+ .gem-c-attachment__attribute {
72
+ // From the Design System
73
+ // Automatic wrapping for unbreakable text (e.g. URLs)
74
+ word-wrap: break-word; // Fallback for older browsers only
75
+ overflow-wrap: break-word;
76
+ }
70
77
  }
71
78
 
72
79
  .gem-c-attachment__metadata--compact {
@@ -86,6 +86,10 @@
86
86
  padding-bottom: 0;
87
87
  margin-right: govuk-spacing(2);
88
88
  }
89
+
90
+ @include govuk-media-query($from: desktop) {
91
+ margin-right: govuk-spacing(4);
92
+ }
89
93
  }
90
94
 
91
95
  .gem-c-feedback__prompt-link {
@@ -138,6 +142,10 @@
138
142
  .gem-c-feedback__option-list-item {
139
143
  &:last-child {
140
144
  margin-left: govuk-spacing(2);
145
+
146
+ @include govuk-media-query($from: desktop) {
147
+ margin-left: govuk-spacing(4);
148
+ }
141
149
  }
142
150
  }
143
151
 
@@ -55,3 +55,44 @@
55
55
  }
56
56
  }
57
57
  }
58
+
59
+ // Add rtl table styling when `direction: "rtl"` is set
60
+ .govuk-govspeak.direction-rtl,
61
+ .gem-c-govspeak.direction-rtl {
62
+ table {
63
+ caption {
64
+ text-align: right;
65
+ }
66
+
67
+ th {
68
+ text-align: right;
69
+ }
70
+
71
+ th,
72
+ td {
73
+ padding: govuk-spacing(2) 0 govuk-spacing(2) govuk-spacing(4);
74
+ }
75
+ }
76
+ }
77
+
78
+ // Add rtl table styling when `.direction-rtl` is set on a parent element
79
+ // stylelint-disable max-nesting-depth
80
+ .direction-rtl {
81
+ .govspeak,
82
+ .gem-c-govspeak {
83
+ table {
84
+ caption {
85
+ text-align: right;
86
+ }
87
+
88
+ th {
89
+ text-align: right;
90
+ }
91
+
92
+ th,
93
+ td {
94
+ padding: govuk-spacing(2) 0 govuk-spacing(2) govuk-spacing(4);
95
+ }
96
+ }
97
+ }
98
+ }
@@ -13,20 +13,16 @@
13
13
  link_classes << "govuk-link--no-underline" unless underline_links
14
14
 
15
15
  ga4_tracking ||= false
16
- ga4_data = nil
17
- if ga4_tracking
18
- ga4_data = {
16
+ ga4_data = {
19
17
  event_name: "navigation",
20
18
  type: "content",
21
19
  section: t("components.contents_list.contents", locale: :en) || ""
22
- }.to_json
23
- end
20
+ } if ga4_tracking
24
21
  local_assigns[:aria] ||= {}
25
22
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
26
23
  component_helper.add_class("gem-c-contents-list #{brand_helper.brand_class}")
27
24
  component_helper.add_data_attribute({ module: "gem-track-click" })
28
25
  component_helper.add_data_attribute({ module: "ga4-link-tracker" }) if ga4_tracking
29
- component_helper.add_data_attribute({ ga4_link: ga4_data, ga4_track_links_only: "" }) if ga4_tracking
30
26
  component_helper.add_aria_attribute({ label: t("components.contents_list.contents") }) unless local_assigns[:aria][:label]
31
27
  component_helper.add_role("navigation")
32
28
  -%>
@@ -44,8 +40,12 @@
44
40
  <% contents.each.with_index(1) do |contents_item, position| %>
45
41
  <li class="<%= cl_helper.list_item_classes(contents_item, false) %>" <%= "aria-current=true" if contents_item[:active] %>>
46
42
  <% link_text = format_numbers ? cl_helper.wrap_numbers_with_spans(contents_item[:text]) : contents_item[:text]
47
- ga4_link_data = nil
48
- ga4_link_data = { "index": { "index_link": position }, "index_total": contents.length }.to_json if ga4_tracking
43
+ if ga4_tracking
44
+ ga4_data[:index] = {
45
+ "index_link": position,
46
+ }
47
+ ga4_data[:index_total] = contents.length
48
+ end
49
49
  %>
50
50
  <%= link_to_if !contents_item[:active], link_text, contents_item[:href],
51
51
  class: link_classes,
@@ -56,7 +56,7 @@
56
56
  track_options: {
57
57
  dimension29: contents_item[:text]
58
58
  },
59
- ga4_link: ga4_link_data
59
+ ga4_link: (ga4_tracking ? ga4_data.to_json : nil)
60
60
  }
61
61
  %>
62
62
 
@@ -23,7 +23,8 @@
23
23
  ga4_object = {
24
24
  event_name: "navigation",
25
25
  type: "content",
26
- section: "Top"
26
+ section: "Top",
27
+ action: "opened"
27
28
  }.to_json
28
29
  %>
29
30
  <%= content_tag :div, class: classes, data: { module: "gem-toggle metadata" } do %>
@@ -472,6 +472,28 @@ examples:
472
472
  <li>تابعنا باللغة العربية عبر</li>
473
473
  <li>تابعنا باللغة العربية عبر تويتر </li>
474
474
  </ul>
475
+ <table>
476
+ <thead>
477
+ <tr>
478
+ <th scope="col">السنة</th>
479
+ <th scope="col">الدور</th>
480
+ </tr>
481
+ </thead>
482
+ <tbody>
483
+ <tr>
484
+ <td>2020 - 2022</td>
485
+ <td>وزارة الخارجية والتنمية البريطانية</td>
486
+ </tr>
487
+ <tr>
488
+ <td>2016 - 2020</td>
489
+ <td>القنصل العام البريطاني في القنصلية البريطانية العامة في شونغشينغ</td>
490
+ </tr>
491
+ <tr>
492
+ <td>2012 - 2015</td>
493
+ <td>الدوحة، نائب رئيس البعثة</td>
494
+ </tr>
495
+ </tbody>
496
+ </table>
475
497
  with_youtube_embed:
476
498
  data:
477
499
  block: |
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "35.10.0".freeze
2
+ VERSION = "35.11.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: 35.10.0
4
+ version: 35.11.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: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2023-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -1455,7 +1455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1455
1455
  - !ruby/object:Gem::Version
1456
1456
  version: '0'
1457
1457
  requirements: []
1458
- rubygems_version: 3.4.15
1458
+ rubygems_version: 3.4.17
1459
1459
  signing_key:
1460
1460
  specification_version: 4
1461
1461
  summary: A gem to document components in GOV.UK frontend applications