@ons/design-system 70.0.8 → 70.0.10

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 (202) hide show
  1. package/components/access-code/_macro.njk +31 -25
  2. package/components/access-code/example-access-code-error.njk +49 -37
  3. package/components/access-code/example-access-code.njk +40 -30
  4. package/components/accordion/_macro.njk +7 -6
  5. package/components/accordion/example-accordion-open.njk +0 -1
  6. package/components/address-input/_macro.njk +23 -11
  7. package/components/address-input/autosuggest.address.js +0 -5
  8. package/components/address-input/example-address-input-editable.njk +52 -50
  9. package/components/address-input/example-address-input-manual.njk +23 -21
  10. package/components/address-input/example-address-input.njk +40 -38
  11. package/components/address-output/_macro.njk +6 -6
  12. package/components/autosuggest/_macro.njk +57 -37
  13. package/components/autosuggest/example-autosuggest-country-multiple.njk +26 -26
  14. package/components/autosuggest/example-autosuggest-country.njk +24 -24
  15. package/components/back-to-top/example-back-to-top.njk +183 -6
  16. package/components/back-to-top/example-full-page-back-to-top.njk +135 -123
  17. package/components/breadcrumbs/_macro.njk +12 -4
  18. package/components/browser-banner/_macro.njk +6 -3
  19. package/components/button/_button.scss +36 -1
  20. package/components/button/_macro.njk +63 -62
  21. package/components/button/example-button-ghost.njk +1 -0
  22. package/components/call-to-action/_macro.njk +7 -5
  23. package/components/call-to-action/example-call-to-action-default.njk +3 -2
  24. package/components/card/_macro.njk +26 -10
  25. package/components/card/example-card-set-with-images.njk +31 -29
  26. package/components/card/example-card-set-with-lists.njk +58 -56
  27. package/components/card/example-card-set.njk +28 -26
  28. package/components/card/example-card.njk +9 -7
  29. package/components/char-check-limit/_macro.njk +1 -3
  30. package/components/checkboxes/_checkbox-macro.njk +19 -15
  31. package/components/checkboxes/_macro.njk +81 -72
  32. package/components/checkboxes/example-checkboxes-disabled.njk +30 -30
  33. package/components/checkboxes/example-checkboxes-error.njk +0 -1
  34. package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -5
  35. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +162 -170
  36. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +81 -81
  37. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +79 -79
  38. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +7 -5
  39. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +7 -5
  40. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +7 -5
  41. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +7 -5
  42. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +7 -5
  43. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +7 -5
  44. package/components/checkboxes/example-checkboxes.njk +7 -5
  45. package/components/content-pagination/_macro.njk +34 -32
  46. package/components/content-pagination/example-content-pagination.njk +17 -17
  47. package/components/cookies-banner/_macro.njk +19 -6
  48. package/components/cookies-banner/example-cookies-banner-cymraeg.njk +2 -1
  49. package/components/cookies-banner/example-cookies-banner.njk +3 -4
  50. package/components/date-input/_macro.njk +71 -63
  51. package/components/date-input/example-date-input-error-for-single-field.njk +0 -1
  52. package/components/date-input/example-date-input-error.njk +0 -1
  53. package/components/description-list/_macro.njk +20 -11
  54. package/components/details/_macro.njk +18 -11
  55. package/components/details/example-details-with-warning.njk +15 -10
  56. package/components/document-list/_macro.njk +102 -93
  57. package/components/document-list/example-document-list-article-featured.njk +27 -25
  58. package/components/document-list/example-document-list-articles.njk +55 -53
  59. package/components/document-list/example-document-list-downloads.njk +49 -47
  60. package/components/document-list/example-document-list-search-result-featured.njk +19 -17
  61. package/components/document-list/example-document-list-search-results.njk +60 -58
  62. package/components/duration/_macro.njk +61 -55
  63. package/components/duration/example-duration-error-for-single-field.njk +28 -26
  64. package/components/duration/example-duration-single-field.njk +23 -19
  65. package/components/duration/example-duration.njk +33 -29
  66. package/components/error/_macro.njk +8 -6
  67. package/components/external-link/_macro.njk +7 -5
  68. package/components/external-link/example-external-link.njk +9 -6
  69. package/components/feedback/_macro.njk +7 -5
  70. package/components/field/_macro.njk +2 -2
  71. package/components/fieldset/_macro.njk +23 -16
  72. package/components/footer/_macro.njk +28 -21
  73. package/components/footer/_macro.spec.js +1 -1
  74. package/components/footer/example-footer-cymraeg.njk +2 -1
  75. package/components/footer/example-footer-default.njk +3 -4
  76. package/components/footer/example-footer-transactional.njk +2 -1
  77. package/components/footer/example-footer-warning.njk +2 -1
  78. package/components/footer/example-footer-with-alternative-organisation.njk +2 -1
  79. package/components/footer/example-footer-with-coat-of-arms.njk +2 -1
  80. package/components/footer/example-footer-with-copyright.njk +2 -1
  81. package/components/footer/example-footer.njk +2 -1
  82. package/components/header/_header.scss +24 -19
  83. package/components/header/_macro.njk +183 -141
  84. package/components/header/example-header-default.njk +2 -1
  85. package/components/header/example-header-external-for-survey-with-description.njk +2 -1
  86. package/components/header/example-header-external-for-surveys.njk +2 -1
  87. package/components/header/example-header-external-welsh.njk +7 -7
  88. package/components/header/example-header-external-with-navigation-and-search.njk +3 -2
  89. package/components/header/example-header-external-with-navigation.njk +2 -1
  90. package/components/header/example-header-external-with-service-links.njk +2 -1
  91. package/components/header/example-header-external-with-sub-navigation-removed.njk +2 -1
  92. package/components/header/example-header-external-with-sub-navigation.njk +3 -2
  93. package/components/header/example-header-internal.njk +2 -1
  94. package/components/header/example-header-multiple-logos.njk +2 -1
  95. package/components/header/{example-header-neutral-for-multicoloured-logo.njk → example-header-neutral.njk} +2 -1
  96. package/components/helpers/grid.njk +17 -16
  97. package/components/hero/_macro.njk +6 -11
  98. package/components/hero/example-hero-dark.njk +2 -1
  99. package/components/hero/example-hero-default.njk +2 -1
  100. package/components/icon/_macro.njk +601 -168
  101. package/components/image/_macro.njk +7 -5
  102. package/components/input/_macro.njk +114 -95
  103. package/components/input/example-input-search-with-character-check.njk +1 -1
  104. package/components/input/example-input-search-with-placeholder.njk +1 -1
  105. package/components/input/example-input-search.njk +1 -1
  106. package/components/label/_macro.njk +32 -26
  107. package/components/language-selector/_macro.njk +11 -2
  108. package/components/list/_list.scss +13 -0
  109. package/components/list/_macro.njk +93 -73
  110. package/components/message/_macro.njk +20 -7
  111. package/components/message-list/_macro.njk +26 -20
  112. package/components/modal/_macro.njk +11 -12
  113. package/components/multiple-input-fields/_macro.njk +30 -28
  114. package/components/mutually-exclusive/_macro.njk +20 -13
  115. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -4
  116. package/components/mutually-exclusive/example-mutually-exclusive-date.njk +7 -5
  117. package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +44 -40
  118. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +7 -5
  119. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +6 -4
  120. package/components/mutually-exclusive/example-mutually-exclusive-number.njk +6 -4
  121. package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +6 -4
  122. package/components/navigation/_macro.njk +133 -67
  123. package/components/navigation/_navigation.scss +0 -9
  124. package/components/pagination/_macro.njk +42 -20
  125. package/components/panel/_macro.njk +27 -16
  126. package/components/panel/example-panel-bare.njk +6 -4
  127. package/components/panel/example-panel-with-announcement.njk +7 -4
  128. package/components/panel/example-panel-with-error-summary.njk +6 -4
  129. package/components/panel/example-panel-with-warning.njk +5 -3
  130. package/components/password/_macro.njk +7 -5
  131. package/components/phase-banner/_macro.njk +3 -3
  132. package/components/phase-banner/example-phase-banner-alpha.njk +2 -1
  133. package/components/phase-banner/example-phase-banner-beta.njk +4 -3
  134. package/components/question/_macro.njk +62 -47
  135. package/components/question/example-question-ccs.njk +40 -35
  136. package/components/question/example-question-fieldset.njk +84 -80
  137. package/components/question/example-question-interviewer-note.njk +27 -24
  138. package/components/question/example-question-no-fieldset.njk +39 -33
  139. package/components/quote/_macro.njk +3 -1
  140. package/components/radios/_macro.njk +54 -36
  141. package/components/radios/_macro.spec.js +21 -0
  142. package/components/radios/example-radios-with-clear-button-expanded.njk +6 -4
  143. package/components/radios/example-radios-with-clear-button.njk +6 -4
  144. package/components/radios/example-radios-with-descriptions.njk +7 -5
  145. package/components/radios/example-radios-with-revealed-select-expanded.njk +6 -4
  146. package/components/radios/example-radios-with-revealed-select.njk +6 -4
  147. package/components/radios/example-radios-with-revealed-text-area-expanded.njk +7 -5
  148. package/components/radios/example-radios-with-revealed-text-area.njk +7 -5
  149. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +7 -5
  150. package/components/radios/example-radios-with-revealed-text-input.njk +7 -5
  151. package/components/radios/example-radios-with-separator.njk +6 -4
  152. package/components/radios/example-radios-with-visible-text-input.njk +7 -5
  153. package/components/radios/example-radios-without-border.njk +0 -1
  154. package/components/radios/example-radios.njk +7 -5
  155. package/components/related-content/_macro.njk +10 -11
  156. package/components/related-content/_section-macro.njk +7 -7
  157. package/components/related-content/example-related-content-general.njk +5 -3
  158. package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -49
  159. package/components/related-content/example-related-content-social-media.njk +40 -38
  160. package/components/relationships/_macro.njk +10 -8
  161. package/components/relationships/example-relationships-error.njk +176 -168
  162. package/components/relationships/example-relationships-you.njk +169 -163
  163. package/components/relationships/example-relationships.njk +167 -161
  164. package/components/section-navigation/_macro.njk +34 -12
  165. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +23 -0
  166. package/components/select/_macro.njk +21 -18
  167. package/components/share-page/_macro.njk +10 -5
  168. package/components/skip-to-content/_macro.njk +1 -1
  169. package/components/skip-to-content/example-skip-to-content.njk +1 -0
  170. package/components/status/_macro.njk +1 -1
  171. package/components/summary/_macro.njk +53 -23
  172. package/components/summary/example-summary-household-no-rows.njk +18 -16
  173. package/components/summary/example-summary-household.njk +75 -73
  174. package/components/summary/example-summary-hub-minimal.njk +74 -72
  175. package/components/summary/example-summary-hub.njk +169 -167
  176. package/components/table/_macro.njk +72 -45
  177. package/components/table-of-contents/_macro.njk +34 -32
  178. package/components/table-of-contents/example-table-of-contents-grouped.njk +1 -1
  179. package/components/table-of-contents/example-table-of-contents-single.njk +1 -1
  180. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +79 -38
  181. package/components/table-of-contents/example-table-of-contents-sticky.njk +50 -13
  182. package/components/tabs/_macro.njk +12 -6
  183. package/components/tabs/example-tabs-details.njk +5 -6
  184. package/components/text-indent/_macro.njk +1 -3
  185. package/components/textarea/_macro.njk +49 -46
  186. package/components/textarea/_macro.spec.js +0 -11
  187. package/components/timeline/_macro.njk +4 -6
  188. package/components/timeout-modal/_macro.njk +21 -19
  189. package/components/timeout-modal/example-timeout-modal.njk +16 -14
  190. package/components/timeout-panel/_macro.njk +19 -17
  191. package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -11
  192. package/components/upload/_macro.njk +20 -16
  193. package/components/video/_macro.njk +16 -2
  194. package/components/video/example-video.njk +2 -2
  195. package/css/main.css +1 -1
  196. package/layout/_dsTemplate.njk +22 -20
  197. package/layout/_template.njk +63 -49
  198. package/package.json +4 -3
  199. package/scripts/main.es5.js +1 -1
  200. package/scripts/main.js +1 -1
  201. package/scss/overrides/hcm.scss +1 -1
  202. package/scss/vars/_colors.scss +1 -1
@@ -1,40 +1,42 @@
1
1
  {% from "components/address-input/_macro.njk" import onsAddressInput %}
2
2
 
3
- {{ onsAddressInput({
4
- "id": "address-input",
5
- "dontWrap": true,
6
- "label": {
7
- "text": "Enter address or postcode and select from results",
8
- "id": "address-label-input"
9
- },
10
- "isEditable": false,
11
- "mandatory": true,
12
- "externalInitialiser": true,
13
- "autocomplete": "off",
14
- "APIDomain": "https://mock-address-api.gcp.onsdigital.uk",
15
- 'APIDomainBearerToken': "some_token",
16
- "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
17
- "ariaYouHaveSelected": "You have selected",
18
- "ariaMinChars": "Enter 3 or more characters for suggestions.",
19
- "ariaOneResult": "There is one suggestion available.",
20
- "ariaNResults": "There are {n} suggestions available.",
21
- "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
22
- "ariaGroupedResults": "There are {n} for {x}",
23
- "groupCount": "{n} addresses",
24
- "moreResults": "Enter more of the address to improve results",
25
- "resultsTitle": "Select an address",
26
- "resultsTitleId": "address-results",
27
- "noResults": "No results found. Try entering a different part of the address",
28
- "tooManyResults": "{n} results found. Enter more of the address to improve results",
29
- "typeMore": "Enter more of the address to get results",
30
- "errorTitle": "There is a problem with your answer",
31
- "errorMessageEnter": "Enter an address",
32
- "errorMessageSelect": "Select an address",
33
- "errorMessageAPI": "Sorry, there is a problem. We are working to fix it. Please try again later or",
34
- "errorMessageAPILinkText": "contact us for more help",
35
- "errorMessageAPILink": "#0",
36
- "options": {
37
- "regionCode": "gb-eng",
38
- "addressType": "residential"
39
- }
40
- }) }}
3
+ {{
4
+ onsAddressInput({
5
+ "id": "address-input",
6
+ "dontWrap": true,
7
+ "label": {
8
+ "text": "Enter address or postcode and select from results",
9
+ "id": "address-label-input"
10
+ },
11
+ "isEditable": false,
12
+ "mandatory": true,
13
+ "externalInitialiser": true,
14
+ "autocomplete": "off",
15
+ "APIDomain": "https://mock-address-api.gcp.onsdigital.uk",
16
+ 'APIDomainBearerToken': "some_token",
17
+ "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
18
+ "ariaYouHaveSelected": "You have selected",
19
+ "ariaMinChars": "Enter 3 or more characters for suggestions.",
20
+ "ariaOneResult": "There is one suggestion available.",
21
+ "ariaNResults": "There are {n} suggestions available.",
22
+ "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
23
+ "ariaGroupedResults": "There are {n} for {x}",
24
+ "groupCount": "{n} addresses",
25
+ "moreResults": "Enter more of the address to improve results",
26
+ "resultsTitle": "Select an address",
27
+ "resultsTitleId": "address-results",
28
+ "noResults": "No results found. Try entering a different part of the address",
29
+ "tooManyResults": "{n} results found. Enter more of the address to improve results",
30
+ "typeMore": "Enter more of the address to get results",
31
+ "errorTitle": "There is a problem with your answer",
32
+ "errorMessageEnter": "Enter an address",
33
+ "errorMessageSelect": "Select an address",
34
+ "errorMessageAPI": "Sorry, there is a problem. We are working to fix it. Please try again later or",
35
+ "errorMessageAPILinkText": "contact us for more help",
36
+ "errorMessageAPILink": "#0",
37
+ "options": {
38
+ "regionCode": "gb-eng",
39
+ "addressType": "residential"
40
+ }
41
+ })
42
+ }}
@@ -1,20 +1,20 @@
1
1
  {% macro onsAddressOutput(params) %}
