govuk_publishing_components 41.0.0 → 41.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +192 -171
  3. data/app/assets/stylesheets/component_guide/application.scss +10 -11
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +2 -3
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +3 -3
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +1 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +47 -22
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +3 -3
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss +1 -3
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +19 -19
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +14 -10
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +3 -3
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +2 -2
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +8 -8
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +16 -10
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +2 -2
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +2 -2
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +33 -35
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +3 -3
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +1 -1
  25. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +3 -3
  27. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +13 -3
  28. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
  29. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +6 -6
  30. data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +2 -3
  31. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +4 -3
  32. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -3
  33. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +3 -4
  34. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +3 -3
  35. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +10 -10
  36. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
  37. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
  38. data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +3 -3
  39. data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
  40. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +5 -4
  41. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +1 -1
  42. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -2
  43. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +2 -2
  44. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +1 -1
  45. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
  46. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +5 -5
  47. data/app/views/govuk_publishing_components/components/_cards.html.erb +5 -2
  48. data/app/views/govuk_publishing_components/components/docs/cards.yml +38 -7
  49. data/lib/govuk_publishing_components/version.rb +1 -1
  50. metadata +4 -4
@@ -17,14 +17,14 @@
17
17
  }
18
18
 
19
19
  p {
20
- @include govuk-font($size: 19, $weight: bold);
21
20
  margin: 0;
21
+ @include govuk-font($size: 19, $weight: bold);
22
22
  }
23
23
 
24
24
  em {
25
- @include govuk-font($size: 80, $weight: bold);
26
25
  display: block;
27
26
  margin: 3px 0 -5px;
27
+ @include govuk-font($size: 80, $weight: bold);
28
28
  }
29
29
  }
30
30
  }
@@ -33,9 +33,9 @@
33
33
  }
34
34
 
35
35
  th {
36
- @include govuk-font($size: 19, $weight: bold);
37
36
  text-align: left;
38
37
  color: $govuk-text-colour;
38
+ @include govuk-font($size: 19, $weight: bold);
39
39
  }
40
40
 
41
41
  td small {
@@ -30,8 +30,8 @@
30
30
  }
31
31
 
32
32
  p {
33
- @include govuk-font($size: 19, $weight: bold);
34
33
  margin-left: 1em;
34
+ @include govuk-font($size: 19, $weight: bold);
35
35
  }
36
36
  }
37
37
 
@@ -8,9 +8,9 @@
8
8
  ol,
9
9
  ul,
