govuk_publishing_components 41.1.1 → 41.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/component_guide/application.scss +6 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +12 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +8 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +22 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +12 -6
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +14 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +24 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +32 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +32 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +25 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +17 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +11 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +6 -0
  15. data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
  16. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +4 -4
  17. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +1 -1
  18. data/app/views/govuk_publishing_components/components/_table.html.erb +1 -1
  19. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_external.html.erb +3 -0
  20. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +1 -1
  22. data/lib/govuk_publishing_components/presenters/attachment_helper.rb +4 -0
  23. data/lib/govuk_publishing_components/version.rb +1 -1
  24. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 463dd1a5275229c7459f757f67fd4df12a59df147f952e709e830b55f6aed9ba
4
- data.tar.gz: f376cd0d430fc8c96de335bc19242add6d5f6e7a25fa6034631f881b23215cc3
3
+ metadata.gz: 8abc5426ad47fe2518e790ff7de038018877885b9e0878174b9c77e6241d24ff
4
+ data.tar.gz: fa85ed659a1a181745fcc246cb858dba49cdf8f8dd6cec58a8f88eb977f08b4b
5
5
  SHA512:
6
- metadata.gz: 0de3c1a2a5c84e20c5d931c9717c239fa61cce5c6bb263addf36d3bc7e1f2afb559fbe9c228aab89a7602097a747945df4e4fbebd1fd18035c44e392832bfa51
7
- data.tar.gz: 74fb27acd937298a191a24b380f9079312c6b8da732990987e885385758c2f34c2e11481da8760f4ded003bcf8bb3ee5f924a8be3d21f43043dd24c62122ec07
6
+ metadata.gz: f0eebd7502ca7164363b503cbdb2c33ac53b59ed85e5fea9f8a7660c1f842c823e7c8d3fc761eade6fc0e59642fe67c03a8e5aee9854fafc0dd7a5f79144c750
7
+ data.tar.gz: 89112bb0725fc797dfa3958e168d898c8d73038564282eee3c0b39bd42331b6d76459d1c5edfdcd2f35e3d8dee3349ab7c38098d139657b8e89a1b079df5892f
@@ -136,6 +136,12 @@ $gem-guide-border-width: 1px;
136
136
  &.component-output {
137
137
  padding: 0;
138
138
  }
139
+
140
+ @include govuk-media-query($media-type: print) {
141
+ &[class*="-background"] {
142
+ background-color: unset;
143
+ }
144
+ }
139
145
  }
140
146
 
141
147
  .component-guide-preview--simple {
@@ -27,3 +27,15 @@
27
27
  .gem-c-inverse-header--padding-top {
28
28
  padding-top: govuk-spacing(3);
29
29
  }
30
+
31
+ @include govuk-media-query($media-type: print) {
32
+ .gem-c-inverse-header {
33
+ background-color: unset;
34
+ border-bottom: 2pt solid $govuk-print-text-colour;
35
+
36
+ &,
37
+ & * {
38
+ color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
39
+ }
40
+ }
41
+ }
@@ -20,3 +20,11 @@
20
20
  // the right column.
21
21
  margin-bottom: 20px;
22
22
  }
23
+
24
+ // stylelint-disable declaration-no-important
25
+ @include govuk-media-query($media-type: print) {
26
+ .gem-c-layout-footer {
27
+ font-size: 12pt !important;
28
+ }
29
+ }
30
+ // stylelint-enable declaration-no-important
@@ -167,3 +167,25 @@
167
167
  .gem-c-header__nav {
168
168
  clear: both;
169
169
  }
170
+
171
+ @include govuk-media-query($media-type: print) {
172
+ .gem-c-layout-header .govuk-header__container {
173
+ border-color: $govuk-print-text-colour;
174
+
175
+ .govuk-grid-column-two-thirds {
176
+ width: auto;
177
+ float: none;
178
+ }
179
+
180
+ .govuk-header__logo {
181
+ margin: 0;
182
+ padding: 0 2mm 2mm 0;
183
+ }
184
+
185
+ .gem-c-header__product-name,
186
+ .gem-c-environment-tag {
187
+ color: $govuk-print-text-colour;
188
+ background-color: unset;
189
+ }
190
+ }
191
+ }
@@ -913,12 +913,6 @@ $after-button-padding-left: govuk-spacing(4);
913
913
  font-size: 24px;
914
914
  }
915
915
 
