govuk_publishing_components 12.13.0 → 12.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +37 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +6 -5
  4. data/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js +15 -15
  5. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +2 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +8 -8
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +3 -3
  8. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +16 -0
  10. data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +24 -0
  11. data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +42 -0
  12. data/config/initializers/assets.rb +1 -0
  13. data/lib/govuk_publishing_components/version.rb +1 -1
  14. data/node_modules/accessible-autocomplete/CHANGELOG.md +269 -0
  15. data/node_modules/accessible-autocomplete/CONTRIBUTING.md +150 -0
  16. data/node_modules/accessible-autocomplete/LICENSE.txt +20 -0
  17. data/node_modules/accessible-autocomplete/Procfile +1 -0
  18. data/node_modules/accessible-autocomplete/README.md +416 -0
  19. data/node_modules/accessible-autocomplete/accessibility-criteria.md +42 -0
  20. data/node_modules/accessible-autocomplete/app.json +15 -0
  21. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +1 -0
  22. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +2 -0
  23. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -0
  24. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +2 -0
  25. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -0
  26. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +2 -0
  27. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -0
  28. data/node_modules/accessible-autocomplete/examples/form.html +671 -0
  29. data/node_modules/accessible-autocomplete/examples/index.html +616 -0
  30. data/node_modules/accessible-autocomplete/examples/preact/index.html +346 -0
  31. data/node_modules/accessible-autocomplete/examples/react/index.html +347 -0
  32. data/node_modules/accessible-autocomplete/package.json +192 -0
  33. data/node_modules/accessible-autocomplete/preact.js +1 -0
  34. data/node_modules/accessible-autocomplete/react.js +1 -0
  35. data/node_modules/accessible-autocomplete/scripts/check-staged.js +14 -0
  36. data/node_modules/accessible-autocomplete/src/autocomplete.css +141 -0
  37. data/node_modules/accessible-autocomplete/src/autocomplete.js +524 -0
  38. data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +11 -0
  39. data/node_modules/accessible-autocomplete/src/status.js +80 -0
  40. data/node_modules/accessible-autocomplete/src/wrapper.js +60 -0
  41. data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +44 -0
  42. data/node_modules/accessible-autocomplete/test/functional/index.js +485 -0
  43. data/node_modules/accessible-autocomplete/test/functional/wrapper.js +267 -0
  44. data/node_modules/accessible-autocomplete/test/integration/index.js +188 -0
  45. data/node_modules/accessible-autocomplete/test/karma.config.js +42 -0
  46. data/node_modules/accessible-autocomplete/test/wdio.config.js +80 -0
  47. data/node_modules/accessible-autocomplete/webpack.config.babel.js +193 -0
  48. data/node_modules/preact/LICENSE +21 -0
  49. data/node_modules/preact/README.md +580 -0
  50. data/node_modules/preact/debug.js +112 -0
  51. data/node_modules/preact/debug.js.map +1 -0
  52. data/node_modules/preact/debug/index.js +121 -0
  53. data/node_modules/preact/devtools.js +403 -0
  54. data/node_modules/preact/devtools.js.map +1 -0
  55. data/node_modules/preact/devtools/devtools.js +395 -0
  56. data/node_modules/preact/devtools/index.js +4 -0
  57. data/node_modules/preact/dist/preact.d.ts +891 -0
  58. data/node_modules/preact/dist/preact.dev.js +718 -0
  59. data/node_modules/preact/dist/preact.dev.js.map +1 -0
  60. data/node_modules/preact/dist/preact.js +408 -0
  61. data/node_modules/preact/dist/preact.js.flow +13 -0
  62. data/node_modules/preact/dist/preact.js.map +1 -0
  63. data/node_modules/preact/dist/preact.min.js +2 -0
  64. data/node_modules/preact/dist/preact.min.js.map +1 -0
  65. data/node_modules/preact/dist/preact.mjs +715 -0
  66. data/node_modules/preact/dist/preact.mjs.map +1 -0
  67. data/node_modules/preact/package.json +218 -0
  68. data/node_modules/preact/src/clone-element.js +18 -0
  69. data/node_modules/preact/src/component.js +90 -0
  70. data/node_modules/preact/src/constants.js +17 -0
  71. data/node_modules/preact/src/dom/index.js +138 -0
  72. data/node_modules/preact/src/h.js +86 -0
  73. data/node_modules/preact/src/options.js +22 -0
  74. data/node_modules/preact/src/preact.d.ts +891 -0
  75. data/node_modules/preact/src/preact.js +26 -0
  76. data/node_modules/preact/src/preact.js.flow +13 -0
  77. data/node_modules/preact/src/render-queue.js +28 -0
  78. data/node_modules/preact/src/render.js +22 -0
  79. data/node_modules/preact/src/util.js +19 -0
  80. data/node_modules/preact/src/vdom/component-recycler.js +48 -0
  81. data/node_modules/preact/src/vdom/component.js +296 -0
  82. data/node_modules/preact/src/vdom/diff.js +336 -0
  83. data/node_modules/preact/src/vdom/index.js +54 -0
  84. data/node_modules/preact/src/vnode.js +9 -0
  85. data/node_modules/preact/typings.json +5 -0
  86. metadata +78 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acaa0a2707fc4755d1cd27cb0bcff4ffaf43184142c9d830893c9a31b2009ae4
