@ons/design-system 64.0.0 → 65.1.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 (124) hide show
  1. package/components/access-code/_macro.njk +2 -2
  2. package/components/access-code/_macro.spec.js +2 -2
  3. package/components/access-code/access-code.dom.js +11 -0
  4. package/components/access-code/{uac.js → access-code.js} +1 -1
  5. package/components/access-code/{uac.scss → access-code.scss} +1 -1
  6. package/components/access-code/example-access-code-error.njk +6 -6
  7. package/components/access-code/example-access-code.njk +4 -4
  8. package/components/accordion/_macro.njk +2 -2
  9. package/components/accordion/_macro.spec.js +3 -3
  10. package/components/accordion/accordion.dom.js +1 -1
  11. package/components/accordion/accordion.js +1 -1
  12. package/components/address-input/autosuggest.address.error.js +1 -1
  13. package/components/address-input/autosuggest.address.js +2 -2
  14. package/components/address-input/autosuggest.address.spec.js +5 -5
  15. package/components/autosuggest/_autosuggest.scss +11 -6
  16. package/components/autosuggest/_macro.njk +32 -31
  17. package/components/autosuggest/_macro.spec.js +18 -18
  18. package/components/autosuggest/autosuggest.spec.js +31 -31
  19. package/components/autosuggest/autosuggest.ui.js +8 -9
  20. package/components/breadcrumbs/_breadcrumbs.scss +6 -6
  21. package/components/breadcrumbs/_macro.njk +4 -4
  22. package/components/breadcrumbs/_macro.spec.js +13 -13
  23. package/components/button/_button.scss +27 -27
  24. package/components/button/_macro.spec.js +2 -2
  25. package/components/call-to-action/_macro.njk +1 -1
  26. package/components/card/_card.scss +14 -0
  27. package/components/card/_macro.njk +7 -8
  28. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +88 -0
  29. package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +70 -0
  30. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +72 -0
  31. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +60 -0
  32. package/components/content-pagination/_content-pagination.scss +1 -1
  33. package/components/date-input/_macro.njk +3 -3
  34. package/components/date-input/_macro.spec.js +118 -0
  35. package/components/date-input/example-date-input-error-for-single-field.njk +63 -0
  36. package/components/details/_details.scss +1 -1
  37. package/components/document-list/_macro.njk +5 -7
  38. package/components/document-list/_macro.spec.js +2 -2
  39. package/components/document-list/example-document-list-search-result-featured.njk +1 -1
  40. package/components/document-list/example-document-list-search-results.njk +3 -3
  41. package/components/external-link/_external-link.scss +3 -3
  42. package/components/external-link/_macro.njk +1 -1
  43. package/components/fieldset/_fieldset.scss +1 -1
  44. package/components/footer/_footer.scss +2 -2
  45. package/components/footer/example-footer-with-alternative-organisation.njk +5 -5
  46. package/components/header/_header.scss +8 -8
  47. package/components/header/_macro.njk +4 -4
  48. package/components/header/example-header-external-with-navigation.njk +5 -5
  49. package/components/header/example-header-external-with-service-links.njk +3 -3
  50. package/components/header/example-header-external-with-sub-navigation.njk +10 -10
  51. package/components/header/example-header-internal.njk +2 -2
  52. package/components/header/example-header-neutral-for-multicoloured-logo.njk +6 -6
  53. package/components/icon/_icon.scss +1 -1
  54. package/components/icon/_macro.njk +35 -35
  55. package/components/icon/_macro.spec.js +1 -1
  56. package/components/image/_image.scss +2 -2
  57. package/components/image/_macro.njk +4 -6
  58. package/components/image/_macro.spec.js +10 -10
  59. package/components/list/_list.scss +5 -2
  60. package/components/list/_macro.njk +22 -10
  61. package/components/list/_macro.spec.js +42 -0
  62. package/components/mutually-exclusive/_macro.njk +4 -3
  63. package/components/navigation/_macro.njk +6 -6
  64. package/components/navigation/_macro.spec.js +4 -4
  65. package/components/pagination/_macro.njk +17 -2
  66. package/components/pagination/_pagination.scss +14 -0
  67. package/components/pagination/example-pagination-first.njk +0 -2
  68. package/components/pagination/example-pagination-last.njk +0 -2
  69. package/components/pagination/example-pagination-with-no-range-indicator.njk +0 -2
  70. package/components/pagination/example-pagination.njk +0 -2
  71. package/components/panel/_macro.njk +1 -1
  72. package/components/panel/_panel.scss +7 -7
  73. package/components/password/_macro.njk +1 -1
  74. package/components/password/example-password.njk +1 -2
  75. package/components/question/example-question-interviewer-note.njk +1 -1
  76. package/components/quote/_quote.scss +1 -1
  77. package/components/radios/_macro.njk +1 -1
  78. package/components/radios/example-radios-with-clear-button-expanded.njk +98 -0
  79. package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +70 -0
  80. package/components/radios/example-radios-with-revealed-radios-expanded.njk +69 -0
  81. package/components/radios/example-radios-with-revealed-select-expanded.njk +70 -0
  82. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +81 -0
  83. package/components/relationships/_macro.spec.js +9 -11
  84. package/components/relationships/example-relationships-error.njk +28 -28
  85. package/components/relationships/example-relationships-you.njk +29 -29
  86. package/components/relationships/example-relationships.njk +28 -28
  87. package/components/relationships/relationships.spec.js +13 -13
  88. package/components/reply/_macro.njk +5 -2
  89. package/components/reply/_macro.spec.js +7 -1
  90. package/components/section-navigation/_macro.njk +2 -1
  91. package/components/section-navigation/_macro.spec.js +2 -13
  92. package/components/skip-to-content/_macro.njk +2 -1
  93. package/components/skip-to-content/_macro.spec.js +17 -3
  94. package/components/skip-to-content/_skip.scss +1 -1
  95. package/components/skip-to-content/skip-to-content.dom.js +1 -1
  96. package/components/skip-to-content/skip-to-content.spec.js +3 -3
  97. package/components/summary/_summary.scss +1 -1
  98. package/components/table/_table.scss +6 -6
  99. package/components/table/sortable-table.js +1 -1
  100. package/components/tabs/_macro.njk +5 -5
  101. package/components/tabs/_macro.spec.js +1 -1
  102. package/components/tabs/example-tabs-details.njk +3 -0
  103. package/components/tabs/example-tabs.njk +0 -1
  104. package/components/textarea/example-textarea-error.njk +4 -4
  105. package/components/timeline/_macro.njk +18 -22
  106. package/components/timeline/_macro.spec.js +18 -0
  107. package/components/video/example-video.njk +1 -1
  108. package/components/video/video.js +10 -1
  109. package/components/video/video.spec.js +33 -0
  110. package/css/main.css +3 -3
  111. package/css/print.css +1 -1
  112. package/js/cookies-settings.js +1 -1
  113. package/js/main.js +1 -1
  114. package/package.json +19 -21
  115. package/scripts/main.es5.js +1 -1
  116. package/scripts/main.js +1 -1
  117. package/scss/base/_global.scss +1 -1
  118. package/scss/main.scss +1 -1
  119. package/scss/objects/_spacing.scss +3 -3
  120. package/scss/overrides/hcm.scss +10 -10
  121. package/scss/overrides/rtl.scss +2 -2
  122. package/scss/print.scss +2 -2
  123. package/components/access-code/uac.dom.js +0 -11
  124. /package/components/access-code/{uac.spec.js → access-code.spec.js} +0 -0
@@ -7,6 +7,7 @@
7
7
  {# Resolves caller issue in Jinja: https://github.com/pallets/jinja/issues/371 #}
8
8
  {% set content = caller() %}
9
9
  {% set exclusiveOptionsLength = params.exclusiveOptions | length %}
10
+ {% set or = params.or | default("Or") %}
10
11
 
11
12
  {% call onsFieldset({
12
13
  "id": params.id,
@@ -26,7 +27,7 @@
26
27
  {% endif %}
27
28
  {% if exclusiveOptionsLength == 1 %}
28
29
  <p class="ons-checkboxes--mutually-exclusive__item ons-u-mt-s">
29
- <span class="ons-checkboxes__label ons-u-fs-r--b" aria-hidden="true">{{ params.or }}</span>
30
+ <span class="ons-checkboxes__label ons-u-fs-r--b" aria-hidden="true">{{ or }}</span>
30
31
  {{
31
32
  onsCheckbox({
32
33
  "id": params.exclusiveOptions[0].id,
@@ -38,7 +39,7 @@
38
39
  "deselectMessage": params.deselectMessage,
39
40
  "inputClasses": "ons-js-exclusive-option",
40
41
  "label": {
41
- "text": '<span class="ons-u-vh">' + params.or + ', </span> ' + params.exclusiveOptions[0].label.text,
42
+ "text": '<span class="ons-u-vh">' + or + ', </span> ' + params.exclusiveOptions[0].label.text,
42
43
  "description": params.exclusiveOptions[0].label.description
43
44
  }
44
45
  })
@@ -46,7 +47,7 @@
46
47
  </p>
47
48
  {% elif exclusiveOptionsLength > 1 %}
48
49
  <p class="ons-checkboxes--mutually-exclusive__item ons-u-mt-s">
49
- <span class="ons-checkboxes__label ons-u-fs-r--b" aria-hidden="true">{{ params.or }}</span>
50
+ <span class="ons-checkboxes__label ons-u-fs-r--b" aria-hidden="true">{{ or }}</span>
50
51
  {{
51
52
  onsRadios({
52
53
  "dontWrap": true,
@@ -14,7 +14,7 @@
14
14
  {% endif %}
15
15
  {{ onsAutosuggest({
16
16
  "id": "ons-site-search",
17
- "containerClasses": "ons-autosuggest-input--header",
17
+ "containerClasses": "ons-autosuggest--header",
18
18
  "classes": autosuggestClasses,
19
19
  "label": {
20
20
  "text": params.siteSearchAutosuggest.label,
@@ -42,7 +42,7 @@
42
42
  <ul class="ons-navigation__list">
43
43
  {% for item in params.navigation.itemsList %}
44
44
  <li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and item.url in params.navigation.currentPath) }}">
45
- <a class="ons-navigation__link" href="{{ item.url }}" {% if item.id %}id="{{ item.id }}" {% endif %}{% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %}>{{ item.title }}</a>
45
+ <a class="ons-navigation__link" href="{{ item.url }}" {% if item.id %}id="{{ item.id }}" {% endif %}{% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %}>{% if item.title %}{{ item.title }}{% elif item.text %}{{ item.text }}{% endif %}</a>
46
46
  </li>
47
47
  {% endfor %}
48
48
  </ul>
@@ -55,7 +55,7 @@
55
55
  <ul class="ons-navigation__list ons-navigation__list">
56
56
  {% for item in params.navigation.subNavigation.itemsList %}
57
57
  <li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and item.url in params.navigation.currentPath) }}">
58
- <a class="ons-navigation__link ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id %}id="{{ item.id }}" {% endif %}>{{ item.title }}</a>
58
+ <a class="ons-navigation__link ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id %}id="{{ item.id }}" {% endif %}>{% if item.title %}{{ item.title }}{% elif item.text %}{{ item.text }}{% endif %}</a>
59
59
  </li>
60
60
  {% endfor %}
61
61
  </ul>
@@ -68,7 +68,7 @@
68
68
  "type": "button",
69
69
  "variants": ["mobile", "dropdown"],
70
70
  "attributes": {
71
- "aria-label": "Toggle section navigation",
71
+ "aria-label": "Toggle " + params.navigation.currentPageTitle + " menu" if params.navigation.currentPageTitle else "Toggle section menu",
72
72
  "aria-controls": params.navigation.subNavigation.id,
73
73
  "aria-expanded": "false"
74
74
  }
@@ -81,14 +81,14 @@
81
81
  </li>
82
82
  {% for item in params.navigation.subNavigation.itemsList %}
83
83
  <li class="ons-navigation__item {{ ' ons-navigation__item--active' if (item.url == params.navigation.subNavigation.currentPath) or (item.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and item.url in params.navigation.currentPath) }}">
84
- <a class="ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id %}id="{{ item.id }}--mobile" {% endif %}>{{ item.title }}</a>
84
+ <a class="ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id %}id="{{ item.id }}--mobile" {% endif %}>{% if item.title %}{{ item.title }}{% elif item.text %}{{ item.text }}{% endif %}</a>
85
85
  {% if item.sections %}
86
86
  {% for section in item.sections %}
87
87
  {% if section.sectionTitle %}<h3 class="ons-navigation__list-header">{{ section.sectionTitle }}</h3>{% endif %}
88
88
  <ul class="ons-navigation__list ons-navigation__list--child ons-list--dashed ons-u-ml-s ons-u-mt-xs">
89
89
  {% for child in section.children %}
90
90
  <li class="ons-navigation__item ons-list__item {{ ' ons-navigation__item--active' if (child.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and child.url in params.navigation.currentPath) }}">
91
- <a class="ons-navigation__link ons-navigation__link--section" href="{{ child.url }}" {% if child.ariaLabel %}aria-label="{{ child.ariaLabel }}" {% endif %} {% if child.id %}id="{{ child.id }}" {% endif %}>{{ child.title }}</a>
91
+ <a class="ons-navigation__link ons-navigation__link--section" href="{{ child.url }}" {% if child.ariaLabel %}aria-label="{{ child.ariaLabel }}" {% endif %} {% if child.id %}id="{{ child.id }}" {% endif %}>{% if child.title %}{{ child.title }}{% elif child.text %}{{ child.text }}{% endif %}</a>
92
92
  </li>
93
93
  {% endfor %}
94
94
  </ul>
@@ -10,7 +10,7 @@ const PARAMS = {
10
10
  id: 'main-nav',
11
11
  ariaLabel: 'Main menu',
12
12
  currentPath: ['#1', '/sub-item-1', '/sub-item-2/child-item-1'],
13
- currentPageTitle: 'Main nav item 2',
13
+ currentPageTitle: 'main nav item 2',
14
14
  itemsList: [
15
15
  {
16
16
  title: 'Main nav item 1',
@@ -130,7 +130,7 @@ describe('macro: navigation', () => {
130
130
  accessiblePlaceholder: true,
131
131
  autocomplete: 'off',
132
132
  id: 'ons-site-search',
133
- containerClasses: 'ons-autosuggest-input--header',
133
+ containerClasses: 'ons-autosuggest--header',
134
134
  classes: 'ons-input-search ons-input-search--icon',
135
135
  label: {
136
136
  text: 'Search the design system',
@@ -210,12 +210,12 @@ describe('macro: navigation', () => {
210
210
  faker.renderComponent('navigation', { navigation: PARAMS });
211
211
 
212
212
  expect(buttonSpy.occurrences).toContainEqual({
213
- text: 'Main nav item 2',
213
+ text: 'main nav item 2',
214
214
  classes: 'ons-u-d-no ons-js-sub-navigation-button',
215
215
  variants: ['mobile', 'dropdown'],
216
216
  type: 'button',
217
217
  attributes: {
218
- 'aria-label': 'Toggle section navigation',
218
+ 'aria-label': 'Toggle main nav item 2 menu',
219
219
  'aria-controls': 'sub-nav',
220
220
  'aria-expanded': 'false',
221
221
  },
@@ -1,4 +1,5 @@
1
1
  {% macro onsPagination(params) %}
2
+ {% from "components/icon/_macro.njk" import onsIcon %}
2
3
  {% set currentPageIndex = params.currentPageNumber|int %}
3
4
  {% set totalPages = params.pages | length|int %}
4
5
  {% set position = "Page " ~ currentPageIndex ~ " of " ~ totalPages %}
@@ -13,7 +14,14 @@
13
14
  {% if currentPageIndex != 1 %}
14
15
  {% set prevPageIndex = currentPageIndex - 2 %}
15
16
  <li class="ons-pagination__item ons-pagination__item--previous">
16
- <a href="{{ params.pages[prevPageIndex].url }}" class="ons-pagination__link" rel="prev" aria-label="Go to the previous page (Page {{ currentPageIndex - 1 }})">{{ params.previous }}</a>
17
+ <a href="{{ params.pages[prevPageIndex].url }}" class="ons-pagination__link ons-pagination__link--no-underline" rel="prev" aria-label="Go to the previous page (Page {{ currentPageIndex - 1 }})">
18
+ {{ onsIcon({
19
+ "iconType": 'arrow-previous',
20
+ "classes": 'ons-u-mr-xs',
21
+ "iconSize": 'm'
22
+ }) }}
23
+ <span class="ons-pagination__link-text">{{ params.previous | default("Previous") }}</span>
24
+ </a>
17
25
  </li>
18
26
  {% endif %}
19
27
  {% if currentPageIndex > 2 %}
@@ -60,7 +68,14 @@
60
68
  {% endif %}
61
69
  {% if totalPages > 1 and totalPages != currentPageIndex %}
62
70
  <li class="ons-pagination__item ons-pagination__item--next">
63
- <a href="{{ params.pages[currentPageIndex].url }}" class="ons-pagination__link" rel="next" aria-label="Go to the next page (Page {{ currentPageIndex + 1 }})">{{ params.next }}</a>
71
+ <a href="{{ params.pages[currentPageIndex].url }}" class="ons-pagination__link ons-pagination__link--no-underline" rel="next" aria-label="Go to the next page (Page {{ currentPageIndex + 1 }})">
72
+ <span class="ons-pagination__link-text">{{ params.next | default("Next") }}</span>
73
+ {{ onsIcon({
74
+ "iconType": 'arrow-next',
75
+ "classes": 'ons-u-ml-xs',
76
+ "iconSize": 'm'
77
+ }) }}
78
+ </a>
64
79
  </li>
65
80
  {% endif %}
66
81
  </ul>
@@ -39,12 +39,26 @@ $pagination-item-width: 2.5rem;
39
39
  min-width: $pagination-item-width;
40
40
  }
41
41
 
42
+ &__link--no-underline {
43
+ text-decoration: none;
44
+ &:hover {
45
+ text-decoration: none;
46
+ }
47
+ }
48
+
42
49
  &__link {
43
50
  border-radius: 3px;
44
51
  box-shadow: none;
45
52
  display: block;
46
53
  padding: $pagination-item-padding;
47
54
 
55
+ &-text {
56
+ @extend .ons-u-fs-r--b;
57
+
58
+ display: inline-block;
59
+ vertical-align: middle;
60
+ }
61
+
48
62
  &:focus {
49
63
  border-radius: 0;
50
64
  }
@@ -2,8 +2,6 @@
2
2
 
3
3
  {{
4
4
  onsPagination({
5
- "previous": "Previous",
6
- "next": "Next",
7
5
  "hideRangeIndicator": true,
8
6
  "currentPageNumber": 1,
9
7
  "pages": [
@@ -2,8 +2,6 @@
2
2
 
3
3
  {{
4
4
  onsPagination({
5
- "previous": "Previous",
6
- "next": "Next",
7
5
  "hideRangeIndicator": true,
8
6
  "currentPageNumber": 4,
9
7
  "pages": [
@@ -2,8 +2,6 @@
2
2
 
3
3
  {{
4
4
  onsPagination({
5
- "previous": "Previous",
6
- "next": "Next",
7
5
  "hideRangeIndicator": true,
8
6
  "currentPageNumber": 5,
9
7
  "pages": [
@@ -2,8 +2,6 @@
2
2
 
3
3
  {{
4
4
  onsPagination({
5
- "previous": "Previous",
6
- "next": "Next",
7
5
  "currentPageNumber": 5,
8
6
  "pages": [
9
7
  {
@@ -81,7 +81,7 @@
81
81
  </span>
82
82
  {% endif %}
83
83
 
84
- <div class="ons-panel__body{% if params.iconSize %} ons-svg-icon-margin--{{ params.iconSize }}{% endif %}">{{ (params.body if params else "") | safe }}
84
+ <div class="ons-panel__body{% if params.iconSize %} ons-icon-margin--{{ params.iconSize }}{% endif %}">{{ (params.body if params else "") | safe }}
85
85
  {{ caller() if caller }}
86
86
  </div>
87
87
  </div>
@@ -69,42 +69,42 @@
69
69
  margin-bottom: 0;
70
70
  }
71
71
 
72
- &.ons-svg-icon-margin--xxxl {
72
+ &.ons-icon-margin--xxxl {
73
73
  padding-left: 2.7rem !important;
74
74
 
75
75
  @include mq(m) {
76
76
  padding-left: 3.5rem !important;
77
77
  }
78
78
  }
79
- &.ons-svg-icon-margin--xxl {
79
+ &.ons-icon-margin--xxl {
80
80
  padding-left: 2.45rem !important;
81
81
 
82
82
  @include mq(m) {
83
83
  padding-left: 2.9rem !important;
84
84
  }
85
85
  }
86
- &.ons-svg-icon-margin--xl {
86
+ &.ons-icon-margin--xl {
87
87
  padding-left: 2.35rem !important;
88
88
 
89
89
  @include mq(m) {
90
90
  padding-left: 2.55rem !important;
91
91
  }
92
92
  }
93
- &.ons-svg-icon-margin--l {
93
+ &.ons-icon-margin--l {
94
94
  padding-left: 2.25rem !important;
95
95
 
96
96
  @include mq(m) {
97
97
  padding-left: 2.35rem !important;
98
98
  }
99
99
  }
100
- &.ons-svg-icon-margin--m {
100
+ &.ons-icon-margin--m {
101
101
  padding-left: 2.05rem !important;
102
102
 
103
103
  @include mq(m) {
104
104
  padding-left: 2.2rem !important;
105
105
  }
106
106
  }
107
- &.ons-svg-icon-margin--s {
107
+ &.ons-icon-margin--s {
108
108
  padding-left: 1.7rem !important;
109
109
  }
110
110
  }
@@ -216,7 +216,7 @@
216
216
  &__icon {
217
217
  left: 0;
218
218
  padding-left: 1rem;
219
- .ons-svg-icon {
219
+ .ons-icon {
220
220
  fill: var(--ons-color-success) !important;
221
221
  margin-top: -15% !important;
222
222
  }
@@ -24,7 +24,7 @@
24
24
  "inputClasses": "ons-js-password-toggle",
25
25
  "name": "show-password",
26
26
  "label": {
27
- "text": params.showPasswordText
27
+ "text": params.showPasswordText | default("Show password")
28
28
  }
29
29
  })
30
30
  }}
@@ -5,7 +5,6 @@
5
5
  "id": "password",
6
6
  "label": {
7
7
  "text": "Password"
8
- },
9
- "showPasswordText": "Show password"
8
+ }
10
9
  })
11
10
  }}
@@ -25,7 +25,7 @@ layout: ~
25
25
  {% block main %}
26
26
  {% call onsQuestion({
27
27
  "title": "<mark class=\"ons-instruction\">Interviewer note:</mark>Who to interview",
28
- "instruction": "<p>Only interview a person who was usually living at the property on <em>Sunday 21 March 2021</em>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
28
+ "instruction": "<p>Only interview a person who was usually living at the property on <strong>Sunday 21 March 2021</strong>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
29
29
  "submitButton": {
30
30
  "variants": "timer",
31
31
  "text": "Continue"
@@ -17,7 +17,7 @@
17
17
  position: relative;
18
18
  }
19
19
 
20
- .ons-svg-icon {
20
+ .ons-icon {
21
21
  fill: var(--ons-color-grey-75) !important;
22
22
  height: 1.85rem;
23
23
  left: 0;
@@ -2,7 +2,7 @@
2
2
  {% from "components/fieldset/_macro.njk" import onsFieldset %}
3
3
  {% from "components/button/_macro.njk" import onsButton %}
4
4
  {% from "components/label/_macro.njk" import onsLabel %}
5
-
5
+
6
6
  {% call onsFieldset({
7
7
  "id": params.id,
8
8
  "classes": params.classes,
@@ -0,0 +1,98 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+ {% from "components/button/_macro.njk" import onsButton %}
3
+ {% from "components/question/_macro.njk" import onsQuestion %}
4
+ {% from "components/panel/_macro.njk" import onsPanel %}
5
+
6
+ {% call onsQuestion({
7
+ "title": "What is your religion?",
8
+ "legendIsQuestionTitle": true
9
+ }) %}
10
+ {{
11
+ onsPanel({
12
+ "body": '<p>This question is <strong>voluntary</strong></p>',
13
+ "classes": 'ons-u-mb-m'
14
+ })
15
+ }}
16
+ <form onsubmit="return false;">
17
+ {{
18
+ onsRadios({
19
+ "dontWrap": true,
20
+ "name": "religion",
21
+ "clearRadios": {
22
+ "text": "Clear selection",
23
+ "name": "clear-radios",
24
+ "ariaClearText": "You can clear your answer using the clear selection button after the radio inputs",
25
+ "ariaClearedText": "You have cleared your answer"
26
+ },
27
+ "radios": [
28
+ {
29
+ "id": "none",
30
+ "label": {
31
+ "text": "No religion"
32
+ },
33
+ "value": "none"
34
+ },
35
+ {
36
+ "id": "christian",
37
+ "label": {
38
+ "text": "Christian",
39
+ "description": "Including Church of England, Catholic, Protestant and all other Christian denominations"
40
+ },
41
+ "value": "christian"
42
+ },
43
+ {
44
+ "id": "buddhist",
45
+ "label": {
46
+ "text": "Buddhist"
47
+ },
48
+ "value": "buddhist"
49
+ },
50
+ {
51
+ "id": "hindu",
52
+ "label": {
53
+ "text": "Hindu"
54
+ },
55
+ "value": "hindu"
56
+ },
57
+ {
58
+ "id": "jewish",
59
+ "label": {
60
+ "text": "Jewish"
61
+ },
62
+ "value": "jewish"
63
+ },
64
+ {
65
+ "id": "muslim",
66
+ "label": {
67
+ "text": "Muslim"
68
+ },
69
+ "value": "muslim"
70
+ },
71
+ {
72
+ "id": "sikh",
73
+ "label": {
74
+ "text": "Sikh"
75
+ },
76
+ "value": "sikh"
77
+ },
78
+ {
79
+ "id": "other-radio",
80
+ "label": {
81
+ "text": "Any other religion"
82
+ },
83
+ "value": "other",
84
+ "checked": true,
85
+ "other": {
86
+ "otherType": "input",
87
+ "id": "other-textbox",
88
+ "name": "other-answer",
89
+ "label": {
90
+ "text": "Enter your religion"
91
+ }
92
+ }
93
+ }
94
+ ]
95
+ })
96
+ }}
97
+ </form>
98
+ {% endcall %}
@@ -0,0 +1,70 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+
3
+ {{
4
+ onsRadios({
5
+ "legend": "How would you like us to contact you?",
6
+ "name": "contact",
7
+ "borderless": true,
8
+ "radios": [
9
+ {
10
+ "id": "post",
11
+ "label": {
12
+ "text": "By post"
13
+ },
14
+ "value": "post"
15
+ },
16
+ {
17
+ "id": "email",
18
+ "label": {
19
+ "text": "By email"
20
+ },
21
+ "value": "email"
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "label": {
26
+ "text": "By phone"
27
+ },
28
+ "value": "phone",
29
+ "checked": true,
30
+ "other": {
31
+ "otherType": "checkboxes",
32
+ "selectAllChildren": true,
33
+ "id": "phone-time",
34
+ "name": "phone-time",
35
+ "legend": "Select preferred times of day",
36
+ "checkboxes": [
37
+ {
38
+ "value": "anytime",
39
+ "id": "anytime",
40
+ "label": {
41
+ "text": "Anytime of day"
42
+ }
43
+ },
44
+ {
45
+ "value": "morning",
46
+ "id": "morning",
47
+ "label": {
48
+ "text": "Morning"
49
+ }
50
+ },
51
+ {
52
+ "value": "afternoon",
53
+ "id": "afternoon",
54
+ "label": {
55
+ "text": "Afternoon"
56
+ }
57
+ },
58
+ {
59
+ "value": "evening",
60
+ "id": "evening",
61
+ "label": {
62
+ "text": "Evening"
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ }
68
+ ]
69
+ })
70
+ }}
@@ -0,0 +1,69 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+
3
+ {{
4
+ onsRadios({
5
+ "legend": "How would you like us to contact you?",
6
+ "name": "contact",
7
+ "borderless": true,
8
+ "radios": [
9
+ {
10
+ "id": "post",
11
+ "label": {
12
+ "text": "By post"
13
+ },
14
+ "value": "post"
15
+ },
16
+ {
17
+ "id": "email",
18
+ "label": {
19
+ "text": "By email"
20
+ },
21
+ "value": "email"
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "label": {
26
+ "text": "By phone"
27
+ },
28
+ "value": "phone",
29
+ "checked": true,
30
+ "other": {
31
+ "otherType": "radios",
32
+ "id": "phone-time",
33
+ "name": "phone-time",
34
+ "legend": "Choose preferred time of day",
35
+ "radios": [
36
+ {
37
+ "value": "anytime",
38
+ "id": "anytime",
39
+ "label": {
40
+ "text": "Anytime of day"
41
+ }
42
+ },
43
+ {
44
+ "value": "morning",
45
+ "id": "morning",
46
+ "label": {
47
+ "text": "Morning"
48
+ }
49
+ },
50
+ {
51
+ "value": "afternoon",
52
+ "id": "afternoon",
53
+ "label": {
54
+ "text": "Afternoon"
55
+ }
56
+ },
57
+ {
58
+ "value": "evening",
59
+ "id": "evening",
60
+ "label": {
61
+ "text": "Evening"
62
+ }
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ ]
68
+ })
69
+ }}
@@ -0,0 +1,70 @@
1
+ {% from "components/question/_macro.njk" import onsQuestion %}
2
+ {% from "components/radios/_macro.njk" import onsRadios %}
3
+
4
+ {% call onsQuestion({
5
+ "title": "How would you like us to contact you?",
6
+ "legendIsQuestionTitle": true
7
+ }) %}
8
+ {{
9
+ onsRadios({
10
+ "dontWrap": true,
11
+ "name": "contact",
12
+ "radios": [
13
+ {
14
+ "id": "post",
15
+ "label": {
16
+ "text": "By post"
17
+ },
18
+ "value": "post"
19
+ },
20
+ {
21
+ "id": "email",
22
+ "label": {
23
+ "text": "By email"
24
+ },
25
+ "value": "email"
26
+ },
27
+ {
28
+ "id": "phone",
29
+ "label": {
30
+ "text": "By phone"
31
+ },
32
+ "value": "phone",
33
+ "checked": true,
34
+ "other": {
35
+ "otherType": "select",
36
+ "id": "phone-time",
37
+ "name": "phone-time",
38
+ "label": {
39
+ "text": "Choose preferred time of day"
40
+ },
41
+ "options": [
42
+ {
43
+ "value": "",
44
+ "text": "Select an option",
45
+ "disabled": true,
46
+ "selected": true
47
+ },
48
+ {
49
+ "value": "anytime",
50
+ "text": "Any time of day"
51
+ },
52
+ {
53
+ "value": "morning",
54
+ "text": "Morning"
55
+ },
56
+ {
57
+ "value": "afternoon",
58
+ "text": "Afternoon"
59
+ },
60
+ {
61
+ "value": "evening",
62
+ "text": "Evening"
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ ]
68
+ })
69
+ }}
70
+ {% endcall %}