916
- @include govuk-media-query($media-type: print) {
917
- .gem-c-layout-super-navigation-header__content {
918
- display: none;
919
- }
920
- }
921
-
922
916
  // Ensure the total space to the left of the logo for mobile screen sizes is 24px (margin is 15px)
923
917
  @include govuk-media-query($until: tablet) {
924
918
  .gem-c-layout-super-navigation-header__header-logo--large-navbar {
@@ -989,3 +983,15 @@ $after-button-padding-left: govuk-spacing(4);
989
983
  font-size: govuk-px-to-rem(24px);
990
984
  }
991
985
  }
986
+
987
+ @include govuk-media-query($media-type: print) {
988
+ .gem-c-layout-super-navigation-header {
989
+ border-top: 1pt solid $govuk-print-text-colour;
990
+ margin: 0;
991
+ background-color: none;
992
+ }
993
+
994
+ .gem-c-layout-super-navigation-header__header-logo {
995
+ padding: 10px 0 !important; // stylelint-disable-line declaration-no-important
996
+ }
997
+ }
@@ -22,7 +22,8 @@
22
22
  @include govuk-media-query($media-type: print) {
23
23
  .gem-c-step-nav-header {
24
24
  padding: 0 0 govuk-spacing(4) 0;
25
- background: none;
25
+ background: unset;
26
+ border-color: $govuk-print-text-colour;
26
27
  }
27
28
 
28
29
  .gem-c-step-nav-header__part-of {
@@ -31,5 +32,17 @@
31
32
 
32
33
  .gem-c-step-nav-header__title {
33
34
  @include govuk-font(24, $weight: bold);
35
+
36
+ &,
37
+ &:link,
38
+ &:link:visited {
39
+ color: $govuk-print-text-colour;
40
+ }
41
+
42
+ &::after {
43
+ display: block;
44
+ margin: 1mm auto;
45
+ font-size: 12pt !important; // stylelint-disable-line declaration-no-important
46
+ }
34
47
  }
35
48
  }
@@ -44,3 +44,27 @@
44
44
  .gem-c-step-nav-related__link-item {
45
45
  margin-top: govuk-spacing(3);
46
46
  }
47
+
48
+ // stylelint-disable declaration-no-important
49
+ @include govuk-media-query($media-type: print) {
50
+ .gem-c-step-nav-related {
51
+ background: unset;
52
+ border-color: $govuk-print-text-colour;
53
+ }
54
+
55
+ .gem-c-step-nav-related__heading,
56
+ .gem-c-step-nav-related__link-item {
57
+ .govuk-link,
58
+ .govuk-link:link,
59
+ .govuk-link:link:visited {
60
+ color: $govuk-print-text-colour !important;
61
+
62
+ &::after {
63
+ display: block;
64
+ margin: 1mm auto;
65
+ font-size: 12pt !important;
66
+ }
67
+ }
68
+ }
69
+ }
70
+ // stylelint-enable declaration-no-important
@@ -125,3 +125,35 @@ $table-row-even-background-colour: govuk-colour("light-grey");
125
125
  border: 0;
126
126
  }
127
127
  }
128
+
129
+ // stylelint-disable declaration-no-important
130
+ @include govuk-media-query($media-type: print) {
131
+ .govuk-table--sortable {
132
+ outline: none;
133
+
134
+ * {
135
+ color: $govuk-print-text-colour !important;
136
+ background-color: initial !important;
137
+ }
138
+
139
+ .govuk-table__header,
140
+ .govuk-table__cell {
141
+ border-bottom: 1px solid $govuk-print-text-colour !important;
142
+ }
143
+
144
+ .govuk-table__header {
145
+ font-weight: 700;
146
+ border-right: 0;
147
+ }
148
+
149
+ .app-table__sort-link {
150
+ padding: 0 !important;
151
+
152
+ &::before,
153
+ &::after {
154
+ display: none !important;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ // stylelint-enable declaration-no-important
@@ -31,3 +31,35 @@ li.govuk-tabs__list-item { // stylelint-disable-line selector-no-qualifying-type
31
31
  }
32
32
  }
33
33
  }
34
+
35
+ @include govuk-media-query($media-type: print) {
36
+ .govuk-tabs__title {
37
+ display: block !important; // stylelint-disable-line declaration-no-important
38
+ }
39
+
40
+ .govuk-tabs__tab.govuk-tabs__tab {
41
+ text-decoration: none;
42
+ }
43
+
44
+ .govuk-tabs__list.govuk-tabs__list {
45
+ border: 0;
46
+ }
47
+
48
+ .govuk-tabs__list-item.govuk-tabs__list-item {
49
+ all: unset;
50
+ display: block;
51
+
52
+ &::before {
53
+ content: "—";
54
+ padding-right: 2mm;
55
+ margin: 0;
56
+ }
57
+ }
58
+
59
+ .govuk-tabs__panel.govuk-tabs__panel {
60
+ border: 0;
61
+ padding: 0;
62
+ margin: 0.75cm 0;
63
+ display: block;
64
+ }
65
+ }
@@ -31,6 +31,10 @@
31
31
  padding-top: 0;
32
32
  }
33
33
 
34
+ @include govuk-media-query($media-type: print) {
35
+ padding-left: 0;
36
+ }
37
+
34
38
  .attachment-thumb {
35
39
  position: relative;
36
40
  float: left;
@@ -52,6 +56,10 @@
52
56
  fill: govuk-colour("mid-grey");
53
57
  stroke: govuk-colour("mid-grey");
54
58
  }
59
+
60
+ @include govuk-media-query($media-type: print) {
61
+ margin-left: 0;
62
+ }
55
63
  }
