govuk_publishing_components 41.1.0 → 41.1.1

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: b9252bac93772002b1e1b0927944e80de53d956d71e91db26c5ccd5477fcc9f0
4
- data.tar.gz: 5530379d63fbe2fb58b80e79b1d435c64c05bc9f5ec8e1a034b5f345ac4b1faf
3
+ metadata.gz: 463dd1a5275229c7459f757f67fd4df12a59df147f952e709e830b55f6aed9ba
4
+ data.tar.gz: f376cd0d430fc8c96de335bc19242add6d5f6e7a25fa6034631f881b23215cc3
5
5
  SHA512:
6
- metadata.gz: 109856eac1c0d2dcda97cd14daf38acc7761523de3acff18df5bf9fba42f42b2d2f6e2867e870d944dd7d792de6f8e751a81d944840aa26a6af9d26d2fe680bb
7
- data.tar.gz: 5fe113e9e4ef7b21e256dffe48c0b93e553451ff475ae628589c84d502471a1f4a3134948601aec2e46deed77583d8b7ac07e4bbd7377130733edb48e14fad58
6
+ metadata.gz: 0de3c1a2a5c84e20c5d931c9717c239fa61cce5c6bb263addf36d3bc7e1f2afb559fbe9c228aab89a7602097a747945df4e4fbebd1fd18035c44e392832bfa51
7
+ data.tar.gz: 74fb27acd937298a191a24b380f9079312c6b8da732990987e885385758c2f34c2e11481da8760f4ded003bcf8bb3ee5f924a8be3d21f43043dd24c62122ec07
@@ -3,7 +3,11 @@
3
3
  @import "mixins/prefixed-transform";
4
4
 
5
5
  .gem-c-cards__heading {
6
- margin: 0 0 govuk-spacing(6) 0;
6
+ @include govuk-responsive-margin(6, "bottom");
7
+ }
8
+
9
+ .gem-c-cards__heading--underline + .gem-c-cards__list {
10
+ border-top: 1px solid $govuk-border-colour;
7
11
  }
8
12
 
9
13
  .gem-c-cards__list {
@@ -26,6 +30,14 @@
26
30
  }
27
31
  }
28
32
 