2
- <div class="ons-address-output{% if params.classes %} {{ params.classes }}{% endif %}">
2
+ <div class="ons-address-output{{ ' ' + params.classes if params.classes else '' }}">
3
3
  <p class="ons-address-output__lines">
4
4
  {% if params.unit %}
5
- <span class="ons-address-output__unit">{{ params.unit }}</span><br>
5
+ <span class="ons-address-output__unit">{{ params.unit }}</span><br />
6
6
  {% endif %}
7
7
  {% if params.organisation %}
8
- <span class="ons-address-output__organisation">{{ params.organisation }}</span><br>
8
+ <span class="ons-address-output__organisation">{{ params.organisation }}</span><br />
9
9
  {% endif %}
10
10
  {% if params.line1 %}
11
- <span class="ons-address-output__line1">{{ params.line1 }}</span><br>
11
+ <span class="ons-address-output__line1">{{ params.line1 }}</span><br />
12
12
  {% endif %}
13
13
  {% if params.line2 %}
14
- <span class="ons-address-output__line2">{{ params.line2 }}</span><br>
14
+ <span class="ons-address-output__line2">{{ params.line2 }}</span><br />
15
15
  {% endif %}
16
16
  {% if params.town %}
17
- <span class="ons-address-output__town">{{ params.town }}</span><br>
17
+ <span class="ons-address-output__town">{{ params.town }}</span><br />
18
18
  {% endif %}
