govuk_publishing_components 21.3.0 → 21.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2-2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dit_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dit_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dit_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dit_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_18px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_18px_x2.png +0 -0
- data/app/assets/stylesheets/component_guide/application.scss +6 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +4 -5
- data/app/controllers/govuk_publishing_components/application_controller.rb +11 -0
- data/app/views/govuk_publishing_components/component_guide/example.html.erb +3 -3
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +10 -11
- data/config/initializers/assets.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +51 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 076d12dde5ae718e4121452456f278ab864c4b58b95e2e1bc38be2ce9baf24f0
|
4
|
+
data.tar.gz: 876634e138bef21c35e7a1766f3e65f9bfb04b6636e3bff57a9515d8731cbfa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82a6343d77e6abd5cd893a51311dc4af3a6581f1dd735e546eb58ddf5f66c412f4969ae9129937c303b02f123de16722b6d524320379d48bdf0778b79b63808
|
7
|
+
data.tar.gz: 959208582bc3452e230d01a66541d04c98ef267abaa2c5d7a284ca7c4118c2f607abea49e2bc821acbd9f5c651d2534d9d6f9d1a4c6ac503729869688be1f200
|
Binary file
|
Binary file
|
@@ -7,6 +7,8 @@
|
|
7
7
|
@import "govuk/helpers/all";
|
8
8
|
@import "govuk/core/all";
|
9
9
|
|
10
|
+
$gem-guide-border-width: 1px;
|
11
|
+
|
10
12
|
.component-guide-wrapper {
|
11
13
|
padding-bottom: $govuk-gutter * 1.5;
|
12
14
|
}
|
@@ -34,10 +36,6 @@
|
|
34
36
|
}
|
35
37
|
}
|
36
38
|
|
37
|
-
.component-body {
|
38
|
-
margin-bottom: $govuk-gutter * 1.5;
|
39
|
-
}
|
40
|
-
|
41
39
|
.component-guide-hidden {
|
42
40
|
display: none;
|
43
41
|
}
|
@@ -86,13 +84,13 @@
|
|
86
84
|
}
|
87
85
|
|
88
86
|
.component-call {
|
89
|
-
margin-top:
|
87
|
+
margin-top: -$gem-guide-border-width;
|
90
88
|
margin-bottom: $govuk-gutter-half;
|
91
89
|
|
92
90
|
font-family: Consolas, Monaco, "Andale Mono", monospace;
|
93
91
|
font-size: 16px;
|
94
92
|
line-height: 1.5;
|
95
|
-
border:
|
93
|
+
border: $gem-guide-border-width solid $govuk-border-colour;
|
96
94
|
|
97
95
|
&[contenteditable]:hover {
|
98
96
|
cursor: text;
|
@@ -124,7 +122,7 @@
|
|
124
122
|
|
125
123
|
.component-guide-preview {
|
126
124
|
padding: ($govuk-gutter * 1.5) $govuk-gutter $govuk-gutter;
|
127
|
-
border:
|
125
|
+
border: $gem-guide-border-width solid $govuk-border-colour;
|
128
126
|
position: relative;
|
129
127
|
|
130
128
|
&.direction-rtl {
|
@@ -165,7 +163,7 @@
|
|
165
163
|
.component-guide-preview--violation,
|
166
164
|
.component-guide-preview--warning {
|
167
165
|
@include govuk-text-colour;
|
168
|
-
margin-top:
|
166
|
+
margin-top: -$gem-guide-border-width;
|
169
167
|
|
170
168
|
@include govuk-font($size: 19);
|
171
169
|
|
@@ -65,21 +65,20 @@
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
|
68
|
-
// all crest images are currently in whitehall
|
69
68
|
@mixin crest($crest) {
|
70
|
-
background: image-url("crests/#{$crest}_13px.png") no-repeat 5px 0;
|
69
|
+
background: image-url("govuk_publishing_components/crests/#{$crest}_13px.png") no-repeat 5px 0;
|
71
70
|
background-size: auto 20px;
|
72
71
|
|
73
72
|
@include govuk-device-pixel-ratio {
|
74
|
-
background-image: image-url("crests/#{$crest}_13px_x2.png");
|
73
|
+
background-image: image-url("govuk_publishing_components/crests/#{$crest}_13px_x2.png");
|
75
74
|
}
|
76
75
|
|
77
76
|
@include govuk-media-query($from: tablet) {
|
78
|
-
background: image-url("crests/#{$crest}_18px.png") no-repeat 6px 0;
|
77
|
+
background: image-url("govuk_publishing_components/crests/#{$crest}_18px.png") no-repeat 6px 0;
|
79
78
|
background-size: auto 26px;
|
80
79
|
|
81
80
|
@include govuk-device-pixel-ratio {
|
82
|
-
background-image: image-url("crests/#{$crest}_18px_x2.png");
|
81
|
+
background-image: image-url("govuk_publishing_components/crests/#{$crest}_18px_x2.png");
|
83
82
|
}
|
84
83
|
}
|
85
84
|
}
|
@@ -5,6 +5,17 @@ module GovukPublishingComponents
|
|
5
5
|
before_action :set_x_frame_options_header
|
6
6
|
before_action :set_disable_slimmer_header
|
7
7
|
|
8
|
+
content_security_policy do |p|
|
9
|
+
# don't do anything if the app doesn't have a content security policy
|
10
|
+
next unless p.directives.any?
|
11
|
+
|
12
|
+
# Unfortunately the axe core script uses a dependency that uses eval
|
13
|
+
# see: https://github.com/dequelabs/axe-core/issues/1175
|
14
|
+
# Thus all components shown by govuk_publishing_components need this
|
15
|
+
# enabled
|
16
|
+
p.script_src(*p.script_src, :unsafe_eval)
|
17
|
+
end
|
18
|
+
|
8
19
|
private
|
9
20
|
|
10
21
|
def set_x_frame_options_header
|
@@ -6,10 +6,10 @@
|
|
6
6
|
<div class="component-markdown">
|
7
7
|
<%= raw(@component_example.html_description) %>
|
8
8
|
</div>
|
9
|
-
<h2 class="component-doc-h2">How to call this example</h2>
|
10
|
-
<%= render partial: "govuk_publishing_components/component_guide/component_doc/call", locals: { component_doc: @component_doc, example: @component_example } %>
|
11
|
-
|
12
9
|
<h2 class="component-doc-h2">How it looks</h2>
|
13
10
|
<%= render partial: "govuk_publishing_components/component_guide/component_doc/preview", locals: { component_doc: @component_doc, example: @component_example } %>
|
11
|
+
|
12
|
+
<h2 class="component-doc-h2">How to call this example</h2>
|
13
|
+
<%= render partial: "govuk_publishing_components/component_guide/component_doc/call", locals: { component_doc: @component_doc, example: @component_example } %>
|
14
14
|
</div>
|
15
15
|
</div>
|
@@ -16,20 +16,21 @@
|
|
16
16
|
<div class="component-markdown">
|
17
17
|
<%= raw(@component_doc.html_body) %>
|
18
18
|
</div>
|
19
|
+
|
20
|
+
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
|
19
21
|
</div>
|
20
22
|
<% end %>
|
21
23
|
</div>
|
22
24
|
</div>
|
23
25
|
|
24
|
-
<
|
25
|
-
<
|
26
|
-
|
27
|
-
<%= link_to "Search for usage on GitHub", @component_doc.github_search_url, class: "govuk-link" %>
|
28
|
-
<h2 class="component-doc-h2">How it looks</h2>
|
29
|
-
</div>
|
30
|
-
|
26
|
+
<h2 class="component-doc-h2">How it looks
|
27
|
+
<small>(<a href="<%= component_preview_all_path(@component_doc.id) %>" class="govuk-link">preview all</a>)</small>
|
28
|
+
</h2>
|
31
29
|
<%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: @component_doc.example %>
|
32
30
|
|
31
|
+
<h2 class="component-doc-h2">How to call this component</h2>
|
32
|
+
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: @component_doc.example %>
|
33
|
+
|
33
34
|
<% if @component_doc.govuk_frontend_components.any? %>
|
34
35
|
<h2 class="component-doc-h2">GOV.UK Design System</h2>
|
35
36
|
<div class="component-markdown">
|
@@ -56,9 +57,7 @@
|
|
56
57
|
|
57
58
|
<% if @component_doc.other_examples.any? %>
|
58
59
|
<div class="examples">
|
59
|
-
<h2 class="component-doc-h2">Other examples
|
60
|
-
<small>(<a href="<%= component_preview_all_path(@component_doc.id) %>" class="govuk-link">preview all</a>)</small>
|
61
|
-
</h2>
|
60
|
+
<h2 class="component-doc-h2">Other examples</h2>
|
62
61
|
<% @component_doc.other_examples.each do |example| %>
|
63
62
|
<div class="component-example">
|
64
63
|
<h3 class="example-title">
|
@@ -68,8 +67,8 @@
|
|
68
67
|
<div class="component-markdown">
|
69
68
|
<%= raw(example.html_description) %>
|
70
69
|
</div>
|
71
|
-
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: example %>
|
72
70
|
<%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: example %>
|
71
|
+
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: example %>
|
73
72
|
</div>
|
74
73
|
<% end %>
|
75
74
|
</div>
|
@@ -26,6 +26,7 @@ Rails.application.config.assets.precompile += %w(
|
|
26
26
|
govuk_publishing_components/chevron-banner-hover.svg
|
27
27
|
govuk_publishing_components/chevron-banner-small.svg
|
28
28
|
govuk_publishing_components/chevron-banner-small-focus.svg
|
29
|
+
govuk_publishing_components/crests/*.png
|
29
30
|
)
|
30
31
|
|
31
32
|
# GOV.UK Frontend assets
|
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.
|
4
|
+
version: 21.4.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: 2019-
|
11
|
+
date: 2019-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|
@@ -321,6 +321,55 @@ files:
|
|
321
321
|
- app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg
|
322
322
|
- app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg
|
323
323
|
- app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner.svg
|
324
|
+
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px.png
|
325
|
+
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2-2.png
|
326
|
+
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2.png
|
327
|
+
- app/assets/images/govuk_publishing_components/crests/bis_crest_18px.png
|
328
|
+
- app/assets/images/govuk_publishing_components/crests/bis_crest_18px_x2.png
|
329
|
+
- app/assets/images/govuk_publishing_components/crests/coastguard_13px.png
|
330
|
+
- app/assets/images/govuk_publishing_components/crests/coastguard_13px_x2.png
|
331
|
+
- app/assets/images/govuk_publishing_components/crests/coastguard_18px.png
|
332
|
+
- app/assets/images/govuk_publishing_components/crests/coastguard_18px_x2.png
|
333
|
+
- app/assets/images/govuk_publishing_components/crests/dit_crest_13px.png
|
334
|
+
- app/assets/images/govuk_publishing_components/crests/dit_crest_13px_x2.png
|
335
|
+
- app/assets/images/govuk_publishing_components/crests/dit_crest_18px.png
|
336
|
+
- app/assets/images/govuk_publishing_components/crests/dit_crest_18px_x2.png
|
337
|
+
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px.png
|
338
|
+
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px_x2.png
|
339
|
+
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px.png
|
340
|
+
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px_x2.png
|
341
|
+
- app/assets/images/govuk_publishing_components/crests/ho_crest_13px.png
|
342
|
+
- app/assets/images/govuk_publishing_components/crests/ho_crest_13px_x2.png
|
343
|
+
- app/assets/images/govuk_publishing_components/crests/ho_crest_18px.png
|
344
|
+
- app/assets/images/govuk_publishing_components/crests/ho_crest_18px_x2.png
|
345
|
+
- app/assets/images/govuk_publishing_components/crests/mod_crest_13px.png
|
346
|
+
- app/assets/images/govuk_publishing_components/crests/mod_crest_13px_x2.png
|
347
|
+
- app/assets/images/govuk_publishing_components/crests/mod_crest_18px.png
|
348
|
+
- app/assets/images/govuk_publishing_components/crests/mod_crest_18px_x2.png
|
349
|
+
- app/assets/images/govuk_publishing_components/crests/org_crest_13px.png
|
350
|
+
- app/assets/images/govuk_publishing_components/crests/org_crest_13px_x2.png
|
351
|
+
- app/assets/images/govuk_publishing_components/crests/org_crest_18px.png
|
352
|
+
- app/assets/images/govuk_publishing_components/crests/org_crest_18px_x2.png
|
353
|
+
- app/assets/images/govuk_publishing_components/crests/portcullis_13px.png
|
354
|
+
- app/assets/images/govuk_publishing_components/crests/portcullis_13px_x2.png
|
355
|
+
- app/assets/images/govuk_publishing_components/crests/portcullis_18px.png
|
356
|
+
- app/assets/images/govuk_publishing_components/crests/portcullis_18px_x2.png
|
357
|
+
- app/assets/images/govuk_publishing_components/crests/so_crest_13px.png
|
358
|
+
- app/assets/images/govuk_publishing_components/crests/so_crest_13px_x2.png
|
359
|
+
- app/assets/images/govuk_publishing_components/crests/so_crest_18px.png
|
360
|
+
- app/assets/images/govuk_publishing_components/crests/so_crest_18px_x2.png
|
361
|
+
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px.png
|
362
|
+
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px_x2.png
|
363
|
+
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px.png
|
364
|
+
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px_x2.png
|
365
|
+
- app/assets/images/govuk_publishing_components/crests/ukho_13px.png
|
366
|
+
- app/assets/images/govuk_publishing_components/crests/ukho_13px_x2.png
|
367
|
+
- app/assets/images/govuk_publishing_components/crests/ukho_18px.png
|
368
|
+
- app/assets/images/govuk_publishing_components/crests/ukho_18px_x2.png
|
369
|
+
- app/assets/images/govuk_publishing_components/crests/wales_crest_13px.png
|
370
|
+
- app/assets/images/govuk_publishing_components/crests/wales_crest_13px_x2.png
|
371
|
+
- app/assets/images/govuk_publishing_components/crests/wales_crest_18px.png
|
372
|
+
- app/assets/images/govuk_publishing_components/crests/wales_crest_18px_x2.png
|
324
373
|
- app/assets/images/govuk_publishing_components/favicon-development.png
|
325
374
|
- app/assets/images/govuk_publishing_components/favicon-example.png
|
326
375
|
- app/assets/images/govuk_publishing_components/favicon-integration.png
|