govuk_publishing_components 6.2.0 → 6.3.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.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/{govuk_publishing_components → component_guide}/accessibility-test.js +0 -0
  3. data/app/assets/javascripts/component_guide/application.js +3 -0
  4. data/app/assets/javascripts/{govuk_publishing_components → component_guide}/vendor/axe.min.js +0 -0
  5. data/app/assets/javascripts/{govuk_publishing_components → component_guide}/vendor/matches-polyfill.min.js +0 -0
  6. data/app/assets/javascripts/{govuk_publishing_components → component_guide}/visual-regression.js +0 -0
  7. data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -0
  8. data/app/assets/javascripts/govuk_publishing_components/components/success-alert.js +12 -0
  9. data/app/assets/javascripts/{current-location.js → govuk_publishing_components/lib/current-location.js} +0 -0
  10. data/app/assets/javascripts/{history-support.js → govuk_publishing_components/lib/history-support.js} +0 -0
  11. data/app/assets/stylesheets/{govuk_publishing_components/component_guide.scss → component_guide/application.scss} +0 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +4 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +18 -0
  15. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +1 -0
  16. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +8 -0
  17. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +19 -0
  18. data/app/views/layouts/govuk_publishing_components/application.html.erb +2 -2
  19. data/lib/govuk_publishing_components/version.rb +1 -1
  20. metadata +14 -10
  21. data/app/assets/javascripts/govuk_publishing_components/application.js +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34285d5cb5c081751784ac345982132dc747756854e258428010f277a9c01fa5
4
- data.tar.gz: d5c1f26c16b66ee943513822e4ba1dae26f820ae86790ab4122f88c16b4da8b2
3
+ metadata.gz: 6fa1d987486ec07c2f3630dc95e654cc6b25182c11d37a650f5e427352b514c6
4
+ data.tar.gz: 1943d061e4c46413900f8806d996d8bea2500f44e46677e46cf55f7bdf99cb0b
5
5
  SHA512:
6
- metadata.gz: d17167dd84b0f8ce4a4cdcb2280dfab376a6e30b50b15606e8ba93b61b4f1386fed7a4ab0d437c3c17e2c2efabced7ec5bf20e05455311d26f20f951118a3413
7
- data.tar.gz: 0cedea047da2ee69a35df7cbd546c50f2fde34c776d668fb54beb3670c37398facb4bd5041315a0a477a6e973f7a402e04b038dddb89dbaa4685e1e9355a6e05
6
+ metadata.gz: d562062a75f692d25bb5d1ce45ad77c286bdb24568e673a8ec6dd7a3bca672c489ded85cfba8d1630a82b849797d6621017db4af8c0a23ac89f0e19597953297
7
+ data.tar.gz: 2b6d6c96044a96158bde90d20615bc182e92c4122e03c683b9b2f3365242fced025e95fea3f8bbd4a97aee66149adbd444ead22cc86d141317a75bd4d1f68807
@@ -0,0 +1,3 @@
1
+ //= require govuk/modules
2
+ //= require_tree ./vendor
3
+ //= require_tree .
@@ -1 +1,2 @@
1
+ //= require_tree ./lib
1
2
  //= require_tree ./components
@@ -0,0 +1,12 @@
1
+ window.GOVUK = window.GOVUK || {}
2
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
+
4
+ (function (GOVUK) {
5
+ 'use strict'
6
+
7
+ GOVUK.Modules.SuccessAlert = function () {
8
+ this.start = function (element) {
9
+ element.focus()
10
+ }
11
+ }
12
+ })(window.GOVUK)
@@ -20,4 +20,5 @@
20
20
  @import "components/step-by-step-nav-related";
21
21
  @import "components/feedback";
22
22
  @import "components/inverse-header";
23
+ @import "components/success-alert";
23
24
  @import "components/taxonomy-navigation";
@@ -4,6 +4,10 @@
4
4
  padding-bottom: $gutter-one-third;
5
5
  border-bottom: 1px solid $border-colour;
6
6
  list-style: none;
7
+
8
+ &:last-child {
9
+ border-bottom: none;
10
+ }
7
11
  }
8
12
 