19
19
  {% if params.postcode %}
20
20
  <span class="ons-address-output__postcode">{{ params.postcode }}</span>
@@ -3,7 +3,7 @@
3
3
  {% macro onsAutosuggest(params) %}
4
4
  <div
5
5
  id="{{ params.id }}-container"
6
- class="{% if not params.externalInitialiser %}ons-js-autosuggest {% endif %}{% if params.isEditable == false %}ons-js-address-not-editable{% endif %}{% if params.mandatory == true %} ons-js-address-mandatory{% endif %} {% if params.containerClasses %} {{ params.containerClasses }}{% endif %} ons-autosuggest"
6
+ class="ons-autosuggest{{ ' ons-js-autosuggest' if not params.externalInitialiser }}{{ ' ons-js-address-not-editable' if params.isEditable == false }}{{ ' ons-js-address-mandatory' if params.mandatory == true }}{{ ' ' + params.containerClasses if params.containerClasses else '' }}"
7
7
  data-instructions="{{ params.instructions }}"
8
8
  data-aria-you-have-selected="{{ params.ariaYouHaveSelected }}"
9
9
  data-min-chars="{{ params.minChars }}"
@@ -35,50 +35,70 @@
35
35
  {% if params.options.addressType %}data-options-address-type="{{ params.options.addressType }}"{% endif %}
36
36
  {% endif %}
37
37
  >
38
-
39
38
  {% set autosuggestResults %}
40
- <div class="ons-autosuggest__results ons-js-autosuggest-results{% if params.input.width %} ons-input--w-{{ params.input.width }}{% else %} ons-input--w-20{% endif %}">
39
+ <div
40
+ class="ons-autosuggest__results ons-js-autosuggest-results{% if params.input.width %}{{ ' ' }}ons-input--w-{{ params.input.width }}{% else %}{{ ' ' }}ons-input--w-20{% endif %}"
41
+ >
41
42
  <div id="{{ params.resultsTitleId }}" class="ons-autosuggest__results-title ons-u-fs-s">{{ params.resultsTitle }}</div>
42
- <ul class="ons-autosuggest__listbox ons-js-autosuggest-listbox" title="{{ params.resultsTitle }}" role="listbox" id="{{ params.id }}-listbox" tabindex="-1"></ul>
43
+ <ul
44
+ class="ons-autosuggest__listbox ons-js-autosuggest-listbox"
45
+ title="{{ params.resultsTitle }}"
46
+ role="listbox"
47
+ id="{{ params.id }}-listbox"
48
+ tabindex="-1"
49
+ ></ul>
50
+ </div>
51
+ <div
52
+ class="ons-autosuggest__instructions ons-u-vh ons-js-autosuggest-instructions"
53
+ id="{{ params.id }}-instructions"
54
+ tabindex="-1"
55
+ >
56
+ {{ params.instructions }}
43
57
  </div>
44
- <div class="ons-autosuggest__instructions ons-u-vh ons-js-autosuggest-instructions" id="{{ params.id }}-instructions" tabindex="-1">{{ params.instructions }}</div>
45
- <div class="ons-autosuggest__status ons-u-vh ons-js-autosuggest-aria-status" aria-live="assertive" aria-atomic="true" role="status" tabindex="-1"></div>
58
+ <div
59
+ class="ons-autosuggest__status ons-u-vh ons-js-autosuggest-aria-status"
60
+ aria-live="assertive"
61
+ aria-atomic="true"
62
+ role="status"
63
+ tabindex="-1"
64
+ ></div>
46
65
  {% endset %}
47
66
 
48
- {{ onsInput({
49
- "id": params.id,
50
- "type": params.input.type,
51
- "classes": "ons-js-autosuggest-input " + (params.input.classes if params.input.classes else ''),
52
- "width": params.input.width,
53
- "label": params.input.label,
54
- "autocomplete": params.input.autocomplete,
55
- "legend": params.input.legend,
56
- "legendClasses": params.input.legendClasses,
57
- "legendIsQuestionTitle": params.input.legendIsQuestionTitle,
58
- "value": params.input.value,
59
- "attributes": params.input.attributes,
60
- "error": params.input.error,
61
- "mutuallyExclusive": params.input.mutuallyExclusive,
62
- "accessiblePlaceholder": params.input.accessiblePlaceholder,
63
- "name": params.input.name,
64
- "autosuggestResults": autosuggestResults,
65
- "minLength": params.input.minLength,
66
- "maxLength": params.input.maxLength,
67
- "prefix": params.input.prefix,
68
- "suffix": params.input.suffix,
69
- "fieldId": params.input.fieldId,
70
- "fieldClasses": params.input.fieldClasses,
71
- "dontWrap": params.input.dontWrap,
72
- "charCheckLimit": params.input.charCheckLimit,
73
- "searchButton": params.input.searchButton,
74
- "postTextboxLinkText": params.input.postTextboxLinkText,
75
- "postTextboxLinkUrl": params.input.postTextboxLinkUrl,
76
- "listeners": params.input.listeners
77
- }) }}
67
+ {{
68
+ onsInput({
69
+ "id": params.id,
70
+ "type": params.input.type,
71
+ "classes": "ons-js-autosuggest-input" + (" " + params.input.classes if params.input.classes else ""),
72
+ "width": params.input.width,
73
+ "label": params.input.label,
74
+ "autocomplete": params.input.autocomplete,
75
+ "legend": params.input.legend,
76
+ "legendClasses": params.input.legendClasses,
77
+ "legendIsQuestionTitle": params.input.legendIsQuestionTitle,
78
+ "value": params.input.value,
79
+ "attributes": params.input.attributes,
80
+ "error": params.input.error,
81
+ "mutuallyExclusive": params.input.mutuallyExclusive,
82
+ "accessiblePlaceholder": params.input.accessiblePlaceholder,
83
+ "name": params.input.name,
84
+ "autosuggestResults": autosuggestResults,
85
+ "minLength": params.input.minLength,
86
+ "maxLength": params.input.maxLength,
87
+ "prefix": params.input.prefix,
88
+ "suffix": params.input.suffix,
89
+ "fieldId": params.input.fieldId,
90
+ "fieldClasses": params.input.fieldClasses,
91
+ "dontWrap": params.input.dontWrap,
92
+ "charCheckLimit": params.input.charCheckLimit,
93
+ "searchButton": params.input.searchButton,
94
+ "postTextboxLinkText": params.input.postTextboxLinkText,
95
+ "postTextboxLinkUrl": params.input.postTextboxLinkUrl,
96
+ "listeners": params.input.listeners
97
+ })
98
+ }}
78
99
 
79
100
  {% if not params.mutuallyExclusive %}
80
101
  {{ autosuggestResults | safe }}
81
102
  {% endif %}
82
-
83
103
  </div>
84
104
  {% endmacro %}
@@ -2,32 +2,32 @@
2
2
 
3
3
  <div class="ons-grid ons-grid--gutterless">
4
4
  <div class="ons-grid__col ons-col-8@m">