56
64
 
57
65
  .attachment-details {
@@ -109,6 +117,23 @@
109
117
  .js-hidden {
110
118
  display: none;
111
119
  }
120
+
121
+ // stylelint-disable declaration-no-important
122
+ @include govuk-media-query($media-type: print) {
123
+ a,
124
+ a:link,
125
+ a:link:visited {
126
+ color: $govuk-print-text-colour !important;
127
+
128
+ &::after {
129
+ display: block;
130
+ margin: 1mm auto;
131
+ font-weight: normal;
132
+ font-size: 12pt !important;
133
+ }
134
+ }
135
+ }
136
+ // stylelint-enable declaration-no-important
112
137
  }
113
138
  }
114
139
 
@@ -24,4 +24,21 @@
24
24
  .govuk-button--start {
25
25
  @extend .govuk-button--start;
26
26
  }
27
+
28
+ @include govuk-media-query($media-type: print) {
29
+ .gem-c-button {
30
+ box-shadow: none;
31
+ border: 2pt solid $govuk-print-text-colour;
32
+
33
+ &,
34
+ & * {
35
+ background-color: unset;
36
+ color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
37
+ }
38
+
39
+ &::after {
40
+ display: none;
41
+ }
42
+ }
43
+ }
27
44
  }
@@ -43,5 +43,16 @@ $highlight-answer-color: govuk-colour("white");
43
43
  }
44
44
  }
45
45
  }
46
+
47
+ // stylelint-disable declaration-no-important
48
+ @include govuk-media-query($media-type: print) {
49
+ background-color: unset;
50
+
51
+ &,
52
+ & * {
53
+ color: $govuk-print-text-colour !important;
54
+ }
55
+ }
56
+ // stylelint-enable declaration-no-important
46
57
  }
47
58
  }
@@ -25,3 +25,9 @@
25
25
  height: 100%;
26
26
  border: 0;
27
27
  }
28
+
29
+ @include govuk-media-query($media-type: print) {
30
+ .gem-c-govspeak__youtube-video {
31
+ break-inside: avoid;
32
+ }
33
+ }
@@ -75,6 +75,8 @@
75
75
  <%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %>
76
76
  <% elsif attachment.pdf? %>
77
77
  <%= render "govuk_publishing_components/components/attachment/thumbnail_pdf" %>
78
+ <% elsif attachment.external? %>
79
+ <%= render "govuk_publishing_components/components/attachment/thumbnail_external" %>
78
80
  <% else %>
79
81
  <%= render "govuk_publishing_components/components/attachment/thumbnail_generic" %>
80
82
  <% end %>
@@ -31,11 +31,11 @@
31
31
  </div>
32
32
  </div>
33
33
  <div class="govuk-grid-row">
34
- <div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop gem-c-layout-header__search">
34
+ <div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop gem-c-layout-header__search govuk-!-display-none-print">
35
35
  <%= render "govuk_publishing_components/components/layout_header/search" %>
36
36
  </div>
37
37
  <% if navigation_items.any? %>
38
- <div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
38
+ <div class="govuk-header__content gem-c-header__content govuk-grid-column-full govuk-!-display-none-print">
39
39
  <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
40
40
  </div>
41
41
  <% end %>
@@ -50,12 +50,12 @@
50
50
  } %>
51
51
  </div>
52
52
  <% if navigation_items.any? %>
53
- <div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
53
+ <div class="govuk-header__content gem-c-header__content govuk-grid-column-full govuk-!-display-none-print">
54
54
  <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
55
55
  </div>
56
56
  <% end %>
57
57
  <% if search %>
58
- <div class="govuk-grid-column-one-third gem-c-layout-header__search">
58
+ <div class="govuk-grid-column-one-third gem-c-layout-header__search govuk-!-display-none-print">
59
59
  <%= render "govuk_publishing_components/components/layout_header/search" %>
60
60
  </div>
61
61
  <% end %>
@@ -109,7 +109,7 @@
109
109
  </div>
110
110
  <nav
111
111
  aria-labelledby="super-navigation-menu-heading"
112
- class="gem-c-layout-super-navigation-header__content"
112
+ class="gem-c-layout-super-navigation-header__content govuk-!-display-none-print"
113
113
  data-module="super-navigation-mega-menu"
114
114
  >
115
115
  <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden">
@@ -58,7 +58,7 @@
58
58
 
59
59
  <% if filterable %>
60
60
  <div data-module="table">
61
- <div class="js-gem-c-table__filter govuk-!-display-none">
61
+ <div class="js-gem-c-table__filter govuk-!-display-none govuk-!-display-none-print">
62
62
  <%= render "govuk_publishing_components/components/input", {
63
63
  label: {
64
64
  text: label
@@ -0,0 +1,3 @@
1
+ <svg class="gem-c-attachment__thumbnail-image gem-c-attachment__thumbnail-image--external" version="1.1" viewBox="0 0 99 140" aria-hidden="true">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21 59H12V68H21V59ZM30 86V77H69V86H30ZM87 104H30V95H87V104ZM78 122H30V113H78V122ZM21 86H12V77H21V86ZM21 122H12V113H21V122ZM21 104H12V95H21V104ZM87 68H30V59H87V68ZM87 39V12H12V39H87ZM77.9699 29.2919H77.9202L75.2756 17H71.2279L68.5088 29.2919H68.4591L66.1249 17H62.2014L66.1746 34.8047H70.5699L73.2145 22.0409L75.9088 34.8047H80.3289L84.3021 17H80.391L77.9699 29.2919ZM53.8195 29.2919H53.8692L56.2903 17H60.2014L56.2282 34.8047H51.8081L49.1138 22.0409L46.4692 34.8047H42.0739L38.1007 17H42.0242L44.3584 29.2919H44.4081L47.1272 17H51.1749L53.8195 29.2919ZM29.7684 29.2919H29.7188L27.0742 17H23.0265L20.3074 29.2919H20.2577L17.9235 17H14L17.9732 34.8047H22.3685L25.0131 22.0409L27.7074 34.8047H32.1275L36.1007 17H32.1896L29.7684 29.2919Z"/>
3
+ </svg>
@@ -12,7 +12,7 @@
12
12
  >
13
13
  <%= t("components.layout_header.menu") %>
14
14
  </button>
15
- <ul id="navigation" class="govuk-header__navigation-list">
15
+ <ul id="navigation" class="govuk-header__navigation-list govuk-!-display-none-print">
16
16
  <% navigation_items.each_with_index do |item, index| %>
17
17
  <%
18
18
  li_classes = %w(govuk-header__navigation-item)
@@ -9,7 +9,7 @@
9
9
  </button>
10
10
  <form
11
11
  action="/search"
12
- class="gem-c-layout-header__search-form govuk-clearfix"
12
+ class="gem-c-layout-header__search-form govuk-clearfix govuk-!-display-none-print"
13
13
  id="search"
14
14
  method="get"
15
15
  role="search"
@@ -36,6 +36,10 @@ module GovukPublishingComponents
36
36
  type == "html"
37
37
  end
38
38
 
39
+ def external?
40
+ type == "external"
41
+ end
42
+
39
43
  def content_type
40
44
  @content_type ||= SupportedContentType.find(
41
45
  attachment_data[:content_type],
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "41.1.1".freeze
2
+ VERSION = "41.1.2".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.1.1
4
+ version: 41.1.2
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-08-12 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -719,6 +719,7 @@ files:
719
719
  - app/views/govuk_publishing_components/components/_translation_nav.html.erb
720
720
  - app/views/govuk_publishing_components/components/_warning_text.html.erb
721
721
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
722
+ - app/views/govuk_publishing_components/components/attachment/_thumbnail_external.html.erb
722
723
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
723
724
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_html.html.erb
724
725
  - app/views/govuk_publishing_components/components/attachment/_thumbnail_pdf.html.erb