@onsvisual/svelte-components 0.1.104 → 1.0.0-next.1

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 (360) hide show
  1. package/dist/css/main.css +500 -4
  2. package/dist/datavis/BarChart/BarChart.stories.svelte +84 -0
  3. package/dist/datavis/BarChart/BarChart.stories.svelte.d.ts +23 -0
  4. package/dist/datavis/BarChart/docs/component.md +19 -0
  5. package/dist/datavis/Chart/Chart.stories.svelte +128 -0
  6. package/dist/datavis/Chart/Chart.stories.svelte.d.ts +23 -0
  7. package/dist/datavis/Chart/docs/component.md +31 -0
  8. package/dist/datavis/Chart/docs/example.md +28 -0
  9. package/dist/datavis/ColumnChart/ColumnChart.stories.svelte +84 -0
  10. package/dist/datavis/ColumnChart/ColumnChart.stories.svelte.d.ts +23 -0
  11. package/dist/datavis/ColumnChart/docs/component.md +19 -0
  12. package/dist/datavis/DotPlotChart/DotPlotChart.stories.svelte +40 -0
  13. package/dist/datavis/DotPlotChart/DotPlotChart.stories.svelte.d.ts +23 -0
  14. package/dist/datavis/DotPlotChart/docs/component.md +19 -0
  15. package/dist/datavis/LineChart/LineChart.stories.svelte +64 -0
  16. package/dist/datavis/LineChart/LineChart.stories.svelte.d.ts +23 -0
  17. package/dist/datavis/LineChart/docs/component.md +31 -0
  18. package/dist/datavis/ScatterChart/ScatterChart.stories.svelte +55 -0
  19. package/dist/datavis/ScatterChart/ScatterChart.stories.svelte.d.ts +23 -0
  20. package/dist/datavis/ScatterChart/docs/component.md +53 -0
  21. package/dist/datavis/Table/Table.stories.svelte +32 -0
  22. package/dist/{@types/datavis/Table/Table.svelte.d.ts → datavis/Table/Table.stories.svelte.d.ts} +2 -16
  23. package/dist/datavis/Table/Table.svelte +141 -149
  24. package/dist/datavis/Table/Table.svelte.d.ts +35 -0
  25. package/dist/datavis/Table/docs/component.md +20 -0
  26. package/dist/datavis/intro.mdx +22 -0
  27. package/dist/decorators/Blockquote/Blockquote.stories.svelte +25 -0
  28. package/dist/decorators/Blockquote/Blockquote.stories.svelte.d.ts +23 -0
  29. package/dist/decorators/Blockquote/Blockquote.svelte +22 -22
  30. package/dist/{@types/decorators → decorators}/Blockquote/Blockquote.svelte.d.ts +2 -2
  31. package/dist/decorators/Blockquote/docs/component.md +10 -0
  32. package/dist/decorators/Divider/Divider.stories.svelte +29 -0
  33. package/dist/decorators/Divider/Divider.stories.svelte.d.ts +23 -0
  34. package/dist/decorators/Divider/Divider.svelte +40 -59
  35. package/dist/{@types/decorators → decorators}/Divider/Divider.svelte.d.ts +10 -14
  36. package/dist/decorators/Divider/docs/component.md +12 -0
  37. package/dist/decorators/Em/Em.stories.svelte +30 -0
  38. package/dist/{@types/decorators/Em/Em.svelte.d.ts → decorators/Em/Em.stories.svelte.d.ts} +4 -10
  39. package/dist/decorators/Em/Em.svelte +42 -25
  40. package/dist/decorators/Em/Em.svelte.d.ts +33 -0
  41. package/dist/decorators/Em/docs/component.md +12 -0
  42. package/dist/decorators/Indent/Indent.stories.svelte +22 -0
  43. package/dist/decorators/Indent/Indent.stories.svelte.d.ts +23 -0
  44. package/dist/decorators/Indent/Indent.svelte +3 -0
  45. package/dist/decorators/Indent/Indent.svelte.d.ts +27 -0
  46. package/dist/decorators/Indent/docs/component.md +10 -0
  47. package/dist/{@types/index.d.ts → index.d.ts} +10 -10
  48. package/dist/index.js +13 -8
  49. package/dist/inputs/Button/Button.stories.svelte +65 -0
  50. package/dist/inputs/Button/Button.stories.svelte.d.ts +23 -0
  51. package/dist/inputs/Button/Button.svelte +113 -113
  52. package/dist/inputs/Button/Button.svelte.d.ts +51 -0
  53. package/dist/inputs/Button/Icon.svelte +44 -44
  54. package/dist/{@types/inputs → inputs}/Button/Icon.svelte.d.ts +6 -6
  55. package/dist/inputs/Button/docs/component.md +17 -0
  56. package/dist/inputs/Checkbox/Checkbox.stories.svelte +34 -0
  57. package/dist/inputs/Checkbox/Checkbox.stories.svelte.d.ts +23 -0
  58. package/dist/inputs/Checkbox/Checkbox.svelte +145 -152
  59. package/dist/{@types/inputs → inputs}/Checkbox/Checkbox.svelte.d.ts +16 -16
  60. package/dist/inputs/Checkbox/docs/component.md +14 -0
  61. package/dist/inputs/Checkboxes/Checkboxes.stories.svelte +42 -0
  62. package/dist/inputs/Checkboxes/Checkboxes.stories.svelte.d.ts +23 -0
  63. package/dist/inputs/Checkboxes/Checkboxes.svelte +29 -29
  64. package/dist/{@types/inputs → inputs}/Checkboxes/Checkboxes.svelte.d.ts +8 -8
  65. package/dist/inputs/Checkboxes/docs/component.md +20 -0
  66. package/dist/inputs/Checkboxes/docs/example.md +16 -0
  67. package/dist/inputs/Dropdown/Dropdown.stories.svelte +54 -0
  68. package/dist/{@types/inputs/Dropdown/Dropdown.svelte.d.ts → inputs/Dropdown/Dropdown.stories.svelte.d.ts} +2 -16
  69. package/dist/inputs/Dropdown/Dropdown.svelte +49 -55
  70. package/dist/inputs/Dropdown/Dropdown.svelte.d.ts +37 -0
  71. package/dist/inputs/Dropdown/docs/component.md +22 -0
  72. package/dist/inputs/ErrorPanel/ErrorPanel.stories.svelte +25 -0
  73. package/dist/inputs/ErrorPanel/ErrorPanel.stories.svelte.d.ts +23 -0
  74. package/dist/inputs/ErrorPanel/ErrorPanel.svelte +14 -30
  75. package/dist/{@types/inputs → inputs}/ErrorPanel/ErrorPanel.svelte.d.ts +2 -2
  76. package/dist/inputs/ErrorPanel/docs/component.md +14 -0
  77. package/dist/inputs/ErrorSummary/ErrorSummary.stories.svelte +34 -0
  78. package/dist/inputs/ErrorSummary/ErrorSummary.stories.svelte.d.ts +23 -0
  79. package/dist/inputs/ErrorSummary/ErrorSummary.svelte +34 -32
  80. package/dist/{@types/inputs → inputs}/ErrorSummary/ErrorSummary.svelte.d.ts +4 -4
  81. package/dist/inputs/ErrorSummary/docs/component.md +17 -0
  82. package/dist/inputs/ErrorSummary/docs/example.md +12 -0
  83. package/dist/inputs/Input/Input.stories.svelte +73 -0
  84. package/dist/inputs/Input/Input.stories.svelte.d.ts +23 -0
  85. package/dist/inputs/Input/Input.svelte +125 -156
  86. package/dist/inputs/Input/Input.svelte.d.ts +51 -0
  87. package/dist/inputs/Input/docs/component.md +16 -0
  88. package/dist/inputs/Radios/Radio.svelte +68 -102
  89. package/dist/{@types/inputs → inputs}/Radios/Radio.svelte.d.ts +6 -6
  90. package/dist/inputs/Radios/Radios.stories.svelte +51 -0
  91. package/dist/inputs/Radios/Radios.stories.svelte.d.ts +23 -0
  92. package/dist/inputs/Radios/Radios.svelte +38 -38
  93. package/dist/{@types/inputs → inputs}/Radios/Radios.svelte.d.ts +10 -10
  94. package/dist/inputs/Radios/docs/component.md +24 -0
  95. package/dist/inputs/Radios/docs/example.md +21 -0
  96. package/dist/inputs/Select/Select.stories.svelte +61 -0
  97. package/dist/inputs/Select/Select.stories.svelte.d.ts +23 -0
  98. package/dist/inputs/Select/Select.svelte +271 -289
  99. package/dist/inputs/Select/Select.svelte.d.ts +58 -0
  100. package/dist/inputs/Select/docs/component.md +27 -0
  101. package/dist/inputs/Textarea/Textarea.stories.svelte +40 -0
  102. package/dist/{@types/inputs/Textarea/Textarea.svelte.d.ts → inputs/Textarea/Textarea.stories.svelte.d.ts} +2 -16
  103. package/dist/inputs/Textarea/Textarea.svelte +93 -89
  104. package/dist/inputs/Textarea/Textarea.svelte.d.ts +37 -0
  105. package/dist/inputs/Textarea/docs/component.md +16 -0
  106. package/dist/intro.mdx +60 -0
  107. package/dist/js/menuOptions.js +14 -0
  108. package/dist/{@types/js → js}/utils.d.ts +8 -2
  109. package/dist/js/utils.js +61 -44
  110. package/dist/{@types/js → js}/withParams.d.ts +3 -9
  111. package/dist/js/withParams.js +17 -20
  112. package/dist/layout/Accordion/Accordion.stories.svelte +30 -0
  113. package/dist/{@types/layout/Accordion/Accordion.svelte.d.ts → layout/Accordion/Accordion.stories.svelte.d.ts} +4 -8
  114. package/dist/layout/Accordion/Accordion.svelte +49 -29
  115. package/dist/layout/Accordion/Accordion.svelte.d.ts +31 -0
  116. package/dist/layout/Accordion/AccordionItem.svelte +46 -81
  117. package/dist/{@types/layout → layout}/Accordion/AccordionItem.svelte.d.ts +6 -6
  118. package/dist/layout/Accordion/accordion.d.ts +18 -0
  119. package/dist/layout/Accordion/accordion.js +64 -0
  120. package/dist/layout/Accordion/details.d.ts +14 -0
  121. package/dist/layout/Accordion/details.js +83 -0
  122. package/dist/layout/Accordion/docs/component.md +19 -0
  123. package/dist/layout/AnalyticsBanner/AnalyticsBanner.stories.svelte +16 -0
  124. package/dist/{@types/layout/AnalyticsBanner/AnalyticsBanner.svelte.d.ts → layout/AnalyticsBanner/AnalyticsBanner.stories.svelte.d.ts} +2 -13
  125. package/dist/layout/AnalyticsBanner/AnalyticsBanner.svelte +284 -273
  126. package/dist/layout/AnalyticsBanner/AnalyticsBanner.svelte.d.ts +36 -0
  127. package/dist/layout/AnalyticsBanner/docs/component.md +17 -0
  128. package/dist/layout/BackLink/BackLink.stories.svelte +16 -0
  129. package/dist/layout/BackLink/BackLink.stories.svelte.d.ts +23 -0
  130. package/dist/layout/BackLink/BackLink.svelte +30 -0
  131. package/dist/layout/BackLink/BackLink.svelte.d.ts +25 -0
  132. package/dist/layout/BackLink/docs/component.md +12 -0
  133. package/dist/layout/Breadcrumb/Breadcrumb.stories.svelte +31 -0
  134. package/dist/layout/Breadcrumb/Breadcrumb.stories.svelte.d.ts +23 -0
  135. package/dist/layout/Breadcrumb/Breadcrumb.svelte +44 -67
  136. package/dist/{@types/layout → layout}/Breadcrumb/Breadcrumb.svelte.d.ts +6 -12
  137. package/dist/layout/Breadcrumb/docs/component.md +15 -0
  138. package/dist/layout/Card/Card.stories.svelte +39 -0
  139. package/dist/layout/Card/Card.stories.svelte.d.ts +23 -0
  140. package/dist/layout/Card/Card.svelte +120 -0
  141. package/dist/layout/Card/Card.svelte.d.ts +49 -0
  142. package/dist/layout/Card/docs/component.md +14 -0
  143. package/dist/layout/Card/docs/eg-images.md +27 -0
  144. package/dist/layout/Card/docs/eg-links.md +12 -0
  145. package/dist/layout/Card/docs/eg-spans.md +12 -0
  146. package/dist/layout/Contents/Contents.stories.svelte +27 -0
  147. package/dist/{@types/layout/Contents/Contents.svelte.d.ts → layout/Contents/Contents.stories.svelte.d.ts} +2 -8
  148. package/dist/layout/Contents/Contents.svelte +42 -40
  149. package/dist/layout/Contents/Contents.svelte.d.ts +29 -0
  150. package/dist/layout/Contents/docs/component.md +18 -0
  151. package/dist/layout/DescriptionList/DescriptionList.stories.svelte +22 -0
  152. package/dist/layout/DescriptionList/DescriptionList.stories.svelte.d.ts +23 -0
  153. package/dist/layout/DescriptionList/DescriptionList.svelte +48 -0
  154. package/dist/layout/DescriptionList/DescriptionList.svelte.d.ts +27 -0
  155. package/dist/layout/DescriptionList/docs/component.md +18 -0
  156. package/dist/layout/Details/Details.stories.svelte +32 -0
  157. package/dist/layout/Details/Details.stories.svelte.d.ts +23 -0
  158. package/dist/layout/Details/Details.svelte +70 -0
  159. package/dist/layout/Details/Details.svelte.d.ts +35 -0
  160. package/dist/layout/Details/docs/component.md +14 -0
  161. package/dist/layout/DocumentList/Document.svelte +103 -0
  162. package/dist/layout/DocumentList/Document.svelte.d.ts +39 -0
  163. package/dist/layout/DocumentList/DocumentList.stories.svelte +73 -0
  164. package/dist/layout/DocumentList/DocumentList.stories.svelte.d.ts +23 -0
  165. package/dist/layout/DocumentList/DocumentList.svelte +17 -0
  166. package/dist/layout/DocumentList/DocumentList.svelte.d.ts +27 -0
  167. package/dist/layout/DocumentList/docs/component.md +28 -0
  168. package/dist/layout/DocumentList/docs/example.md +23 -0
  169. package/dist/layout/ErrorPage/ErrorPage.stories.svelte +18 -0
  170. package/dist/{@types/layout/ErrorPage/ErrorPage.svelte.d.ts → layout/ErrorPage/ErrorPage.stories.svelte.d.ts} +2 -6
  171. package/dist/layout/ErrorPage/ErrorPage.svelte +45 -40
  172. package/dist/layout/ErrorPage/ErrorPage.svelte.d.ts +29 -0
  173. package/dist/layout/ErrorPage/docs/component.md +13 -0
  174. package/dist/layout/Footer/Footer.stories.svelte +24 -0
  175. package/dist/{@types/layout/Footer/Footer.svelte.d.ts → layout/Footer/Footer.stories.svelte.d.ts} +4 -12
  176. package/dist/layout/Footer/Footer.svelte +372 -257
  177. package/dist/layout/Footer/Footer.svelte.d.ts +27 -0
  178. package/dist/layout/Footer/docs/component.md +10 -0
  179. package/dist/layout/Grid/Grid.stories.svelte +50 -0
  180. package/dist/layout/Grid/Grid.stories.svelte.d.ts +23 -0
  181. package/dist/layout/Grid/Grid.svelte +110 -160
  182. package/dist/layout/Grid/Grid.svelte.d.ts +49 -0
  183. package/dist/layout/Grid/GridCell.svelte +65 -0
  184. package/dist/layout/Grid/GridCell.svelte.d.ts +27 -0
  185. package/dist/layout/Grid/docs/component.md +14 -0
  186. package/dist/layout/Header/Header.stories.svelte +26 -0
  187. package/dist/{@types/layout/Header/Header.svelte.d.ts → layout/Header/Header.stories.svelte.d.ts} +4 -20
  188. package/dist/layout/Header/Header.svelte +842 -612
  189. package/dist/layout/Header/Header.svelte.d.ts +39 -0
  190. package/dist/layout/Header/docs/component.md +11 -0
  191. package/dist/layout/Hero/Hero.stories.svelte +77 -0
  192. package/dist/layout/Hero/Hero.stories.svelte.d.ts +23 -0
  193. package/dist/layout/Hero/Hero.svelte +350 -80
  194. package/dist/layout/Hero/Hero.svelte.d.ts +55 -0
  195. package/dist/layout/Hero/docs/component.md +14 -0
  196. package/dist/layout/Highlight/Highlight.stories.svelte +29 -0
  197. package/dist/layout/Highlight/Highlight.stories.svelte.d.ts +23 -0
  198. package/dist/layout/Highlight/Highlight.svelte +78 -66
  199. package/dist/layout/Highlight/Highlight.svelte.d.ts +45 -0
  200. package/dist/layout/Highlight/docs/component.md +12 -0
  201. package/dist/layout/Image/Image.stories.svelte +23 -0
  202. package/dist/layout/Image/Image.stories.svelte.d.ts +23 -0
  203. package/dist/layout/Image/Image.svelte +24 -0
  204. package/dist/layout/Image/Image.svelte.d.ts +27 -0
  205. package/dist/layout/Image/docs/component.md +15 -0
  206. package/dist/layout/List/Li.svelte +3 -0
  207. package/dist/layout/List/Li.svelte.d.ts +27 -0
  208. package/dist/layout/List/List.stories.svelte +40 -0
  209. package/dist/{@types/layout/List/List.svelte.d.ts → layout/List/List.stories.svelte.d.ts} +4 -8
  210. package/dist/layout/List/List.svelte +34 -25
  211. package/dist/layout/List/List.svelte.d.ts +29 -0
  212. package/dist/layout/List/docs/component.md +14 -0
  213. package/dist/layout/List/docs/example.md +12 -0
  214. package/dist/layout/NavSections/NavSection.svelte +66 -66
  215. package/dist/{@types/layout → layout}/NavSections/NavSection.svelte.d.ts +10 -10
  216. package/dist/layout/NavSections/NavSections.stories.svelte +48 -0
  217. package/dist/layout/NavSections/NavSections.stories.svelte.d.ts +23 -0
  218. package/dist/layout/NavSections/NavSections.svelte +135 -183
  219. package/dist/{@types/layout → layout}/NavSections/NavSections.svelte.d.ts +14 -24
  220. package/dist/layout/NavSections/docs/component.md +27 -0
  221. package/dist/layout/Notice/Notice.stories.svelte +61 -0
  222. package/dist/layout/Notice/Notice.stories.svelte.d.ts +23 -0
  223. package/dist/layout/Notice/Notice.svelte +45 -54
  224. package/dist/{@types/layout → layout}/Notice/Notice.svelte.d.ts +2 -6
  225. package/dist/layout/Notice/docs/component.md +14 -0
  226. package/dist/layout/PhaseBanner/PhaseBanner.stories.svelte +24 -0
  227. package/dist/{@types/layout/PhaseBanner/PhaseBanner.svelte.d.ts → layout/PhaseBanner/PhaseBanner.stories.svelte.d.ts} +2 -4
  228. package/dist/layout/PhaseBanner/PhaseBanner.svelte +56 -35
  229. package/dist/layout/PhaseBanner/PhaseBanner.svelte.d.ts +25 -0
  230. package/dist/layout/PhaseBanner/docs/component.md +14 -0
  231. package/dist/layout/RelatedContent/RelatedContent.stories.svelte +36 -0
  232. package/dist/{@types/layout/RelatedContent/RelatedContent.svelte.d.ts → layout/RelatedContent/RelatedContent.stories.svelte.d.ts} +2 -2
  233. package/dist/layout/RelatedContent/RelatedContent.svelte +44 -54
  234. package/dist/layout/RelatedContent/RelatedContent.svelte.d.ts +31 -0
  235. package/dist/layout/RelatedContent/docs/component.md +16 -0
  236. package/dist/layout/Scroller/Scroller.stories.svelte +61 -0
  237. package/dist/layout/Scroller/Scroller.stories.svelte.d.ts +23 -0
  238. package/dist/layout/Scroller/Scroller.svelte +341 -331
  239. package/dist/{@types/layout → layout}/Scroller/Scroller.svelte.d.ts +22 -20
  240. package/dist/layout/Scroller/ScrollerSection.svelte +54 -73
  241. package/dist/{@types/layout → layout}/Scroller/ScrollerSection.svelte.d.ts +6 -12
  242. package/dist/layout/Scroller/docs/component.md +41 -0
  243. package/dist/layout/Section/Section.stories.svelte +33 -0
  244. package/dist/layout/Section/Section.stories.svelte.d.ts +23 -0
  245. package/dist/layout/Section/Section.svelte +53 -77
  246. package/dist/layout/Section/Section.svelte.d.ts +41 -0
  247. package/dist/layout/Section/docs/component.md +12 -0
  248. package/dist/layout/ShareButtons/ShareButtons.stories.svelte +20 -0
  249. package/dist/layout/ShareButtons/ShareButtons.stories.svelte.d.ts +23 -0
  250. package/dist/layout/ShareButtons/ShareButtons.svelte +118 -175
  251. package/dist/{@types/layout → layout}/ShareButtons/ShareButtons.svelte.d.ts +6 -14
  252. package/dist/layout/ShareButtons/docs/component.md +14 -0
  253. package/dist/layout/SkipLink/SkipLink.stories.svelte +16 -0
  254. package/dist/{@types/layout/SkipLink/SkipLink.svelte.d.ts → layout/SkipLink/SkipLink.stories.svelte.d.ts} +2 -2
  255. package/dist/layout/SkipLink/SkipLink.svelte +6 -6
  256. package/dist/layout/SkipLink/SkipLink.svelte.d.ts +23 -0
  257. package/dist/layout/SkipLink/docs/component.md +11 -0
  258. package/dist/layout/Summary/Summary.stories.svelte +21 -0
  259. package/dist/{@types/layout/Summary/Summary.svelte.d.ts → layout/Summary/Summary.stories.svelte.d.ts} +2 -4
  260. package/dist/layout/Summary/Summary.svelte +50 -46
  261. package/dist/layout/Summary/Summary.svelte.d.ts +31 -0
  262. package/dist/layout/Summary/docs/component.md +17 -0
  263. package/dist/layout/Tabs/Tab.svelte +42 -42
  264. package/dist/{@types/layout → layout}/Tabs/Tab.svelte.d.ts +6 -6
  265. package/dist/layout/Tabs/Tabs.stories.svelte +29 -0
  266. package/dist/layout/Tabs/Tabs.stories.svelte.d.ts +23 -0
  267. package/dist/layout/Tabs/Tabs.svelte +71 -97
  268. package/dist/{@types/layout → layout}/Tabs/Tabs.svelte.d.ts +6 -6
  269. package/dist/layout/Tabs/docs/component.md +16 -0
  270. package/dist/layout/Tabs/tabs.d.ts +43 -0
  271. package/dist/layout/Tabs/tabs.js +302 -0
  272. package/dist/templates/EmbedArticle/EmbedArticle.stories.svelte +72 -0
  273. package/dist/templates/EmbedArticle/EmbedArticle.stories.svelte.d.ts +23 -0
  274. package/dist/templates/EmbedArticle/docs/component.md +56 -0
  275. package/dist/templates/FeatureArticle/FeatureArticle.stories.svelte +151 -0
  276. package/dist/templates/FeatureArticle/FeatureArticle.stories.svelte.d.ts +23 -0
  277. package/dist/templates/FeatureArticle/docs/component.md +125 -0
  278. package/dist/templates/StandardArticle/StandardArticle.stories.svelte +86 -0
  279. package/dist/templates/StandardArticle/StandardArticle.stories.svelte.d.ts +23 -0
  280. package/dist/templates/StandardArticle/docs/component.md +76 -0
  281. package/dist/templates/intro.mdx +19 -0
  282. package/dist/wrappers/Container/Container.stories.svelte +38 -0
  283. package/dist/wrappers/Container/Container.stories.svelte.d.ts +23 -0
  284. package/dist/wrappers/Container/Container.svelte +61 -140
  285. package/dist/wrappers/Container/Container.svelte.d.ts +39 -0
  286. package/dist/wrappers/Container/docs/component.md +10 -0
  287. package/dist/wrappers/Embed/Embed.stories.svelte +24 -0
  288. package/dist/wrappers/Embed/Embed.stories.svelte.d.ts +23 -0
  289. package/dist/wrappers/Embed/Embed.svelte +33 -32
  290. package/dist/{@types/wrappers → wrappers}/Embed/Embed.svelte.d.ts +4 -4
  291. package/dist/wrappers/Embed/docs/component.md +15 -0
  292. package/dist/wrappers/LazyLoad/LazyLoad.stories.svelte +37 -0
  293. package/dist/wrappers/LazyLoad/LazyLoad.stories.svelte.d.ts +23 -0
  294. package/dist/wrappers/LazyLoad/LazyLoad.svelte +34 -35
  295. package/dist/{@types/wrappers → wrappers}/LazyLoad/LazyLoad.svelte.d.ts +6 -6
  296. package/dist/wrappers/LazyLoad/docs/component.md +29 -0
  297. package/dist/wrappers/Main/Main.stories.svelte +24 -0
  298. package/dist/wrappers/Main/Main.stories.svelte.d.ts +23 -0
  299. package/dist/wrappers/Main/Main.svelte +10 -3
  300. package/dist/{@types/wrappers → wrappers}/Main/Main.svelte.d.ts +2 -4
  301. package/dist/wrappers/Main/docs/component.md +16 -0
  302. package/dist/wrappers/Observe/Observe.stories.svelte +29 -0
  303. package/dist/wrappers/Observe/Observe.stories.svelte.d.ts +23 -0
  304. package/dist/wrappers/Observe/Observe.svelte +24 -24
  305. package/dist/{@types/wrappers → wrappers}/Observe/Observe.svelte.d.ts +2 -2
  306. package/dist/wrappers/Observe/docs/component.md +22 -0
  307. package/dist/wrappers/Theme/Theme.stories.svelte +70 -0
  308. package/dist/{@types/wrappers/Theme/Theme.svelte.d.ts → wrappers/Theme/Theme.stories.svelte.d.ts} +4 -20
  309. package/dist/wrappers/Theme/Theme.svelte +64 -101
  310. package/dist/wrappers/Theme/Theme.svelte.d.ts +37 -0
  311. package/dist/wrappers/Theme/docs/component.md +10 -0
  312. package/dist/wrappers/Theme/themes.d.ts +143 -0
  313. package/dist/wrappers/Theme/themes.js +68 -27
  314. package/package.json +82 -195
  315. package/dist/@types/actions/cssVariables/index.d.ts +0 -4
  316. package/dist/@types/actions/resizeObserver/index.d.ts +0 -4
  317. package/dist/@types/inputs/AccessibleSelect/AccessibleSelect.svelte.d.ts +0 -58
  318. package/dist/@types/inputs/Button/Button.svelte.d.ts +0 -51
  319. package/dist/@types/inputs/Input/Input.svelte.d.ts +0 -51
  320. package/dist/@types/inputs/Select/Select.svelte.d.ts +0 -77
  321. package/dist/@types/js/docsPage.d.ts +0 -25
  322. package/dist/@types/layout/Backlink/Backlink.svelte.d.ts +0 -23
  323. package/dist/@types/layout/Cards/Card.svelte.d.ts +0 -49
  324. package/dist/@types/layout/Cards/Cards.svelte.d.ts +0 -51
  325. package/dist/@types/layout/Footer/ONSLogo.svelte.d.ts +0 -29
  326. package/dist/@types/layout/Grid/Grid.svelte.d.ts +0 -53
  327. package/dist/@types/layout/Header/ONSLogo.svelte.d.ts +0 -31
  328. package/dist/@types/layout/Hero/Hero.svelte.d.ts +0 -47
  329. package/dist/@types/layout/Highlight/Highlight.svelte.d.ts +0 -43
  330. package/dist/@types/layout/NavSections/SectionBacklink.svelte.d.ts +0 -23
  331. package/dist/@types/layout/Section/Section.svelte.d.ts +0 -47
  332. package/dist/@types/layout/Survey/Survey.svelte.d.ts +0 -23
  333. package/dist/@types/layout/Survey/init-survey.d.ts +0 -1
  334. package/dist/@types/layout/Titleblock/Meta.svelte.d.ts +0 -23
  335. package/dist/@types/layout/Titleblock/Titleblock.svelte.d.ts +0 -53
  336. package/dist/@types/layout/Twisty/Twisty.svelte.d.ts +0 -33
  337. package/dist/@types/wrappers/Container/Container.svelte.d.ts +0 -45
  338. package/dist/@types/wrappers/Theme/themes.d.ts +0 -29
  339. package/dist/actions/cssVariables/index.js +0 -20
  340. package/dist/actions/resizeObserver/index.js +0 -25
  341. package/dist/globals.d.ts +0 -23
  342. package/dist/inputs/AccessibleSelect/AccessibleSelect.svelte +0 -280
  343. package/dist/inputs/AccessibleSelect/options.js +0 -263
  344. package/dist/js/docsPage.js +0 -13
  345. package/dist/layout/Backlink/Backlink.svelte +0 -32
  346. package/dist/layout/Cards/Card.svelte +0 -99
  347. package/dist/layout/Cards/Cards.svelte +0 -95
  348. package/dist/layout/Footer/ONSLogo.svelte +0 -150
  349. package/dist/layout/Header/ONSLogo.svelte +0 -148
  350. package/dist/layout/NavSections/SectionBacklink.svelte +0 -31
  351. package/dist/layout/Survey/Survey.svelte +0 -96
  352. package/dist/layout/Survey/init-survey.js +0 -230
  353. package/dist/layout/Titleblock/Meta.svelte +0 -26
  354. package/dist/layout/Titleblock/Titleblock.svelte +0 -147
  355. package/dist/layout/Twisty/Twisty.svelte +0 -56
  356. /package/dist/{@types/datavis/shared → datavis/demo-data}/data-scatter.d.ts +0 -0
  357. /package/dist/datavis/{shared → demo-data}/data-scatter.js +0 -0
  358. /package/dist/{@types/datavis/shared → datavis/demo-data}/data.d.ts +0 -0
  359. /package/dist/datavis/{shared → demo-data}/data.js +0 -0
  360. /package/dist/{@types/inputs/AccessibleSelect/options.d.ts → js/menuOptions.d.ts} +0 -0