5
-
6
- {{ onsAutosuggest({
7
- "id": "country-of-birth-autosuggest-multiple",
8
- "input": {
9
- "label": {
10
- "text": "Passport",
11
- "id": "country-of-birth-label-multiple",
12
- "description": "Enter your own answer or select from suggestions. You can enter multiple countries if you have a passport for more than one."
5
+ {{
6
+ onsAutosuggest({
7
+ "id": "country-of-birth-autosuggest-multiple",
8
+ "input": {
9
+ "label": {
10
+ "text": "Passport",
11
+ "id": "country-of-birth-label-multiple",
12
+ "description": "Enter your own answer or select from suggestions. You can enter multiple countries if you have a passport for more than one."
13
+ },
14
+ "autocomplete": "off"
13
15
  },
14
- "autocomplete": "off"
15
- },
16
- "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
17
- "ariaYouHaveSelected": "You have selected",
18
- "ariaMinChars": "Enter 3 or more characters for suggestions.",
19
- "ariaOneResult": "There is one suggestion available.",
20
- "ariaNResults": "There are {n} suggestions available.",
21
- "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
22
- "moreResults": "Continue entering to improve suggestions",
23
- "resultsTitle": "Suggestions",
24
- "resultsTitleId": "country-of-birth-suggestions",
25
- "allowMultiple": true,
26
- "autosuggestData": "/examples/data/country-of-birth.json",
27
- "noResults": "No suggestions found. You can enter your own answer",
28
- "typeMore": "Continue entering to get suggestions",
29
- "language": "en"
30
- }) }}
31
-
16
+ "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
17
+ "ariaYouHaveSelected": "You have selected",
18
+ "ariaMinChars": "Enter 3 or more characters for suggestions.",
19
+ "ariaOneResult": "There is one suggestion available.",
20
+ "ariaNResults": "There are {n} suggestions available.",
21
+ "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
22
+ "moreResults": "Continue entering to improve suggestions",
23
+ "resultsTitle": "Suggestions",
24
+ "resultsTitleId": "country-of-birth-suggestions",
25
+ "allowMultiple": true,
26
+ "autosuggestData": "/examples/data/country-of-birth.json",
27
+ "noResults": "No suggestions found. You can enter your own answer",
28
+ "typeMore": "Continue entering to get suggestions",
29
+ "language": "en"
30
+ })
31
+ }}
32
32
  </div>
33
33
  </div>
@@ -2,30 +2,30 @@
2
2
 
3
3
  <div class="ons-grid ons-grid--gutterless">
4
4
  <div class="ons-grid__col ons-col-8@m">
5
-
6
- {{ onsAutosuggest({
7
- "id": "country-of-birth-autosuggest",
8
- "input": {
9
- "label": {
10
- "text": "Current name of country",
11
- "description": "Enter your own answer or select from suggestions",
12
- "id": "country-of-birth-label"
5
+ {{
6
+ onsAutosuggest({
7
+ "id": "country-of-birth-autosuggest",
8
+ "input": {
9
+ "label": {
10
+ "text": "Current name of country",
11
+ "description": "Enter your own answer or select from suggestions",
12
+ "id": "country-of-birth-label"
13
+ },
14
+ "autocomplete": "off"
13
15
  },
14
- "autocomplete": "off"
15
- },
16
- "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
17
- "ariaYouHaveSelected": "You have selected",
18
- "ariaMinChars": "Enter 3 or more characters for suggestions.",
19
- "ariaOneResult": "There is one suggestion available.",
20
- "ariaNResults": "There are {n} suggestions available.",
21
- "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
22
- "moreResults": "Continue entering to improve suggestions",
23
- "resultsTitle": "Suggestions",
24
- "resultsTitleId": "country-of-birth-suggestions",
25
- "autosuggestData": "/examples/data/country-of-birth.json",
26
- "noResults": "No suggestions found. You can enter your own answer",
27
- "typeMore": "Continue entering to get suggestions"
28
- }) }}
29
-
16
+ "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
17
+ "ariaYouHaveSelected": "You have selected",
18
+ "ariaMinChars": "Enter 3 or more characters for suggestions.",
19
+ "ariaOneResult": "There is one suggestion available.",
20
+ "ariaNResults": "There are {n} suggestions available.",
21
+ "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
22
+ "moreResults": "Continue entering to improve suggestions",
23
+ "resultsTitle": "Suggestions",
24
+ "resultsTitleId": "country-of-birth-suggestions",
25
+ "autosuggestData": "/examples/data/country-of-birth.json",
26
+ "noResults": "No suggestions found. You can enter your own answer",
27
+ "typeMore": "Continue entering to get suggestions"
28
+ })
29
+ }}
30
30
  </div>
31
31
  </div>