govuk_publishing_components 21.41.4 → 21.42.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: 9d4263852283a50336d43fdd7b56a06ab968227afcaa08b25181499c7e270855
4
- data.tar.gz: af61816f2ef492f8a3ca62bb0eae3ed97e62779ff0fefdc43a782535139146bc
3
+ metadata.gz: 24829cd84e2ddb267b818d1d885391681240e46cac461922e7389dc173c797c6
4
+ data.tar.gz: 1e07e232b562ebfc957807cc4c08a28ce29d3d7b4ae5c31ad00283f5ce30f651
5
5
  SHA512:
6
- metadata.gz: ecf6d158f9724bec8f9188c90f5b9800ccd3177f1ce46d46bb2a9e04875b9e180fb153bfa7922fd10029f0151b4da44f6734c264088ec8452c5a66bd9b8cd852
7
- data.tar.gz: df909a799add5deaf886c14be12bd0265013149144d2790489809257bcefc8b39d59ea2c0da01a6004ad898c73e44433450f984c3312c7f0766d19c3e90e45bf
6
+ metadata.gz: a59631eac2c60297c23f7fac1b136baa6d4ed48a75d03aace3ddd5b9eba136d39c772df2602bb88d7336824e581137acf8a3a78e273a1b681241183eb9155f43
7
+ data.tar.gz: 45bfd361a06cfcff26f939f5469c6e6f1c9790059fdb63ae3556b731308e1a6ae86e60be28c01c94b67ed3fa7dfaea0803dd737607023f59ebd8876b11aec84f
@@ -1,5 +1,15 @@
1
1
  @import "govuk/components/accordion/accordion";
2
2
 
3
+ .gem-c-accordion {
4
+ .govuk-accordion__section-heading {
5
+ // this is a temporary addition to fix the line height when it
6
+ // is being overridden by styles from govuk-template in collections
7
+ @include govuk-media-query($until: desktop) {
8
+ @include govuk-font(24, $weight: bold, $line-height: 1.6);
9
+ }
10
+ }
11
+ }
12
+
3
13
  .govuk-accordion--condensed {
4
14
  .govuk-accordion__section-button {
5
15
  @include govuk-media-query($from: tablet) {
@@ -1,11 +1,14 @@
1
1
  <%
2
+ local_assigns[:margin_bottom] ||= 6
2
3
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
4
 
4
5
  id ||= "default-id-#{SecureRandom.hex(4)}"
5
6
  items ||= []
6
7
  condensed ||= false
8
+
7
9
  accordion_classes = %w(gem-c-accordion govuk-accordion)
8
10
  accordion_classes << 'govuk-accordion--condensed' if condensed
11
+ accordion_classes << (shared_helper.get_margin_bottom)
9
12
 
10
13
  data_attributes ||= {}
11
14
  data_attributes[:module] = 'govuk-accordion'
@@ -233,6 +233,20 @@ examples:
233
233
  text: "How people read"
234
234
  content:
235
235
  html: "<p class='govuk-body'>This is the content for How people read.</p>"
236
+ with_margin_bottom:
237
+ description: |
238
+ The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 30px.
239
+ data:
240
+ margin_bottom: 0
241
+ items:
242
+ - heading:
243
+ text: "Writing well for the web"
244
+ content:
245
+ html: "<p class='govuk-body'>This is the content for Writing well for the web.</p>"
246
+ - heading:
247
+ text: "Writing well for specialists"
248
+ content:
249
+ html: "<p class='govuk-body'>This is the content for Writing well for specialists.</p>"
236
250
  with_section_open:
237
251
  description: |
238
252
  Adding `expanded: true` to the item will mean the section will default to being open, rather than closed. Once a user has opened or closed a section, the state of each section will be remembered - this can override a section's default.
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.41.4".freeze
2
+ VERSION = "21.42.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: 21.41.4
4
+ version: 21.42.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-04-23 00:00:00.000000000 Z
11
+ date: 2020-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters