govuk_publishing_components 23.5.1 → 23.6.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: 68acf2ab68688ebffe315cfe437a0e5bbaecb52c9b5e5e7b651730ff7470ad39
4
- data.tar.gz: cf7739918f368db0190aab556f648bfeea71e68f735b6f6bdab63a6c3adae7c9
3
+ metadata.gz: 34b79bd902906ae48c22d4f01510b329d279a953d607ef7633fcd29d44dbd3ef
4
+ data.tar.gz: e4bf0609433d8308708a96da4b9a6e9f2960e3551960af806c12be5bb74be16d
5
5
  SHA512:
6
- metadata.gz: 3a68c2256473279092d1c77fd0f5aa3333eb7b6481b6137a2a3edae7ff96a74261b1ed0dc423715e82b9c0c1a7498b3ed6f27deb2f515fd163c7260e765b9333
7
- data.tar.gz: 470d0f9f8fac2694021524c2f04b5e1618f5391ea10af5cad91fa7fe22faa39dc6b8a4dfe5029945455c18ad76254b9e6aa6cf0300cde1fc5b9351a0f3c98620
6
+ metadata.gz: 285ae326a806521d45584efced7930c995009d6577820a248fec57fb4f0974d7e2eeaaabd7ba2e245beac066fe16e1c398a2ffc6590141e272fb1c2807adbf96
7
+ data.tar.gz: c2e148283ce68ef51963f2b9a437aa754bb65f5baa9aadc712316605e3028c3d0714d1db6f36214f77be558755464d013bb63ede138764376076376cb484de76
@@ -413,7 +413,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
413
413
  }
414
414
  } else {
415
415
  // if it's a stacked graph
416
- if (spanWidth > cellWidth && cellVal > 0) {
416
+ if ((spanWidth > cellWidth && cellVal > 0) || (cellVal < 1)) {
417
417
  $cell.classList.add('mc-value-overflow')
418
418
  }
419
419
  }
@@ -22,10 +22,9 @@
22
22
  <div class="component-markdown">
23
23
  <%= raw(@component_doc.html_body) %>
24
24
  </div>
25
-
26
- <p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
27
25
  </div>
28
26
  <% end %>
27
+ <p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
29
28
  </div>
30
29
  </div>
31
30
 
@@ -5,6 +5,7 @@
5
5
  hide_order_copy_link ||= false
6
6
  attributes = []
7
7
  data_attributes ||= {}
8
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
8
9
 
9
10
  if attachment.content_type_name
10
11
  content = if attachment.content_type_abbr
@@ -50,11 +51,11 @@
50
51
  <% end %>
51
52
 
52
53
  <%= tag.div class: "gem-c-attachment__details" do %>
53
- <%= tag.h2 class: "gem-c-attachment__title" do %>
54
+ <%= content_tag(shared_helper.get_heading_level, class: "gem-c-attachment__title") do %>
54
55
  <%= link_to attachment.title, attachment.url,
55
- class: "govuk-link gem-c-attachment__link",
56
- target: target,
57
- data: data_attributes %>
56
+ class: "govuk-link gem-c-attachment__link",
57
+ target: target,
58
+ data: data_attributes %>
58
59
  <% end %>
59
60
 
60
61
  <% if attachment.reference.present? %>
@@ -158,3 +158,13 @@ examples:
158
158
  unique_reference: "2942"
159
159
  unnumbered_hoc_paper: true
160
160
  hide_order_copy_link: true
161
+ with_custom_heading_level:
162
+ description: Default is `h2`.
163
+ data:
164
+ heading_level: 3
165
+ attachment:
166
+ title: "Department for Transport information asset register"
167
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/747661/department-for-transport-information-asset-register.csv
168
+ filename: department-for-transport-information-asset-register.csv
169
+ content_type: text/csv
170
+ file_size: 20000
@@ -236,6 +236,47 @@ examples:
236
236
  </tr>
237
237
  </tbody>
238
238
  </table>
239
+ stacked_chart:
240
+ data:
241
+ block: |
242
+ <table class="js-barchart-table mc-stacked mc-auto-outdent">
243
+ <thead>
244
+ <tr>
245
+ <th scope="col">Colours</th>
246
+ <th scope="col">Fruits</th>
247
+ <th scope="col">Vegetables</th>
248
+ <th scope="col">Beans</th>
249
+ <th scope="col">Nuts</th>
250
+ <th scope="col">Total</th>
251
+ </tr>
252
+ </thead>
253
+ <tbody>
254
+ <tr>
255
+ <td>Red</td>
256
+ <td>23</td>
257
+ <td>9</td>
258
+ <td>2</td>
259
+ <td>1</td>
260
+ <td>35</td>
261
+ </tr>
262
+ <tr>
263
+ <td>Green</td>
264
+ <td>5</td>
265
+ <td>33</td>
266
+ <td>8</td>
267
+ <td>0</td>
268
+ <td>46</td>
269
+ </tr>
270
+ <tr>
271
+ <td>Yellow</td>
272
+ <td>2</td>
273
+ <td>10</td>
274
+ <td>0</td>
275
+ <td>15</td>
276
+ <td>27</td>
277
+ </tr>
278
+ </tbody>
279
+ </table>
239
280
  chart_with_multiple_headings:
240
281
  data:
241
282
  block: |
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "23.5.1".freeze
2
+ VERSION = "23.6.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: 23.5.1
4
+ version: 23.6.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: 2020-11-12 00:00:00.000000000 Z
11
+ date: 2020-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config