govuk_publishing_components 21.36.0 → 21.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/component_guide/application.scss +2 -0
- data/app/assets/stylesheets/component_guide/print.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -0
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +4 -10
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +7 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -5
- data/config/initializers/assets.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97f4e780c9b3f27f06d6aee281982ba45b61f4d5c33004f486eb1200c9bb5b0f
|
|
4
|
+
data.tar.gz: ef54a714d226943bbdb1aad4092991bdd772cd6a084ef77036c420d1a49b7123
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64e7a5809d24381576e81d8c508de4b16dc6186ce8ede46bd1905c1226a2622552e99e89aeec4a8af2fdffbb6dcc62b4eb19290cfc3db070754c0d25113fecc2
|
|
7
|
+
data.tar.gz: 8dd0576161ca46ef0b41c433ce8f17163eee5e12e5f3ba0ad35e366ae02b74e25260749d92d3788c37b66b6b18da09802fb3042674a4cb6fcca47f6289814613
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "govuk_publishing_components/all_components_print";
|
|
@@ -46,7 +46,7 @@ module GovukPublishingComponents
|
|
|
46
46
|
additional_files = "@import 'govuk_publishing_components/govuk_frontend_support';\n"
|
|
47
47
|
additional_files << "@import 'govuk_publishing_components/component_support';\n" unless print_styles
|
|
48
48
|
|
|
49
|
-
components = components_in_use
|
|
49
|
+
components = components_in_use
|
|
50
50
|
extra_components = []
|
|
51
51
|
|
|
52
52
|
components.each do |component|
|
|
@@ -55,7 +55,6 @@ module GovukPublishingComponents
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
components << extra_components.compact
|
|
58
|
-
components << components_used_by_component_guide.compact
|
|
59
58
|
components = components.flatten.uniq.sort
|
|
60
59
|
|
|
61
60
|
components.map { |component|
|
|
@@ -74,13 +73,13 @@ module GovukPublishingComponents
|
|
|
74
73
|
end
|
|
75
74
|
|
|
76
75
|
def components_in_use_docs
|
|
77
|
-
@components_in_use_docs ||= ComponentDocs.new(gem_components: true, limit_to: components_in_use
|
|
76
|
+
@components_in_use_docs ||= ComponentDocs.new(gem_components: true, limit_to: components_in_use)
|
|
78
77
|
end
|
|
79
78
|
|
|
80
|
-
def components_in_use
|
|
79
|
+
def components_in_use
|
|
81
80
|
matches = []
|
|
82
81
|
|
|
83
|
-
files = Dir[
|
|
82
|
+
files = Dir["#{@application_path}/app/views/**/*.html.erb"]
|
|
84
83
|
files.each do |file|
|
|
85
84
|
data = File.read(file)
|
|
86
85
|
matches << data.scan(/(govuk_publishing_components\/components\/[a-z_-]+)/)
|
|
@@ -113,10 +112,5 @@ module GovukPublishingComponents
|
|
|
113
112
|
h[:url] = component_doc_path(component_doc.id) if component_example
|
|
114
113
|
end
|
|
115
114
|
end
|
|
116
|
-
|
|
117
|
-
def components_used_by_component_guide
|
|
118
|
-
components = components_in_use("#{@component_gem_path}/app/views/govuk_publishing_components/component_guide/")
|
|
119
|
-
components << components_in_use("#{@component_gem_path}/app/views/layouts/")
|
|
120
|
-
end
|
|
121
115
|
end
|
|
122
116
|
end
|
|
@@ -20,6 +20,13 @@ examples:
|
|
|
20
20
|
label:
|
|
21
21
|
text: "Can you provide more detail?"
|
|
22
22
|
name: "more-detail"
|
|
23
|
+
with_id_attribute:
|
|
24
|
+
description: An id can be passed for the textarea. By default one is randomly generated.
|
|
25
|
+
data:
|
|
26
|
+
label:
|
|
27
|
+
text: "What is the nature of your medical emergency?"
|
|
28
|
+
name: "emergency-name"
|
|
29
|
+
id: "emergency-id"
|
|
23
30
|
with_margin_bottom:
|
|
24
31
|
description: 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 a margin bottom of 6 (30px).
|
|
25
32
|
data:
|
|
@@ -16,12 +16,8 @@
|
|
|
16
16
|
<%= csrf_meta_tags %>
|
|
17
17
|
<%= favicon_link_tag "govuk_publishing_components/favicon-production.png" %>
|
|
18
18
|
|
|
19
|
-
<%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_stylesheet}" %>
|
|
20
19
|
<%= stylesheet_link_tag "component_guide/application", media: "screen" %>
|
|
21
|
-
|
|
22
|
-
<% if GovukPublishingComponents::Config.application_print_stylesheet %>
|
|
23
|
-
<%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_print_stylesheet}", media: "print" %>
|
|
24
|
-
<% end %>
|
|
20
|
+
<%= stylesheet_link_tag "component_guide/print", media: "print" %>
|
|
25
21
|
|
|
26
22
|
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
|
27
23
|
<%= yield :extra_headers %>
|
|
@@ -6,6 +6,7 @@ Rails.application.config.assets.precompile += %w(
|
|
|
6
6
|
component_guide/application.js
|
|
7
7
|
component_guide/filter-components.js
|
|
8
8
|
component_guide/visual-regression.js
|
|
9
|
+
component_guide/print.css
|
|
9
10
|
govuk_publishing_components/all_components.js
|
|
10
11
|
govuk_publishing_components/modules.js
|
|
11
12
|
govuk_publishing_components/vendor/modernizr.js
|
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.36.
|
|
4
|
+
version: 21.36.1
|
|
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-03-
|
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gds-api-adapters
|
|
@@ -443,6 +443,7 @@ files:
|
|
|
443
443
|
- app/assets/javascripts/govuk_publishing_components/vendor/magna-charta.min.js
|
|
444
444
|
- app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js
|
|
445
445
|
- app/assets/stylesheets/component_guide/application.scss
|
|
446
|
+
- app/assets/stylesheets/component_guide/print.scss
|
|
446
447
|
- app/assets/stylesheets/govuk_publishing_components/_all_components.scss
|
|
447
448
|
- app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss
|
|
448
449
|
- app/assets/stylesheets/govuk_publishing_components/component_support.scss
|