@@ -1,643 +1,873 @@
1
1
  <script>
2
- import { onMount, getContext } from "svelte";
3
- import Theme from "../../wrappers/Theme/Theme.svelte";
4
- import ONSLogo from "./ONSLogo.svelte";
5
- import SkipLink from "../SkipLink/SkipLink.svelte";
2
+ import { onMount, getContext } from "svelte";
3
+ import Theme from "../../wrappers/Theme/Theme.svelte";
4
+ import SkipLink from "../SkipLink/SkipLink.svelte";
6
5
 
7
- const page = getContext("page");
6
+ const page = getContext("page");
8
7
 
9
- /**
10
- * Display compact header without menus
11
- * @type {boolean}
12
- */
13
- export let compact = false;
14
- /**
15
- * Optional product title
16
- * @type {string}
17
- */
18
- export let title = "";
19
- /**
20
- * Optional link for product title
21
- * @type {string}
22
- */
23
- export let titleHref = "";
24
- /**
25
- * Sets a predefined theme
26
- * @type {"light"|"dark"}
27
- */
28
- export let theme = null;
29
- /**
30
- * Define additional props to override the base theme
31
- * @type {object}
32
- */
33
- export let themeOverrides = null;
34
- /**
35
- * Set to true to include an English/Welsh language link
36
- * @type {boolean}
37
- */
38
- export let bilingual = true;
39
- /**
40
- * Set to false to disable skipLink (eg. if you need to move its location)
41
- * @type {boolean}
42
- */
43
- export let skipLinkEnabled = true;
8
+ /**
9
+ * Display compact header without menus
10
+ * @type {boolean}
11
+ */
12
+ export let compact = false;
13
+ /**
14
+ * Optional product title
15
+ * @type {string}
16
+ */
17
+ export let title = "";
18
+ /**
19
+ * Optional link for product title
20
+ * @type {string}
21
+ */
22
+ export let titleHref = "";
23
+ /**
24
+ * Sets a predefined theme
25
+ * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|null}
26
+ */
27
+ export let theme = null;
28
+ /**
29
+ * Define additional props to override the base theme
30
+ * @type {object}
31
+ */
32
+ export let themeOverrides = {};
33
+ /**
34
+ * Set to true to include an English/Welsh language link
35
+ * @type {boolean}
36
+ */
37
+ export let bilingual = true;
38
+ /**
39
+ * Anchor link to skip to main body content (default "#main")
40
+ * @type {string}
41
+ */
42
+ export let skipHref = "#main";
44
43
 