9
13
  .gem-c-document-list__item-title {
@@ -28,4 +32,3 @@
28
32
  .gem-c-document-list--top-margin {
29
33
  margin-top: $gutter-two-thirds;
30
34
  }
31
-
@@ -0,0 +1,18 @@
1
+ .gem-c-success-alert {
2
+ color: $gem-text-colour;
3
+ padding: $gem-spacing-scale-3;
4
+ border: $gem-border-width-mobile solid $gem-success-colour;
5
+
6
+ @include media(tablet) {
7
+ padding: $gem-spacing-scale-4;
8
+ border-width: $gem-border-width-tablet;
9
+ }
10
+ }
11
+
12
+ .gem-c-success-alert__message {
13
+ @include bold-19;
14
+ }
15
+
16
+ .gem-c-success-alert:focus {
17
+ outline: $gem-focus-width solid $gem-focus-colour;
18
+ }
@@ -24,3 +24,4 @@ $gem-focus-width: 3px;
24
24
  $gem-focus-colour: $focus-colour;
25
25
 
26
26
  $gem-error-colour: $red;
27
+ $gem-success-colour: $button-colour;
@@ -0,0 +1,8 @@
1
+ <div
2
+ class="gem-c-success-alert"
3
+ data-module="success-alert"
4
+ role="alert"
5
+ tabindex="-1"
6
+ >
7
+ <p class="gem-c-success-alert__message"><%= message %></p>
8
+ </div>
@@ -0,0 +1,19 @@
1
+ name: Success Alert
2
+ description: Used at the top of the page, to summarise a successful user action.
3
+ accessibility_criteria: |
4
+ - should be focused on page load, to ensure the message is noticed by
5
+ assistive tech
6
+ - Should have a role of ‘alert’ to communicate that is a important and
7
+ time sensitive message
8
+ examples:
9
+ default:
10
+ data:
11
+ message: Message to alert the user to a successful action goes here
12
+ long_example:
13
+ data:
14
+ message: |
15
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut aliquet
16
+ dignissim dui, ac laoreet tortor vulputate nec. Aenean quis turpis
17
+ orci. Proin semper porttitor ipsum, vel maximus justo rutrum vel.
18
+ Morbi volutpat facilisis libero. Donec posuere eget odio non egestas.
19
+ Nullam sed neque quis turpis.
@@ -10,12 +10,12 @@
10
10
  <% end %>
11
11
  <%= yield :title %><% if content_for(:title) %> - <% end %><%= GovukPublishingComponents::Config.component_guide_title %>
12
12
  </title>
13
- <%= stylesheet_link_tag "govuk_publishing_components/component_guide", media: "screen" %>
13
+ <%= stylesheet_link_tag "component_guide/application", media: "screen" %>
14
14
  <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_stylesheet}" %>
15
15
  <% if GovukPublishingComponents::Config.application_print_stylesheet %>
16
16
  <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_print_stylesheet}", media: "print" %>
17
17
  <% end %>
18
- <%= javascript_include_tag "govuk_publishing_components/application" %>
18
+ <%= javascript_include_tag "component_guide/application" %>
19
19
  <%= javascript_include_tag "#{GovukPublishingComponents::Config.application_javascript}" %>
20
20
  <%= csrf_meta_tags %>
21
21
  </head>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '6.2.0'.freeze
2
+ VERSION = '6.3.0'.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: 6.2.0
4
+ version: 6.3.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: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -301,20 +301,21 @@ files:
301
301
  - README.md
302
302
  - Rakefile
303
303
  - app/assets/config/govuk_publishing_components_manifest.js
304
- - app/assets/javascripts/current-location.js
305
- - app/assets/javascripts/govuk_publishing_components/accessibility-test.js
304
+ - app/assets/javascripts/component_guide/accessibility-test.js
305
+ - app/assets/javascripts/component_guide/application.js
306
+ - app/assets/javascripts/component_guide/vendor/axe.min.js
307
+ - app/assets/javascripts/component_guide/vendor/matches-polyfill.min.js
308
+ - app/assets/javascripts/component_guide/visual-regression.js
306
309
  - app/assets/javascripts/govuk_publishing_components/all_components.js
307
- - app/assets/javascripts/govuk_publishing_components/application.js
308
310
  - app/assets/javascripts/govuk_publishing_components/components/error-summary.js
309
311
  - app/assets/javascripts/govuk_publishing_components/components/feedback.js
310
312
  - app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
311
- - app/assets/javascripts/govuk_publishing_components/vendor/axe.min.js
312
- - app/assets/javascripts/govuk_publishing_components/vendor/matches-polyfill.min.js
313
- - app/assets/javascripts/govuk_publishing_components/visual-regression.js
314
- - app/assets/javascripts/history-support.js
313
+ - app/assets/javascripts/govuk_publishing_components/components/success-alert.js
314
+ - app/assets/javascripts/govuk_publishing_components/lib/current-location.js
315
+ - app/assets/javascripts/govuk_publishing_components/lib/history-support.js
316
+ - app/assets/stylesheets/component_guide/application.scss
315
317
  - app/assets/stylesheets/govuk_publishing_components/_all_components.scss
316
318
  - app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss
317
- - app/assets/stylesheets/govuk_publishing_components/component_guide.scss
318
319
  - app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss
319
320
  - app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss
320
321
  - app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss
@@ -328,6 +329,7 @@ files:
328
329
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
329
330
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss
330
331
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss
332
+ - app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss
331
333
  - app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss
332
334
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_clearfix.scss
333
335
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
@@ -364,6 +366,7 @@ files:
364
366
  - app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb
365
367
  - app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
366
368
  - app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb
369
+ - app/views/govuk_publishing_components/components/_success_alert.html.erb
367
370
  - app/views/govuk_publishing_components/components/_taxonomy_navigation.html.erb
368
371
  - app/views/govuk_publishing_components/components/docs/back_link.yml
369
372
  - app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml
@@ -380,6 +383,7 @@ files:
380
383
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml
381
384
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml
382
385
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml
386
+ - app/views/govuk_publishing_components/components/docs/success_alert.yml
383
387
  - app/views/govuk_publishing_components/components/docs/taxonomy_navigation.yml
384
388
  - app/views/layouts/govuk_publishing_components/application.html.erb
385
389
  - config/initializers/assets.rb
@@ -1,17 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require govuk/modules
14
- //= require ../history-support
15
- //= require ../current-location
16
- //= require_tree ./vendor
17
- //= require_tree .