@ons/design-system 62.0.1 → 62.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 (212) hide show
  1. package/README.md +0 -63
  2. package/components/access-code/example-access-code-error.njk +87 -0
  3. package/components/access-code/example-access-code.njk +63 -0
  4. package/components/accordion/example-accordion-open.njk +126 -0
  5. package/components/accordion/example-accordion.njk +25 -0
  6. package/components/address-input/example-address-input-editable.njk +52 -0
  7. package/components/address-input/example-address-input-manual.njk +23 -0
  8. package/components/address-input/example-address-input.njk +40 -0
  9. package/components/autosuggest/example-autosuggest-country-multiple.njk +30 -0
  10. package/components/autosuggest/example-autosuggest-country.njk +29 -0
  11. package/components/back-link/example-back-link.njk +17 -0
  12. package/components/breadcrumbs/example-breadcrumbs-single.njk +13 -0
  13. package/components/breadcrumbs/example-breadcrumbs.njk +17 -0
  14. package/components/button/_button.scss +5 -3
  15. package/components/button/example-button-custom.njk +20 -0
  16. package/components/button/example-button-disabled.njk +7 -0
  17. package/components/button/example-button-download.njk +9 -0
  18. package/components/button/example-button-ghost.njk +15 -0
  19. package/components/button/example-button-group.njk +16 -0
  20. package/components/button/example-button-link.njk +7 -0
  21. package/components/button/example-button-loader.njk +9 -0
  22. package/components/button/example-button-new-window.njk +12 -0
  23. package/components/button/example-button-print.njk +8 -0
  24. package/components/button/example-button-secondary-small.njk +8 -0
  25. package/components/button/example-button-secondary.njk +8 -0
  26. package/components/button/example-button-small.njk +8 -0
  27. package/components/button/example-button-timer.njk +9 -0
  28. package/components/button/example-button.njk +6 -0
  29. package/components/call-to-action/example-call-to-action-default.njk +14 -0
  30. package/components/card/example-card-set-with-images.njk +41 -0
  31. package/components/card/example-card-set-with-lists.njk +68 -0
  32. package/components/card/example-card-set.njk +38 -0
  33. package/components/card/example-card.njk +9 -0
  34. package/components/checkboxes/example-checkboxes-disabled.njk +34 -0
  35. package/components/checkboxes/example-checkboxes-error.njk +60 -0
  36. package/components/checkboxes/example-checkboxes-with-descriptions.njk +71 -0
  37. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +177 -0
  38. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +86 -0
  39. package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +69 -0
  40. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +71 -0
  41. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +59 -0
  42. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +51 -0
  43. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +61 -0
  44. package/components/checkboxes/example-checkboxes-without-border.njk +33 -0
  45. package/components/checkboxes/example-checkboxes.njk +46 -0
  46. package/components/content-pagination/example-content-pagination.njk +20 -0
  47. package/components/cookies-banner/_macro.njk +4 -4
  48. package/components/cookies-banner/_macro.spec.js +41 -1
  49. package/components/cookies-banner/example-cookies-banner-cymraeg.njk +9 -0
  50. package/components/cookies-banner/example-cookies-banner.njk +7 -0
  51. package/components/date-input/example-date-input-error.njk +62 -0
  52. package/components/date-input/example-date-input.njk +36 -0
  53. package/components/details/example-details-with-saved-state.njk +10 -0
  54. package/components/details/example-details-with-warning.njk +19 -0
  55. package/components/details/example-details.njk +9 -0
  56. package/components/document-list/example-document-list-article-featured.njk +31 -0
  57. package/components/document-list/example-document-list-articles.njk +60 -0
  58. package/components/document-list/example-document-list-downloads.njk +59 -0
  59. package/components/document-list/example-document-list-search-result-featured.njk +19 -0
  60. package/components/document-list/example-document-list-search-results.njk +67 -0
  61. package/components/duration/example-duration-error.njk +30 -0
  62. package/components/duration/example-duration.njk +35 -0
  63. package/components/duration/examples-duration-error-for-single-field.njk +31 -0
  64. package/components/external-link/example-external-link.njk +8 -0
  65. package/components/feedback/example-feedback-call-to-action.njk +14 -0
  66. package/components/footer/example-footer-cymraeg.njk +54 -0
  67. package/components/footer/example-footer-default.njk +7 -0
  68. package/components/footer/example-footer-transactional.njk +62 -0
  69. package/components/footer/example-footer-warning.njk +32 -0
  70. package/components/footer/example-footer-with-alternative-organisation.njk +124 -0
  71. package/components/footer/example-footer-with-coat-of-arms.njk +32 -0
  72. package/components/footer/example-footer-with-copyright.njk +35 -0
  73. package/components/footer/example-footer.njk +85 -0
  74. package/components/header/_header.scss +2 -2
  75. package/components/header/_macro.spec.js +97 -0
  76. package/components/header/example-header-default.njk +12 -0
  77. package/components/header/example-header-external-for-survey-with-description.njk +20 -0
  78. package/components/header/example-header-external-for-surveys.njk +33 -0
  79. package/components/header/example-header-external-welsh.njk +29 -0
  80. package/components/header/example-header-external-with-navigation.njk +42 -0
  81. package/components/header/example-header-external-with-service-links.njk +35 -0
  82. package/components/header/example-header-external-with-sub-navigation.njk +132 -0
  83. package/components/header/example-header-internal.njk +32 -0
  84. package/components/header/example-header-neutral-for-multicoloured-logo.njk +59 -0
  85. package/components/hero/example-hero-dark.njk +15 -0
  86. package/components/hero/example-hero-default.njk +14 -0
  87. package/components/images/example-images-for-regular-screens.njk +8 -0
  88. package/components/images/example-images-for-retina-screens.njk +10 -0
  89. package/components/input/example-input-email.njk +12 -0
  90. package/components/input/example-input-number-prefixed.njk +17 -0
  91. package/components/input/example-input-number-suffixed.njk +34 -0
  92. package/components/input/example-input-number.njk +15 -0
  93. package/components/input/example-input-numeric-values.njk +64 -0
  94. package/components/input/example-input-telephone.njk +13 -0
  95. package/components/input/example-input-text-width-constrained.njk +11 -0
  96. package/components/input/example-input-text-with-character-limit-checker.njk +17 -0
  97. package/components/input/example-input-text-with-description.njk +10 -0
  98. package/components/input/example-input-text.njk +9 -0
  99. package/components/label/example-label-with-description.njk +8 -0
  100. package/components/label/example-label.njk +8 -0
  101. package/components/metadata/example-metadata.njk +57 -0
  102. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +71 -0
  103. package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +47 -0
  104. package/components/mutually-exclusive/example-mutually-exclusive-date.njk +49 -0
  105. package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +45 -0
  106. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +36 -0
  107. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +63 -0
  108. package/components/mutually-exclusive/example-mutually-exclusive-number.njk +43 -0
  109. package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +40 -0
  110. package/components/navigation/_macro.njk +1 -1
  111. package/components/pagination/example-pagination-first.njk +24 -0
  112. package/components/pagination/example-pagination-last.njk +24 -0
  113. package/components/pagination/example-pagination-with-no-range-indicator.njk +42 -0
  114. package/components/pagination/example-pagination.njk +116 -0
  115. package/components/panel/example-panel-bare.njk +9 -0
  116. package/components/panel/example-panel-with-announcement.njk +18 -0
  117. package/components/panel/example-panel-with-error-details.njk +18 -0
  118. package/components/panel/example-panel-with-error-summary.njk +25 -0
  119. package/components/panel/example-panel-with-information.njk +7 -0
  120. package/components/panel/example-panel-with-spacious-information.njk +7 -0
  121. package/components/panel/example-panel-with-success-message.njk +10 -0
  122. package/components/panel/example-panel-with-warning.njk +8 -0
  123. package/components/password/example-password.njk +11 -0
  124. package/components/phase-banner/example-phase-banner-alpha.njk +10 -0
  125. package/components/phase-banner/example-phase-banner-beta.njk +9 -0
  126. package/components/question/example-question-ccs.njk +49 -0
  127. package/components/question/example-question-fieldset.njk +99 -0
  128. package/components/question/example-question-interviewer-note.njk +38 -0
  129. package/components/question/example-question-no-fieldset.njk +46 -0
  130. package/components/radios/example-radios-with-clear-button.njk +97 -0
  131. package/components/radios/example-radios-with-descriptions.njk +57 -0
  132. package/components/radios/example-radios-with-error.njk +38 -0
  133. package/components/radios/example-radios-with-revealed-checkboxes.njk +69 -0
  134. package/components/radios/example-radios-with-revealed-radios.njk +68 -0
  135. package/components/radios/example-radios-with-revealed-select.njk +69 -0
  136. package/components/radios/example-radios-with-revealed-text-input.njk +80 -0
  137. package/components/radios/example-radios-with-separator.njk +59 -0
  138. package/components/radios/example-radios-with-visible-text-input.njk +40 -0
  139. package/components/radios/example-radios-without-border.njk +48 -0
  140. package/components/radios/examples-radios.njk +38 -0
  141. package/components/related-content/example-related-content-general.njk +44 -0
  142. package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -0
  143. package/components/related-content/example-related-content-social-media.njk +40 -0
  144. package/components/relationships/example-relationships-error.njk +211 -0
  145. package/components/relationships/example-relationships-you.njk +187 -0
  146. package/components/relationships/example-relationships.njk +185 -0
  147. package/components/search/example-search-with-character-check.njk +23 -0
  148. package/components/search/example-search-with-placeholder.njk +16 -0
  149. package/components/search/example-search.njk +16 -0
  150. package/components/section-navigation/example-section-navigation-vertical.njk +40 -0
  151. package/components/section-navigation/example-section-navigation.njk +21 -0
  152. package/components/select/example-select-wide.njk +55 -0
  153. package/components/select/example-select-with-error.njk +58 -0
  154. package/components/select/example-select-with-inline-label.njk +23 -0
  155. package/components/select/example-select.njk +50 -0
  156. package/components/share-page/example-share-page.njk +11 -0
  157. package/components/skip-to-content/example-skip-to-content.njk +10 -0
  158. package/components/status/example-status-dead.njk +7 -0
  159. package/components/status/example-status-error.njk +7 -0
  160. package/components/status/example-status-neutral-information.njk +6 -0
  161. package/components/status/example-status-pending.njk +7 -0
  162. package/components/status/example-status-small.njk +8 -0
  163. package/components/status/example-status-success.njk +7 -0
  164. package/components/summary/example-summary-grouped-total.njk +67 -0
  165. package/components/summary/example-summary-grouped-with-errors.njk +96 -0
  166. package/components/summary/example-summary-grouped.njk +353 -0
  167. package/components/summary/example-summary-household-no-rows.njk +20 -0
  168. package/components/summary/example-summary-household.njk +77 -0
  169. package/components/summary/example-summary-hub.njk +170 -0
  170. package/components/summary/example-summary-multiple.njk +81 -0
  171. package/components/summary/example-summary-no-action.njk +40 -0
  172. package/components/summary/example-summary.njk +107 -0
  173. package/components/table/_macro.njk +1 -1
  174. package/components/table/_table.scss +10 -10
  175. package/components/table/example-table-basic.njk +47 -0
  176. package/components/table/example-table-compact.njk +73 -0
  177. package/components/table/example-table-footer.njk +56 -0
  178. package/components/table/example-table-numeric.njk +81 -0
  179. package/components/table/example-table-responsive.njk +89 -0
  180. package/components/table/example-table-scrollable.njk +158 -0
  181. package/components/table/example-table-sortable.njk +236 -0
  182. package/components/table/sortable-table.dom.js +1 -1
  183. package/components/table/sortable-table.js +5 -2
  184. package/components/table-of-contents/example-table-of-contents-grouped.njk +50 -0
  185. package/components/table-of-contents/example-table-of-contents-single.njk +39 -0
  186. package/components/table-of-contents/example-table-of-contents-sticky.njk +78 -0
  187. package/components/tabs/example-tabs-details.njk +59 -0
  188. package/components/tabs/example-tabs.njk +39 -0
  189. package/components/textarea/example-textarea-error.njk +16 -0
  190. package/components/textarea/example-textarea-with-character-limit.njk +18 -0
  191. package/components/textarea/example-textarea.njk +12 -0
  192. package/components/timeline/example-timeline.njk +35 -0
  193. package/components/timeout-modal/example-timeout-modal.njk +16 -0
  194. package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -0
  195. package/components/upload/example-upload-error.njk +16 -0
  196. package/components/upload/example-upload.njk +12 -0
  197. package/components/video/example-video.njk +14 -0
  198. package/css/main.css +3 -3
  199. package/css/print.css +1 -1
  200. package/layout/_template.njk +1 -12
  201. package/package.json +3 -8
  202. package/scripts/main.es5.js +1 -1
  203. package/scripts/main.js +2 -2
  204. package/scss/base/_typography.scss +2 -2
  205. package/scss/main.scss +0 -1
  206. package/scss/print.scss +13 -5
  207. package/scss/utilities/_highlight.scss +6 -0
  208. package/scss/utilities/_index.scss +1 -0
  209. package/components/code-highlight/_macro.njk +0 -5
  210. package/components/code-highlight/_macro.spec.js +0 -56
  211. package/components/code-highlight/code-highlight.spec.js +0 -18
  212. package/scss/patternlib.scss +0 -148