10
10
  p {
11
- @include govuk-font($size: 19);
12
11
  margin-top: $govuk-gutter-half;
13
12
  margin-bottom: $govuk-gutter-half;
13
+ @include govuk-font($size: 19);
14
14
 
15
15
  @include govuk-media-query($from: tablet) {
16
16
  margin-top: $gutter-two-thirds;
@@ -24,15 +24,15 @@
24
24
  // thus H1's are not expected and are discouraged by bare styling
25
25
 
26
26
  h1 {
27
- @include govuk-font($size: 19);
28
27
  margin: 0;
29
28
  padding: 0;
29
+ @include govuk-font($size: 19);
30
30
  }
31
31
 
32
32
  h2 {
33
- @include govuk-font($size: 27, $weight: bold);
34
33
  margin-top: $govuk-gutter;
35
34
  margin-bottom: 0;
35
+ @include govuk-font($size: 27, $weight: bold);
36
36
 
37
37
  @include govuk-media-query($from: desktop) {
38
38
  margin-top: $govuk-gutter * 1.5;
@@ -41,9 +41,9 @@
41
41
  }
42
42
 
43
43
  h3 {
44
- @include govuk-font($size: 19, $weight: bold);
45
44
  margin-top: $govuk-gutter + 5px;
46
45
  margin-bottom: 0;
46
+ @include govuk-font($size: 19, $weight: bold);
47
47
  }
48
48
 
49
49
  // H4, H5 and H6 are discouraged and thus styled the same
@@ -51,9 +51,9 @@
51
51
  h4,
52
52
  h5,
53
53
  h6 {
54
- @include govuk-font($size: 19, $weight: bold);
55
54
  margin-top: $govuk-gutter + 5px;
56
55
  margin-bottom: 0;
56
+ @include govuk-font($size: 19, $weight: bold);
57
57
 
58
58
  + p {
59
59
  margin-top: 5px;
@@ -3,9 +3,12 @@
3
3
  heading ||= nil
4
4
  items ||= nil
5
5
  sub_heading_level ||= 3
6
- two_column_layout ||= false
6
+ columns ||= false
7
+
7
8
  ul_classes = %w[gem-c-cards__list]
8
- ul_classes << 'gem-c-cards__list--two-column-desktop' if two_column_layout
9
+ ul_classes << 'gem-c-cards__list--two-column-desktop' if columns == 2
10
+ ul_classes << 'gem-c-cards__list--three-column-desktop' if columns == 3
11
+
9
12
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
10
13
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
11
14
  component_helper.add_class("gem-c-cards")
@@ -1,13 +1,11 @@
1
- name: Cards (experimental)
1
+ name: Cards
2
2
  description: A grid of cards that have a link and a description
3
3
  body: |
4
- The component renders the cards as an unordered list element and visually presents it as a grid. It doesn't use the [GOV.UK Design System grid](https://design-system.service.gov.uk/styles/layout/#grid-system) but sets its own so that it can separately target desktop, tablet and mobile columns.
4
+ The component renders the cards as an unordered list element and visually presents it using CSS grid to display the cards in either a one (default), two or three column layout. It doesn't use the [GOV.UK Design System grid](https://design-system.service.gov.uk/styles/layout/#grid-system) but sets its own so that it can separately target desktop, tablet and mobile columns.
5
5
 
6
- You can display the grid in three or two columns on desktop. Browsers that don't support CSS grid always display one column.
6
+ Browsers that don't support CSS grid always display one column.
7
7
 
8
8
  You must set a `href` for all the links.
9
-
10
- This component is currently experimental. If you are using it, please feed back any research findings to the GOV.UK Explore team.
11
9
  accessibility_criteria: |
12
10
  The component must:
13
11
 
@@ -71,9 +69,42 @@ examples:
71
69
  path: http://www.gov.uk
72
70
  description: Owning or renting and council services
73
71
  two_column_layout:
74
- description: Override default three column layout on desktop by passing through `two_column_layout` parameter (defaults to `false`).
72
+ description: Override default single column layout on desktop by setting the `columns` parameter to `2`.
73
+ data:
74
+ columns: 2
75
+ items:
76
+ - link:
77
+ text: Benefits
78
+ path: http://www.gov.uk
79
+ description: Includes eligibility, appeals, tax credits and Universal Credit
80
+ - link:
81
+ text: Births, deaths, marriages and&nbsp;care
82
+ path: http://www.gov.uk
83
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
84
+ - link:
85
+ text: Business and self-employed
86
+ path: http://www.gov.uk
87
+ description: Tools and guidance for businesses
88
+ - link:
89
+ text: Childcare and parenting
90
+ path: http://www.gov.uk
91
+ description: Includes giving birth, fostering, adopting, benefits for children, childcare and schools
92
+ - link:
93
+ text: Citizenship and living in the&nbsp;UK
94
+ path: http://www.gov.uk
95
+ description: Voting, community participation, life in the UK, international projects
96
+ - link:
97
+ text: Crime, justice and the&nbsp;law
98
+ path: http://www.gov.uk
99
+ description: Legal processes, courts and the police
100
+ - link:
101
+ text: Disabled people
102
+ path: http://www.gov.uk
103
+ description: Includes carers, your rights, benefits and the Equality Act
104
+ three_column_layout:
105
+ description: Override default single column layout on desktop by setting the `columns` parameter to `3`.
75
106
  data:
76
- two_column_layout: true
107
+ columns: 3
77
108
  items:
78
109
  - link:
79
110
  text: Benefits
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "41.0.0".freeze
2
+ VERSION = "41.1.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: 41.0.0
4
+ version: 41.1.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: 2024-07-30 00:00:00.000000000 Z
11
+ date: 2024-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -1837,14 +1837,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1837
1837
  requirements:
1838
1838
  - - ">="
1839
1839
  - !ruby/object:Gem::Version
1840
- version: '3.1'
1840
+ version: '3.2'
1841
1841
  required_rubygems_version: !ruby/object:Gem::Requirement
1842
1842
  requirements:
1843
1843
  - - ">="
1844
1844
  - !ruby/object:Gem::Version
1845
1845
  version: '0'
1846
1846
  requirements: []
1847
- rubygems_version: 3.5.16
1847
+ rubygems_version: 3.5.17
1848
1848
  signing_key:
1849
1849
  specification_version: 4
1850
1850
  summary: A gem to document components in GOV.UK frontend applications