33
+ .gem-c-cards__list--one-column {
34
+ .gem-c-cards__list-item {
35
+ &:first-child {
36
+ border-top: 0;
37
+ }
38
+ }
39
+ }
40
+
29
41
  .gem-c-cards__list--two-column-desktop {
30
42
  @include govuk-media-query($from: "tablet") {
31
43
  grid-auto-rows: fractions(1); // Set all rows to same fractional height of the complete grid
@@ -6,6 +6,7 @@
6
6
  columns ||= false
7
7
 
8
8
  ul_classes = %w[gem-c-cards__list]
9
+ ul_classes << 'gem-c-cards__list--one-column' unless columns
9
10
  ul_classes << 'gem-c-cards__list--two-column-desktop' if columns == 2
10
11
  ul_classes << 'gem-c-cards__list--three-column-desktop' if columns == 3
11
12
 
@@ -16,7 +17,11 @@
16
17
  <% if items.present? %>
17
18
  <%= tag.div(**component_helper.all_attributes) do %>
18
19
  <% if heading %>
19
- <%= content_tag(shared_helper.get_heading_level, class: "gem-c-cards__heading govuk-heading-m") do %>
20
+ <%
21
+ heading_classes = %w[gem-c-cards__heading govuk-heading-m]
22
+ heading_classes << "gem-c-cards__heading--underline" unless columns
23
+ %>
24
+ <%= content_tag(shared_helper.get_heading_level, class: heading_classes) do %>
20
25
  <%= heading %>
21
26
  <% end %>
22
27
  <% end %>
@@ -40,34 +40,30 @@ examples:
40
40
  text: Citizenship and living in the&nbsp;UK
41
41
  path: http://www.gov.uk
42
42
  description: Voting, community participation, life in the UK, international projects
43
+ one_column_layout_without_heading:
44
+ description: No border at the top of the list of cards is present when using a one column layout without a heading. The first card item will still include a top border when using a 2 or 3 column layout as shown in the examples below.
45
+ data:
46
+ items:
43
47
  - link:
44
- text: Crime, justice and the&nbsp;law
45
- path: http://www.gov.uk
46
- description: Legal processes, courts and the police
47
- - link:
48
- text: Disabled people
49
- path: http://www.gov.uk
50
- description: Includes carers, your rights, benefits and the Equality Act
51
- - link:
52
- text: Driving and transport
48
+ text: Benefits
53
49
  path: http://www.gov.uk
54
- description: Includes vehicle tax, MOT and driving licences
50
+ description: Includes eligibility, appeals, tax credits and Universal Credit
55
51
  - link:
56
- text: Education and learning
52
+ text: Births, deaths, marriages and&nbsp;care
57
53
  path: http://www.gov.uk
58
- description: Includes student loans, admissions and apprenticeships
54
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
59
55
  - link:
60
- text: Employing people
56
+ text: Business and self-employed
61
57
  path: http://www.gov.uk
62
- description: Includes pay, contracts, hiring and redundancies
58
+ description: Tools and guidance for businesses
63
59
  - link:
64
- text: Environment and countryside
60
+ text: Childcare and parenting
65
61
  path: http://www.gov.uk
66
- description: Includes flooding, recycling and wildlife
62
+ description: Includes giving birth, fostering, adopting, benefits for children, childcare and schools
67
63
  - link:
68
- text: Housing and local services
64
+ text: Citizenship and living in the&nbsp;UK
69
65
  path: http://www.gov.uk
70
- description: Owning or renting and council services
66
+ description: Voting, community participation, life in the UK, international projects
71
67
  two_column_layout:
72
68
  description: Override default single column layout on desktop by setting the `columns` parameter to `2`.
73
69
  data:
@@ -93,14 +89,6 @@ examples:
93
89
  text: Citizenship and living in the&nbsp;UK
94
90
  path: http://www.gov.uk
95
91
  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
92
  three_column_layout:
105
93
  description: Override default single column layout on desktop by setting the `columns` parameter to `3`.
106
94
  data:
@@ -126,14 +114,6 @@ examples:
126
114
  text: Citizenship and living in the&nbsp;UK
127
115
  path: http://www.gov.uk
128
116
  description: Voting, community participation, life in the UK, international projects
129
- - link:
130
- text: Crime, justice and the&nbsp;law
131
- path: http://www.gov.uk
132
- description: Legal processes, courts and the police
133
- - link:
134
- text: Disabled people
135
- path: http://www.gov.uk
136
- description: Includes carers, your rights, benefits and the Equality Act
137
117
  custom_heading_levels:
138
118
  description: |
139
119
  Override default heading level by passing through `heading_level` parameter (defaults to `<h2>`).
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "41.1.0".freeze
2
+ VERSION = "41.1.1".freeze
3
3
  end
@@ -70,16 +70,19 @@ declare namespace axe {
70
70
  | LabelledShadowDomSelector
71
71
  | LabelledFramesSelector;
72
72
  type SelectorList = Array<Selector | FramesSelector> | NodeList;
73
+ type ContextProp = Selector | SelectorList;
73
74
  type ContextObject =
74
75
  | {
75
- include: Selector | SelectorList;
76
- exclude?: Selector | SelectorList;
76
+ include: ContextProp;
77
+ exclude?: ContextProp;
77
78
  }
78
79
  | {
79
- exclude: Selector | SelectorList;
80
- include?: Selector | SelectorList;
80
+ exclude: ContextProp;
81
+ include?: ContextProp;
81
82
  };
82
- type ElementContext = Selector | SelectorList | ContextObject;
83
+ type ContextSpec = ContextProp | ContextObject;
84
+ /** Synonym to ContextSpec */
85
+ type ElementContext = ContextSpec;
83
86
 
84
87
  type SerialSelector =
85
88
  | BaseSelector
@@ -406,6 +409,16 @@ declare namespace axe {
406
409
  shadowSelect: (selector: CrossTreeSelector) => Element | null;
407
410
  shadowSelectAll: (selector: CrossTreeSelector) => Element[];
408
411
  getStandards(): Required<Standards>;
412
+ isContextSpec: (context: unknown) => context is ContextSpec;
413
+ isContextObject: (context: unknown) => context is ContextObject;
414
+ isContextProp: (context: unknown) => context is ContextProp;
415
+ isLabelledFramesSelector: (
416
+ selector: unknown
417
+ ) => selector is LabelledFramesSelector;
418
+ isLabelledShadowDomSelector: (
419
+ selector: unknown
420
+ ) => selector is LabelledShadowDomSelector;
421
+
409
422
  DqElement: new (
410
423
  elm: Element,
411
424
  options?: { absolutePaths?: boolean }