4
- data.tar.gz: fde7f8260325a8f34892ae1172ee6aa08d9a8f80b6eca75b22fcda3e10a2ceee
3
+ metadata.gz: 22608ab505427d142c63713014ab1c755747b103b201209aa7618857cf4618bb
4
+ data.tar.gz: 21dbf8c698d0c10ac3f31b6ef5410594884409f1644a4107bda7439f9cda06ce
5
5
  SHA512:
6
- metadata.gz: 4da5ff851b5f138306729313d500f1449b4e6a74d0926e12b4c65282ca01ce4212a269ce9e3252673071f17cd43b6052af77daac3796dfe295306518640bf9ef
7
- data.tar.gz: d89afaec0bb2b5ef4083acc885869c17be60a455602570abe1ffe563aded1ed704786b33dd6a19dab52a2b1e480a9ee8187eed444376f2e7aa8286a6c1f7e5de
6
+ metadata.gz: 3730afe02cad40f6bba07a5624b5aa7a7c38d4d4f03c89f19bf109adb5b22b38210915fa4099299135a76fbe1ef48f8be9d4fdf9933485ab8cb97ded4a4880c7
7
+ data.tar.gz: c0b87858aa2c7bc43daf1426ad39ac9b5b4314b0f9b276c9b6aab7009345c68f781fb57f0dd799c9b80cde44e7ab8997708d0d8881fed54c8826eb243f06d224
@@ -0,0 +1,37 @@
1
+ //= require accessible-autocomplete/dist/accessible-autocomplete.min.js
2
+
3
+ window.GOVUK = window.GOVUK || {};
4
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
5
+
6
+ (function (Modules) {
7
+ "use strict";
8
+
9
+ Modules.AccessibleAutocomplete = function () {
10
+ this.start = function ($element) {
11
+ var $selectElem = $element.find('select');
12
+
13
+ var configOptions = {
14
+ selectElement: document.getElementById($selectElem.attr('id')),
15
+ showAllValues: true,
16
+ confirmOnBlur: false
17
+ };
18
+
19
+ if ($selectElem.data('track-category') !== undefined && $selectElem.data('track-action') !== undefined) {
20
+ configOptions.onConfirm = function(val) {
21
+ track($selectElem.data('track-category'), $selectElem.data('track-action'), val, $selectElem.data('track-options'));
22
+ };
23
+ }
24
+
25
+ new accessibleAutocomplete.enhanceSelectElement(configOptions);
26
+ };
27
+
28
+ function track (category, action, label, options) {
29
+ if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
30
+ options = options || {};
31
+ options.label = label;
32
+
33
+ GOVUK.analytics.trackEvent(category, action, options);
34
+ }
35
+ }
36
+ };
37
+ })(window.GOVUK.Modules);
@@ -1,10 +1,11 @@
1
1
  // This component relies on JavaScript from GOV.UK Frontend
2
2
  //= require govuk-frontend/components/checkboxes/checkboxes.js
3
-
4
- window.GOVUK = window.GOVUK || {}
3
+ window.GOVUK = window.GOVUK || {};
5
4
  window.GOVUK.Modules = window.GOVUK.Modules || {};
6
- (function (Modules) {
7
- 'use strict'
5
+
6
+ (function (Modules) {
7
+ 'use strict';
8
+
8
9
  Modules.Checkboxes = function () {
9
10
  this.start = function (scope) {
10
11
  var _this = this;
@@ -40,5 +41,5 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
40
41
  $('#' + parent_id).prop("checked", false);
41
42
  }
42
43
  };
43
- }
44
+ };
44
45
  })(window.GOVUK.Modules);
@@ -1,23 +1,23 @@
1
- window.GOVUK = window.GOVUK || {}
1
+ window.GOVUK = window.GOVUK || {};
2
2
  window.GOVUK.Modules = window.GOVUK.Modules || {};
3
3
 
4
- (function (global, GOVUK) {
5
- 'use strict'
4
+ (function (Modules) {
5
+ 'use strict';
6
6
 
7
- GOVUK.Modules.CopyToClipboard = function () {
7
+ Modules.CopyToClipboard = function () {
8
8
  this.start = function (element) {
9
- var input = element[0].querySelector('.gem-c-input')
10
- var copyButton = element[0].querySelector('.gem-c-button')
9
+ var input = element[0].querySelector('.gem-c-input');
10
+ var copyButton = element[0].querySelector('.gem-c-button');
11
11
 
12
12
  input.addEventListener('click', function() {
13
- input.select()
14
- })
13
+ input.select();
14
+ });
15
15
 
16
16
  copyButton.addEventListener('click', function (event) {
17
- event.preventDefault()
18
- input.select()
19
- document.execCommand('copy')
20
- })
21
- }
22
- }
23
- })(window, window.GOVUK)
17
+ event.preventDefault();
18
+ input.select();
19
+ document.execCommand('copy');
20
+ });
21
+ };
22
+ };
23
+ })(window.GOVUK.Modules);
@@ -3,7 +3,6 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
3
 
4
4
  (function (Modules) {
5
5
  "use strict";
6
- window.GOVUK = window.GOVUK || {};
7
6
 
8
7
  Modules.Feedback = function () {
9
8
 
@@ -113,7 +112,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
113
112
  return {
114
113
  category: $node.data('track-category'),
115
114
  action: $node.data('track-action')
116
- }
115
+ };
117
116
  }
118
117
 
119
118
  function trackEvent (trackEventParams) {
@@ -147,7 +146,6 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
147
146
  that.$prompt.removeClass(jshiddenClass);
148
147
  that.$prompt.focus();
149
148
  }
150
- }
151
-
149
+ };
152
150
  };
153
151
  })(window.GOVUK.Modules);
@@ -1,12 +1,12 @@
1
- window.GOVUK = window.GOVUK || {}
1
+ window.GOVUK = window.GOVUK || {};
2
2
  window.GOVUK.Modules = window.GOVUK.Modules || {};
3
3
 