45
- let lang = "en";
46
- let baseurl = "//www.ons.gov.uk";
47
- let baseother = "//cy.ons.gov.uk";
48
- let path = "";
49
- let mounted = false;
44
+ let lang = "en";
45
+ let baseurl = "https://www.ons.gov.uk";
46
+ let baseother = "https://cy.ons.gov.uk";
47
+ let path = "";
50
48
 
51
- function setPaths(mounted, page) {
52
- if (mounted) {
53
- const url = page?.url || document.location;
54
- lang = url.host.startsWith("cy") ? "cy" : "en";
55
- baseurl = lang === "cy" ? "//cy.ons.gov.uk" : "//www.ons.gov.uk";
56
- baseother = lang === "cy" ? "//www.ons.gov.uk" : "//cy.ons.gov.uk";
57
- path = url.pathname;
58
- }
59
- }
60
- $: setPaths(mounted, $page);
61
- onMount(() => {
62
- mounted = true;
49
+ let menuExpanded = false;
50
+ let searchExpanded = false;
63
51
 
64
- /// Add keyboard event listeners
65
- const navItems = document.querySelectorAll(".js-nav");
66
- navItems.forEach((item) => {
67
- item.addEventListener("keydown", handleKeydown);
68
- });
52
+ const menu = [
53
+ {
54
+ label_en: "Business, industry and trade",
55
+ label_cy: "Busnes, diwydiant a masnach",
56
+ url: "/businessindustryandtrade",
57
+ expanded: false,
58
+ children: [
59
+ { label_en: "Business", label_cy: "Busnes", url: "/businessindustryandtrade/business" },
60
+ {
61
+ label_en: "Changes to business",
62
+ label_cy: "Newidiadau i fusnesau",
63
+ url: "/businessindustryandtrade/changestobusiness"
64
+ },
65
+ {
66
+ label_en: "Construction industry",
67
+ label_cy: "Diwydiant adeiladu",
68
+ url: "/businessindustryandtrade/constructionindustry"
69
+ },
70
+ {
71
+ label_en: "IT and internet industry",
72
+ label_cy: "Y diwydiant TG a'r rhyngrwyd",
73
+ url: "/businessindustryandtrade"
74
+ },
75
+ {
76
+ label_en: "International trade",
77
+ label_cy: "Masnach ryngwladol",
78
+ url: "/businessindustryandtrade/itandinternetindustry"
79
+ },
80
+ {
81
+ label_en: "Manufacturing and production industry",
82
+ label_cy: "Y diwydiant gweithgynhyrchu a chynhyrchu",
83
+ url: "/businessindustryandtrade/manufacturingandproductionindustry"
84
+ },
85
+ {
86
+ label_en: "Retail industry",
87
+ label_cy: "Y diwydiant manwerthu",
88
+ url: "/businessindustryandtrade/retailindustry"
89
+ },
90
+ {
91
+ label_en: "Tourism industry",
92
+ label_cy: "Y diwydiant twristiaeth",
93
+ url: "/businessindustryandtrade/tourismindustry"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ label_en: "Economy",
99
+ label_cy: "Yr economi",
100
+ url: "/economy",
101
+ expanded: false,
102
+ children: [
103
+ {
104
+ label_en: "Economic output and productivity",
105
+ label_cy: "Allgynnyrch economaidd a chynhyrchiant",
106
+ url: "/economy/economicoutputandproductivity"
107
+ },
108
+ {
109
+ label_en: "Environmental accounts",
110
+ label_cy: "Cyfrifon amgylcheddol",
111
+ url: "/economy/environmentalaccounts"
112
+ },
113
+ {
114
+ label_en: "Government, public sector and taxes",
115
+ label_cy: "Llywodraeth, y sector cyhoeddus a threthi",
116
+ url: "/economy/governmentpublicsectorandtaxes"
117
+ },
118
+ {
119
+ label_en: "Gross Domestic Product (GDP)",
120
+ label_cy: "Cynnyrch Domestig Gros (CDG)",
121
+ url: "/economy/grossdomesticproductgdp"
122
+ },
123
+ {
124
+ label_en: "Gross Value Added (GVA)",
125
+ label_cy: "Gwerth Ychwanegol Gros",
126
+ url: "/economy/grossvalueaddedgva"
127
+ },
128
+ {
129
+ label_en: "Inflation and price indices",
130
+ label_cy: "Mynegeion chwyddiant a phrisiau",
131
+ url: "/economy/inflationandpriceindices"
132
+ },
133
+ {
134
+ label_en: "Investments, pensions and trusts",
135
+ label_cy: "Buddsoddiadau, pensiynau ac ymddiriedolaethau",
136
+ url: "/economy/investmentspensionsandtrusts"
137
+ },
138
+ {
139
+ label_en: "National accounts",
140
+ label_cy: "Cyfrifon gwladol",
141
+ url: "/economy/nationalaccounts"
142
+ },
143
+ {
144
+ label_en: "Regional accounts",
145
+ label_cy: "Cyfrifon rhanbarthol",
146
+ url: "/economy/regionalaccounts"
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ label_en: "Employment and labour market",
152
+ label_cy: "Cyflogaeth a'r farchnad lafur",
153
+ url: "/employmentandlabourmarket",
154
+ expanded: false,
155
+ children: [
156
+ {
157
+ label_en: "People in work",
158
+ label_cy: "Pobl mewn gwaith",
159
+ url: "/employmentandlabourmarket/peopleinwork"
160
+ },
161
+ {
162
+ label_en: "People not in work",
163
+ label_cy: "Pobl nad ydynt mewn gwaith",
164
+ url: "/employmentandlabourmarket/peoplenotinwork"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ label_en: "People, population and community",
170
+ label_cy: "Pobl, y boblogaeth a chymunedau",
171
+ url: "/peoplepopulationandcommunity",
172
+ expanded: false,
173
+ children: [
174
+ {
175
+ label_en: "Births, deaths and marriages",
176
+ label_cy: "Genedigaethau, marwolaethau a phriodasau",
177
+ url: "/peoplepopulationandcommunity/birthsdeathsandmarriages"
178
+ },
179
+ {
180
+ label_en: "Crime and justice",
181
+ label_cy: "Troseddu a chyfiawnder",
182
+ url: "/peoplepopulationandcommunity/crimeandjustice"
183
+ },
184
+ {
185
+ label_en: "Cultural identity",
186
+ label_cy: "Hunaniaeth ddiwylliannol",
187
+ url: "/peoplepopulationandcommunity/culturalidentity"
188
+ },
189
+ {
190
+ label_en: "Education and childcare",
191
+ label_cy: "Addysg a gofal plant",
192
+ url: "/peoplepopulationandcommunity/educationandchildcare"
193
+ },
194
+ {
195
+ label_en: "Elections",
196
+ label_cy: "Etholiadau",
197
+ url: "/peoplepopulationandcommunity/elections"
198
+ },
199
+ {
200
+ label_en: "Health and social care",
201
+ label_cy: "Iechyd a gofal cymdeithasol",
202
+ url: "/peoplepopulationandcommunity/healthandsocialcare"
203
+ },
204
+ {
205
+ label_en: "Household characteristics",
206
+ label_cy: "Nodweddion aelwydydd",
207
+ url: "/peoplepopulationandcommunity/householdcharacteristics"
208
+ },
209
+ { label_en: "Housing", label_cy: "Tai", url: "/peoplepopulationandcommunity/housing" },
210
+ {
211
+ label_en: "Leisure and tourism",
212
+ label_cy: "Hamdden a thwristiaeth",
213
+ url: "/peoplepopulationandcommunity/leisureandtourism"
214
+ },
215
+ {
216
+ label_en: "Personal and household finances",
217
+ label_cy: "Cyllid personol a chyllid aelwydydd",
218
+ url: "/peoplepopulationandcommunity/personalandhouseholdfinances"
219
+ },
220
+ {
221
+ label_en: "Population and migration",
222
+ label_cy: "Poblogaeth ac ymfudo",
223
+ url: "/peoplepopulationandcommunity/populationandmigration"
224
+ },
225
+ {
226
+ label_en: "Well-being",
227
+ label_cy: "Lles",
228
+ url: "/peoplepopulationandcommunity/wellbeing"
229
+ }
230
+ ]
231
+ },
232
+ { label_en: "Taking part in a survey?", label_cy: "Cymryd rhan mewn arolwg?", url: "/surveys" },
233
+ {
234
+ label_en: "Release calendar",
235
+ label_cy: "Calendar datganiadau",
236
+ url: "/releasecalendar",
237
+ secondary: true
238
+ },
239
+ { label_en: "Methodology", label_cy: "Methodoleg", url: "/methodology", secondary: true },
240
+ { label_en: "Media", label_cy: "Media", url: "/news", secondary: true },
241
+ { label_en: "About", label_cy: "Amdanom ni", url: "/aboutus", secondary: true },
242
+ { label_en: "Blog", label_cy: "Blog", url: "https://blog.ons.gov.uk/", secondary: true }
243
+ ];
69
244
 
70
- return () => {
71
- navItems.forEach((item) => {
72
- item.removeEventListener("keydown", handleKeydown);
73
- });
74
- };
75
- });
245
+ const texts = {
246
+ Home: "Hafan",
247
+ Search: "Chwilio",
248
+ Menu: "Dewislen",
249
+ "Hide search": "Cuddio",
250
+ "Office for National Statistics logo - Homepage": "Logo Swyddfa Ystadegau Gwladol - Hafan",
251
+ "Search for a keyword(s) or time series ID": "Chwilio am allweddair neu ID cyfres amser"
252
+ };
76
253
 
77
- let menuExpanded = false;
78
- let searchExpanded = false;
254
+ function toggle_sm(e, i) {
255
+ if (window.matchMedia("(max-width:767px)").matches) {
256
+ e.preventDefault();
257
+ menu[i].expanded = !menu[i].expanded;
258
+ }
259
+ }
79
260
 
80
- let menu = [
81
- {
82
- label_en: "Business, industry and trade",
83
- label_cy: "Busnes, diwydiant a masnach",
84
- url: "/businessindustryandtrade",
85
- expanded: false,
86
- children: [
87
- { label_en: "Business", label_cy: "Busnes", url: "/businessindustryandtrade/business" },
88
- {
89
- label_en: "Changes to business",
90
- label_cy: "Newidiadau i fusnesau",
91
- url: "/businessindustryandtrade/changestobusiness",
92
- },
93
- {
94
- label_en: "Construction industry",
95
- label_cy: "Diwydiant adeiladu",
96
- url: "/businessindustryandtrade/constructionindustry",
97
- },
98
- {
99
- label_en: "IT and internet industry",
100
- label_cy: "Y diwydiant TG a'r rhyngrwyd",
101
- url: "/businessindustryandtrade",
102
- },
103
- {
104
- label_en: "International trade",
105
- label_cy: "Masnach ryngwladol",
106
- url: "/businessindustryandtrade/itandinternetindustry",
107
- },
108
- {
109
- label_en: "Manufacturing and production industry",
110
- label_cy: "Y diwydiant gweithgynhyrchu a chynhyrchu",
111
- url: "/businessindustryandtrade/manufacturingandproductionindustry",
112
- },
113
- {
114
- label_en: "Retail industry",
115
- label_cy: "Y diwydiant manwerthu",
116
- url: "/businessindustryandtrade/retailindustry",
117
- },
118
- {
119
- label_en: "Tourism industry",
120
- label_cy: "Y diwydiant twristiaeth",
121
- url: "/businessindustryandtrade/tourismindustry",
122
- },
123
- ],
124
- },
125
- {
126
- label_en: "Economy",
127
- label_cy: "Yr economi",
128
- url: "/economy",
129
- expanded: false,
130
- children: [
131
- {
132
- label_en: "Economic output and productivity",
133
- label_cy: "Allgynnyrch economaidd a chynhyrchiant",
134
- url: "/economy/economicoutputandproductivity",
135
- },
136
- {
137
- label_en: "Environmental accounts",
138
- label_cy: "Cyfrifon amgylcheddol",
139
- url: "/economy/environmentalaccounts",
140
- },
141
- {
142
- label_en: "Government, public sector and taxes",
143
- label_cy: "Llywodraeth, y sector cyhoeddus a threthi",
144
- url: "/economy/governmentpublicsectorandtaxes",
145
- },
146
- {
147
- label_en: "Gross Domestic Product (GDP)",
148
- label_cy: "Cynnyrch Domestig Gros (CDG)",
149
- url: "/economy/grossdomesticproductgdp",
150
- },
151
- {
152
- label_en: "Gross Value Added (GVA)",
153
- label_cy: "Gwerth Ychwanegol Gros",
154
- url: "/economy/grossvalueaddedgva",
155
- },
156
- {
157
- label_en: "Inflation and price indices",
158
- label_cy: "Mynegeion chwyddiant a phrisiau",
159
- url: "/economy/inflationandpriceindices",
160
- },
161
- {
162
- label_en: "Investments, pensions and trusts",
163
- label_cy: "Buddsoddiadau, pensiynau ac ymddiriedolaethau",
164
- url: "/economy/investmentspensionsandtrusts",
165
- },
166
- {
167
- label_en: "National accounts",
168
- label_cy: "Cyfrifon gwladol",
169
- url: "/economy/nationalaccounts",
170
- },
171
- {
172
- label_en: "Regional accounts",
173
- label_cy: "Cyfrifon rhanbarthol",
174
- url: "/economy/regionalaccounts",
175
- },
176
- ],
177
- },
178
- {
179
- label_en: "Employment and labour market",
180
- label_cy: "Cyflogaeth a'r farchnad lafur",
181
- url: "/employmentandlabourmarket",
182
- expanded: false,
183
- children: [
184
- {
185
- label_en: "People in work",
186
- label_cy: "Pobl mewn gwaith",
187
- url: "/employmentandlabourmarket/peopleinwork",
188
- },
189
- {
190
- label_en: "People not in work",
191
- label_cy: "Pobl nad ydynt mewn gwaith",
192
- url: "/employmentandlabourmarket/peoplenotinwork",
193
- },
194
- ],
195
- },
196
- {
197
- label_en: "People, population and community",
198
- label_cy: "Pobl, y boblogaeth a chymunedau",
199
- url: "/peoplepopulationandcommunity",
200
- expanded: false,
201
- children: [
202
- {
203
- label_en: "Births, deaths and marriages",
204
- label_cy: "Genedigaethau, marwolaethau a phriodasau",
205
- url: "/peoplepopulationandcommunity/birthsdeathsandmarriages",
206
- },
207
- {
208
- label_en: "Crime and justice",
209
- label_cy: "Troseddu a chyfiawnder",
210
- url: "/peoplepopulationandcommunity/crimeandjustice",
211
- },
212
- {
213
- label_en: "Cultural identity",
214
- label_cy: "Hunaniaeth ddiwylliannol",
215
- url: "/peoplepopulationandcommunity/culturalidentity",
216
- },
217
- {
218
- label_en: "Education and childcare",
219
- label_cy: "Addysg a gofal plant",
220
- url: "/peoplepopulationandcommunity/educationandchildcare",
221
- },
222
- {
223
- label_en: "Elections",
224
- label_cy: "Etholiadau",
225
- url: "/peoplepopulationandcommunity/elections",
226
- },
227
- {
228
- label_en: "Health and social care",
229
- label_cy: "Iechyd a gofal cymdeithasol",
230
- url: "/peoplepopulationandcommunity/healthandsocialcare",
231
- },
232
- {
233
- label_en: "Household characteristics",
234
- label_cy: "Nodweddion aelwydydd",
235
- url: "/peoplepopulationandcommunity/householdcharacteristics",
236
- },
237
- { label_en: "Housing", label_cy: "Tai", url: "/peoplepopulationandcommunity/housing" },
238
- {
239
- label_en: "Leisure and tourism",
240
- label_cy: "Hamdden a thwristiaeth",
241
- url: "/peoplepopulationandcommunity/leisureandtourism",
242
- },
243
- {
244
- label_en: "Personal and household finances",
245
- label_cy: "Cyllid personol a chyllid aelwydydd",
246
- url: "/peoplepopulationandcommunity/personalandhouseholdfinances",
247
- },
248
- {
249
- label_en: "Population and migration",
250
- label_cy: "Poblogaeth ac ymfudo",
251
- url: "/peoplepopulationandcommunity/populationandmigration",
252
- },
253
- {
254
- label_en: "Well-being",
255
- label_cy: "Lles",
256
- url: "/peoplepopulationandcommunity/wellbeing",
257
- },
258
- ],
259
- },
260
- { label_en: "Taking part in a survey?", label_cy: "Cymryd rhan mewn arolwg?", url: "/surveys" },
261
- {
262
- label_en: "Release calendar",
263
- label_cy: "Calendar datganiadau",
264
- url: "/releasecalendar",
265
- secondary: true,
266
- },
267
- { label_en: "Methodology", label_cy: "Methodoleg", url: "/methodology", secondary: true },
268
- { label_en: "Media", label_cy: "Media", url: "/news", secondary: true },
269
- { label_en: "About", label_cy: "Amdanom ni", url: "/aboutus", secondary: true },
270
- { label_en: "Blog", label_cy: "Blog", url: "https://blog.ons.gov.uk/", secondary: true },
271
- ];
261
+ function handleKeydown(event) {
262
+ const target = event.currentTarget;
263
+ // Find the currently focused expandable child link within the navigation item
264
+ const focusedExpandableChild = target.querySelector(".js-expandable__child a:focus");
272
265
 
273
- const texts = {
274
- Home: "Hafan",
275
- Search: "Chwilio",
276
- Menu: "Dewislen",
277
- "Hide search": "Cuddio",
278
- "Office for National Statistics logo - Homepage": "Logo Swyddfa Ystadegau Gwladol - Hafan",
279
- "Search for a keyword(s) or time series ID": "Chwilio am allweddair neu ID cyfres amser",
280
- };
266
+ // Find all child links in the current navigation item
267
+ const childLinks = Array.from(target.querySelectorAll(".js-expandable__child a"));
281
268
 
282
- const i18n = (text) => (lang === "cy" && texts[text] ? texts[text] : text);
269
+ // Close any expanded items from mouse events
270
+ const allExpandedItems = document.querySelectorAll(".js-expandable-active");
271
+ allExpandedItems.forEach((item) => {
272
+ if (item !== target) {
273
+ item.classList.remove("js-expandable-active");
274
+ const content = item.querySelector(".js-expandable__content");
275
+ if (content) {
276
+ content.classList.add("js-nav-hidden");
277
+ content.setAttribute("aria-expanded", "false");
278
+ }
279
+ }
280
+ });
283
281
 
284
- function toggle_sm(e, i) {
285
- if (window.matchMedia("(max-width:767px)").matches) {
286
- e.preventDefault();
287
- menu[i].expanded = !menu[i].expanded;
288
- }
289
- }
282
+ switch (event.key) {
283
+ case "Tab":
284
+ if (focusedExpandableChild) {
285
+ target.classList.remove("primary-nav__item--focus");
286
+ }
287
+ break;
290
288
 
291
- function handleKeydown(event) {
292
- const target = event.currentTarget;
293
- // Find the currently focused expandable child link within the navigation item
294
- const focusedExpandableChild = target.querySelector(".js-expandable__child a:focus");
289
+ case "Escape":
290
+ event.preventDefault();
291
+ target.classList.remove("primary-nav__item--focus");
292
+ const firstNavLink = target.closest(".js-nav").querySelector("a:first-child");
293
+ if (firstNavLink) {
294
+ firstNavLink.classList.add("hide-children");
295
+ firstNavLink.focus();
296
+ firstNavLink.addEventListener(
297
+ "focusout",
298
+ () => {
299
+ firstNavLink.classList.remove("hide-children");
300
+ },
301
+ { once: true }
302
+ );
303
+ }
304
+ break;
295
305
 
296
- // Find all child links in the current navigation item
297
- const childLinks = Array.from(target.querySelectorAll(".js-expandable__child a"));
306
+ case "ArrowDown":
307
+ event.preventDefault();
308
+ if (!focusedExpandableChild) {
309
+ // If no child is focused, focus the first child. Needs to start from 0 as first child is link to primary nav.
310
+ const firstChild = childLinks[1];
311
+ if (firstChild) {
312
+ console.log("add focus");
313
+ target.classList.add("primary-nav__item--focus");
314
+ firstChild.focus({ focusVisible: true });
315
+ }
316
+ } else {
317
+ // Find the current index and move to the next child
318
+ const currentIndex = childLinks.indexOf(focusedExpandableChild);
319
+ if (currentIndex < childLinks.length - 1) {
320
+ childLinks[currentIndex + 1].focus();
321
+ }
322
+ }
323
+ break;
298
324
 
299
- // Close any expanded items from mouse events
300
- const allExpandedItems = document.querySelectorAll(".js-expandable-active");
301
- allExpandedItems.forEach((item) => {
302
- if (item !== target) {
303
- item.classList.remove("js-expandable-active");
304
- const content = item.querySelector(".js-expandable__content");
305
- if (content) {
306
- content.classList.add("js-nav-hidden");
307
- content.setAttribute("aria-expanded", "false");
308
- }
309
- }
310
- });
325
+ case "ArrowUp":
326
+ event.preventDefault();
311
327
 
312
- switch (event.key) {
313
- case "Tab":
314
- if (focusedExpandableChild) {
315
- target.classList.remove("primary-nav__item--focus");
316
- }
317
- break;
328
+ if (focusedExpandableChild) {
329
+ const currentIndex = childLinks.indexOf(focusedExpandableChild);
330
+ if (currentIndex > 0) {
331
+ // Move to previous child
332
+ childLinks[currentIndex - 1].focus();
333
+ } else {
334
+ // If at first child, move focus back to main nav link
335
+ target.classList.remove("primary-nav__item--focus");
336
+ const mainLink = target.querySelector("a:first-child");
337
+ if (mainLink) {
338
+ mainLink.focus();
339
+ }
340
+ }
341
+ }
342
+ break;
318
343
 
319
- case "Escape":
320
- event.preventDefault();
321
- target.classList.remove("primary-nav__item--focus");
322
- const firstNavLink = target.closest(".js-nav").querySelector("a:first-child");
323
- if (firstNavLink) {
324
- firstNavLink.classList.add("hide-children");
325
- firstNavLink.focus();
326
- firstNavLink.addEventListener(
327
- "focusout",
328
- () => {
329
- firstNavLink.classList.remove("hide-children");
330
- },
331
- { once: true }
332
- );
333
- }
334
- break;
344
+ case "ArrowRight":
345
+ event.preventDefault();
346
+ target.classList.remove("primary-nav__item--focus");
347
+ const nextNav = target.closest(".js-nav").nextElementSibling;
348
+ if (nextNav) {
349
+ const firstLink = nextNav.querySelector("a:first-child");
350
+ if (firstLink) firstLink.focus();
351
+ }
352
+ break;
335
353
 
336
- case "ArrowDown":
337
- event.preventDefault();
338
- if (!focusedExpandableChild) {
339
- // If no child is focused, focus the first child. Needs to start from 0 as first child is link to primary nav.
340
- const firstChild = childLinks[1];
341
- if (firstChild) {
342
- console.log("add focus");
343
- target.classList.add("primary-nav__item--focus");
344
- firstChild.focus({ focusVisible: true });
345
- }
346
- } else {
347
- // Find the current index and move to the next child
348
- const currentIndex = childLinks.indexOf(focusedExpandableChild);
349
- if (currentIndex < childLinks.length - 1) {
350
- childLinks[currentIndex + 1].focus();
351
- }
352
- }
353
- break;
354
+ case "ArrowLeft":
355
+ event.preventDefault();
356
+ target.classList.remove("primary-nav__item--focus");
357
+ const prevNav = target.closest(".js-nav").previousElementSibling;
358
+ if (prevNav) {
359
+ const firstLink = prevNav.querySelector("a:first-child");
360
+ if (firstLink) firstLink.focus();
361
+ }
362
+ break;
363
+ }
364
+ }
354
365
 
355
- case "ArrowUp":
356
- event.preventDefault();
366
+ function setPaths() {
367
+ const url = page?.url || document.location;
368
+ lang = url.host.startsWith("cy") ? "cy" : "en";
369
+ baseurl = lang === "cy" ? "https://cy.ons.gov.uk" : "https://www.ons.gov.uk";
370
+ baseother = lang === "cy" ? "https://www.ons.gov.uk" : "https://cy.ons.gov.uk";
371
+ path = url.pathname;
372
+ }
373
+ onMount(() => {
374
+ setPaths();
357
375
 
358
- if (focusedExpandableChild) {
359
- const currentIndex = childLinks.indexOf(focusedExpandableChild);
360
- if (currentIndex > 0) {
361
- // Move to previous child
362
- childLinks[currentIndex - 1].focus();
363
- } else {
364
- // If at first child, move focus back to main nav link
365
- target.classList.remove("primary-nav__item--focus");
366
- const mainLink = target.querySelector("a:first-child");
367
- if (mainLink) {
368
- mainLink.focus();
369
- }
370
- }
371
- }
372
- break;
376
+ /// Add keyboard event listeners
377
+ const navItems = document.querySelectorAll(".js-nav");
378
+ navItems.forEach((item) => {
379
+ item.addEventListener("keydown", handleKeydown);
380
+ });
373
381
 
374
- case "ArrowRight":
375
- event.preventDefault();
376
- target.classList.remove("primary-nav__item--focus");
377
- const nextNav = target.closest(".js-nav").nextElementSibling;
378
- if (nextNav) {
379
- const firstLink = nextNav.querySelector("a:first-child");
380
- if (firstLink) firstLink.focus();
381
- }
382
- break;
382
+ return () => {
383
+ navItems.forEach((item) => {
384
+ item.removeEventListener("keydown", handleKeydown);
385
+ });
386
+ };
387
+ });
383
388
 
384
- case "ArrowLeft":
385
- event.preventDefault();
386
- target.classList.remove("primary-nav__item--focus");
387
- const prevNav = target.closest(".js-nav").previousElementSibling;
388
- if (prevNav) {
389
- const firstLink = prevNav.querySelector("a:first-child");
390
- if (firstLink) firstLink.focus();
391
- }
392
- break;
393
- }
394
- }
389
+ $: i18n = (text) => (lang === "cy" && texts[text] ? texts[text] : text);
395
390
  </script>
396
391
 
397
392
  <header class="ons-header" role="banner">
398
- {#if skipLinkEnabled}
399
- <SkipLink />
400
- {/if}
401
- <slot name="before" />
402
- <Theme theme="{theme}" overrides="{themeOverrides}">
403
- {#if lang}
404
- <div id="pagePath" class="hide">{path}</div>
405
- {#if compact}
406
- <div
407
- class="ons-header__top"
408
- style:border-bottom="{!title ? "1px solid var(--ons-color-borders)" : null}"
409
- >
410
- <div class="ons-container">
411
- <div
412
- class="ons-header__grid-top ons-grid ons-grid--gutterless ons-grid--flex ons-grid--between ons-grid--vertical-center ons-grid--no-wrap"
413
- >
414
- <div class="ons-grid__col ons-col-auto">
415
- <a class="ons-header__org-logo-link" href="{baseurl}/"
416
- ><div class="ons-header__org-logo ons-header__org-logo--large">
417
- <ONSLogo theme="{theme}" width="{197}" height="{19}" />
418
- </div>
419
- <div class="ons-header__org-logo ons-header__org-logo--small">
420
- <ONSLogo theme="{theme}" width="{120}" height="{27}" compact />
421
- </div></a
422
- >
423
- </div>
424
- </div>
425
- </div>
426
- </div>
427
- {:else}
428
- <div class="wrapper">
429
- <div class="header col-wrap">
430
- <div class="col col--lg-one-third col--md-one-third">
431
- <a href="{baseurl}/">
432
- <ONSLogo theme="{theme}" className="logo" height="{39}" compact />
433
- </a>
434
- </div>
435
- <div
436
- class="col col--lg-two-thirds col--md-two-thirds hide--sm print--hide language--js__container"
437
- >
438
- <div class="language" style:min-height="20px">
439
- {#if bilingual && lang == "en"}
440
- <span>English (EN) | </span>
441
- <a href="{baseother}{path}" class="language__link" lang="cy">Cymraeg (CY)</a>
442
- {:else if bilingual}
443
- <a href="{baseother}{path}" class="language__link" lang="en">English (EN)</a>
444
- <span> | Cymraeg (EN)</span>
445
- {/if}
446
- </div>
447
- </div>
448
- <div class="secondary-nav col col--lg-two-thirds col--md-two-thirds print--hide">
449
- <ul class="secondary-nav__list js-nav-clone__list">
450
- {#each menu.filter((d) => d.secondary) as item}
451
- <li class="secondary-nav__item">
452
- <a class="secondary-nav__link js-nav-clone__link" href="{baseurl}{item.url}"
453
- >{item["label_" + lang]}</a
454
- >
455
- </li>
456
- {/each}
457
- </ul>
458
- </div>
459
- </div>
460
- </div>
461
- <div class="primary-nav print--hide">
462
- <!-- Controls -->
463
- <nav aria-label="Header links">
464
- <ul class="nav--controls">
465
- <li class="nav--controls__item" class:menu-is-expanded="{menuExpanded}">
466
- <a
467
- href="#nav-primary"
468
- id="menu-toggle"
469
- aria-controls="nav-primary"
470
- aria-expanded="{menuExpanded}"
471
- class="nav--controls__menu"
472
- on:click|preventDefault="{() => {
473
- menuExpanded = !menuExpanded;
474
- searchExpanded = false;
475
- }}"
476
- >
477
- <span class="nav--controls__text">{i18n("Menu")}</span>
478
- </a>
479
- </li>
480
- <li class="nav--controls__item" class:search-is-expanded="{searchExpanded}">
481
- <a
482
- href="#nav-search"
483
- id="search-toggle"
484
- aria-controls="nav-search"
485
- aria-expanded="{searchExpanded}"
486
- class="nav--controls__search"
487
- on:click|preventDefault="{() => {
488
- searchExpanded = !searchExpanded;
489
- menuExpanded = false;
490
- }}"
491
- >
492
- <span class="nav--controls__text"
493
- >{searchExpanded ? i18n("Hide search") : i18n("Search")}</span
494
- >
495
- </a>
496
- </li>
497
- </ul>
393
+ {#if skipHref}
394
+ <SkipLink href={skipHref} />
395
+ {/if}
396
+ <slot name="before" />
397
+ <Theme {theme} overrides={themeOverrides}>
398
+ {#if lang}
399
+ <!-- <div id="pagePath" class="hide">{path}</div> -->
400
+ {#if compact}
401
+ <div class="ons-browser-banner">
402
+ <div class="ons-container">
403
+ <p class="ons-browser-banner__content">
404
+ <span class="ons-browser-banner__lead"
405
+ >This website no longer supports your browser.</span
406
+ ><span class="ons-browser-banner__cta">
407
+ You can <a
408
+ class="ons-browser-banner__link"
409
+ href="https://www.ons.gov.uk/help/browsers"
410
+ >upgrade your browser to the latest version</a
411
+ >.</span
412
+ >
413
+ </p>
414
+ </div>
415
+ </div>
416
+ <div class="ons-header__top" class:ons-header__top--compact={compact && !title}>
417
+ <div class="ons-container">
418
+ <div
419
+ class="ons-header__grid-top ons-grid ons-grid-flex ons-grid-flex--between ons-grid-flex--vertical-center ons-grid-flex--no-wrap ons-grid--gutterless"
420
+ >
421
+ <div class="ons-grid__col ons-col-auto">
422
+ <a class="ons-header__org-logo-link" href={baseurl}>
423
+ <div class="ons-header__org-logo ons-header__org-logo--large">
424
+ <svg
425
+ class="ons-icon--logo"
426
+ xmlns="http://www.w3.org/2000/svg"
427
+ width="250"
428
+ height="24"
429
+ viewBox="33 2 552 60"
430
+ aria-labelledby="ons-logo-en-alt"
431
+ role="img"
432
+ >
433
+ <title id="ons-logo-en-alt"> Office for National Statistics homepage </title>
434
+ <g
435
+ class="ons-icon--logo__group ons-icon--logo__group--secondary"
436
+ fill="#a8bd3a"
437
+ >
438
+ <path
439
+ d="M0,34.6c.8-1.69,1.39-3,2.32-4.6A38.28,38.28,0,0,1,0,23.4V34.6M5,3S0,3,0,9.25v1A62.12,62.12,0,0,0,4.2,27a43.77,43.77,0,0,1,9.42-10.79C21.69,9.21,31.16,5.13,45.9,3Z"
440
+ />
441
+ </g>
442
+ <g
443
+ class="ons-icon--logo__group ons-icon--logo__group--primary"
444
+ fill="#003c57"
445
+ >
446
+ <path
447
+ d="M53.06,6.42C36.2,8,24.68,12.92,16.43,20.07A41.46,41.46,0,0,0,6.4,32.2C12.87,44.93,28.88,57,46.6,57H47s6.32.21,6.32-6.91V6.36a1.22,1.22,0,0,1-.26.06M9.72,42.67a44.25,44.25,0,0,1-5-7.42A80.59,80.59,0,0,0,0,46.38V56.91L31.06,57c-9.83-3-15.74-7.64-21.34-14.3"
448
+ />
449
+ </g>
450
+ <g class="ons-icon--logo__group ons-icon--logo__group--text" fill="#003c57">
451
+ <path
452
+ d="M82,47.49c-9.07,0-13.13-7.51-13.13-16.77S72.91,14,82,14s13.1,7.61,13.1,16.77S91.1,47.54,82,47.54m0-30.91c-6.69,0-9.07,7.33-9.07,14.05s2.16,13.9,9.07,13.9,9-7.28,9-13.9-2.34-14-9-14"
453
+ />
454
+ <path
455
+ d="M106.36,23.81V46.88h-3.67V23.81H98.93V21.56h3.76V17.9c0-4.61,2.72-7.95,8.08-7.95.38,0,.86.05.86.05v2.35h-.43c-2.55,0-4.84,1.64-4.84,5.12v4.09h5.27v2.25Z"
456
+ />
457
+ <path
458
+ d="M121.53,23.81V46.88h-3.67V23.81H114.1V21.56h3.76V17.9c0-4.61,2.72-7.95,8.08-7.95.38,0,.86.05.86.05v2.35h-.43c-2.55,0-4.84,1.64-4.84,5.12v4.09h5.27v2.25Z"
459
+ />
460
+ <path
461
+ d="M132.85,16.72a2.28,2.28,0,0,1-2.33-2.23v0a2.34,2.34,0,0,1,4.67,0,2.28,2.28,0,0,1-2.3,2.26h0M131,21.56h3.71V46.88H131Z"
462
+ />
463
+ <path
464
+ d="M150.53,47.49c-6,0-10.63-5.16-10.63-13.29S144.52,21,150.66,21a9.76,9.76,0,0,1,6.17,1.74l-1,2.25a7.53,7.53,0,0,0-4.4-1.36c-5.15,0-7.78,4.46-7.78,10.48,0,6.2,3,10.62,7.65,10.62a8,8,0,0,0,4.49-1.37l1,2.45a10.21,10.21,0,0,1-6.3,1.73"
465
+ />
466
+ <path
467
+ d="M162.84,35.75c.48,6,3.76,9,8.9,9a14.66,14.66,0,0,0,6.88-1.55l1.08,2.59a18,18,0,0,1-8.22,1.73c-7.12,0-12.18-4.23-12.18-13.34,0-8.69,4.67-13.2,11-13.2s10.37,3.95,10.37,12.4Zm7.35-12.41c-4.1,0-7.56,3.2-7.52,10.29l14.39-2c0-5.87-2.81-8.32-6.87-8.32"
468
+ />
469
+ <path
470
+ d="M198.57,23.81V46.88H194.9V23.81h-3.76V21.56h3.76V17.9c0-4.61,2.72-7.95,8.08-7.95.39,0,.87.05.87.05v2.35h-.44c-2.54,0-4.84,1.64-4.84,5.12v4.09h5.28v2.25Z"
471
+ />
472
+ <path
473
+ d="M217.28,47.49c-7.47,0-10.89-5.78-10.89-13.24S209.81,21,217.28,21s10.85,5.82,10.85,13.3-3.37,13.24-10.85,13.24m0-24c-5.53,0-7.13,5.59-7.13,10.81s1.73,10.56,7.13,10.56,7.13-5.35,7.13-10.56-1.6-10.81-7.13-10.81"
474
+ />
475
+ <path
476
+ d="M244.08,23.91c-2.34-.61-5.75-.52-7.35.47v22.5H233V22.69c2.67-1.13,5.36-1.74,10.11-1.74H245Z"
477
+ />
478
+ <path
479
+ d="M277.42,47.13,263.07,25a32.2,32.2,0,0,1-1.85-3.29h-.09s.13,1.88.13,3.85V47.13h-4.71V14.8h5.31l13.61,20.82A28.76,28.76,0,0,1,277.38,39h.08s-.17-1.84-.17-3.77V14.8H282V47.13Z"
480
+ />
481
+ <path
482
+ d="M297.52,47.79c-7.43,0-10.93-3-10.93-7.81,0-6.8,7.12-8.64,15.59-9.39V29.13c0-3.47-2.37-4.51-5.83-4.51a18,18,0,0,0-6.87,1.46L288.23,23a24,24,0,0,1,9.12-1.83c5.61,0,9.93,2.3,9.93,8.78V46a22.71,22.71,0,0,1-9.76,1.83m4.66-14.67c-6.26.67-10.45,1.84-10.45,6.73,0,3.42,2.42,4.88,6.22,4.88a10.09,10.09,0,0,0,4.23-.84Z"
483
+ />
484
+ <path
485
+ d="M322,47.69c-5.31,0-7.34-3.43-7.34-6.86V25.09h-3.55V21.81h3.55V16.12l5.4-1.5v7.19H325v3.28h-5V40.55a3.26,3.26,0,0,0,3,3.52h.5a5.5,5.5,0,0,0,1.46-.23v3.33a7.69,7.69,0,0,1-3,.52"
486
+ />
487
+ <path
488
+ d="M331.91,17.43a3,3,0,0,1-3.15-2.81,3.17,3.17,0,0,1,6.31,0,3,3,0,0,1-3.16,2.81m-2.72,4.38h5.44V47.13h-5.44Z"
489
+ />
490
+ <path
491
+ d="M350.88,47.79c-7.73,0-11.57-5.74-11.57-13.3s3.84-13.34,11.57-13.34,11.54,5.78,11.54,13.34-3.8,13.3-11.54,13.3m0-23.17c-4.66,0-6.05,4.89-6.05,9.82s1.47,9.63,6.05,9.63,6.05-4.7,6.05-9.63-1.38-9.82-6.05-9.82"
492
+ />
493
+ <path
494
+ d="M382.52,47.13V29c0-3.24-2.77-4.47-5.88-4.47a12.3,12.3,0,0,0-4.37.76v21.8h-5.39V23a26.81,26.81,0,0,1,10.06-1.83c6.61,0,11,2.25,11,7.8V47.13Z"
495
+ />
496
+ <path
497
+ d="M403.18,47.79c-7.43,0-10.94-3-10.94-7.81,0-6.8,7.13-8.64,15.6-9.39V29.13c0-3.47-2.37-4.51-5.83-4.51a18,18,0,0,0-6.87,1.46L393.89,23A24,24,0,0,1,403,21.15c5.62,0,9.94,2.3,9.94,8.78V46a22.71,22.71,0,0,1-9.76,1.83m4.66-14.67c-6.27.67-10.46,1.84-10.46,6.73,0,3.42,2.43,4.88,6.23,4.88a10.09,10.09,0,0,0,4.23-.84Z"
498
+ />
499
+ <polygon
500
+ points="418.52 47.13 418.52 34.91 418.52 10.25 423.92 10.25 423.92 22.76 423.92 47.13 418.52 47.13"
501
+ />
502
+ <path
503
+ d="M445.39,47.79A19.11,19.11,0,0,1,436.58,46l1.51-4a13.48,13.48,0,0,0,6.22,1.55c3.76,0,6.44-2.21,6.44-5.41,0-7.09-13.44-4.36-13.44-14.42,0-5.13,4.15-9.59,10.72-9.59A15.82,15.82,0,0,1,455.8,16l-1.38,3.52a11.93,11.93,0,0,0-5.66-1.5c-3.5,0-5.79,2.11-5.79,5.12,0,7,13.74,3.94,13.74,14.65,0,5.74-4.71,10-11.32,10"
504
+ />
505
+ <path
506
+ d="M470.41,47.69c-5.31,0-7.34-3.43-7.34-6.86V25.09h-3.54V21.81h3.54V16.12l5.4-1.5v7.19h4.92v3.28h-4.92V40.55a3.27,3.27,0,0,0,3,3.52h.48a5.12,5.12,0,0,0,1.46-.23v3.33a7.69,7.69,0,0,1-3,.52"
507
+ />
508
+ <path
509
+ d="M487.27,47.79c-7.44,0-10.93-3-10.93-7.81,0-6.8,7.13-8.64,15.6-9.39V29.13c0-3.47-2.38-4.51-5.84-4.51a18,18,0,0,0-6.87,1.46L478,23a23.94,23.94,0,0,1,9.11-1.83c5.62,0,9.94,2.3,9.94,8.78V46a22.71,22.71,0,0,1-9.76,1.83M492,33.16c-6.27.67-10.46,1.84-10.46,6.73,0,3.42,2.42,4.88,6.22,4.88a10,10,0,0,0,4.24-.84Z"
510
+ />
511
+ <path
512
+ d="M511.73,47.69c-5.32,0-7.35-3.43-7.35-6.86V25.09h-3.54V21.81h3.54V16.12l5.4-1.5v7.19h4.92v3.28h-4.92V40.55a3.26,3.26,0,0,0,3,3.52h.5a5.5,5.5,0,0,0,1.46-.23v3.33a7.69,7.69,0,0,1-3,.52"
513
+ />
514
+ <path
515
+ d="M521.66,17.43a3,3,0,0,1-3.15-2.81,3.17,3.17,0,0,1,6.31,0,3,3,0,0,1-3.16,2.81m-2.72,4.38h5.45V47.13h-5.45Z"
516
+ />
517
+ <path
518
+ d="M536.19,47.79A15.9,15.9,0,0,1,528.54,46L530,42.48a10.53,10.53,0,0,0,5.52,1.5c2.77,0,5-1.78,5-3.94,0-6-11.1-3.2-11.1-11.47,0-3.76,3.37-7.42,8.86-7.42A13.56,13.56,0,0,1,545.34,23l-1.42,3.14a8.47,8.47,0,0,0-4.62-1.45c-2.81,0-4.54,1.69-4.54,3.62,0,5.64,11.32,3.14,11.32,11.6,0,4-3.85,7.9-9.89,7.9"
519
+ />
520
+ <path
521
+ d="M559.83,47.69c-5.31,0-7.35-3.43-7.35-6.86V25.09h-3.54V21.81h3.54V16.12l5.4-1.5v7.19h4.93v3.28h-4.93V40.55a3.27,3.27,0,0,0,3,3.52h.48a5.64,5.64,0,0,0,1.47-.23v3.33a7.72,7.72,0,0,1-3,.52"
522
+ />
523
+ <path
524
+ d="M569.77,17.43a3,3,0,0,1-3.15-2.81,3.17,3.17,0,0,1,6.31,0,3,3,0,0,1-3.16,2.81m-2.72,4.38h5.44V47.13h-5.44Z"
525
+ />
526
+ <path
527
+ d="M588.14,47.79c-6.23,0-11-5.08-11-13.35s4.88-13.29,11-13.29A10.51,10.51,0,0,1,594.66,23l-1.21,3a6.87,6.87,0,0,0-4-1.22c-4.4,0-6.69,3.81-6.69,9.49s2.63,9.59,6.61,9.59a6.74,6.74,0,0,0,4-1.28L594.7,46c-1.12.94-3.33,1.84-6.56,1.84"
528
+ />
529
+ <path
530
+ d="M605.1,47.79A15.9,15.9,0,0,1,597.45,46l1.42-3.47A10.54,10.54,0,0,0,604.4,44c2.77,0,5-1.78,5-3.94,0-6-11.1-3.2-11.1-11.47,0-3.76,3.37-7.42,8.85-7.42a13.49,13.49,0,0,1,7.1,1.83l-1.42,3.14a8.42,8.42,0,0,0-4.63-1.45c-2.8,0-4.53,1.69-4.53,3.62,0,5.64,11.32,3.14,11.32,11.6,0,4-3.85,7.9-9.89,7.9"
531
+ />
532
+ </g>
533
+ </svg>
534
+ </div>
535
+ <div class="ons-header__org-logo ons-header__org-logo--small">
536
+ <svg
537
+ class="ons-icon--logo"
538
+ xmlns="http://www.w3.org/2000/svg"
539
+ width="120"
540
+ height="27"
541
+ viewBox="0 5 595 116"
542
+ aria-labelledby="ons-logo-stacked-en-alt"
543
+ role="img"
544
+ >
545
+ <title id="ons-logo-stacked-en-alt">
546
+ Office for National Statistics logo
547
+ </title>
548
+ <g
549
+ class="ons-icon--logo__group ons-icon--logo__group--secondary"
550
+ fill="#a8bd3a"
551
+ >
552
+ <path
553
+ d="M0,70.5c1.8-3.7,3.6-7.2,5.6-10.7A127.94,127.94,0,0,1,0,42.6V70.5M10.9,0S0,0,0,13.5v7.2A128.06,128.06,0,0,0,7.9,56.2a114.75,114.75,0,0,1,22.3-26C47.8,15.1,71.5,4.7,103.7.1Z"
554
+ />
555
+ </g>
556
+ <g
557
+ class="ons-icon--logo__group ons-icon--logo__group--primary"
558
+ fill="#003c57"
559
+ >
560
+ <path
561
+ d="M115.9,7.3c-36.8,3.5-62,14-80,29.4a108.15,108.15,0,0,0-23.6,29c14.1,27.4,41.1,47.6,86,50.5h4.4s13.8.5,13.8-14.9V7.2l-.6.1M21.2,85.4a92.68,92.68,0,0,1-11-16A173,173,0,0,0,0,93.4v22.7l73.6.1c-22.9-5.5-40.1-16.4-52.4-30.8"
562
+ />
563
+ </g>
564
+ <g class="ons-icon--logo__group ons-icon--logo__group--text" fill="#003c57">
565
+ <path
566
+ d="M161,51.9c-11.3,0-16.3-9.3-16.3-20.8s5-20.8,16.3-20.8,16.3,9.5,16.3,20.8c-.1,11.5-5.1,20.8-16.3,20.8m0-38.3c-8.3,0-11.3,9.1-11.3,17.4s2.7,17.3,11.3,17.3,11.2-9.1,11.2-17.3S169.3,13.6,161,13.6m30.2,8.9V51.2h-4.5V22.6H182V19.8h4.7V15.2c0-5.7,3.4-9.9,10-9.9a8,8,0,0,1,1.1.1V8.3h-.5c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8l-6.7-.1Zm18.9,0V51.2h-4.5V22.6h-4.7V19.8h4.7V15.2c0-5.7,3.4-9.9,10-9.9a8,8,0,0,1,1.1.1V8.3h-.5c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8l-6.7-.1Zm14-8.8a2.82,2.82,0,0,1-2.9-2.8,2.9,2.9,0,0,1,5.8,0,2.76,2.76,0,0,1-2.9,2.8m-2.3,6h4.6V51.2h-4.6Zm24.3,32.2c-7.4,0-13.2-6.4-13.2-16.5,0-10.3,5.8-16.5,13.4-16.5a12.36,12.36,0,0,1,7.7,2.2l-1.2,2.8a8.92,8.92,0,0,0-5.5-1.7c-6.4,0-9.7,5.5-9.7,13,0,7.7,3.7,13.2,9.5,13.2a9.8,9.8,0,0,0,5.6-1.7l1.2,3c-1.3,1.2-4,2.2-7.8,2.2m15.3-14.6c.6,7.4,4.7,11.1,11.1,11.1a18.36,18.36,0,0,0,8.5-1.9l1.3,3.2a22.58,22.58,0,0,1-10.2,2.1c-8.8,0-15.1-5.3-15.1-16.6,0-10.8,5.8-16.4,13.7-16.4s12.9,4.9,12.9,15.4l-22.2,3.1ZM270.5,22c-5.1,0-9.4,4-9.3,12.8l17.9-2.5C279,25,275.5,22,270.5,22m42.2.5V51.2h-4.5V22.6h-4.7V19.8h4.7V15.2c0-5.7,3.4-9.9,10-9.9a8,8,0,0,1,1.1.1V8.3h-.5c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8Zm23.2,29.4c-9.3,0-13.5-7.2-13.5-16.5s4.2-16.5,13.5-16.5,13.5,7.2,13.5,16.5-4.2,16.5-13.5,16.5m0-29.8c-6.9,0-8.8,7-8.8,13.4s2.1,13.1,8.8,13.1c6.9,0,8.9-6.6,8.9-13.1s-2-13.4-8.9-13.4m33.3.6c-2.9-.8-7.1-.6-9.1.6V51.2h-4.6V21.1c3.3-1.4,6.6-2.2,12.5-2.2h2.4c0,.1-1.2,3.8-1.2,3.8ZM171.3,114.8,153.5,87.3c-1.3-2.1-2.3-4.1-2.3-4.1h-.1s.2,2.3.2,4.8v26.8h-5.8V74.7h6.6L169,100.5a46.13,46.13,0,0,1,2.4,4.1h.1s-.2-2.3-.2-4.7V74.6h5.9v40.1l-5.9.1Zm25,.8c-9.2,0-13.6-3.7-13.6-9.7,0-8.5,8.8-10.7,19.4-11.7V92.4c0-4.3-2.9-5.6-7.2-5.6a22.34,22.34,0,0,0-8.5,1.8l-1.6-3.8a30.2,30.2,0,0,1,11.3-2.3c7,0,12.3,2.9,12.3,10.9v19.9c-2.7,1.4-6.9,2.3-12.1,2.3m5.8-18.2c-7.8.8-13,2.3-13,8.3,0,4.2,3,6.1,7.7,6.1a12.33,12.33,0,0,0,5.3-1.1Zm24.5,18.1c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4V83.4h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2c0,2.5,1.4,4.4,4.3,4.4a5.66,5.66,0,0,0,1.8-.3v4.1a11.47,11.47,0,0,1-3.7.6M239,77.9a3.52,3.52,0,1,1,3.9-3.5,3.71,3.71,0,0,1-3.9,3.5m-3.4,5.5h6.8v31.4h-6.8Zm26.9,32.2c-9.6,0-14.4-7.1-14.4-16.5s4.8-16.6,14.4-16.6,14.3,7.2,14.3,16.6-4.7,16.5-14.3,16.5m0-28.7c-5.8,0-7.5,6.1-7.5,12.2s1.8,11.9,7.5,11.9,7.5-5.8,7.5-11.9-1.7-12.2-7.5-12.2m39.3,27.9V92.3c0-4-3.4-5.5-7.3-5.5a16,16,0,0,0-5.4.9v27.1h-6.7v-30a32.8,32.8,0,0,1,12.5-2.3c8.2,0,13.7,2.8,13.7,9.7v22.6Zm25.7.8c-9.2,0-13.6-3.7-13.6-9.7,0-8.5,8.9-10.7,19.4-11.7V92.4c0-4.3-2.9-5.6-7.2-5.6a22.34,22.34,0,0,0-8.5,1.8L316,84.8a30.2,30.2,0,0,1,11.3-2.3c7,0,12.3,2.9,12.3,10.9v19.9c-2.7,1.4-6.9,2.3-12.1,2.3m5.8-18.2c-7.8.8-13,2.3-13,8.3,0,4.2,3,6.1,7.7,6.1a12.33,12.33,0,0,0,5.3-1.1Zm13.2,17.4V69h6.7v45.8Zm38.6.8a23.94,23.94,0,0,1-10.9-2.3l1.9-4.9a17,17,0,0,0,7.7,1.9c4.7,0,8-2.7,8-6.7,0-8.8-16.7-5.4-16.7-17.9,0-6.4,5.2-11.9,13.3-11.9a20.22,20.22,0,0,1,9.7,2.3l-1.7,4.4a14.57,14.57,0,0,0-7-1.9c-4.3,0-7.2,2.6-7.2,6.4,0,8.6,17.1,4.9,17.1,18.2-.1,7.1-6,12.4-14.2,12.4m31.1-.1c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4V83.4h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2a4.07,4.07,0,0,0,4.3,4.4,5.66,5.66,0,0,0,1.8-.3v4.1a12.06,12.06,0,0,1-3.7.6m20.9.1c-9.2,0-13.6-3.7-13.6-9.7,0-8.5,8.9-10.7,19.4-11.7V92.4c0-4.3-2.9-5.6-7.2-5.6a22.34,22.34,0,0,0-8.5,1.8l-1.6-3.8a30.2,30.2,0,0,1,11.3-2.3c7,0,12.3,2.9,12.3,10.9v19.9c-2.6,1.4-6.9,2.3-12.1,2.3m5.8-18.2c-7.8.8-13,2.3-13,8.3,0,4.2,3,6.1,7.7,6.1a12.33,12.33,0,0,0,5.3-1.1Zm24.6,18.1c-6.6,0-9.1-4.3-9.1-8.5V87.5H454V83.4h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2a4.07,4.07,0,0,0,4.3,4.4,5.66,5.66,0,0,0,1.8-.3v4.1a12.69,12.69,0,0,1-3.7.6m12.3-37.6a3.52,3.52,0,1,1,3.9-3.5,3.65,3.65,0,0,1-3.9,3.5m-3.4,5.5h6.8v31.4h-6.8Zm21.4,32.2a19.46,19.46,0,0,1-9.5-2.3l1.8-4.3a13.21,13.21,0,0,0,6.9,1.9c3.4,0,6.2-2.2,6.2-4.9,0-7.5-13.8-4-13.8-14.2,0-4.7,4.2-9.2,11-9.2a16.21,16.21,0,0,1,8.8,2.3l-1.8,3.9a10.31,10.31,0,0,0-5.7-1.8c-3.5,0-5.6,2.1-5.6,4.5,0,7,14,3.9,14,14.4,0,4.9-4.7,9.7-12.3,9.7m29.4-.1c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4V83.4h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2c0,2.5,1.4,4.4,4.3,4.4a5.66,5.66,0,0,0,1.8-.3v4.1a12.06,12.06,0,0,1-3.7.6m12.3-37.6a3.52,3.52,0,1,1,3.9-3.5c.1,2-1.7,3.5-3.9,3.5m-3.3,5.5H543v31.4h-6.8Zm26.2,32.2c-7.7,0-13.6-6.3-13.6-16.6s6.1-16.5,13.7-16.5c3.9,0,6.6,1.1,8,2.3L569,88.6a8.61,8.61,0,0,0-4.9-1.5c-5.5,0-8.3,4.7-8.3,11.8s3.3,11.9,8.2,11.9a8.39,8.39,0,0,0,4.9-1.6l1.7,4.1c-1.5,1.2-4.2,2.3-8.2,2.3m20.6,0a19.46,19.46,0,0,1-9.5-2.3l1.8-4.3a13.21,13.21,0,0,0,6.9,1.9c3.4,0,6.2-2.2,6.2-4.9,0-7.5-13.8-4-13.8-14.2,0-4.7,4.2-9.2,11-9.2a16.85,16.85,0,0,1,8.9,2.3l-1.8,3.9A10.31,10.31,0,0,0,587,87c-3.5,0-5.6,2.1-5.6,4.5,0,7,14,3.9,14,14.4-.1,4.9-4.9,9.7-12.4,9.7"
567
+ />
568
+ </g>
569
+ </svg>
570
+ </div>
571
+ </a>
572
+ </div>
573
+ </div>
574
+ </div>
575
+ </div>
576
+ {:else}
577
+ <div class="ons-container">
578
+ <div class="header col-wrap">
579
+ <div class="col col--lg-one-third col--md-one-third">
580
+ <a href="{baseurl}/">
581
+ <svg
582
+ version="1.1"
583
+ xmlns="http://www.w3.org/2000/svg"
584
+ xmlns:xlink="http://www.w3.org/1999/xlink"
585
+ viewBox="0 0 595.3 116.3"
586
+ aria-hidden="true"
587
+ class="logo"
588
+ >
589
+ <title>Office for National Statistics logo - Homepage</title>
590
+ <path
591
+ class="ons-icon--logo__group ons-icon--logo__group--secondary"
592
+ d="M0,70.5c1.8-3.7,3.6-7.2,5.6-10.7C3.3,54.2,1.5,48.5,0,42.6V70.5 M10.9,0C10.9,0,0,0,0,13.5v7.2
593
+ C1,33,3.6,45,7.9,56.2c6.1-9.6,13.4-18.4,22.3-26C47.8,15.1,71.5,4.7,103.7,0.1L10.9,0z"
594
+ fill="#a8bd3a"
595
+ />
596
+ <path
597
+ class="ons-icon--logo__group ons-icon--logo__group--primary"
598
+ d="M115.9,7.3c-36.8,3.5-62,14-80,29.4c-9.7,8.3-17.3,18-23.6,29c14.1,27.4,41.1,47.6,86,50.5h4.4
599
+ c0,0,13.8,0.5,13.8-14.9V7.2L115.9,7.3 M21.2,85.4c-4.2-4.9-7.9-10.3-11-16C6.3,76.9,2.9,84.9,0,93.4v22.7l73.6,0.1
600
+ C50.7,110.7,33.5,99.8,21.2,85.4"
601
+ fill="#003c57"
602
+ />
603
+ <path
604
+ class="ons-icon--logo__group ons-icon--logo__group--text"
605
+ d="M161,51.9c-11.3,0-16.3-9.3-16.3-20.8c0-11.4,5-20.8,16.3-20.8s16.3,9.5,16.3,20.8
606
+ C177.2,42.6,172.2,51.9,161,51.9 M161,13.6c-8.3,0-11.3,9.1-11.3,17.4c0,8.2,2.7,17.3,11.3,17.3s11.2-9.1,11.2-17.3
607
+ C172.2,22.7,169.3,13.6,161,13.6 M191.2,22.5v28.7h-4.5V22.6H182v-2.8h4.7v-4.6c0-5.7,3.4-9.9,10-9.9c0.5,0,1.1,0.1,1.1,0.1v2.9
608
+ h-0.5c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8L191.2,22.5L191.2,22.5z M210.1,22.5v28.7h-4.5V22.6h-4.7v-2.8h4.7v-4.6c0-5.7,3.4-9.9,10-9.9
609
+ c0.5,0,1.1,0.1,1.1,0.1v2.9h-0.5c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8L210.1,22.5L210.1,22.5z M224.1,13.7c-1.6,0-2.9-1.2-2.9-2.8
610
+ s1.3-2.9,2.9-2.9c1.6,0,2.9,1.3,2.9,2.9S225.8,13.7,224.1,13.7 M221.8,19.7h4.6v31.5h-4.6V19.7z M246.1,51.9
611
+ c-7.4,0-13.2-6.4-13.2-16.5c0-10.3,5.8-16.5,13.4-16.5c3.8,0,6.3,1.1,7.7,2.2l-1.2,2.8c-1-0.8-2.9-1.7-5.5-1.7
612
+ c-6.4,0-9.7,5.5-9.7,13c0,7.7,3.7,13.2,9.5,13.2c2.4,0,4.3-0.8,5.6-1.7l1.2,3C252.6,50.9,249.9,51.9,246.1,51.9 M261.4,37.3
613
+ c0.6,7.4,4.7,11.1,11.1,11.1c3.9,0,6.8-1,8.5-1.9l1.3,3.2c-2,1.1-5.7,2.1-10.2,2.1c-8.8,0-15.1-5.3-15.1-16.6
614
+ c0-10.8,5.8-16.4,13.7-16.4c8,0,12.9,4.9,12.9,15.4L261.4,37.3L261.4,37.3z M270.5,22c-5.1,0-9.4,4-9.3,12.8l17.9-2.5
615
+ C279,25,275.5,22,270.5,22 M312.7,22.5v28.7h-4.5V22.6h-4.7v-2.8h4.7v-4.6c0-5.7,3.4-9.9,10-9.9c0.5,0,1.1,0.1,1.1,0.1v2.9h-0.5
616
+ c-3.2,0-6,2.1-6,6.4v5.1h6.6v2.8L312.7,22.5z M335.9,51.9c-9.3,0-13.5-7.2-13.5-16.5s4.2-16.5,13.5-16.5s13.5,7.2,13.5,16.5
617
+ C349.4,44.8,345.2,51.9,335.9,51.9 M335.9,22.1c-6.9,0-8.8,7-8.8,13.4c0,6.5,2.1,13.1,8.8,13.1c6.9,0,8.9-6.6,8.9-13.1
618
+ S342.8,22.1,335.9,22.1 M369.2,22.7c-2.9-0.8-7.1-0.6-9.1,0.6v27.9h-4.6V21.1c3.3-1.4,6.6-2.2,12.5-2.2h2.4
619
+ C370.4,19,369.2,22.7,369.2,22.7L369.2,22.7z M171.3,114.8l-17.8-27.5c-1.3-2.1-2.3-4.1-2.3-4.1h-0.1c0,0,0.2,2.3,0.2,4.8v26.8h-5.8
620
+ V74.7h6.6l16.9,25.8c1.5,2.3,2.4,4.1,2.4,4.1h0.1c0,0-0.2-2.3-0.2-4.7V74.6h5.9v40.1L171.3,114.8L171.3,114.8z M196.3,115.6
621
+ c-9.2,0-13.6-3.7-13.6-9.7c0-8.5,8.8-10.7,19.4-11.7v-1.8c0-4.3-2.9-5.6-7.2-5.6c-3.1,0-6.6,0.9-8.5,1.8l-1.6-3.8
622
+ c2.2-0.9,6.3-2.3,11.3-2.3c7,0,12.3,2.9,12.3,10.9v19.9C205.7,114.7,201.5,115.6,196.3,115.6 M202.1,97.4c-7.8,0.8-13,2.3-13,8.3
623
+ c0,4.2,3,6.1,7.7,6.1c2.2,0,4.1-0.5,5.3-1.1V97.4z M226.6,115.5c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4v-4.1h4.4v-7l6.7-1.9v8.9h6.1v4.1
624
+ h-6.1v19.2c0,2.5,1.4,4.4,4.3,4.4c0.6,0,1.2-0.1,1.8-0.3v4.1C229.7,115.1,228.4,115.5,226.6,115.5 M239,77.9c-2.1,0-3.9-1.6-3.9-3.5
625
+ s1.8-3.5,3.9-3.5c2.1,0,3.9,1.6,3.9,3.5C242.9,76.4,241.1,77.9,239,77.9 M235.6,83.4h6.8v31.4h-6.8V83.4z M262.5,115.6
626
+ c-9.6,0-14.4-7.1-14.4-16.5s4.8-16.6,14.4-16.6c9.6,0,14.3,7.2,14.3,16.6C276.9,108.5,272.1,115.6,262.5,115.6 M262.5,86.9
627
+ c-5.8,0-7.5,6.1-7.5,12.2s1.8,11.9,7.5,11.9c5.8,0,7.5-5.8,7.5-11.9C270,92.9,268.3,86.9,262.5,86.9 M301.8,114.8V92.3
628
+ c0-4-3.4-5.5-7.3-5.5c-2.1,0-4.1,0.4-5.4,0.9v27.1h-6.7v-30c2.9-1.3,7.6-2.3,12.5-2.3c8.2,0,13.7,2.8,13.7,9.7v22.6L301.8,114.8
629
+ L301.8,114.8z M327.5,115.6c-9.2,0-13.6-3.7-13.6-9.7c0-8.5,8.9-10.7,19.4-11.7v-1.8c0-4.3-2.9-5.6-7.2-5.6c-3.1,0-6.6,0.9-8.5,1.8
630
+ l-1.6-3.8c2.2-0.9,6.3-2.3,11.3-2.3c7,0,12.3,2.9,12.3,10.9v19.9C336.9,114.7,332.7,115.6,327.5,115.6 M333.3,97.4
631
+ c-7.8,0.8-13,2.3-13,8.3c0,4.2,3,6.1,7.7,6.1c2.2,0,4.1-0.5,5.3-1.1V97.4z M346.5,114.8V69h6.7v45.8H346.5z M385.1,115.6
632
+ c-4.8,0-8.7-1.1-10.9-2.3l1.9-4.9c1.6,0.9,4.6,1.9,7.7,1.9c4.7,0,8-2.7,8-6.7c0-8.8-16.7-5.4-16.7-17.9c0-6.4,5.2-11.9,13.3-11.9
633
+ c4.3,0,7.8,1.2,9.7,2.3l-1.7,4.4c-1.5-0.9-4.2-1.9-7-1.9c-4.3,0-7.2,2.6-7.2,6.4c0,8.6,17.1,4.9,17.1,18.2
634
+ C399.2,110.3,393.3,115.6,385.1,115.6 M416.2,115.5c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4v-4.1h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2
635
+ c0,2.5,1.5,4.4,4.3,4.4c0.6,0,1.2-0.1,1.8-0.3v4.1C419.3,115.1,417.9,115.5,416.2,115.5 M437.1,115.6c-9.2,0-13.6-3.7-13.6-9.7
636
+ c0-8.5,8.9-10.7,19.4-11.7v-1.8c0-4.3-2.9-5.6-7.2-5.6c-3.1,0-6.6,0.9-8.5,1.8l-1.6-3.8c2.2-0.9,6.3-2.3,11.3-2.3
637
+ c7,0,12.3,2.9,12.3,10.9v19.9C446.6,114.7,442.3,115.6,437.1,115.6 M442.9,97.4c-7.8,0.8-13,2.3-13,8.3c0,4.2,3,6.1,7.7,6.1
638
+ c2.2,0,4.1-0.5,5.3-1.1V97.4z M467.5,115.5c-6.6,0-9.1-4.3-9.1-8.5V87.5H454v-4.1h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2
639
+ c0,2.5,1.5,4.4,4.3,4.4c0.6,0,1.2-0.1,1.8-0.3v4.1C470.5,115.1,469.2,115.5,467.5,115.5 M479.8,77.9c-2.1,0-3.9-1.6-3.9-3.5
640
+ s1.8-3.5,3.9-3.5s3.9,1.6,3.9,3.5C483.7,76.4,482,77.9,479.8,77.9 M476.4,83.4h6.8v31.4h-6.8V83.4z M497.8,115.6
641
+ c-3.9,0-7.6-1.1-9.5-2.3l1.8-4.3c1.3,0.9,4,1.9,6.9,1.9c3.4,0,6.2-2.2,6.2-4.9c0-7.5-13.8-4-13.8-14.2c0-4.7,4.2-9.2,11-9.2
642
+ c3.9,0,6.7,1,8.8,2.3l-1.8,3.9c-1-0.7-3.1-1.8-5.7-1.8c-3.5,0-5.6,2.1-5.6,4.5c0,7,14,3.9,14,14.4
643
+ C510.1,110.8,505.4,115.6,497.8,115.6 M527.2,115.5c-6.6,0-9.1-4.3-9.1-8.5V87.5h-4.4v-4.1h4.4v-7l6.7-1.9v8.9h6.1v4.1h-6.1v19.2
644
+ c0,2.5,1.4,4.4,4.3,4.4c0.6,0,1.2-0.1,1.8-0.3v4.1C530.3,115.1,528.9,115.5,527.2,115.5 M539.5,77.9c-2.1,0-3.9-1.6-3.9-3.5
645
+ s1.8-3.5,3.9-3.5c2.1,0,3.9,1.6,3.9,3.5C543.5,76.4,541.7,77.9,539.5,77.9 M536.2,83.4h6.8v31.4h-6.8V83.4z M562.4,115.6
646
+ c-7.7,0-13.6-6.3-13.6-16.6c0-10.4,6.1-16.5,13.7-16.5c3.9,0,6.6,1.1,8,2.3l-1.5,3.8c-1-0.7-2.7-1.5-4.9-1.5
647
+ c-5.5,0-8.3,4.7-8.3,11.8c0,7.2,3.3,11.9,8.2,11.9c2.1,0,3.8-0.8,4.9-1.6l1.7,4.1C569.1,114.5,566.4,115.6,562.4,115.6 M583,115.6
648
+ c-3.9,0-7.6-1.1-9.5-2.3l1.8-4.3c1.3,0.9,4,1.9,6.9,1.9c3.4,0,6.2-2.2,6.2-4.9c0-7.5-13.8-4-13.8-14.2c0-4.7,4.2-9.2,11-9.2
649
+ c3.9,0,6.7,1,8.9,2.3l-1.8,3.9c-1-0.7-3.1-1.8-5.7-1.8c-3.5,0-5.6,2.1-5.6,4.5c0,7,14,3.9,14,14.4
650
+ C595.3,110.8,590.5,115.6,583,115.6"
651
+ fill="#003c57"
652
+ />
653
+ </svg>
654
+ </a>
655
+ </div>
656
+ <div
657
+ class="col col--lg-two-thirds col--md-two-thirds hide--sm print--hide language--js__container"
658
+ >
659
+ <div class="language" style:min-height="20px">
660
+ {#if bilingual && lang == "en"}
661
+ <span>English (EN) | </span>
662
+ <a href="{baseother}{path}" class="language__link" lang="cy">Cymraeg (CY)</a>
663
+ {:else if bilingual}
664
+ <a href="{baseother}{path}" class="language__link" lang="en">English (EN)</a>
665
+ <span> | Cymraeg (CY)</span>
666
+ {/if}
667
+ </div>
668
+ </div>
669
+ <div class="secondary-nav col col--lg-two-thirds col--md-two-thirds print--hide">
670
+ <ul class="secondary-nav__list js-nav-clone__list">
671
+ {#each menu.filter((d) => d.secondary) as item}
672
+ <li class="secondary-nav__item">
673
+ <a class="secondary-nav__link js-nav-clone__link" href="{baseurl}{item.url}"
674
+ >{item["label_" + lang]}</a
675
+ >
676
+ </li>
677
+ {/each}
678
+ </ul>
679
+ </div>
680
+ </div>
681
+ </div>
682
+ <div class="primary-nav print--hide">
683
+ <!-- Controls -->
684
+ <nav aria-label="Header links">
685
+ <ul class="nav--controls">
686
+ <li class="nav--controls__item" class:menu-is-expanded={menuExpanded}>
687
+ <a
688
+ href="#nav-primary"
689
+ id="menu-toggle"
690
+ aria-controls="nav-primary"
691
+ aria-expanded={menuExpanded}
692
+ class="nav--controls__menu"
693
+ on:click|preventDefault={() => {
694
+ menuExpanded = !menuExpanded;
695
+ searchExpanded = false;
696
+ }}
697
+ >
698
+ <span class="nav--controls__text">{i18n("Menu")}</span>
699
+ </a>
700
+ </li>
701
+ <li class="nav--controls__item" class:search-is-expanded={searchExpanded}>
702
+ <a
703
+ href="#nav-search"
704
+ id="search-toggle"
705
+ aria-controls="nav-search"
706
+ aria-expanded={searchExpanded}
707
+ class="nav--controls__search"
708
+ on:click|preventDefault={() => {
709
+ searchExpanded = !searchExpanded;
710
+ menuExpanded = false;
711
+ }}
712
+ >
713
+ <span class="nav--controls__text"
714
+ >{searchExpanded ? i18n("Hide search") : i18n("Search")}</span
715
+ >
716
+ </a>
717
+ </li>
718
+ </ul>
498
719
 
499
- <!-- Main Navigation -->
500
- <ul
501
- class="wrapper primary-nav__list"
502
- class:nav-main--hidden="{!menuExpanded}"
503
- id="nav-primary"
504
- aria-expanded="{menuExpanded}"
505
- >
506
- <!-- Home Link -->
507
- <li class="primary-nav__item js-nav">
508
- <a
509
- class="primary-nav__link col col--md-7 col--lg-9"
510
- href="{baseurl}/"
511
- style="color: #e5e6e7">{i18n("Home")}</a
512
- >
513
- </li>
720
+ <!-- Main Navigation -->
721
+ <ul
722
+ class="ons-container primary-nav__list"
723
+ class:nav-main--hidden={!menuExpanded}
724
+ id="nav-primary"
725
+ aria-expanded={menuExpanded}
726
+ >
727
+ <!-- Home Link -->
728
+ <li class="primary-nav__item js-nav">
729
+ <a
730
+ class="primary-nav__link col col--md-7 col--lg-9"
731
+ href="{baseurl}/"
732
+ style="color: #e5e6e7">{i18n("Home")}</a
733
+ >
734
+ </li>
514
735
 
515
- <!-- Menu Items -->
516
- {#each [...menu
517
- .filter((d) => d.children)
518
- .sort( (a, b) => a["label_" + lang].localeCompare(b["label_" + lang]) ), ...menu.filter((d) => !d.children)] as item, i}
519
- {#if item.children}
520
- <li
521
- class="primary-nav__item js-nav js-expandable"
522
- class:js-expandable-active="{item.expanded}"
523
- >
524
- <a
525
- class="primary-nav__link col col--md-8 col--lg-10"
526
- href="{baseurl}{item.url}"
527
- aria-expanded="false"
528
- aria-label="{item['label_' + lang]} sub menu"
529
- on:click="{(e) => toggle_sm(e, i)}"
530
- >
531
- <span aria-hidden="true" class="expansion-indicator"></span>
532
- <span class="submenu-title">
533
- {item[`label_${lang}`]}
534
- </span>
535
- </a>
536
- <ul
537
- class="primary-nav__child-list col col--md-16 col--lg-20 js-expandable__content jsEnhance"
538
- class:js-nav-hidden="{!item.expanded}"
539
- aria-expanded="{item.expanded}"
540
- aria-label="submenu"
541
- >
542
- <li class="primary-nav__child-item js-expandable__child hide--md">
543
- <a class="primary-nav__child-link" tabindex="-1" href="{baseurl}{item.url}"
544
- >{item[`label_${lang}`]}</a
545
- >
546
- </li>
547
- {#each [...item.children].sort( (a, b) => a[`label_${lang}`].localeCompare(b[`label_${lang}`]) ) as child}
548
- <li class="primary-nav__child-item js-expandable__child">
549
- <a
550
- class="primary-nav__child-link"
551
- tabindex="-1"
552
- href="{baseurl}{child.url}">{child[`label_${lang}`]}</a
553
- >
554
- </li>
555
- {/each}
556
- </ul>
557
- </li>
558
- {:else}
559
- <li class="primary-nav__item js-nav" class:hide--md="{item.secondary}">
560
- <a
561
- class="primary-nav__link col col--md-8 col--lg-10"
562
- href="{baseurl}{item.url}"
563
- >
564
- {item["label_" + lang]}
565
- </a>
566
- </li>
567
- {/if}
568
- {/each}
736
+ <!-- Menu Items -->
737
+ {#each [...menu
738
+ .filter((d) => d.children)
739
+ .sort( (a, b) => a["label_" + lang].localeCompare(b["label_" + lang]) ), ...menu.filter((d) => !d.children)] as item, i}
740
+ {#if item.children}
741
+ <li
742
+ class="primary-nav__item js-nav js-expandable"
743
+ class:js-expandable-active={item.expanded}
744
+ >
745
+ <a
746
+ class="primary-nav__link col col--md-8 col--lg-10"
747
+ href="{baseurl}{item.url}"
748
+ aria-expanded="false"
749
+ aria-label="{item['label_' + lang]} sub menu"
750
+ on:click={(e) => toggle_sm(e, i)}
751
+ >
752
+ <span aria-hidden="true" class="expansion-indicator"></span>
753
+ <span class="submenu-title">
754
+ {item[`label_${lang}`]}
755
+ </span>
756
+ </a>
757
+ <ul
758
+ class="primary-nav__child-list col col--md-16 col--lg-20 js-expandable__content jsEnhance"
759
+ class:js-nav-hidden={!item.expanded}
760
+ aria-expanded={item.expanded}
761
+ aria-label="submenu"
762
+ >
763
+ <li class="primary-nav__child-item js-expandable__child hide--md">
764
+ <a class="primary-nav__child-link" tabindex="-1" href="{baseurl}{item.url}"
765
+ >{item[`label_${lang}`]}</a
766
+ >
767
+ </li>
768
+ {#each [...item.children].sort( (a, b) => a[`label_${lang}`].localeCompare(b[`label_${lang}`]) ) as child}
769
+ <li class="primary-nav__child-item js-expandable__child">
770
+ <a
771
+ class="primary-nav__child-link"
772
+ tabindex="-1"
773
+ href="{baseurl}{child.url}">{child[`label_${lang}`]}</a
774
+ >
775
+ </li>
776
+ {/each}
777
+ </ul>
778
+ </li>
779
+ {:else}
780
+ <li class="primary-nav__item js-nav" class:hide--md={item.secondary}>
781
+ <a
782
+ class="primary-nav__link col col--md-8 col--lg-10"
783
+ href="{baseurl}{item.url}"
784
+ >
785
+ {item["label_" + lang]}
786
+ </a>
787
+ </li>
788
+ {/if}
789
+ {/each}
569
790
 
570
- <!-- Language Switcher -->
571
- <li class="hide--md primary-nav__language">
572
- {#if lang == "en"}
573
- <span>English (EN) | </span>
574
- <a href="{baseother}{path}" class="language__link" lang="cy">Cymraeg (CY)</a>
575
- {:else}
576
- <a href="{baseother}{path}" class="language__link" lang="en">English (EN)</a>
577
- <span> | Cymraeg (EN)</span>
578
- {/if}
579
- </li>
580
- </ul>
581
- </nav>
582
- </div>
583
- <div class="search print--hide" class:nav-search--hidden="{!searchExpanded}" id="searchBar">
584
- <div class="wrapper" role="search">
585
- <form class="col-wrap search__form" action="{baseurl}/search">
586
- <label class="search__label col col--md-23 col--lg-24" for="nav-search"
587
- >{i18n("Search for a keyword(s) or time series ID")}</label
588
- >
589
- <input
590
- type="search"
591
- autocomplete="off"
592
- class="search__input col col--md-21 col--lg-32"
593
- id="nav-search"
594
- name="q"
595
- value=""
596
- />
597
- <button
598
- type="submit"
599
- class="search__button col--md-3 col--lg-3"
600
- id="nav-search-submit"
601
- aria-label="{i18n('Search')}"
602
- >
603
- <span class="icon-search--light">
604
- <svg
605
- class="ons-svg-icon ons-svg-icon--m"
606
- viewBox="0 0 12 12"
607
- xmlns="http://www.w3.org/2000/svg"
608
- aria-hidden="true"
609
- fill="currentColor"
610
- >
611
- <path
612
- d="M11.86 10.23 8.62 6.99a4.63 4.63 0 1 0-6.34 1.64 4.55 4.55 0 0 0 2.36.64 4.65 4.65 0 0 0 2.33-.65l3.24 3.23a.46.46 0 0
613
- 0 .65 0l1-1a.48.48 0 0 0 0-.62Zm-5-3.32a3.28 3.28 0 0 1-2.31.93 3.22 3.22 0 1 1 2.35-.93Z"></path>
614
- </svg>
615
- </span>
616
- </button>
617
- </form>
618
- </div>
619
- </div>
620
- {/if}
621
- {#if title}
622
- <div class="ons-header__main">
623
- <div class="ons-container">
624
- <div
625
- class="ons-grid ons-grid--gutterless ons-grid--flex ons-grid--between ons-grid--vertical-center ons-grid--no-wrap"
626
- >
627
- <div class="ons-grid__col ons-col-auto ons-u-flex-shrink">
628
- <a class="ons-header__title-link" href="{titleHref}"
629
- ><div class="ons-header__title">{title}</div></a
630
- >
631
- </div>
632
- </div>
633
- </div>
634
- </div>
635
- {/if}
636
- {/if}
637
- </Theme>
791
+ <!-- Language Switcher -->
792
+ <li class="hide--md primary-nav__language">
793
+ {#if lang == "en"}
794
+ <span>English (EN) | </span>
795
+ <a href="{baseother}{path}" class="language__link" lang="cy">Cymraeg (CY)</a>
796
+ {:else}
797
+ <a href="{baseother}{path}" class="language__link" lang="en">English (EN)</a>
798
+ <span> | Cymraeg (EN)</span>
799
+ {/if}
800
+ </li>
801
+ </ul>
802
+ </nav>
803
+ </div>
804
+ <div class="search print--hide" class:nav-search--hidden={!searchExpanded} id="searchBar">
805
+ <div class="ons-container" role="search">
806
+ <form class="col-wrap search__form" action="{baseurl}/search">
807
+ <label class="search__label col col--md-23 col--lg-24" for="nav-search"
808
+ >{i18n("Search for a keyword(s) or time series ID")}</label
809
+ >
810
+ <input
811
+ type="search"
812
+ autocomplete="off"
813
+ class="search__input col col--md-21 col--lg-32"
814
+ id="nav-search"
815
+ name="q"
816
+ value=""
817
+ />
818
+ <button
819
+ type="submit"
820
+ class="search__button col--md-3 col--lg-3"
821
+ id="nav-search-submit"
822
+ aria-label={i18n("Search")}
823
+ >
824
+ <span class="icon-search--light">
825
+ <svg
826
+ class="ons-svg-icon ons-svg-icon--m"
827
+ viewBox="0 0 12 12"
828
+ xmlns="http://www.w3.org/2000/svg"
829
+ aria-hidden="true"
830
+ fill="currentColor"
831
+ >
832
+ <path
833
+ d="M11.86 10.23 8.62 6.99a4.63 4.63 0 1 0-6.34 1.64 4.55 4.55 0 0 0 2.36.64 4.65 4.65 0 0 0 2.33-.65l3.24 3.23a.46.46 0 0
834
+ 0 .65 0l1-1a.48.48 0 0 0 0-.62Zm-5-3.32a3.28 3.28 0 0 1-2.31.93 3.22 3.22 0 1 1 2.35-.93Z"
835
+ ></path>
836
+ </svg>
837
+ </span>
838
+ </button>
839
+ </form>
840
+ </div>
841
+ </div>
842
+ {/if}
843
+ {#if title}
844
+ <div class="ons-header__main">
845
+ <div class="ons-container">
846
+ <div
847
+ class="ons-grid ons-grid-flex ons-grid-flex--between ons-grid-flex--vertical-center ons-grid-flex--no-wrap ons-grid--gutterless"
848
+ >
849
+ <div class="ons-grid__col ons-col-auto ons-u-flex-shrink">
850
+ <a class="ons-header__title-link" href={titleHref}>
851
+ <div class="ons-header__title">{title}</div>
852
+ </a>
853
+ </div>
854
+ </div>
855
+ </div>
856
+ </div>
857
+ {/if}
858
+ {/if}
859
+ </Theme>
638
860
  </header>
639
861
 
640
862
  <style>
641
- .ons-header__top {
642
- background: none;
643
- }</style>
863
+ .ons-header__top {
864
+ background: var(--ons-color-page-light);
865
+ }
866
+ .ons-icon--logo__group--primary,
867
+ .ons-icon--logo__group--text {
868
+ fill: var(--ons-color-text-link-hover);
869
+ }
870
+ .ons-header__top--compact {
871
+ border-bottom: 1px solid var(--ons-color-borders);
872
+ }
873
+ </style>