govuk_frontend_toolkit 5.1.1 → 5.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 675e5847b8fe55142c8bfcdc1a44b89859ebb6b2
4
- data.tar.gz: acd7680a1f6626db9a45ea97d89ee5c08f06a944
3
+ metadata.gz: 177c21aaa74abca4dfa655928bb2f6742e1e046f
4
+ data.tar.gz: 2743d40802f0408afcd2618e227f7f22432d8ec2
5
5
  SHA512:
6
- metadata.gz: a57923a7ddf0097e51eae6eb258cd19512265c43fbfc04f85dc536569effb3e1a69ecb7f47aec3aaead323cf43903abc8c0a0fad6a3da21bbf3d4b5f5193f7bc
7
- data.tar.gz: 9177483203d92473543c6f0e71e81d8075955c42b7e38b4d0f19e4268013c9345c66442fdafb2e5c9e790ebe440cf90044832d2b109c08c63eb0da5e3b65e763
6
+ metadata.gz: 2de75c8841daa62163dc4d7ec1cfa9c7390b897264ee35231bb594db1350b72690d8a1a1093746eb79d2ca33dd8e32d1c14f704d76142d4bc2e6a8f6f6a8b5b6
7
+ data.tar.gz: 00e6cb4ccb8133885947b119987287667341d0d3ec0bf10d21754cb14ee6d2af79d551fbc0220f8c6e645e93e6b186b2971a08387e23a0732722f7df8d9d3f3a
@@ -1,16 +1,19 @@
1
1
  sudo: false
2
2
  language: node_js
3
3
  node_js:
4
- - "0.10"
4
+ - "6.9.5"
5
5
  before_install:
6
- - openssl aes-256-cbc -K $encrypted_909ac1036a94_key -iv $encrypted_909ac1036a94_iv -in .travis/govuk_frontend_toolkit_push.enc -out ~/.ssh/id_rsa -d
7
- - chmod 600 ~/.ssh/id_rsa
6
+ # Node project, so Ruby dependencies must be installed manually (see `govuk-lint`)
7
+ - bundle install
8
8
  - git config --global user.name "Travis CI"
9
9
  - git config --global user.email "travis@travis-ci.org"
10
10
  - git remote add origin_ssh git@github.com:alphagov/govuk_frontend_toolkit.git
11
- - bundle install
11
+ # Encrypted SSH config used to `push.sh` to Github (See `.travis/README.md`)
12
+ - 'if [ "$TRAVIS_PULL_REQUEST_BRANCH" = "master" ]; then openssl aes-256-cbc -K $encrypted_909ac1036a94_key -iv $encrypted_909ac1036a94_iv -in .travis/govuk_frontend_toolkit_push.enc -out ~/.ssh/id_rsa -d && chmod 600 ~/.ssh/id_rsa; fi'
12
13
  script:
13
14
  - npm test
15
+ before_deploy:
16
+ - test $TRAVIS_TEST_RESULT = 0
14
17
  deploy:
15
18
  - provider: script
16
19
  script: './push.sh'
@@ -1,3 +1,8 @@
1
+ # 5.1.2
2
+
3
+ - Update show-hide-content.js to work with new `.multiple-choice` custom radio buttons and checkboxes, released in GOV.UK elements 3.0.0 ([PR #390](https://github.com/alphagov/govuk_frontend_toolkit/pull/390))
4
+ - Fix buttons not having an outer edge when colours are changed via browser settings - add an outline so they look like buttons. ([PR #377](https://github.com/alphagov/govuk_frontend_toolkit/pull/377))
5
+
1
6
  # 5.1.1
2
7
 
3
8
  - Update the alpha, beta and discovery colours to $govuk-blue to match the updated phase banner ([PR #370](https://github.com/alphagov/govuk_frontend_toolkit/pull/370))
@@ -1 +1 @@
1
- 5.1.1
1
+ 5.1.2
@@ -464,13 +464,15 @@ GOVUK.shimLinksWithButtonRole.init({
464
464
 
465
465
  Script to support show/hide content, toggled by radio buttons and checkboxes. This allows for progressive disclosure of question and answer forms based on selected values:
466
466
 
467
- <label class="block-label" data-target="show-me">
468
- <input type="radio" name="enabled" value="yes" /> Yes
469
- </label>
467
+ <div class="multiple-choice" data-target="show-me">
468
+ <input type="radio" name="enabled" value="yes" />
469
+ <label>Yes</label>
470
+ </div>
470
471
 
471
- <label class="block-label">
472
- <input type="radio" name="enabled" value="no" /> No
473
- </label>
472
+ <div class="multiple-choice">
473
+ <input type="radio" name="enabled" value="no" />
474
+ <label>No</label>
475
+ </div>
474
476
 
475
477
  <div id="show-me" class="panel js-hidden">
476
478
  <p>Show/Hide content to be toggled</p>
@@ -10,8 +10,8 @@
10
10
  // Radio and Checkbox selectors
11
11
  var selectors = {
12
12
  namespace: 'ShowHideContent',
13
- radio: '.block-label[data-target] input[type="radio"]',
14
- checkbox: '.block-label[data-target] input[type="checkbox"]'
13
+ radio: '[data-target] > input[type="radio"]',
14
+ checkbox: '[data-target] > input[type="checkbox"]'
15
15
  }
16
16
 
17
17
  // Escape name attribute for use in DOM selector
@@ -39,7 +39,7 @@
39
39
 
40
40
  // ARIA attributes aren't set before init
41
41
  if (!id) {
42
- id = $control.closest('label').data('target')
42
+ id = $control.closest('[data-target]').data('target')
43
43
  }
44
44
 
45
45
  // Find show/hide content by id
@@ -100,7 +100,7 @@ describe('GOVUK.GoogleAnalyticsUniversalTracker', function () {
100
100
  )
101
101
  })
102
102
 
103
- it('tracks custom dimensions', function() {
103
+ it('tracks custom dimensions', function () {
104
104
  universal.trackEvent('category', 'action', {dimension29: 'Home'})
105
105
  expect(window.ga.calls.mostRecent().args).toEqual(
106
106
  ['send', {hitType: 'event', eventCategory: 'category', eventAction: 'action', dimension29: 'Home'}]
@@ -21,31 +21,31 @@ describe('show-hide-content', function () {
21
21
 
22
22
  // Radio buttons (yes/no)
23
23
  '<form>' +
24
- '<label class="block-label" data-target="show-hide-radios">' +
24
+ '<div class="multiple-choice" data-target="show-hide-radios">' +
25
25
  '<input type="radio" name="single" value="yes">' +
26
- 'Yes' +
27
- '</label>' +
28
- '<label class="block-label">' +
26
+ '<label>Yes</label>' +
27
+ '</div>' +
28
+ '<div class="multiple-choice">' +
29
29
  '<input type="radio" name="single" value="no">' +
30
- 'No' +
31
- '</label>' +
30
+ '<label>No</label>' +
31
+ '</div>' +
32
32
  '<div id="show-hide-radios" class="panel js-hidden" />' +
33
33
  '</form>' +
34
34
 
35
35
  // Checkboxes (multiple values)
36
36
  '<form>' +
37
- '<label class="block-label" data-target="show-hide-checkboxes">' +
37
+ '<div class="multiple-choice" data-target="show-hide-checkboxes">' +
38
38
  '<input type="checkbox" name="multiple[option1]">' +
39
- 'Option 1' +
40
- '</label>' +
41
- '<label class="block-label">' +
39
+ '<label>Option 1</label>' +
40
+ '</div>' +
41
+ '<div class="multiple-choice">' +
42
42
  '<input type="checkbox" name="multiple[option2]">' +
43
- 'Option 2' +
44
- '</label>' +
45
- '<label class="block-label">' +
43
+ '<label>Option 2</label>' +
44
+ '</div>' +
45
+ '<div class="multiple-choice">' +
46
46
  '<input type="checkbox" name="multiple[option3]">' +
47
- 'Option 3' +
48
- '</label>' +
47
+ '<label>Option 3</label>' +
48
+ '</div>' +
49
49
  '<div id="show-hide-checkboxes" class="panel js-hidden" />' +
50
50
  '</form>'
51
51
  )
@@ -225,7 +225,7 @@ describe('show-hide-content', function () {
225
225
  }))
226
226
  expect(events && events.click).toContain(jasmine.objectContaining({
227
227
  namespace: 'ShowHideContent',
228
- selector: '.block-label[data-target] input[type="checkbox"]'
228
+ selector: '[data-target] > input[type="checkbox"]'
229
229
  }))
230
230
  })
231
231
  })
@@ -243,7 +243,7 @@ describe('show-hide-content', function () {
243
243
  }))
244
244
  expect(events && events.click).not.toContain(jasmine.objectContaining({
245
245
  namespace: 'ShowHideContent',
246
- selector: '.block-label[data-target] input[type="checkbox"]'
246
+ selector: '[data-target] > input[type="checkbox"]'
247
247
  }))
248
248
  })
249
249
  })
@@ -254,14 +254,14 @@ describe('show-hide-content', function () {
254
254
  // Sample markup
255
255
  this.$content = $(
256
256
  // Radio buttons (yes/no)
257
- '<label class="block-label" data-target="show-hide-radios">' +
257
+ '<div class="multiple-choice" data-target="show-hide-radios">' +
258
258
  '<input type="radio" name="single" value="yes">' +
259
- 'Yes' +
260
- '</label>' +
261
- '<label class="block-label">' +
259
+ '<label>Yes</label>' +
260
+ '</div>' +
261
+ '<div class="multiple-choice">' +
262
262
  '<input type="radio" name="single" value="no">' +
263
- 'No' +
264
- '</label>' +
263
+ '<label>No</label>' +
264
+ '</div>' +
265
265
  '<div id="show-hide-radios" class="panel js-hidden" />'
266
266
  )
267
267
 
@@ -30,6 +30,8 @@
30
30
  padding: .526315em .789473em .263157em; // 10px 15px 5px
31
31
  border: none;
32
32
  @include border-radius(0);
33
+ outline: 1px solid transparent; // keep some button appearance when changing colour settings in browsers
34
+ outline-offset: -1px; // fixes bug in Safari that outline width on focus is not overwritten, is reset to 0 on focus in govuk_template
33
35
  -webkit-appearance: none;
34
36
 
35
37
  // Bottom edge effect
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_frontend_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails