publishing_platform_publishing_components 0.5.0 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c220b3353f06ea1deb75bcc07e60a7eeeb269793c1bbe9712a5ab970230a7d98
4
- data.tar.gz: c68ad207fdf6ced57cba965674ab4285c945f086c0b603e1a6383573006df990
3
+ metadata.gz: d3a0f4aacb926c1e893eabd21a66d180dc9d2eccd55715f8db452d7bd1ab3329
4
+ data.tar.gz: 914d59568ba62d0f8355595f0e16c566b279ed2a43fd839e63bd9c206ca1a7dc
5
5
  SHA512:
6
- metadata.gz: c0073afe1fa51c7740e1830495124bf99a4aee701cdf33e498f21c3525f756a143950aa40ef533a0f8d2a6b4e809c2908091c36b32fd3088969b2de6ed9af3f5
7
- data.tar.gz: 7217522d3598a41d937e8aa8e4d5084bb2df08c908bc40b8f13cceb5c02aa6e6c98aafd7c788d46fbfc85c9bf03e62dc57d7b4b7f63675356404abbde7ecc40a
6
+ metadata.gz: eb2579df1df8c926594ae3d734b82e48cc6a6c7bcb7962df67ea0192e502bdd5784c2058da259989f904a0bb322ab086ec29c3c18d32c08a6f768e066dbf22ee
7
+ data.tar.gz: 565c9cbe5ac2559e5987a39d1c13fcd8d21fd43b30554e301f1a3aca2f6be167f38c3ad8015c84a1cdfb80c6d596d6b3fe9e0c8a742831b32d0e35f6d1fe838c
@@ -1,5 +1,6 @@
1
1
  @import "bootstrap";
2
2
  @import "components/attachment";
3
3
  @import "components/attachment-link";
4
+ @import "components/inset-text";
4
5
  @import "components/layout";
5
6
  @import "components/summary-list";
@@ -0,0 +1,29 @@
1
+ @import 'functions';
2
+ @import 'variables';
3
+ @import 'mixins';
4
+
5
+ .gem-c-inset-text {
6
+ padding: 15px;
7
+
8
+ // Margin top intended to collapse
9
+ // This adds an additional 10px to the paragraph above
10
+ margin-top: 20px;
11
+ margin-bottom: 20px;
12
+
13
+ @include media-breakpoint-up(sm) {
14
+ margin-top: 30px;
15
+ margin-bottom: 30px;
16
+ }
17
+
18
+ clear: both;
19
+ border-left: 10px solid $gray-500;
20
+
21
+ > :first-child {
22
+ margin-top: 0;
23
+ }
24
+
25
+ > :only-child,
26
+ > :last-child {
27
+ margin-bottom: 0;
28
+ }
29
+ }
@@ -0,0 +1,14 @@
1
+ <%
2
+ id ||= "inset-text-#{SecureRandom.hex(4)}"
3
+
4
+ component_helper = PublishingPlatformPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
5
+ component_helper.add_class("gem-c-inset-text")
6
+ component_helper.set_id(id)
7
+ %>
8
+ <%= tag.div(**component_helper.all_attributes) do %>
9
+ <% if defined? text %>
10
+ <%= text %>
11
+ <% elsif block_given? %>
12
+ <%= yield %>
13
+ <% end %>
14
+ <% end %>
@@ -0,0 +1,19 @@
1
+ name: Inset text
2
+ description: Use the inset text component to differentiate a block of text from the content that surrounds it.
3
+ uses_component_wrapper_helper: true
4
+ accessibility_criteria: |
5
+ All text must have a contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
6
+ examples:
7
+ default:
8
+ data:
9
+ text: "It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application."
10
+
11
+ with_block:
12
+ description: |
13
+ Note that the contents should be styled separately from the component, which takes no responsibility for what it is passed.
14
+ data:
15
+ block: |
16
+ <div>
17
+ <h2 id='heading'>To publish this step by step you need to</h2>
18
+ <a href='/foo'>Check for broken links</a>
19
+ </div>
@@ -1,3 +1,3 @@
1
1
  module PublishingPlatformPublishingComponents
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.6.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publishing_platform_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Publishing Platform
@@ -177,6 +177,7 @@ files:
177
177
  - app/assets/stylesheets/publishing_platform_publishing_components/_all_components.scss
178
178
  - app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment-link.scss
179
179
  - app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment.scss
180
+ - app/assets/stylesheets/publishing_platform_publishing_components/components/_inset-text.scss
180
181
  - app/assets/stylesheets/publishing_platform_publishing_components/components/_layout.scss
181
182
  - app/assets/stylesheets/publishing_platform_publishing_components/components/_summary-list.scss
182
183
  - app/controllers/publishing_platform_publishing_components/application_controller.rb
@@ -189,6 +190,7 @@ files:
189
190
  - app/views/publishing_platform_publishing_components/components/_attachment.html.erb
190
191
  - app/views/publishing_platform_publishing_components/components/_attachment_link.html.erb
191
192
  - app/views/publishing_platform_publishing_components/components/_error_summary.html.erb
193
+ - app/views/publishing_platform_publishing_components/components/_inset_text.html.erb
192
194
  - app/views/publishing_platform_publishing_components/components/_layout.html.erb
193
195
  - app/views/publishing_platform_publishing_components/components/_navigation.html.erb
194
196
  - app/views/publishing_platform_publishing_components/components/_summary_list.html.erb
@@ -201,6 +203,7 @@ files:
201
203
  - app/views/publishing_platform_publishing_components/components/docs/attachment.yml
202
204
  - app/views/publishing_platform_publishing_components/components/docs/attachment_link.yml
203
205
  - app/views/publishing_platform_publishing_components/components/docs/error_summary.yml
206
+ - app/views/publishing_platform_publishing_components/components/docs/inset_text.yml
204
207
  - app/views/publishing_platform_publishing_components/components/docs/navigation.yml
205
208
  - app/views/publishing_platform_publishing_components/components/docs/summary_list.yml
206
209
  - config/initializers/assets.rb
@@ -449,7 +452,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
449
452
  - !ruby/object:Gem::Version
450
453
  version: '0'
451
454
  requirements: []
452
- rubygems_version: 4.0.1
455
+ rubygems_version: 4.0.2
453
456
  specification_version: 4
454
457
  summary: A gem to document components in Publishing Platform frontend applications
455
458
  test_files: []