@@ -0,0 +1,124 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/footer/_macro.njk" import onsFooter %}
5
+ {{
6
+ onsFooter({
7
+ "poweredBy": '<svg class="ons-svg-logo ons-svg-logo--nisra" xmlns="http://www.w3.org/2000/svg" width="170" height="56" viewBox="0 1 170 54" aria-labelledby="poweredby-alt">
8
+ <title id="poweredby-alt">NISRA - Northern Ireland Statistics and Research Agency</title>
9
+ <g class="ons-svg-logo__group" fill="#3d7cc9">
10
+ <path d="M0,39.3c2.7,4.7,6.1,8.1,10.8,10.8c4.6,2.7,9.7,4,14.7,4c7,0,13.8-2.5,19.2-7.1c0.3-0.3,0.6-0.5,0.9-0.8 c2.1-2,3.9-4.2,5.5-6.9l-15.2-8.8l-1.2-0.7l-8.6-4.9l-0.6-0.4L25,24.8L6.4,35.6l-1.1,0.6L0,39.3L0,39.3z"></path>
11
+ </g>
12
+ <g class="ons-svg-logo__group" fill="#cddb00">
13
+ <path d="M36.4,7.2c-0.4-0.1-0.8-0.3-1.2-0.4c-2.9-0.9-5.9-1.4-9.1-1.4v18.1l9.1,5.3l1.2,0.7l15.2,8.8l1,0.6l-0.6,1 c-1.5,2.6-3.3,4.9-5.4,6.9l5,2.9c2.7-4.7,3.9-9.3,3.9-14.7C55.6,22.2,47.6,11.4,36.4,7.2L36.4,7.2z"></path>
14
+ </g>
15
+ <g class="ons-svg-logo__group" fill="#00205c">
16
+ <path d="M6.2,34.4L25,23.5V4.2h1.2c3.1,0,6.2,0.5,9.1,1.4V0c-5.4,0-10,1.2-14.7,4C9.5,10.3,4.2,22.6,6.2,34.4z"></path>
17
+ </g>
18
+ <g class="ons-svg-logo__group ons-svg-logo__group--text" fill="#00205c">
19
+ <path d="M94.5,48.4l-1-0.2c-0.4-0.1-0.7-0.2-0.7-0.5s0.3-0.5,0.8-0.5c0.7,0,0.8,0.4,0.8,0.5l0.9-0.2c-0.3-0.9-1.2-1.1-1.8-1.1 c-1.5,0-1.7,1-1.7,1.5c0,1.1,1,1.3,1.4,1.3l0.8,0.2c0.2,0,0.5,0.2,0.5,0.5c0,0.5-0.7,0.6-1,0.6c-0.7,0-0.9-0.3-1-0.6l-0.8,0.2 c0.2,0.7,0.9,1.1,1.9,1.1c0.6,0,2-0.2,2-1.5C95.6,49,95.2,48.5,94.5,48.4z M91.2,49c0-1.3-0.6-2.5-2.1-2.5c-1.3,0-2.1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1.6-3-1.7-3.2l-9.5-16H63v27.2h3.9V10.9z M93.9,4.1H89v27.2h4.9V4.1z"></path>
98
+ </g>
99
+ </svg>',
100
+ "legal": [
101
+ {
102
+ "itemsList": [
103
+ {
104
+ "text": 'Cookies',
105
+ "url": '#0'
106
+ },
107
+ {
108
+ "text": 'Accessibility statement',
109
+ "url": '#0'
110
+ },
111
+ {
112
+ "text": 'Privacy and data protection',
113
+ "url": '#0'
114
+ },
115
+ {
116
+ "text": 'Terms and conditions',
117
+ "url": '#0'
118
+ }
119
+ ]
120
+ }
121
+ ],
122
+ "OGLLink": true
123
+ })
124
+ }}
@@ -0,0 +1,32 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/footer/_macro.njk" import onsFooter %}
5
+ {{
6
+ onsFooter({
7
+ "crest": true,
8
+ "legal": [
9
+ {
10
+ "itemsList": [
11
+ {
12
+ "text": 'Cookies',
13
+ "url": '#0'
14
+ },
15
+ {
16
+ "text": 'Accessibility statement',
17
+ "url": '#0'
18
+ },
19
+ {
20
+ "text": 'Privacy and data protection',
21
+ "url": '#0'
22
+ },
23
+ {
24
+ "text": 'Terms and conditions',
25
+ "url": '#0'
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "OGLLink": true
31
+ })
32
+ }}
@@ -0,0 +1,35 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/footer/_macro.njk" import onsFooter %}
5
+ {{
6
+ onsFooter({
7
+ "legal": [
8
+ {
9
+ "itemsList": [
10
+ {
11
+ "text": 'Cookies',
12
+ "url": '#0'
13
+ },
14
+ {
15
+ "text": 'Accessibility statement',
16
+ "url": '#0'
17
+ },
18
+ {
19
+ "text": 'Privacy and data protection',
20
+ "url": '#0'
21
+ },
22
+ {
23
+ "text": 'Terms and conditions',
24
+ "url": '#0'
25
+ }
26
+ ]
27
+ }
28
+ ],
29
+ "OGLLink": true,
30
+ "copyrightDeclaration": {
31
+ "copyright": 'Crown copyright and database rights 2020 OS 100019153.',
32
+ "text": 'Use of address data is subject to the terms and conditions.'
33
+ }
34
+ })
35
+ }}
@@ -0,0 +1,85 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/footer/_macro.njk" import onsFooter %}
5
+ {{
6
+ onsFooter({
7
+ "cols": [
8
+ {
9
+ "title": 'Business surveys',
10
+ "itemsList": [
11
+ {
12
+ "text": 'About our surveys',
13
+ "url": '#0'
14
+ },
15
+ {
16
+ "text": 'Lists of all surveys',
17
+ "url": '#0'
18
+ },
19
+ {
20
+ "text": 'Respondent Charter',
21
+ "url": '#0'
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "title": 'About ONS',
27
+ "itemsList": [
28
+ {
29
+ "text": 'What we do',
30
+ "url": '#0'
31
+ },
32
+ {
33
+ "text": 'Transparency and governance',
34
+ "url": '#0'
35
+ },
36
+ {
37
+ "text": 'Contact us',
38
+ "url": '#0'
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "title": 'Statistics',
44
+ "itemsList": [
45
+ {
46
+ "text": 'UK Statistics Authority',
47
+ "external": true,
48
+ "url": '#0'
49
+ },
50
+ {
51
+ "text": 'Release calendar',
52
+ "url": '#0'
53
+ },
54
+ {
55
+ "text": 'News',
56
+ "url": '#0'
57
+ }
58
+ ]
59
+ }
60
+ ],
61
+ "legal": [
62
+ {
63
+ "itemsList": [
64
+ {
65
+ "text": 'Cookies',
66
+ "url": '#0'
67
+ },
68
+ {
69
+ "text": 'Accessibility statement',
70
+ "url": '#0'
71
+ },
72
+ {
73
+ "text": 'Privacy and data protection',
74
+ "url": '#0'
75
+ },
76
+ {
77
+ "text": 'Terms and conditions',
78
+ "url": '#0'
79
+ }
80
+ ]
81
+ }
82
+ ],
83
+ "OGLLink": true
84
+ })
85
+ }}
@@ -1,8 +1,8 @@
1
1
  // Block
2
2
  .ons-header {
3
+ @include font-smoothing;
4
+
3
5
  display: block;
4
- -webkit-font-smoothing: antialiased;
5
- -moz-osx-font-smoothing: grayscale;
6
6
  margin: 0;
7
7
  position: relative;
8
8
 
@@ -117,6 +117,50 @@ const EXAMPLE_HEADER_NAVIGATION_CONFIG = {
117
117
  },
118
118
  };
119
119
 
120
+ const EXAMPLE_HEADER_NAVIGATION_WITH_SUBNAVIGATION_CONFIG = {
121
+ navigation: {
122
+ id: 'main-nav',
123
+ ariaLabel: 'Main menu',
124
+ currentPath: '#1',
125
+ currentPageTitle: 'Guidance',
126
+ itemsList: [
127
+ {
128
+ title: 'Home',
129
+ url: '#0',
130
+ },
131
+ {
132
+ title: 'Guidance',
133
+ url: '#1',
134
+ },
135
+ ],
136
+ toggleNavigationButton: {
137
+ text: 'Menu',
138
+ ariaLabel: 'Toggle main menu',
139
+ },
140
+ subNavigation: {
141
+ id: 'sub-nav',
142
+ overviewURL: '#overview',
143
+ overviewText: 'Overview',
144
+ ariaLabel: 'Section menu',
145
+ currentPath: '#1',
146
+ itemsList: [
147
+ {
148
+ title: 'Sub nav item 1',
149
+ url: '#0',
150
+ classes: 'custom-class-sub-item-1',
151
+ id: 'sub-item-1',
152
+ },
153
+ {
154
+ title: 'Sub nav item 2',
155
+ url: '#1',
156
+ classes: 'custom-class-sub-item-2',
157
+ id: 'sub-item-2',
158
+ },
159
+ ],
160
+ },
161
+ },
162
+ };
163
+
120
164
  describe('macro: header', () => {
121
165
  describe('mode: basic', () => {
122
166
  it('passes jest-axe checks', async () => {
@@ -644,5 +688,58 @@ describe('macro: header', () => {
644
688
  },
645
689
  });
646
690
  });
691
+
692
+ it('renders the navigation in the correct container if `wide`', () => {
693
+ const $ = cheerio.load(
694
+ renderComponent('header', {
695
+ ...EXAMPLE_HEADER_BASIC,
696
+ wide: true,
697
+ ...EXAMPLE_HEADER_NAVIGATION_CONFIG,
698
+ }),
699
+ );
700
+
701
+ const navContainer = $('.ons-navigation-wrapper .ons-container');
702
+ expect($(navContainer).hasClass('ons-container--wide')).toBe(true);
703
+ });
704
+
705
+ it('renders the navigation in the correct container if `fullWidth`', () => {
706
+ const $ = cheerio.load(
707
+ renderComponent('header', {
708
+ ...EXAMPLE_HEADER_BASIC,
709
+ fullWidth: true,
710
+ ...EXAMPLE_HEADER_NAVIGATION_CONFIG,
711
+ }),
712
+ );
713
+
714
+ const navContainer = $('.ons-navigation-wrapper .ons-container');
715
+ expect($(navContainer).hasClass('ons-container--full-width')).toBe(true);
716
+ });
717
+
718
+ it('renders the sub-navigation in the correct container if `wide`', () => {
719
+ const $ = cheerio.load(
720
+ renderComponent('header', {
721
+ ...EXAMPLE_HEADER_BASIC,
722
+ wide: true,
723
+ ...EXAMPLE_HEADER_NAVIGATION_WITH_SUBNAVIGATION_CONFIG,
724
+ }),
725
+ );
726
+
727
+ const subNavContainer = $('.ons-navigation--sub .ons-container');
728
+ expect($(subNavContainer).hasClass('ons-container--wide')).toBe(true);
729
+ });
730
+
731
+ it('renders the sub-navigation in the correct container if `fullWidth`', () => {
732
+ const $ = cheerio.load(
733
+ renderComponent('header', {
734
+ ...EXAMPLE_HEADER_BASIC,
735
+ fullWidth: true,
736
+ ...EXAMPLE_HEADER_NAVIGATION_WITH_SUBNAVIGATION_CONFIG,
737
+ }),
738
+ );
739
+ console.log($.html());
740
+
741
+ const subNavContainer = $('.ons-navigation--sub .ons-container');
742
+ expect($(subNavContainer).hasClass('ons-container--full-width')).toBe(true);
743
+ });
647
744
  });
648
745
  });
@@ -0,0 +1,12 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/header/_macro.njk" import onsHeader %}
5
+
6
+ {{
7
+ onsHeader({
8
+ "title": 'Page title',
9
+ "mastheadLogoUrl": '#0',
10
+ "titleUrl": '#0'
11
+ })
12
+ }}
@@ -0,0 +1,20 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/header/_macro.njk" import onsHeader %}
5
+
6
+ {{
7
+ onsHeader({
8
+ "variants": 'description',
9
+ "title": 'Service title',
10
+ "titleUrl": '#0',
11
+ "mastheadLogoUrl": '#0',
12
+ "description": 'This is the description or tagline',
13
+ "button": {
14
+ "text": 'Save and sign out',
15
+ "url": '#0',
16
+ "iconType": 'exit',
17
+ "iconPosition": 'after'
18
+ }
19
+ })
20
+ }}
@@ -0,0 +1,33 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/header/_macro.njk" import onsHeader %}
5
+
6
+ {{
7
+ onsHeader({
8
+ "title": 'Survey title',
9
+ "mastheadLogoUrl": '#0',
10
+ "button": {
11
+ "text": 'Save and sign out',
12
+ "url": '#0',
13
+ "iconType": 'exit',
14
+ "iconPosition": 'after'
15
+ },
16
+ "language": {
17
+ "languages": [
18
+ {
19
+ "url": '#0',
20
+ "ISOCode": 'en',
21
+ "text": 'English',
22
+ "current": true
23
+ },
24
+ {
25
+ "url": '#0',
26
+ "ISOCode": 'cy',
27
+ "text": 'Cymraeg',
28
+ "current": false
29
+ }
30
+ ]
31
+ }
32
+ })
33
+ }}
@@ -0,0 +1,29 @@
1
+ ---
2
+ fullWidth: true
3
+ layout: ~
4
+ ---
5
+ {% extends "layout/_template.njk" %}
6
+
7
+ {% set pageConfig = {
8
+ "header": {
9
+ "mastheadLogoUrl": '#0',
10
+ "title": 'Gwasanaeth Cymraeg',
11
+ "titleUrl": '#0',
12
+ "language": {
13
+ "languages": [
14
+ {
15
+ "url": '#0',
16
+ "ISOCode": 'en',
17
+ "text": 'English',
18
+ "current": false
19
+ },
20
+ {
21
+ "url": '#0',
22
+ "ISOCode": 'cy',
23
+ "text": 'Cymraeg',
24
+ "current": true
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ } %}
@@ -0,0 +1,42 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/header/_macro.njk" import onsHeader %}
5
+
6
+ {{
7
+ onsHeader({
8
+ "title": 'Design system',
9
+ "titleUrl": '#0',
10
+ "navigation": {
11
+ "id": 'main-nav',
12
+ "ariaLabel": 'Main menu',
13
+ "currentPath": '#home',
14
+ "itemsList": [
15
+ {
16
+ "title": 'Home',
17
+ "url": '#home'
18
+ },
19
+ {
20
+ "title": 'Guidance',
21
+ "url": '#0'
22
+ },
23
+ {
24
+ "title": 'Foundations',
25
+ "url": '#0'
26
+ },
27
+ {
28
+ "title": 'Components',
29
+ "url": '#0'
30
+ },
31
+ {
32
+ "title": 'Patterns',
33
+ "url": '#0'
34
+ }
35
+ ],
36
+ "toggleNavigationButton": {
37
+ "text": 'Menu',
38
+ "ariaLabel": 'Toggle main menu'
39
+ }
40
+ }
41
+ })
42
+ }}
@@ -0,0 +1,35 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/header/_macro.njk" import onsHeader %}
5
+
6
+ {{
7
+ onsHeader({
8
+ "title": 'Page title',
9
+ "mastheadLogoUrl": '#0',
10
+ "titleUrl": '#0',
11
+ "serviceLinks": {
12
+ "id": "service-links",
13
+ "ariaLabel": 'Services menu',
14
+ "ariaListLabel": 'Menu',
15
+ "toggleServicesButton": {
16
+ "text": 'Menu',
17
+ "ariaLabel": 'Toggle services menu'
18
+ },
19
+ "itemsList": [
20
+ {
21
+ "title": "Help",
22
+ "url": "#0"
23
+ },
24
+ {
25
+ "title": "My Account",
26
+ "url": "#0"
27
+ },
28
+ {
29
+ "title": "Sign out",
30
+ "url": "#0"
31
+ }
32
+ ]
33
+ }
34
+ })
35
+ }}