@communitiesuk/svelte-component-library 0.1.17

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 (217) hide show
  1. package/README.md +188 -0
  2. package/dist/assets/css/govuk-frontend.min.css +2 -0
  3. package/dist/assets/css/govuk-frontend.min.css.map +1 -0
  4. package/dist/assets/fonts/bold-affa96571d-v2.woff +0 -0
  5. package/dist/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  6. package/dist/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  7. package/dist/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  8. package/dist/assets/govuk_publishing_components/images/icon-autocomplete-search-suggestion.svg +4 -0
  9. package/dist/assets/govuk_publishing_components/images/icon-close.svg +1 -0
  10. package/dist/assets/images/favicon.ico +0 -0
  11. package/dist/assets/images/favicon.svg +1 -0
  12. package/dist/assets/images/govuk-crest-2x.png +0 -0
  13. package/dist/assets/images/govuk-crest.png +0 -0
  14. package/dist/assets/images/govuk-crest.svg +1 -0
  15. package/dist/assets/images/govuk-icon-180.png +0 -0
  16. package/dist/assets/images/govuk-icon-192.png +0 -0
  17. package/dist/assets/images/govuk-icon-512.png +0 -0
  18. package/dist/assets/images/govuk-icon-mask.svg +1 -0
  19. package/dist/assets/images/govuk-opengraph-image.png +0 -0
  20. package/dist/assets/images/homepage-illustration.svg +1 -0
  21. package/dist/assets/images/homepage.svg +44 -0
  22. package/dist/assets/images/masthead-illustration.svg +123 -0
  23. package/dist/assets/images/oflog_crest_black.png +0 -0
  24. package/dist/assets/images/oflog_crest_white.png +0 -0
  25. package/dist/assets/images/undraw_approved-wireframe_odf4.svg +1 -0
  26. package/dist/assets/images/undraw_collaborators_rgw4.svg +1 -0
  27. package/dist/assets/images/undraw_content-creator_vuqg.svg +1 -0
  28. package/dist/assets/images/undraw_online-media_opxh.svg +1 -0
  29. package/dist/assets/images/undraw_pull-request_zlsu.svg +1 -0
  30. package/dist/assets/images/undraw_reviewed-docs_g0cg.svg +1 -0
  31. package/dist/components/FilterPanel/codeBlocks.d.ts +3 -0
  32. package/dist/components/FilterPanel/codeBlocks.js +418 -0
  33. package/dist/components/content/InsetText.svelte +21 -0
  34. package/dist/components/content/InsetText.svelte.d.ts +7 -0
  35. package/dist/components/content/WarningText.svelte +27 -0
  36. package/dist/components/content/WarningText.svelte.d.ts +8 -0
  37. package/dist/components/data-vis/axis/Axis.svelte +51 -0
  38. package/dist/components/data-vis/axis/Axis.svelte.d.ts +33 -0
  39. package/dist/components/data-vis/axis/Ticks.svelte +113 -0
  40. package/dist/components/data-vis/axis/Ticks.svelte.d.ts +33 -0
  41. package/dist/components/data-vis/line-chart/Line.svelte +150 -0
  42. package/dist/components/data-vis/line-chart/Line.svelte.d.ts +85 -0
  43. package/dist/components/data-vis/line-chart/LineChart.svelte +249 -0
  44. package/dist/components/data-vis/line-chart/LineChart.svelte.d.ts +73 -0
  45. package/dist/components/data-vis/line-chart/Lines.svelte +138 -0
  46. package/dist/components/data-vis/line-chart/Lines.svelte.d.ts +57 -0
  47. package/dist/components/data-vis/line-chart/Marker.svelte +61 -0
  48. package/dist/components/data-vis/line-chart/Marker.svelte.d.ts +37 -0
  49. package/dist/components/data-vis/line-chart/SeriesLabel.svelte +67 -0
  50. package/dist/components/data-vis/line-chart/SeriesLabel.svelte.d.ts +43 -0
  51. package/dist/components/data-vis/line-chart/ValueLabel.svelte +50 -0
  52. package/dist/components/data-vis/line-chart/ValueLabel.svelte.d.ts +25 -0
  53. package/dist/components/data-vis/map/Map.svelte +392 -0
  54. package/dist/components/data-vis/map/Map.svelte.d.ts +47 -0
  55. package/dist/components/data-vis/map/MapLegend.svelte +41 -0
  56. package/dist/components/data-vis/map/MapLegend.svelte.d.ts +15 -0
  57. package/dist/components/data-vis/map/NonStandardControls.svelte +42 -0
  58. package/dist/components/data-vis/map/NonStandardControls.svelte.d.ts +13 -0
  59. package/dist/components/data-vis/map/Tooltip.svelte +41 -0
  60. package/dist/components/data-vis/map/Tooltip.svelte.d.ts +19 -0
  61. package/dist/components/data-vis/map/colorbrewer.d.ts +337 -0
  62. package/dist/components/data-vis/map/colorbrewer.js +1523 -0
  63. package/dist/components/data-vis/map/colors.d.ts +13 -0
  64. package/dist/components/data-vis/map/colors.js +65 -0
  65. package/dist/components/data-vis/map/dataJoin.d.ts +2 -0
  66. package/dist/components/data-vis/map/dataJoin.js +27 -0
  67. package/dist/components/data-vis/map/fullTopo.json +1 -0
  68. package/dist/components/data-vis/map/jenks.d.ts +1 -0
  69. package/dist/components/data-vis/map/jenks.js +51 -0
  70. package/dist/components/data-vis/map/lad2023.json +1 -0
  71. package/dist/components/data-vis/map/mapUtils.d.ts +5 -0
  72. package/dist/components/data-vis/map/mapUtils.js +86 -0
  73. package/dist/components/data-vis/map/topo.json +1 -0
  74. package/dist/components/data-vis/table/Table.svelte +247 -0
  75. package/dist/components/data-vis/table/Table.svelte.d.ts +19 -0
  76. package/dist/components/layout/Breadcrumbs.svelte +191 -0
  77. package/dist/components/layout/Breadcrumbs.svelte.d.ts +24 -0
  78. package/dist/components/layout/Footer.svelte +171 -0
  79. package/dist/components/layout/Footer.svelte.d.ts +30 -0
  80. package/dist/components/layout/Header.svelte +43 -0
  81. package/dist/components/layout/Header.svelte.d.ts +7 -0
  82. package/dist/components/layout/InternalHeader.svelte +628 -0
  83. package/dist/components/layout/InternalHeader.svelte.d.ts +15 -0
  84. package/dist/components/layout/PhaseBanner.svelte +28 -0
  85. package/dist/components/layout/PhaseBanner.svelte.d.ts +9 -0
  86. package/dist/components/layout/ServiceNavigation.svelte +143 -0
  87. package/dist/components/layout/ServiceNavigation.svelte.d.ts +13 -0
  88. package/dist/components/layout/SideNavigation.svelte +345 -0
  89. package/dist/components/layout/SideNavigation.svelte.d.ts +25 -0
  90. package/dist/components/layout/service-navigation-nested-mobile/HeaderNav.svelte +91 -0
  91. package/dist/components/layout/service-navigation-nested-mobile/HeaderNav.svelte.d.ts +15 -0
  92. package/dist/components/layout/service-navigation-nested-mobile/MobileNav.svelte +233 -0
  93. package/dist/components/layout/service-navigation-nested-mobile/MobileNav.svelte.d.ts +27 -0
  94. package/dist/components/layout/service-navigation-nested-mobile/ServiceNavigationNestedMobile.svelte +70 -0
  95. package/dist/components/layout/service-navigation-nested-mobile/ServiceNavigationNestedMobile.svelte.d.ts +11 -0
  96. package/dist/components/layout/service-navigation-nested-mobile/SideNav.svelte +276 -0
  97. package/dist/components/layout/service-navigation-nested-mobile/SideNav.svelte.d.ts +22 -0
  98. package/dist/components/ui/Accordion.svelte +244 -0
  99. package/dist/components/ui/Accordion.svelte.d.ts +23 -0
  100. package/dist/components/ui/Breadcrumbs.svelte +198 -0
  101. package/dist/components/ui/Breadcrumbs.svelte.d.ts +24 -0
  102. package/dist/components/ui/Button.svelte +96 -0
  103. package/dist/components/ui/Button.svelte.d.ts +17 -0
  104. package/dist/components/ui/CheckBox.svelte +198 -0
  105. package/dist/components/ui/CheckBox.svelte.d.ts +27 -0
  106. package/dist/components/ui/ContentsList.svelte +1117 -0
  107. package/dist/components/ui/ContentsList.svelte.d.ts +25 -0
  108. package/dist/components/ui/DateInput.svelte +255 -0
  109. package/dist/components/ui/DateInput.svelte.d.ts +59 -0
  110. package/dist/components/ui/Details.svelte +12 -0
  111. package/dist/components/ui/Details.svelte.d.ts +13 -0
  112. package/dist/components/ui/FilterPanel.svelte +588 -0
  113. package/dist/components/ui/FilterPanel.svelte.d.ts +74 -0
  114. package/dist/components/ui/Footer.svelte +171 -0
  115. package/dist/components/ui/Footer.svelte.d.ts +30 -0
  116. package/dist/components/ui/Header.svelte +43 -0
  117. package/dist/components/ui/Header.svelte.d.ts +7 -0
  118. package/dist/components/ui/Masthead.svelte +267 -0
  119. package/dist/components/ui/Masthead.svelte.d.ts +12 -0
  120. package/dist/components/ui/NavigationExample.svelte +117 -0
  121. package/dist/components/ui/NavigationExample.svelte.d.ts +3 -0
  122. package/dist/components/ui/NotificationBanner.svelte +93 -0
  123. package/dist/components/ui/NotificationBanner.svelte.d.ts +15 -0
  124. package/dist/components/ui/Radios.svelte +176 -0
  125. package/dist/components/ui/Radios.svelte.d.ts +28 -0
  126. package/dist/components/ui/RelatedContent.svelte +596 -0
  127. package/dist/components/ui/RelatedContent.svelte.d.ts +29 -0
  128. package/dist/components/ui/Search.svelte +499 -0
  129. package/dist/components/ui/Search.svelte.d.ts +32 -0
  130. package/dist/components/ui/SearchAutocomplete.svelte +655 -0
  131. package/dist/components/ui/SearchAutocomplete.svelte.d.ts +37 -0
  132. package/dist/components/ui/Select.svelte +116 -0
  133. package/dist/components/ui/Select.svelte.d.ts +22 -0
  134. package/dist/components/ui/ServiceNavigation.svelte +143 -0
  135. package/dist/components/ui/ServiceNavigation.svelte.d.ts +13 -0
  136. package/dist/components/ui/SideNavigation.svelte +346 -0
  137. package/dist/components/ui/SideNavigation.svelte.d.ts +25 -0
  138. package/dist/components/ui/Tabs.svelte +306 -0
  139. package/dist/components/ui/Tabs.svelte.d.ts +18 -0
  140. package/dist/components/ui/WhatsNew.svelte +155 -0
  141. package/dist/components/ui/WhatsNew.svelte.d.ts +29 -0
  142. package/dist/config.d.ts +51 -0
  143. package/dist/config.js +44 -0
  144. package/dist/icons/DoubleChevronButton.svelte +62 -0
  145. package/dist/icons/DoubleChevronButton.svelte.d.ts +13 -0
  146. package/dist/icons/IconSearch.svelte +42 -0
  147. package/dist/icons/IconSearch.svelte.d.ts +6 -0
  148. package/dist/icons/SingleChevronButtonWithLabel.svelte +132 -0
  149. package/dist/icons/SingleChevronButtonWithLabel.svelte.d.ts +19 -0
  150. package/dist/index.d.ts +44 -0
  151. package/dist/index.js +45 -0
  152. package/dist/main.css +1 -0
  153. package/dist/package-wrapping/BaseInformation.svelte +82 -0
  154. package/dist/package-wrapping/BaseInformation.svelte.d.ts +15 -0
  155. package/dist/package-wrapping/BaseNameAndStatus.svelte +108 -0
  156. package/dist/package-wrapping/BaseNameAndStatus.svelte.d.ts +10 -0
  157. package/dist/package-wrapping/CodeBlock.svelte +62 -0
  158. package/dist/package-wrapping/CodeBlock.svelte.d.ts +12 -0
  159. package/dist/package-wrapping/ComponentDemo.svelte +114 -0
  160. package/dist/package-wrapping/ComponentDemo.svelte.d.ts +25 -0
  161. package/dist/package-wrapping/ComponentDemoTEMP.svelte +305 -0
  162. package/dist/package-wrapping/ComponentDemoTEMP.svelte.d.ts +21 -0
  163. package/dist/package-wrapping/ComponentDetails.svelte +123 -0
  164. package/dist/package-wrapping/ComponentDetails.svelte.d.ts +13 -0
  165. package/dist/package-wrapping/DividerLine.svelte +21 -0
  166. package/dist/package-wrapping/DividerLine.svelte.d.ts +17 -0
  167. package/dist/package-wrapping/InputForParameter.svelte +205 -0
  168. package/dist/package-wrapping/InputForParameter.svelte.d.ts +13 -0
  169. package/dist/package-wrapping/InputForParameterUpdated.svelte +222 -0
  170. package/dist/package-wrapping/InputForParameterUpdated.svelte.d.ts +17 -0
  171. package/dist/package-wrapping/InputForParameterUpdatedTEMP.svelte +203 -0
  172. package/dist/package-wrapping/InputForParameterUpdatedTEMP.svelte.d.ts +17 -0
  173. package/dist/package-wrapping/ListOfComponentStatuses.svelte +19 -0
  174. package/dist/package-wrapping/ListOfComponentStatuses.svelte.d.ts +11 -0
  175. package/dist/package-wrapping/OverlayAndComponentContainer.svelte +426 -0
  176. package/dist/package-wrapping/OverlayAndComponentContainer.svelte.d.ts +33 -0
  177. package/dist/package-wrapping/ParametersSection.svelte +235 -0
  178. package/dist/package-wrapping/ParametersSection.svelte.d.ts +19 -0
  179. package/dist/package-wrapping/ParsingErrorToastsContainer.svelte +50 -0
  180. package/dist/package-wrapping/ParsingErrorToastsContainer.svelte.d.ts +15 -0
  181. package/dist/package-wrapping/Pill.svelte +54 -0
  182. package/dist/package-wrapping/Pill.svelte.d.ts +25 -0
  183. package/dist/package-wrapping/PlaygroundDetails.svelte +106 -0
  184. package/dist/package-wrapping/PlaygroundDetails.svelte.d.ts +13 -0
  185. package/dist/package-wrapping/ScreenSizeRadio.svelte +24 -0
  186. package/dist/package-wrapping/ScreenSizeRadio.svelte.d.ts +11 -0
  187. package/dist/package-wrapping/ScreenSizeRadioUpdated.svelte +23 -0
  188. package/dist/package-wrapping/ScreenSizeRadioUpdated.svelte.d.ts +11 -0
  189. package/dist/package-wrapping/SidebarContainer.svelte +103 -0
  190. package/dist/package-wrapping/SidebarContainer.svelte.d.ts +23 -0
  191. package/dist/package-wrapping/WrapperDetailsUpdate.svelte +40 -0
  192. package/dist/package-wrapping/WrapperDetailsUpdate.svelte.d.ts +15 -0
  193. package/dist/package-wrapping/templates/Template.svelte +100 -0
  194. package/dist/package-wrapping/templates/Template.svelte.d.ts +25 -0
  195. package/dist/templates/ComponentPageTemplate.svelte +1 -0
  196. package/dist/templates/ComponentPageTemplate.svelte.d.ts +26 -0
  197. package/dist/utils/data-transformations/convertCSV.d.ts +2 -0
  198. package/dist/utils/data-transformations/convertCSV.js +22 -0
  199. package/dist/utils/data-transformations/getValueFromParametersArray.d.ts +1 -0
  200. package/dist/utils/data-transformations/getValueFromParametersArray.js +9 -0
  201. package/dist/utils/layoutNavHelpers.d.ts +70 -0
  202. package/dist/utils/layoutNavHelpers.js +129 -0
  203. package/dist/utils/package-wrapping-specific/addIndexAndInitialValue.d.ts +1 -0
  204. package/dist/utils/package-wrapping-specific/addIndexAndInitialValue.js +21 -0
  205. package/dist/utils/package-wrapping-specific/createBindableParametersValuesArray.d.ts +1 -0
  206. package/dist/utils/package-wrapping-specific/createBindableParametersValuesArray.js +12 -0
  207. package/dist/utils/package-wrapping-specific/createParametersObject.d.ts +1 -0
  208. package/dist/utils/package-wrapping-specific/createParametersObject.js +29 -0
  209. package/dist/utils/package-wrapping-specific/defineDefaultEventHandler.d.ts +1 -0
  210. package/dist/utils/package-wrapping-specific/defineDefaultEventHandler.js +14 -0
  211. package/dist/utils/package-wrapping-specific/trackVisibleParameters.d.ts +1 -0
  212. package/dist/utils/package-wrapping-specific/trackVisibleParameters.js +29 -0
  213. package/dist/utils/syntax-highlighting/shikiHighlight.d.ts +7 -0
  214. package/dist/utils/syntax-highlighting/shikiHighlight.js +76 -0
  215. package/dist/utils/text-string-conversion/textStringConversion.d.ts +9 -0
  216. package/dist/utils/text-string-conversion/textStringConversion.js +86 -0
  217. package/package.json +113 -0
@@ -0,0 +1,171 @@
1
+ <script lang="ts">
2
+ // Define component props with default values
3
+ // sections: array of footer navigation sections
4
+ // inlineLinks: array of inline footer links
5
+ // metaCustomContent: custom HTML content for meta section
6
+ // containerWidth: width class for the container
7
+ // showLicence: toggle for OGL license display
8
+ // showCopyright: toggle for crown copyright display
9
+ // copyrightLogoUrl: URL for the crown copyright logo background image (overrides the default CSS background-image)
10
+ // copyrightText: Text to display for the crown copyright notice
11
+ // crownSvgPath: SVG path data for the crown logo used in the license section
12
+ // licenceHref: URL for the Open Government Licence link
13
+ // licenceLinkText: Text for the Open Government Licence link
14
+ // licenceTextBefore: Text to display before the licence link
15
+ // licenceTextAfter: Text to display after the licence link
16
+ // copyrightHref: URL for the crown copyright link
17
+
18
+ // Define types for component props
19
+ interface FooterItem {
20
+ href: string;
21
+ label: string;
22
+ lang?: string;
23
+ hrefLang?: string;
24
+ }
25
+
26
+ interface FooterSection {
27
+ title: string;
28
+ columns?: number;
29
+ items: FooterItem[];
30
+ }
31
+
32
+ // Define component props with types and default values
33
+ let {
34
+ sections = [] as FooterSection[],
35
+ inlineLinks = [] as FooterItem[],
36
+ metaCustomContent = "",
37
+ containerWidth = "govuk-width-container",
38
+ showLicence = true,
39
+ showCopyright = true,
40
+ copyrightLogoUrl = "/assets/images/govuk-crest.svg",
41
+ copyrightText = "© Crown copyright",
42
+ crownSvgPath = "M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145",
43
+ licenceHref = "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",
44
+ licenceLinkText = "Open Government Licence v3.0",
45
+ licenceTextBefore = "All content is available under the ",
46
+ licenceTextAfter = ", except where otherwise stated",
47
+ copyrightHref = "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
48
+ } = $props<{
49
+ sections?: FooterSection[];
50
+ inlineLinks?: FooterItem[];
51
+ metaCustomContent?: string;
52
+ containerWidth?: string;
53
+ showLicence?: boolean;
54
+ showCopyright?: boolean;
55
+ copyrightLogoUrl?: string;
56
+ copyrightText?: string;
57
+ crownSvgPath?: string;
58
+ licenceHref?: string;
59
+ licenceLinkText?: string;
60
+ licenceTextBefore?: string;
61
+ licenceTextAfter?: string;
62
+ copyrightHref?: string;
63
+ }>();
64
+ </script>
65
+
66
+ <!-- Main footer container -->
67
+ <footer class="govuk-footer">
68
+ <div class={containerWidth}>
69
+ <!-- Navigation sections (optional) -->
70
+ {#if sections.length > 0}
71
+ <div class="govuk-footer__navigation">
72
+ <!-- Iterate through each footer section -->
73
+ {#each sections as section}
74
+ <div
75
+ class="govuk-footer__section {section.columns === 2
76
+ ? 'govuk-grid-column-two-thirds'
77
+ : 'govuk-grid-column-one-third'}"
78
+ >
79
+ <h2 class="govuk-footer__heading govuk-heading-m">
80
+ {section.title}
81
+ </h2>
82
+ <ul
83
+ class="govuk-footer__list {section.columns === 2
84
+ ? 'govuk-footer__list--columns-2'
85
+ : ''}"
86
+ >
87
+ {#each section.items as item}
88
+ <li class="govuk-footer__list-item">
89
+ <a
90
+ class="govuk-footer__link"
91
+ href={item.href}
92
+ lang={item.lang}
93
+ hreflang={item.hrefLang}
94
+ >
95
+ {item.label}
96
+ </a>
97
+ </li>
98
+ {/each}
99
+ </ul>
100
+ </div>
101
+ {/each}
102
+ </div>
103
+ <hr class="govuk-footer__section-break" />
104
+ {/if}
105
+
106
+ <!-- Footer meta section -->
107
+ <div class="govuk-footer__meta">
108
+ <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
109
+ <!-- Inline links section (optional) -->
110
+ {#if inlineLinks.length > 0}
111
+ <h2 class="govuk-visually-hidden">Support links</h2>
112
+ <ul class="govuk-footer__inline-list">
113
+ {#each inlineLinks as link}
114
+ <li class="govuk-footer__inline-list-item">
115
+ <a
116
+ class="govuk-footer__link"
117
+ href={link.href}
118
+ lang={link.lang}
119
+ hreflang={link.hrefLang}
120
+ >
121
+ {link.label}
122
+ </a>
123
+ </li>
124
+ {/each}
125
+ </ul>
126
+ {/if}
127
+
128
+ <!-- Custom meta content (optional) -->
129
+ {#if metaCustomContent}
130
+ <div class="govuk-footer__meta-custom">
131
+ {@html metaCustomContent}
132
+ </div>
133
+ {/if}
134
+
135
+ <!-- Open Government License section (optional) -->
136
+ {#if showLicence}
137
+ <svg
138
+ aria-hidden="true"
139
+ focusable="false"
140
+ class="govuk-footer__licence-logo"
141
+ xmlns="http://www.w3.org/2000/svg"
142
+ viewBox="0 0 483.2 195.7"
143
+ height="17"
144
+ width="41"
145
+ >
146
+ <path fill="currentColor" d={crownSvgPath}></path>
147
+ </svg>
148
+ <span class="govuk-footer__licence-description">
149
+ {licenceTextBefore}
150
+ <a class="govuk-footer__link" href={licenceHref} rel="license"
151
+ >{licenceLinkText}</a
152
+ >{licenceTextAfter}
153
+ </span>
154
+ {/if}
155
+ </div>
156
+
157
+ <!-- Crown copyright section (optional) -->
158
+ {#if showCopyright}
159
+ <div class="govuk-footer__meta-item">
160
+ <a
161
+ class="govuk-footer__link govuk-footer__copyright-logo"
162
+ href={copyrightHref}
163
+ style="background-image: url({copyrightLogoUrl});"
164
+ >
165
+ {copyrightText}
166
+ </a>
167
+ </div>
168
+ {/if}
169
+ </div>
170
+ </div>
171
+ </footer>
@@ -0,0 +1,30 @@
1
+ interface FooterItem {
2
+ href: string;
3
+ label: string;
4
+ lang?: string;
5
+ hrefLang?: string;
6
+ }
7
+ interface FooterSection {
8
+ title: string;
9
+ columns?: number;
10
+ items: FooterItem[];
11
+ }
12
+ type $$ComponentProps = {
13
+ sections?: FooterSection[];
14
+ inlineLinks?: FooterItem[];
15
+ metaCustomContent?: string;
16
+ containerWidth?: string;
17
+ showLicence?: boolean;
18
+ showCopyright?: boolean;
19
+ copyrightLogoUrl?: string;
20
+ copyrightText?: string;
21
+ crownSvgPath?: string;
22
+ licenceHref?: string;
23
+ licenceLinkText?: string;
24
+ licenceTextBefore?: string;
25
+ licenceTextAfter?: string;
26
+ copyrightHref?: string;
27
+ };
28
+ declare const Footer: import("svelte").Component<$$ComponentProps, {}, "">;
29
+ type Footer = ReturnType<typeof Footer>;
30
+ export default Footer;
@@ -0,0 +1,43 @@
1
+ <!-- Default GOV.UK header
2
+ Most services on GOV.UK should use the default GOV.UK header.
3
+
4
+ It should only show the GOV.UK logo and any GOV.UK-wide links and tools to help your users. Do not add the menu of GOV.UK topic links to your service's GOV.UK header. -->
5
+
6
+ <script lang="ts">
7
+ let { fullWidthBorder = false, homepageUrl = "/" } = $props<{
8
+ fullWidthBorder?: boolean;
9
+ homepageUrl?: string;
10
+ }>();
11
+ </script>
12
+
13
+ <header
14
+ class="govuk-header{fullWidthBorder
15
+ ? ' govuk-header--full-width-border'
16
+ : ''}"
17
+ data-module="govuk-header"
18
+ >
19
+ <div class="govuk-header__container govuk-width-container">
20
+ <div class="govuk-header__logo">
21
+ <a
22
+ href={homepageUrl}
23
+ class="govuk-header__link govuk-header__link--homepage"
24
+ >
25
+ <svg
26
+ focusable="false"
27
+ role="img"
28
+ class="govuk-header__logotype"
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ viewBox="0 0 148 30"
31
+ height="30"
32
+ width="148"
33
+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4.8.6.2 1.1.3 1.8.3zm13-17.4h4.2v9.1l7.4-9.1h5.2l-7.2 8.4L148 28h-4.9l-5.5-9.4-2.7 3V28h-4.2V7zm-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z"
38
+ ></path>
39
+ </svg>
40
+ </a>
41
+ </div>
42
+ </div>
43
+ </header>
@@ -0,0 +1,7 @@
1
+ type $$ComponentProps = {
2
+ fullWidthBorder?: boolean;
3
+ homepageUrl?: string;
4
+ };
5
+ declare const Header: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type Header = ReturnType<typeof Header>;
7
+ export default Header;
@@ -0,0 +1,267 @@
1
+ <script lang="ts">
2
+ import homepageIllustration from "../../assets/images/homepage-illustration.svg";
3
+
4
+ // Define component props with types and default values
5
+ let {
6
+ title = "Design your service using GOV.UK styles, components and patterns",
7
+ description = "Use this design system to make government services consistent with GOV.UK. Learn from the research and experience of other service teams and avoid repeating work that's already been done.",
8
+ buttonText = "Get started",
9
+ buttonHref = "/get-started/",
10
+ imageSrc = homepageIllustration,
11
+ imageAlt = "",
12
+ backgroundColor = "#1d70b8", // GOV.UK blue by default
13
+ } = $props<{
14
+ title?: string;
15
+ description?: string;
16
+ buttonText?: string;
17
+ buttonHref?: string;
18
+ imageSrc?: string;
19
+ imageAlt?: string;
20
+ backgroundColor?: string;
21
+ }>();
22
+ </script>
23
+
24
+ <div
25
+ class="app-masthead"
26
+ style="background-color: {backgroundColor}; border-bottom-color: {backgroundColor};"
27
+ >
28
+ <div class="govuk-width-container">
29
+ <div class="govuk-grid-row">
30
+ <div class="govuk-grid-column-two-thirds-from-desktop">
31
+ <h1 class="govuk-heading-xl app-masthead__title">{@html title}</h1>
32
+ <p class="app-masthead__description">{description}</p>
33
+
34
+ <a
35
+ href={buttonHref}
36
+ role="button"
37
+ draggable="false"
38
+ class="govuk-button govuk-button--inverse govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-button--start"
39
+ data-module="govuk-button"
40
+ >
41
+ {buttonText}
42
+ <svg
43
+ class="govuk-button__start-icon"
44
+ xmlns="http://www.w3.org/2000/svg"
45
+ width="17.5"
46
+ height="19"
47
+ viewBox="0 0 33 40"
48
+ aria-hidden="true"
49
+ focusable="false"
50
+ >
51
+ <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path>
52
+ </svg>
53
+ </a>
54
+ </div>
55
+
56
+ <div class="govuk-grid-column-one-third-from-desktop">
57
+ <img
58
+ class="app-masthead__image"
59
+ src={imageSrc}
60
+ alt={imageAlt}
61
+ role="presentation"
62
+ />
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+
68
+ <style>
69
+ /* Ensure our masthead styles take precedence over global GOV.UK styles using specificity */
70
+ .app-masthead.app-masthead {
71
+ /* @include govuk-responsive-padding(6, "top"); */
72
+ padding-top: 20px;
73
+ /* @include govuk-responsive-padding(6, "bottom"); */
74
+ padding-bottom: 20px;
75
+ /* border-bottom: 1px solid govuk-colour("blue"); - now set via inline style */
76
+ border-bottom-width: 1px;
77
+ border-bottom-style: solid;
78
+ /* color: govuk-colour("white"); */
79
+ color: #ffffff;
80
+ /* background-color: govuk-colour("blue"); - now set via inline style */
81
+ }
82
+
83
+ @media (min-width: 40.0625em) {
84
+ .app-masthead.app-masthead {
85
+ /* Responsive spacing unit 6: 30px on large screens */
86
+ padding-top: 30px;
87
+ padding-bottom: 30px;
88
+ }
89
+ }
90
+
91
+ .app-masthead .app-masthead__title.app-masthead__title {
92
+ /* color: govuk-colour("white"); */
93
+ color: #ffffff;
94
+ /* @include govuk-responsive-margin(6, "bottom"); */
95
+ margin-bottom: 20px;
96
+ }
97
+
98
+ @media (min-width: 40.0625em) {
99
+ .app-masthead .app-masthead__title.app-masthead__title {
100
+ /* Responsive spacing unit 6: 30px on large screens */
101
+ margin-bottom: 30px;
102
+ }
103
+ }
104
+
105
+ .app-masthead .app-masthead__description.app-masthead__description {
106
+ /* @include govuk-font(24); - Font size 24 from the typography scale */
107
+ font-family: "GDS Transport", arial, sans-serif;
108
+ font-weight: 400;
109
+ font-size: 1.25rem; /* 20px */
110
+ line-height: 1.25;
111
+ margin-bottom: 0;
112
+ }
113
+
114
+ @media (min-width: 40.0625em) {
115
+ .app-masthead .app-masthead__description.app-masthead__description {
116
+ font-size: 1.5rem; /* 24px */
117
+ line-height: 1.25;
118
+ }
119
+ }
120
+
121
+ .app-masthead .app-masthead__image.app-masthead__image {
122
+ display: none;
123
+ }
124
+
125
+ /* @include govuk-media-query($from: desktop) - Desktop breakpoint is 769px */
126
+ @media (min-width: 48.0625em) {
127
+ .app-masthead .app-masthead__image.app-masthead__image {
128
+ display: block;
129
+ width: 100%;
130
+ /* margin-top: govuk-spacing(3); - Static spacing unit 3 is 15px */
131
+ margin-top: 15px;
132
+ }
133
+ }
134
+
135
+ /* GOV.UK Button Styles - Scoped to our component with high specificity */
136
+ .app-masthead .govuk-button.govuk-button {
137
+ /* @include govuk-font($size: 19, $line-height: 19px); */
138
+ font-family: "GDS Transport", arial, sans-serif;
139
+ font-weight: 400;
140
+ font-size: 1.1875rem; /* 19px */
141
+ line-height: 1.1875; /* 19px line height */
142
+ box-sizing: border-box;
143
+ display: inline-block;
144
+ position: relative;
145
+ width: 100%;
146
+ margin-top: 0;
147
+ margin-right: 0;
148
+ margin-left: 0;
149
+ margin-bottom: 1.375rem; /* 22px - adjusted for shadow */
150
+ /* Padding calculation: govuk-spacing(2) - border-width - shadow adjustment */
151
+ padding: 0.4375rem 0.625rem 0.3125rem; /* 7px 10px 5px */
152
+ border: 0.125rem solid transparent; /* 2px border */
153
+ border-radius: 0;
154
+ color: #ffffff; /* $govuk-button-text-colour */
155
+ background-color: #00703c; /* $govuk-button-colour (green) */
156
+ box-shadow: 0 0.125rem 0 #002d18; /* 2px shadow */
157
+ text-align: center;
158
+ vertical-align: top;
159
+ cursor: pointer;
160
+ text-decoration: none;
161
+ -webkit-appearance: none;
162
+ }
163
+
164
+ @media (min-width: 40.0625em) {
165
+ .app-masthead .govuk-button.govuk-button {
166
+ width: auto;
167
+ margin-bottom: 1.375rem;
168
+ }
169
+ }
170
+
171
+ /* Link states for buttons */
172
+ .app-masthead .govuk-button.govuk-button:link,
173
+ .app-masthead .govuk-button.govuk-button:visited,
174
+ .app-masthead .govuk-button.govuk-button:active {
175
+ color: #ffffff;
176
+ text-decoration: none;
177
+ }
178
+
179
+ .app-masthead .govuk-button.govuk-button:hover {
180
+ background-color: #005a30; /* $govuk-button-hover-colour */
181
+ box-shadow: 0 0.25rem 0 #002d18; /* 4px shadow on hover */
182
+ color: #ffffff;
183
+ text-decoration: none;
184
+ }
185
+
186
+ .app-masthead .govuk-button.govuk-button:active {
187
+ top: 0.125rem; /* 2px - button pressed down */
188
+ box-shadow: 0 0 0 #002d18; /* No shadow when pressed */
189
+ }
190
+
191
+ .app-masthead .govuk-button.govuk-button:focus {
192
+ border-color: #ffdd00; /* $govuk-focus-colour */
193
+ outline: 0.1875rem solid transparent; /* 3px */
194
+ box-shadow: inset 0 0 0 1px #ffdd00;
195
+ }
196
+
197
+ .app-masthead .govuk-button.govuk-button:focus:not(:active):not(:hover) {
198
+ border-color: #ffdd00;
199
+ color: #0b0c0c; /* $govuk-focus-text-colour */
200
+ background-color: #ffdd00;
201
+ box-shadow: 0 0.125rem 0 #0b0c0c;
202
+ }
203
+
204
+ /* Inverse button styles - white button with blue text */
205
+ .app-masthead .govuk-button.govuk-button--inverse {
206
+ background-color: #ffffff; /* $govuk-inverse-button-colour */
207
+ box-shadow: 0 0.125rem 0 #0b0c0c; /* $govuk-inverse-button-shadow-colour */
208
+ color: #1d70b8; /* $govuk-inverse-button-text-colour - BLUE text, not white! */
209
+ }
210
+
211
+ .app-masthead .govuk-button.govuk-button--inverse:link,
212
+ .app-masthead .govuk-button.govuk-button--inverse:visited,
213
+ .app-masthead .govuk-button.govuk-button--inverse:active {
214
+ color: #1d70b8; /* Blue text for all states */
215
+ }
216
+
217
+ .app-masthead .govuk-button.govuk-button--inverse:hover {
218
+ background-color: #f3f2f1; /* $govuk-inverse-button-hover-colour */
219
+ color: #1d70b8; /* Keep blue text on hover */
220
+ }
221
+
222
+ /* Start button styles */
223
+ .app-masthead .govuk-button.govuk-button--start {
224
+ /* @include govuk-typography-weight-bold; @include govuk-font-size($size: 24, $line-height: 1); */
225
+ font-weight: 700;
226
+ font-size: 1.5rem; /* 24px */
227
+ line-height: 1;
228
+ display: inline-flex;
229
+ min-height: auto;
230
+ justify-content: center;
231
+ }
232
+
233
+ .app-masthead .govuk-button .govuk-button__start-icon {
234
+ /* margin-left: govuk-spacing(1); on mobile, govuk-spacing(2) on desktop */
235
+ margin-left: 0.3125rem; /* 5px - govuk-spacing(1) */
236
+ vertical-align: middle;
237
+ flex-shrink: 0;
238
+ align-self: center;
239
+ forced-color-adjust: auto;
240
+ }
241
+
242
+ @media (min-width: 48.0625em) {
243
+ .app-masthead .govuk-button .govuk-button__start-icon {
244
+ margin-left: 0.625rem; /* 10px - govuk-spacing(2) */
245
+ }
246
+ }
247
+
248
+ /* GOV.UK Typography - Scoped to our component with high specificity */
249
+ .app-masthead .govuk-heading-xl.govuk-heading-xl {
250
+ color: #ffffff; /* Override to white for masthead */
251
+ font-family: "GDS Transport", arial, sans-serif;
252
+ font-weight: 700;
253
+ font-size: 2rem;
254
+ line-height: 1.09375;
255
+ display: block;
256
+ margin-top: 0;
257
+ margin-bottom: 1.875rem;
258
+ }
259
+
260
+ @media (min-width: 40.0625em) {
261
+ .app-masthead .govuk-heading-xl.govuk-heading-xl {
262
+ font-size: 3rem;
263
+ line-height: 1.04167;
264
+ margin-bottom: 3.125rem;
265
+ }
266
+ }
267
+ </style>
@@ -0,0 +1,12 @@
1
+ type $$ComponentProps = {
2
+ title?: string;
3
+ description?: string;
4
+ buttonText?: string;
5
+ buttonHref?: string;
6
+ imageSrc?: string;
7
+ imageAlt?: string;
8
+ backgroundColor?: string;
9
+ };
10
+ declare const Masthead: import("svelte").Component<$$ComponentProps, {}, "">;
11
+ type Masthead = ReturnType<typeof Masthead>;
12
+ export default Masthead;
@@ -0,0 +1,117 @@
1
+ <script lang="ts">
2
+ import HeaderNav from "../layout/service-navigation-nested-mobile/HeaderNav.svelte";
3
+ import MobileNav from "../layout/service-navigation-nested-mobile/MobileNav.svelte";
4
+ import SideNav from "../layout/service-navigation-nested-mobile/SideNav.svelte";
5
+ import { onMount } from "svelte";
6
+
7
+ // Example navigation data
8
+ const topNavItems = [
9
+ { text: "Get started", href: "/get-started" },
10
+ { text: "Components", href: "/components", current: true },
11
+ { text: "Patterns", href: "/patterns" },
12
+ { text: "Community", href: "/community" },
13
+ ];
14
+
15
+ // Current section
16
+ let currentSection = $state("Components");
17
+
18
+ // Mobile nav sections
19
+ const mobileNavSections = [
20
+ {
21
+ title: "Get started",
22
+ href: "/get-started",
23
+ items: [
24
+ {
25
+ text: "Accessibility testing",
26
+ href: "/get-started/accessibility-testing",
27
+ },
28
+ { text: "Install DWP Frontend", href: "/get-started/npm" },
29
+ ],
30
+ },
31
+ {
32
+ title: "Components",
33
+ href: "/components",
34
+ current: true,
35
+ items: [
36
+ {
37
+ text: "External service footer",
38
+ href: "/components/external-service-footer",
39
+ },
40
+ { text: "Header navigation", href: "/components/header-navigation" },
41
+ { text: "Timeline", href: "/components/timeline" },
42
+ ],
43
+ },
44
+ {
45
+ title: "Patterns",
46
+ href: "/patterns",
47
+ items: [
48
+ {
49
+ title: "Help users to...",
50
+ items: [
51
+ { text: "Add another thing", href: "/patterns/add-another-thing" },
52
+ ],
53
+ },
54
+ {
55
+ title: "Pages",
56
+ items: [{ text: "Cookies page", href: "/patterns/cookies-page" }],
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ title: "Community",
62
+ href: "/community",
63
+ items: [{ text: "Latest updates", href: "/community/latest-updates" }],
64
+ },
65
+ ];
66
+
67
+ // Side nav items
68
+ const sideNavItems = [
69
+ {
70
+ text: "External service footer",
71
+ href: "/components/external-service-footer",
72
+ },
73
+ { text: "Header navigation", href: "/components/header-navigation" },
74
+ { text: "Timeline", href: "/components/timeline", current: true },
75
+ ];
76
+
77
+ // Mobile nav state
78
+ let isMobileNavOpen = $state(false);
79
+
80
+ // Handle toggle mobile nav event
81
+ function handleToggleMobileNav(event: CustomEvent<boolean>) {
82
+ isMobileNavOpen = event.detail;
83
+ }
84
+ </script>
85
+
86
+ <div class="app-pane">
87
+ <!-- Header with top navigation -->
88
+ <HeaderNav
89
+ productName="Design System"
90
+ logoText="DWP"
91
+ navigationItems={topNavItems}
92
+ {currentSection}
93
+ on:toggleMobileNav={handleToggleMobileNav}
94
+ />
95
+
96
+ <!-- Mobile navigation -->
97
+ <MobileNav
98
+ isOpen={isMobileNavOpen}
99
+ sections={mobileNavSections}
100
+ {currentSection}
101
+ />
102
+
103
+ <div class="app-pane__body">
104
+ <!-- Side navigation -->
105
+ <SideNav
106
+ title="Pages in this section"
107
+ items={sideNavItems}
108
+ currentItem="Timeline"
109
+ />
110
+
111
+ <!-- Main content area would go here -->
112
+ <div class="app-pane__content">
113
+ <h1>Example content</h1>
114
+ <p>This demonstrates the three navigation components working together.</p>
115
+ </div>
116
+ </div>
117
+ </div>
@@ -0,0 +1,3 @@
1
+ declare const NavigationExample: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type NavigationExample = ReturnType<typeof NavigationExample>;
3
+ export default NavigationExample;