4
- (function (GOVUK) {
5
- 'use strict'
4
+ (function (Modules) {
5
+ 'use strict';
6
6
 
7
- GOVUK.Modules.InitialFocus = function () {
7
+ Modules.InitialFocus = function () {
8
8
  this.start = function (element) {
9
- element.focus()
10
- }
11
- }
12
- })(window.GOVUK)
9
+ element.focus();
10
+ };
11
+ };
12
+ })(window.GOVUK.Modules);
@@ -1,9 +1,10 @@
1
+ window.GOVUK = window.GOVUK || {};
2
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
+
1
4
  (function (Modules) {
2
5
  "use strict";
3
- window.GOVUK = window.GOVUK || {};
4
6
 
5
7
  Modules.Gemstepnav = function () {
6
-
7
8
  var actions = {}; // stores text for JS appended elements 'show' and 'hide' on steps, and 'show/hide all' button
8
9
  var rememberShownStep = false;
9
10
  var stepNavSize;
@@ -14,7 +15,6 @@
14
15
  var uniqueId;
15
16
 
16
17
  this.start = function ($element) {
17
-
18
18
  // Indicate that js has worked
19
19
  $element.addClass('gem-c-step-nav--active');
20
20
 
@@ -13,6 +13,7 @@
13
13
  @import "components/helpers/brand-colours";
14
14
  @import "components/mixins/media-down";
15
15
 
16
+ @import "components/accessible-autocomplete";
16
17
  @import "components/back-link";
17
18
  @import "components/breadcrumbs";
18
19
  @import "components/button";
@@ -0,0 +1,16 @@
1
+ @import "helpers/govuk-frontend-settings";
2
+ @import "govuk-frontend/settings/all";
3
+ @import "govuk-frontend/tools/all";
4
+ @import "govuk-frontend/helpers/all";
5
+
6
+ @import url(asset-path("accessible-autocomplete/dist/accessible-autocomplete.min.css"));
7
+
8
+ .gem-c-accessible-autocomplete {
9
+ .autocomplete__input {
10
+ background: govuk-colour("white");
11
+ }
12
+
13
+ .autocomplete__option {
14
+ @include govuk-font(19)
15
+ }
16
+ }
@@ -0,0 +1,24 @@
1
+ <%
2
+ id ||= "autocomplete-#{SecureRandom.hex(4)}"
3
+ label ||= nil
4
+ data_attributes ||= nil
5
+ options ||= []
6
+ selected_option ||= nil
7
+ %>
8
+ <% if label && options.any? %>
9
+ <%=
10
+ render "govuk_publishing_components/components/label", {
11
+ html_for: id
12
+ }.merge(label.symbolize_keys)
13
+ %>
14
+
15
+ <div class="gem-c-accessible-autocomplete" data-module="accessible-autocomplete">
16
+ <%=
17
+ select_tag(
18
+ id,
19
+ options_for_select(options, selected_option),
20
+ data: data_attributes
21
+ )
22
+ %>
23
+ </div>
24
+ <% end %>
@@ -0,0 +1,42 @@
1
+ name: Accessible autocomplete
2
+ description: An autocomplete component, built to be accessible.
3
+ body: |
4
+ This component uses the [Accessible Autocomplete](https://github.com/alphagov/accessible-autocomplete) code to create an accessible autocomplete element. The autocomplete is created with the `showAllValues`
5
+ option set to `true` and the `confirmOnBlur` option set to `false` (see [Autocomplete examples](https://alphagov.github.io/accessible-autocomplete/examples) here). It also depends upon the
6
+ [label component](https://github.com/component-guide/label).
7
+
8
+ If Javascript is disabled, the component appears as a select box, so the user can still select an option.
9
+ accessibility_criteria: |
10
+ [Accessibility acceptance criteria](https://github.com/alphagov/accessible-autocomplete/blob/master/accessibility-criteria.md)
11
+ examples:
12
+ default:
13
+ data:
14
+ label:
15
+ text: 'Countries'
16
+ options: [['', ''], ['France', 'fr'], ['Germany', 'de'], ['Sweden', 'se'], ['Switzerland', 'ch'], ['United Kingdom', 'gb'], ['United States', 'us']]
17
+ with_unique_identifier:
18
+ data:
19
+ id: 'unique-autocomplete'
20
+ label:
21
+ text: 'Countries'
22
+ options: [['', ''], ['France', 'fr'], ['Germany', 'de'], ['Sweden', 'se'], ['Switzerland', 'ch'], ['United Kingdom', 'gb'], ['United States', 'us']]
23
+ with_selected_option_chosen:
24
+ data:
25
+ id: 'selected-option-chosen-autocomplete'
26
+ label:
27
+ text: 'Countries'
28
+ options: [['', ''], ['France', 'fr'], ['Germany', 'de'], ['Sweden', 'se'], ['Switzerland', 'ch'], ['United Kingdom', 'gb'], ['United States', 'us']]
29
+ selected_option: ['United Kingdom', 'gb']
30
+ with_tracking_enabled:
31
+ description: |
32
+ This example shows tracking enabled on an autocomplete. Tracking will be enabled automatically when `track_category` and `track_action` are specified in `data_attributes`.
33
+ data:
34
+ id: 'tracking-enabled-autocomplete'
35
+ label:
36
+ text: 'Countries'
37
+ options: [['', ''], ['France', 'fr'], ['Germany', 'de'], ['Sweden', 'se'], ['Switzerland', 'ch'], ['United Kingdom', 'gb'], ['United States', 'us']]
38
+ data_attributes:
39
+ track_category: 'chosen_category'
40
+ track_action: 'chosen_action'
41
+ track_option:
42
+ custom_dimension: 'your_custom_dimension'
@@ -22,6 +22,7 @@ Rails.application.config.assets.precompile += %w(
22
22
  # Add GOV.Frontend assets
23
23
 
24
24
  Rails.application.config.assets.precompile += %w(
25
+ accessible-autocomplete/dist/accessible-autocomplete.min.css
25
26
  govuk-logotype-crown.png
26
27
  )
27
28
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '12.13.0'.freeze
2
+ VERSION = '12.14.0'.freeze
3
3
  end
@@ -0,0 +1,269 @@
1
+ # CHANGELOG
2
+
3
+ ## [Unreleased]
4
+
5
+ ## 1.6.2 - 2018-11-13
6
+
7
+ - Update all packages and add `@babel/preset-env` for browser polyfills. Updates Preact and avoids React 16 `onFocusOut` warnings - thanks [@colinrotherham](https://github.com/colinrotherham)
8
+ ([#316](https://github.com/alphagov/accessible-autocomplete/pull/316))
9
+
10
+ - Fix mouse event issues in IE9-11 including looping `mouseout` and click event being prevented on child elements (e.g. bold text) - thanks [@colinrotherham](https://github.com/colinrotherham)
11
+ ([#310](https://github.com/alphagov/accessible-autocomplete/pull/310))
12
+
13
+ - Fix position being incorrectly reported as '1 of n' regardless of actual
14
+ position in list – thanks [@PRGfx](https://github.com/PRGfx)
15
+ ([#291](https://github.com/alphagov/accessible-autocomplete/pull/291))
16
+
17
+ - Fix spacebar input not being registered when seeing 'No results found'
18
+ message – thanks [@AdenFraser](https://github.com/AdenFraser)
19
+ ([#287](https://github.com/alphagov/accessible-autocomplete/pull/287))
20
+
21
+ - Update following dependencies (from "Current" to "Wanted"). This fixes failing WebdriverIO tests and updates JS Standard to use eslint 4.
22
+
23
+ | Package | Current | Wanted | Latest |
24
+ |------------------------------------------|---------|--------|--------|
25
+ | babel-eslint | 8.0.0 | 8.2.6 | 8.2.6 |
26
+ | babel-loader | 7.1.0 | 7.1.5 | 7.1.5 |
27
+ | babel-plugin-transform-decorators-legacy | 1.3.4 | 1.3.5 | 1.3.5 |
28
+ | babel-register | 6.24.1 | 6.26.0 | 6.26.0 |
29
+ | babel-runtime | 6.23.0 | 6.26.0 | 6.26.0 |
30
+ | chai | 4.0.2 | 4.1.2 | 4.1.2 |
31
+ | chalk | 2.0.1 | 2.4.1 | 2.4.1 |
32
+ | copy-webpack-plugin | 4.0.1 | 4.5.2 | 4.5.2 |
33
+ | coveralls | 2.13.1 | 2.13.3 | 3.0.2 |
34
+ | cross-env | 5.0.1 | 5.2.0 | 5.2.0 |
35
+ | csso-cli | 1.0.0 | 1.1.0 | 1.1.0 |
36
+ | husky | 0.14.1 | 0.14.3 | 0.14.3 |
37
+ | karma | 1.7.0 | 1.7.1 | 2.0.4 |
38
+ | karma-coverage | 1.1.1 | 1.1.2 | 1.1.2 |
39
+ | karma-mocha-reporter | 2.2.3 | 2.2.5 | 2.2.5 |
40
+ | karma-webpack | 2.0.3 | 2.0.13 | 3.0.0 |
41
+ | mocha | 3.4.2 | 3.5.3 | 5.2.0 |
42
+ | npm-run-all | 4.0.2 | 4.1.3 | 4.1.3 |
43
+ | phantomjs-prebuilt | 2.1.14 | 2.1.16 | 2.1.16 |
44
+ | preact | 8.1.0 | 8.2.9 | 8.2.9 |
45
+ | sinon-chai | 2.11.0 | 2.14.0 | 3.2.0 |
46
+ | source-map-loader | 0.2.1 | 0.2.3 | 0.2.3 |
47
+ | standard | 10.0.2 | 11.0.1 | 11.0.1 |
48
+ | wdio-mocha-framework | 0.5.10 | 0.5.13 | 0.6.2 |
49
+ | wdio-sauce-service | 0.4.0 | 0.4.10 | 0.4.10 |
50
+ | wdio-selenium-standalone-service | 0.0.8 | 0.0.10 | 0.0.10 |
51
+ | wdio-spec-reporter | 0.1.0 | 0.1.5 | 0.1.5 |
52
+ | webdriverio | 4.8.0 | 4.13.1 | 4.13.1 |
53
+ | webpack | 3.0.0 | 3.12.0 | 4.16.1 |
54
+ | webpack-dev-server | 2.5.0 | 2.11.2 | 3.1.4 |
55
+ | webpack-sources | 1.0.1 | 1.1.0 | 1.1.0 |
56
+
57
+ ## 1.6.1 - 2017-09-25
58
+
59
+ - Fix role attr by moving `role='combobox'` to wrapper and adding `role='textbox'` to the input. By [@tobias-g](https://github.com/tobias-g)
60
+ - Fix examples page by removing unrequired npm package `v8-lazy-parse-webpack-plugin`
61
+ - Fix scrolling on iOS by reverting #85, new issue raised to find better fix for clicking custom suggestions #177
62
+ - Fix selection and timeout race condition. By [@tobias-g](https://github.com/tobias-g)
63
+ - Fix dropdown on IE to ensure it isn't focusable. By [@tobias-g](https://github.com/tobias-g)
64
+
65
+ ## 1.6.0 - 2017-07-20
66
+
67
+ - [Feature] Allow customization of the dropdown arrow. By [@sventschui](https://github.com/sventschui).
68
+
69
+ ## 1.5.0 - 2017-07-18
70
+
71
+ - [Feature] Add ability to translate texts. Relates to #96. By [@sventschui](https://github.com/sventschui).
72
+
73
+ ## 1.4.2 - 2017-07-18
74
+
75
+ - Allow space to confirm an option, fixes #98.
76
+ - Add support for navigating lists on IE9, 10 and 11, fixes #193.
77
+
78
+ ## 1.4.1 - 2017-07-06
79
+
80
+ - Fix use of HTML entities in enhanced select options. #151. By [@dracos](https://github.com/dracos).
81
+
82
+ ## 1.4.0 - 2017-07-04
83
+
84
+ - [Feature] Add option to show all values on dropdown. By [@joelanman](https://github.com/joelanman).
85
+
86
+ ## 1.3.2 - 2017-07-03
87
+
88
+ - Redirect keypresses on an option to input, fixes #179.
89
+
90
+ ## 1.3.1 - 2017-06-08
91
+
92
+ - Fix `autoselect: false` not working when using `enhanceSelectElement`.
93
+
94
+ ## 1.3.0 - 2017-06-02
95
+
96
+ - [Feature] Add support for passing an array of strings to `source`. By [@joelanman](https://github.com/joelanman).
97
+
98
+ ## 1.2.1 - 2017-05-24
99
+
100
+ - Fix progressive enhancement in FireFox < 48. By [@revilossor](https://github.com/revilossor).
101
+
102
+ ## 1.2.0 - 2017-05-23
103
+
104
+ - [Feature] Export Preact and React bundles.
105
+
106
+ ## 1.1.0 - 2017-05-18
107
+
108
+ - [Feature] Add `required` option. By [@samtsai](https://github.com/samtsai).
109
+
110
+ ## 1.0.6 - 2017-05-17
111
+
112
+ - Update preact dependency to v8.1.0.
113
+
114
+ ## 1.0.5 - 2017-05-16
115
+
116
+ - Add support for handling null/placeholder options when using `enhanceSelectElement`. Use `preserveNullOptions: true` to include options with `value=''` in the autocomplete results when enhancing a select element. By @lennym.
117
+
118
+ ## 1.0.4 - 2017-05-15 (deprecated)
119
+
120
+ - This release does not contain any changes compared to the previous one and is due to a mistake in our build scripts.
121
+
122
+ ## 1.0.3 - 2017-05-15
123
+
124
+ - Do not copy `name` attribute when using `enhanceSelectElement`. By [@lennym](https://github.com/lennym).
125
+
126
+ ## 1.0.2 - 2017-05-12
127
+
128
+ - Add support for an empty `defaultValue` when enhancing a select element. By [@lennym](https://github.com/lennym).
129
+
130
+ ## 1.0.1 - 2017-05-12
131
+
132
+ - Update `style` property in package.json to reflect updated filename. By [@lennym](https://github.com/lennym).
133
+
134
+ ## 1.0.0 - 2017-05-10
135
+
136
+ - [Breaking] Default `autoselect` to `true` when using `enhanceSelectElement`.
137
+ - [Breaking] Make `id` a required attribute.
138
+ - [Breaking] Rename `onSelect` to `onConfirm`.
139
+ - [Breaking] Rename `selectOnBlur` to `confirmOnBlur`.
140
+ - Fix an issue where users couldn't click on custom suggestions on Chrome.
141
+
142
+ ## 0.6.0 - 2017-05-10
143
+
144
+ - [Breaking] Rename component from `accessible-typeahead` to `accessible-autocomplete`.
145
+ - Default `defaultValue` when progressively enhancing.
146
+ - Throw an error when `enhanceSelectElement` is called without a `selectElement`.
147
+ - Throw errors when `accessibleAutocomplete` is called without `element` or `source`.
148
+
149
+ ## 0.5.0 - 2017-05-09
150
+
151
+ - Test the typeahead with end to end tests.
152
+ - Don't display hints on browsers that don't support pointer-events.
153
+ - [Breaking] Rename `dist/styled.min.css` to `dist/accessible-typeahead.min.css`.
154
+ - [Breaking] Rename library main export from `AccessibleTypeahead` to `accessibleTypeahead`.
155
+ - Fix aria status region to more reliably trigger when the number of results stay the same.
156
+ - Fix hint rendering and being picked up by assistive technologies.
157
+ - More aria status region above input so it's more easily picked while navigating.
158
+
159
+ ## 0.4.2 - 2017-05-03
160
+
161
+ - Add touchEnd handler for iOS and touch devices, fixes custom suggestions.
162
+ - Add `style` declaration in package.json
163
+ - Add support for UMD/commonjs module definition.
164
+
165
+ ## 0.4.1 - 2017-04-26
166
+
167
+ - Minify `styled.css` for production.
168
+
169
+ ## 0.4.0 - 2017-04-11
170
+
171
+ - [Breaking] Don't focus suggestions when hovering them, add `:hover` CSS class.
172
+ - Add `showNoOptionsFound` property to allow users to disable this behaviour.
173
+ - Pass through unrecognised key events to input, allowing users to continue typing when they are focusing an option.
174
+
175
+ ## 0.3.5 - 2017-04-06
176
+
177
+ - Don't prepopulate `defaultValue` in `enhanceSelectElement`.
178
+
179
+ ## 0.3.4 - 2017-04-06
180
+
181
+ - Pass actual selected object into `onSelect`.
182
+ - Add `selectOnBlur` property to allow users to disable this behaviour.
183
+ - Add `placeholder` property.
184
+
185
+ ## 0.3.3 - 2017-04-04
186
+
187
+ - Add `templates.inputValue` and `templates.suggestion` properties. These allow users to override how the suggestions are displayed.
188
+
189
+ ## 0.3.2 - 2017-04-03
190
+
191
+ - Add `AccessibleTypeahead.enhanceSelectElement` function.
192
+ - Add `onSelect` property.
193
+
194
+ ## 0.3.1 - 2017-03-09
195
+
196
+ - Add ability to specify a `defaultValue` to prefill the input.
197
+ - When user has selected an option with the keyboard, blurring will select.
198
+ - When user has no selected but autoselect is on, blurring will select.
199
+ - Hovering no longer selects, just focuses.
200
+ - When hovering out of component, focus returns to selected.
201
+ - Allow enter to submit forms when menu isn't opened.
202
+ - Hide results when going under minLength.
203
+
204
+ ## 0.3.0 - 2017-03-09
205
+
206
+ - [Breaking] Add `displayMenu` property. The default is `inline` which was not the previous default.
207
+ - CSS colour changes, and more properties moved away from inline styles.
208
+ - Turn off native browser autocomplete so it doesn't interfere with typeahead overlay.
209
+ - Change the content and styling of the 'No results found' feature.
210
+
211
+ ## 0.2.4 - 2017-03-02
212
+
213
+ - Display "No options found" when there are no results.
214
+ - Add `autoselect` property. This refactors the `:focused` CSS class to `--focused`, but because previous styling should still work as before, is not a breaking change.
215
+ - Poll the input element periodically to pick up value changes. This makes it more resilient to direct modifications from applications like Dragon, or from interventions from other JavaScript snippets.
216
+
217
+ ## 0.2.3 - 2017-02-21
218
+
219
+ - Add `minLength` property, which:
220
+ - Tells the aria region to display text that the user should type in more characters;
221
+ - Doesn't call the `source` until that lower limit is reached.
222
+ - Select text only when component is unfocused.
223
+
224
+ ## 0.2.2 - 2017-02-16
225
+
226
+ - Fix focus/blur events on IE11.
227
+ - Fix value of `aria-expanded` attribute to be based on `menuOpen`.
228
+ - Remove `aria-activedescendant` attribute when no option selected.
229
+ - Set `aria-selected` on options when they are focused.
230
+ - Fix clicking on options on Safari.
231
+ - Use a darker blue in the styled example for better contrast ratios.
232
+ - Don't close menu when blurring options or input on iOS, to allow VoiceOver users the ability to select from the available options.
233
+ - Autoselect entire text region when focusing into the input.
234
+
235
+ ## 0.2.1 - 2017-02-03
236
+
237
+ - Don't close menu when closing the keyboard on iOS, to allow VoiceOver users the ability to select from the available options.
238
+ - Add ability to set `name` attribute on input.
239
+
240
+ ## 0.2.0 - 2017-01-31
241
+
242
+ - [Breaking] Change the CSS classes to our own instead of the jQuery typeahead ones.
243
+ - Allow importing styling from file in `examples/styled.css`.
244
+ - Tweak the styled example to fix two Safari bugs:
245
+ - fix scroll bar appearing in menu where none is necessary;
246
+ - fix weird margin separating the input from the menu.
247
+
248
+ ## 0.1.3 - 2017-01-31
249
+
250
+ - Don't apply focused CSS on hover, change handler to MouseOver instead of MouseMove.
251
+ - (WIP) Make enter select first option if `autoselect` is enabled. This feature is not finished yet.
252
+ - Close results when focusing out of component after hovering an element.
253
+ - Update styled example:
254
+ - unbold results;
255
+ - make height of options consistent with input;
256
+ - remove top border from results menu;
257
+ - remove default focus outline on options.
258
+ - Don't display the menu when there are no options.
259
+ - Prevent accidental form submission by `preventDefault`ing on enter key.
260
+ - Add form around basic example.
261
+
262
+ ## 0.1.2 - 2017-01-20
263
+
264
+ - Don't specify typeahead menu width inline. Allows custom CSS to override it.
265
+
266
+ ## 0.1.0 - 2017-01-19
267
+
268
+ - Initial release.
269
+ - Basic functionality, minimal styling, only two examples, incomplete tests.