@communitiesuk/svelte-component-library 0.1.17 → 0.2.0-alpha.2

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 (97) hide show
  1. package/README.md +116 -98
  2. package/dist/assets/css/base.css +9 -0
  3. package/dist/assets/css/code-block.css +116 -0
  4. package/dist/assets/css/components.css +47 -0
  5. package/dist/assets/css/fonts.css +19 -0
  6. package/dist/assets/css/govuk-additional.css +142 -0
  7. package/dist/assets/css/govuk-frontend.min.css +2 -2
  8. package/dist/assets/css/moduk.css +1 -0
  9. package/dist/assets/css/moj-frontend.min copy.css +4108 -0
  10. package/dist/assets/css/moj-frontend.min.css +2 -0
  11. package/dist/assets/css/moj-frontend.min.css.map +1 -0
  12. package/dist/assets/css/utilities.css +0 -0
  13. package/dist/assets/images/govuk-crest.svg +1 -1
  14. package/dist/assets/js/govuk-frontend.min.js +1 -0
  15. package/dist/assets/js/moj-frontend.min.js +1 -0
  16. package/dist/assets/rebrand/images/favicon.ico +0 -0
  17. package/dist/assets/rebrand/images/favicon.svg +1 -0
  18. package/dist/assets/rebrand/images/govuk-crest.svg +1 -0
  19. package/dist/assets/rebrand/images/govuk-icon-180.png +0 -0
  20. package/dist/assets/rebrand/images/govuk-icon-192.png +0 -0
  21. package/dist/assets/rebrand/images/govuk-icon-512.png +0 -0
  22. package/dist/assets/rebrand/images/govuk-icon-mask.svg +1 -0
  23. package/dist/assets/rebrand/images/govuk-opengraph-image.png +0 -0
  24. package/dist/assets/rebrand/manifest.json +39 -0
  25. package/dist/components/data-vis/line-chart/Line.svelte +48 -41
  26. package/dist/components/data-vis/line-chart/Line.svelte.d.ts +6 -4
  27. package/dist/components/data-vis/line-chart/LineChart.svelte +145 -36
  28. package/dist/components/data-vis/line-chart/LineChart.svelte.d.ts +25 -9
  29. package/dist/components/data-vis/line-chart/Lines.svelte +10 -23
  30. package/dist/components/data-vis/line-chart/Lines.svelte.d.ts +8 -4
  31. package/dist/components/data-vis/line-chart/Marker.svelte +31 -5
  32. package/dist/components/data-vis/line-chart/Marker.svelte.d.ts +6 -2
  33. package/dist/components/data-vis/line-chart/SeriesLabel.svelte +7 -8
  34. package/dist/components/data-vis/line-chart/SeriesLabel.svelte.d.ts +2 -2
  35. package/dist/components/data-vis/line-chart/ValueLabel.svelte +26 -34
  36. package/dist/components/data-vis/line-chart/ValueLabel.svelte.d.ts +8 -4
  37. package/dist/components/data-vis/map/Map.svelte +299 -71
  38. package/dist/components/data-vis/map/Map.svelte.d.ts +39 -12
  39. package/dist/components/data-vis/map/NonStandardControls.svelte +10 -1
  40. package/dist/components/data-vis/map/NonStandardControls.svelte.d.ts +12 -11
  41. package/dist/components/data-vis/map/Tooltip.svelte +3 -4
  42. package/dist/components/data-vis/map/Tooltip.svelte.d.ts +0 -2
  43. package/dist/components/data-vis/map/mapUtils.d.ts +2 -0
  44. package/dist/components/data-vis/map/mapUtils.js +50 -0
  45. package/dist/components/data-vis/table/Table.svelte +28 -40
  46. package/dist/components/data-vis/table/Table.svelte.d.ts +0 -2
  47. package/dist/components/layout/Breadcrumbs.svelte +10 -12
  48. package/dist/components/layout/Breadcrumbs.svelte.d.ts +1 -0
  49. package/dist/components/layout/Footer.svelte +69 -4
  50. package/dist/components/layout/Footer.svelte.d.ts +3 -0
  51. package/dist/components/layout/Header.svelte +56 -16
  52. package/dist/components/layout/Header.svelte.d.ts +1 -0
  53. package/dist/components/layout/InternalHeader.svelte +155 -150
  54. package/dist/components/layout/InternalHeader.svelte.d.ts +1 -0
  55. package/dist/components/ui/Button.svelte +78 -4
  56. package/dist/components/ui/Button.svelte.d.ts +2 -0
  57. package/dist/components/ui/CookieBanner.svelte +356 -0
  58. package/dist/components/ui/CookieBanner.svelte.d.ts +18 -0
  59. package/dist/components/ui/FilterPanel.svelte +167 -158
  60. package/dist/components/ui/FilterPanel.svelte.d.ts +2 -0
  61. package/dist/components/ui/Masthead.svelte +35 -23
  62. package/dist/components/ui/Masthead.svelte.d.ts +2 -0
  63. package/dist/components/ui/PostcodeOrAreaSearch.svelte +200 -0
  64. package/dist/components/ui/PostcodeOrAreaSearch.svelte.d.ts +37 -0
  65. package/dist/components/ui/Search.svelte +2 -2
  66. package/dist/components/ui/SearchAutocomplete.svelte +104 -14
  67. package/dist/components/ui/SearchAutocomplete.svelte.d.ts +4 -0
  68. package/dist/data/IMD2019.json +32846 -0
  69. package/dist/data/places.csv +20039 -0
  70. package/dist/data/places.json +100192 -0
  71. package/dist/data/svgFontDimensions.json +90 -0
  72. package/dist/data/testData.json +52632 -0
  73. package/dist/index.d.ts +2 -0
  74. package/dist/index.js +2 -0
  75. package/dist/package-wrapping/BaseInformation.svelte +0 -33
  76. package/dist/package-wrapping/SidebarContainer.svelte +0 -7
  77. package/dist/utils/area-search/geoConfig.d.ts +435 -0
  78. package/dist/utils/area-search/geoConfig.js +291 -0
  79. package/dist/utils/cookiesNavigation.d.ts +44 -0
  80. package/dist/utils/cookiesNavigation.js +63 -0
  81. package/dist/utils/data-transformations/convert-csv-to-json-proper.cjs +88 -0
  82. package/dist/utils/data-transformations/convert-csv-to-json-proper.d.cts +1 -0
  83. package/dist/utils/data-transformations/convertCSV.d.ts +6 -0
  84. package/dist/utils/data-transformations/convertCSV.js +40 -21
  85. package/dist/utils/text-string-conversion/textStringConversion.d.ts +6 -0
  86. package/dist/utils/text-string-conversion/textStringConversion.js +10 -0
  87. package/package.json +18 -7
  88. package/dist/components/ui/Breadcrumbs.svelte +0 -198
  89. package/dist/components/ui/Breadcrumbs.svelte.d.ts +0 -24
  90. package/dist/components/ui/Footer.svelte +0 -171
  91. package/dist/components/ui/Footer.svelte.d.ts +0 -30
  92. package/dist/components/ui/Header.svelte +0 -43
  93. package/dist/components/ui/Header.svelte.d.ts +0 -7
  94. package/dist/components/ui/ServiceNavigation.svelte +0 -143
  95. package/dist/components/ui/ServiceNavigation.svelte.d.ts +0 -13
  96. package/dist/components/ui/SideNavigation.svelte +0 -346
  97. package/dist/components/ui/SideNavigation.svelte.d.ts +0 -25
@@ -78,12 +78,16 @@
78
78
  applyButtonText = "Apply",
79
79
  // GA4 related props
80
80
  ga4BaseEvent = { event_name: "select_content", type: "finder" },
81
+ filterPanelSectionsExpanded = false,
82
+ filterPanelExpanded = true,
81
83
  } = $props<{
82
84
  resultsCount?: string;
83
85
  sectionsData?: Section[];
84
86
  filterButtonText?: string;
85
87
  applyButtonText?: string;
86
88
  ga4BaseEvent?: Record<string, any>;
89
+ filterPanelSectionsExpanded?: boolean;
90
+ filterPanelExpanded?: boolean;
87
91
  }>();
88
92
 
89
93
  let sections = $derived(sectionsData);
@@ -91,7 +95,7 @@
91
95
  // Call $props.id() once at the top level
92
96
  const componentId = $props.id();
93
97
 
94
- let panelOpen = $state(true);
98
+ let panelOpen = $derived(filterPanelExpanded);
95
99
  // Use the stored componentId to create other IDs
96
100
  const panelId = `filter-panel-${componentId}`;
97
101
  const filterButtonId = `filter-button-${componentId}`;
@@ -131,173 +135,178 @@
131
135
  }
132
136
  </script>
133
137
 
134
- <div data-module="filter-panel ga4-event-tracker" class="app-c-filter-panel">
135
- <div class="app-c-filter-panel__header">
136
- <button
137
- id={filterButtonId}
138
- class="app-c-filter-panel__button govuk-link"
139
- aria-expanded={panelOpen}
140
- aria-controls={panelId}
141
- onclick={togglePanel}
142
- data-ga4-expandable=""
143
- data-ga4-event={getGa4Event({
144
- section: filterButtonText,
145
- text: filterButtonText,
146
- index_section: 0,
147
- index_section_count: sections.length,
148
- })}
149
- >
150
- <span class="app-c-filter-panel__button-inner">{filterButtonText}</span>
151
- </button>
152
- <h2 id="js-result-count" class="app-c-filter-panel__count">
153
- {resultsCount}
154
- </h2>
155
- </div>
138
+ {#key `${filterPanelExpanded}-${filterPanelSectionsExpanded}`}
139
+ <div data-module="filter-panel ga4-event-tracker" class="app-c-filter-panel">
140
+ <div class="app-c-filter-panel__header">
141
+ <button
142
+ id={filterButtonId}
143
+ class="app-c-filter-panel__button govuk-link"
144
+ aria-expanded={panelOpen}
145
+ aria-controls={panelId}
146
+ onclick={togglePanel}
147
+ data-ga4-expandable=""
148
+ data-ga4-event={getGa4Event({
149
+ section: filterButtonText,
150
+ text: filterButtonText,
151
+ index_section: 0,
152
+ index_section_count: sections.length,
153
+ })}
154
+ >
155
+ <span class="app-c-filter-panel__button-inner">{filterButtonText}</span>
156
+ </button>
157
+ <h2 id="js-result-count" class="app-c-filter-panel__count">
158
+ {resultsCount}
159
+ </h2>
160
+ </div>
156
161
 
157
- {#if panelOpen}
158
- <div
159
- class="app-c-filter-panel__content"
160
- id={panelId}
161
- role="region"
162
- aria-labelledby={filterButtonId}
163
- >
164
- {#each sections as section (section.id)}
165
- <details
166
- data-ga4-index={JSON.stringify({
167
- index_section: section.ga4IndexSection,
168
- index_section_count: section.ga4IndexSectionCount,
169
- })}
170
- data-module="filter-section"
171
- data-ga4-section={section.ga4Section}
172
- data-ga4-filter-parent={section.ga4Section}
173
- data-ga4-change-category={`update-filter ${section.type === "radios" || section.type === "checkboxes" ? section.type.slice(0, -2) : section.type}`}
174
- class="app-c-filter-section {section.type === 'select' &&
175
- section.title === 'Topic'
176
- ? 'js-all-content-finder-taxonomy-select'
177
- : ''}"
178
- open={section.openByDefault === undefined
179
- ? true
180
- : section.openByDefault}
181
- >
182
- <summary
183
- class="app-c-filter-section__summary"
184
- data-ga4-expandable=""
185
- data-ga4-event={getGa4Event({
186
- section: section.ga4Section,
187
- text: section.ga4Section,
162
+ {#if panelOpen}
163
+ <div
164
+ class="app-c-filter-panel__content"
165
+ id={panelId}
166
+ role="region"
167
+ aria-labelledby={filterButtonId}
168
+ >
169
+ {#each sections as section (section.id)}
170
+ <details
171
+ data-ga4-index={JSON.stringify({
188
172
  index_section: section.ga4IndexSection,
189
173
  index_section_count: section.ga4IndexSectionCount,
190
174
  })}
175
+ data-module="filter-section"
176
+ data-ga4-section={section.ga4Section}
177
+ data-ga4-filter-parent={section.ga4Section}
178
+ data-ga4-change-category={`update-filter ${section.type === "radios" || section.type === "checkboxes" ? section.type.slice(0, -2) : section.type}`}
179
+ class="app-c-filter-section {section.type === 'select' &&
180
+ section.title === 'Topic'
181
+ ? 'js-all-content-finder-taxonomy-select'
182
+ : ''}"
183
+ open={section.openByDefault !== undefined
184
+ ? section.openByDefault
185
+ : filterPanelSectionsExpanded}
191
186
  >
192
- <h2 class="app-c-filter-section__summary-heading">
193
- {#if section.type !== "radios"}
194
- <span class="govuk-visually-hidden">Filter by</span>{/if}
195
- {section.title}
196
- </h2>
197
- </summary>
198
- <div class="app-c-filter-section__content">
199
- {#if section.type === "radios"}
200
- {@const radioData = section}
201
- <div class="govuk-form-group govuk-!-margin-bottom-2">
202
- <Radios
203
- name={radioData.name}
204
- legend={radioData.legend}
205
- legendSize="m"
206
- isPageHeading={false}
207
- options={radioData.options.map((opt) => ({ ...opt }))}
208
- selectedValue={radioData.selectedValue}
209
- small={true}
210
- />
211
- </div>
212
- {:else if section.type === "date"}
213
- {@const dateData = section}
214
- <div data-ga4-section="Updated after">
215
- <DateInput
216
- id={`${dateData.id}-from`}
217
- namePrefix={dateData.fromNamePrefix}
218
- items={createDateInputItems(dateData.fromInitialValue)}
219
- fieldset={{
220
- legend: { text: dateData.fromLegend, isPageHeading: false },
221
- }}
222
- hint={{ text: dateData.fromHint }}
223
- legendSize={undefined}
224
- />
225
- </div>
226
- <div data-ga4-section="Updated before">
227
- <DateInput
228
- id={`${dateData.id}-to`}
229
- namePrefix={dateData.toNamePrefix}
230
- items={createDateInputItems(dateData.toInitialValue)}
231
- fieldset={{
232
- legend: { text: dateData.toLegend, isPageHeading: false },
233
- }}
234
- hint={{ text: dateData.toHint }}
235
- legendSize={undefined}
236
- />
237
- </div>
238
- {:else if section.type === "select"}
239
- {@const selectData = section}
240
- {#each selectData.selects as sel, selIdx (sel.id)}
187
+ <summary
188
+ class="app-c-filter-section__summary"
189
+ data-ga4-expandable=""
190
+ data-ga4-event={getGa4Event({
191
+ section: section.ga4Section,
192
+ text: section.ga4Section,
193
+ index_section: section.ga4IndexSection,
194
+ index_section_count: section.ga4IndexSectionCount,
195
+ })}
196
+ >
197
+ <h2 class="app-c-filter-section__summary-heading">
198
+ {#if section.type !== "radios"}
199
+ <span class="govuk-visually-hidden">Filter by</span>{/if}
200
+ {section.title}
201
+ </h2>
202
+ </summary>
203
+ <div class="app-c-filter-section__content">
204
+ {#if section.type === "radios"}
205
+ {@const radioData = section}
206
+ <div class="govuk-form-group govuk-!-margin-bottom-2">
207
+ <Radios
208
+ name={radioData.name}
209
+ legend={radioData.legend}
210
+ legendSize="m"
211
+ isPageHeading={false}
212
+ options={radioData.options.map((opt) => ({ ...opt }))}
213
+ selectedValue={radioData.selectedValue}
214
+ small={true}
215
+ />
216
+ </div>
217
+ {:else if section.type === "date"}
218
+ {@const dateData = section}
219
+ <div data-ga4-section="Updated after">
220
+ <DateInput
221
+ id={`${dateData.id}-from`}
222
+ namePrefix={dateData.fromNamePrefix}
223
+ items={createDateInputItems(dateData.fromInitialValue)}
224
+ fieldset={{
225
+ legend: {
226
+ text: dateData.fromLegend,
227
+ isPageHeading: false,
228
+ },
229
+ }}
230
+ hint={{ text: dateData.fromHint }}
231
+ legendSize={undefined}
232
+ />
233
+ </div>
234
+ <div data-ga4-section="Updated before">
235
+ <DateInput
236
+ id={`${dateData.id}-to`}
237
+ namePrefix={dateData.toNamePrefix}
238
+ items={createDateInputItems(dateData.toInitialValue)}
239
+ fieldset={{
240
+ legend: { text: dateData.toLegend, isPageHeading: false },
241
+ }}
242
+ hint={{ text: dateData.toHint }}
243
+ legendSize={undefined}
244
+ />
245
+ </div>
246
+ {:else if section.type === "select"}
247
+ {@const selectData = section}
248
+ {#each selectData.selects as sel, selIdx (sel.id)}
249
+ <div
250
+ class={`govuk-form-group gem-c-select ${selIdx === 1 ? "js-required" : ""}`}
251
+ style={selIdx === 1 ? "display: block;" : undefined}
252
+ data-ga4-section={selIdx === 1 ? sel.label : undefined}
253
+ >
254
+ <Select
255
+ id={sel.id}
256
+ name={sel.name}
257
+ label={sel.label}
258
+ items={sel.options.map((opt) => ({
259
+ value: opt.value,
260
+ text: opt.label,
261
+ disabled: opt.disabled,
262
+ }))}
263
+ value={sel.value}
264
+ fullWidth={sel.fullWidth}
265
+ labelIsPageHeading={false}
266
+ />
267
+ </div>
268
+ {/each}
269
+ {:else if section.type === "checkboxes"}
270
+ {@const checkboxData = section}
241
271
  <div
242
- class={`govuk-form-group gem-c-select ${selIdx === 1 ? "js-required" : ""}`}
243
- style={selIdx === 1 ? "display: block;" : undefined}
244
- data-ga4-section={selIdx === 1 ? sel.label : undefined}
272
+ id={`checkboxes-${checkboxData.id}`}
273
+ data-module="gem-checkboxes govuk-checkboxes"
274
+ class="gem-c-checkboxes govuk-form-group govuk-checkboxes--small"
245
275
  >
246
- <Select
247
- id={sel.id}
248
- name={sel.name}
249
- label={sel.label}
250
- items={sel.options.map((opt) => ({
251
- value: opt.value,
252
- text: opt.label,
253
- disabled: opt.disabled,
254
- }))}
255
- value={sel.value}
256
- fullWidth={sel.fullWidth}
257
- labelIsPageHeading={false}
276
+ <CheckBox
277
+ name={checkboxData.name}
278
+ legend={checkboxData.legend}
279
+ legendSize="m"
280
+ isPageHeading={false}
281
+ options={checkboxData.options.map((opt) => ({ ...opt }))}
282
+ selectedValues={checkboxData.selectedValues}
283
+ small={true}
258
284
  />
259
285
  </div>
260
- {/each}
261
- {:else if section.type === "checkboxes"}
262
- {@const checkboxData = section}
263
- <div
264
- id={`checkboxes-${checkboxData.id}`}
265
- data-module="gem-checkboxes govuk-checkboxes"
266
- class="gem-c-checkboxes govuk-form-group govuk-checkboxes--small"
267
- >
268
- <CheckBox
269
- name={checkboxData.name}
270
- legend={checkboxData.legend}
271
- legendSize="m"
272
- isPageHeading={false}
273
- options={checkboxData.options.map((opt) => ({ ...opt }))}
274
- selectedValues={checkboxData.selectedValues}
275
- small={true}
276
- />
277
- </div>
278
- {/if}
279
- </div>
280
- </details>
281
- {/each}
282
-
283
- <div class="app-c-filter-panel__actions">
284
- <input
285
- type="submit"
286
- value={applyButtonText}
287
- class="govuk-button app-c-filter-panel__action app-c-filter-panel__action--submit"
288
- data-ga4-event={getGa4Event({
289
- text: applyButtonText,
290
- section: filterButtonText,
291
- action: "apply",
292
- index_section: 0,
293
- index_section_count: sections.length,
294
- })}
295
- data-disable-with={applyButtonText}
296
- />
286
+ {/if}
287
+ </div>
288
+ </details>
289
+ {/each}
290
+
291
+ <div class="app-c-filter-panel__actions">
292
+ <input
293
+ type="submit"
294
+ value={applyButtonText}
295
+ class="govuk-button app-c-filter-panel__action app-c-filter-panel__action--submit"
296
+ data-ga4-event={getGa4Event({
297
+ text: applyButtonText,
298
+ section: filterButtonText,
299
+ action: "apply",
300
+ index_section: 0,
301
+ index_section_count: sections.length,
302
+ })}
303
+ data-disable-with={applyButtonText}
304
+ />
305
+ </div>
297
306
  </div>
298
- </div>
299
- {/if}
300
- </div>
307
+ {/if}
308
+ </div>
309
+ {/key}
301
310
 
302
311
  <style>
303
312
  /* Test comment to see if line 1 error changes */
@@ -68,6 +68,8 @@ type $$ComponentProps = {
68
68
  filterButtonText?: string;
69
69
  applyButtonText?: string;
70
70
  ga4BaseEvent?: Record<string, any>;
71
+ filterPanelSectionsExpanded?: boolean;
72
+ filterPanelExpanded?: boolean;
71
73
  };
72
74
  declare const FilterPanel: import("svelte").Component<$$ComponentProps, {}, "">;
73
75
  type FilterPanel = ReturnType<typeof FilterPanel>;
@@ -1,56 +1,61 @@
1
1
  <script lang="ts">
2
- import homepageIllustration from "../../assets/images/homepage-illustration.svg";
2
+ import homepageIllustration from "./../../assets/images/homepage-illustration.svg";
3
3
 
4
4
  // Define component props with types and default values
5
5
  let {
6
6
  title = "Design your service using GOV.UK styles, components and patterns",
7
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
+ includeButton = true,
8
9
  buttonText = "Get started",
9
10
  buttonHref = "/get-started/",
10
11
  imageSrc = homepageIllustration,
11
12
  imageAlt = "",
12
13
  backgroundColor = "#1d70b8", // GOV.UK blue by default
14
+ textColor = "#FFFFFF",
13
15
  } = $props<{
14
16
  title?: string;
15
17
  description?: string;
18
+ includeButton?: boolean;
16
19
  buttonText?: string;
17
20
  buttonHref?: string;
18
21
  imageSrc?: string;
19
22
  imageAlt?: string;
20
23
  backgroundColor?: string;
24
+ textColor?: string;
21
25
  }>();
22
26
  </script>
23
27
 
24
28
  <div
25
29
  class="app-masthead"
26
- style="background-color: {backgroundColor}; border-bottom-color: {backgroundColor};"
30
+ style="background-color: {backgroundColor}; border-bottom-color: {backgroundColor}; --masthead-text-color: {textColor};"
27
31
  >
28
32
  <div class="govuk-width-container">
29
33
  <div class="govuk-grid-row">
30
34
  <div class="govuk-grid-column-two-thirds-from-desktop">
31
35
  <h1 class="govuk-heading-xl app-masthead__title">{@html title}</h1>
32
36
  <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"
37
+ {#if includeButton === true}
38
+ <a
39
+ href={buttonHref}
40
+ role="button"
41
+ draggable="false"
42
+ class="govuk-button govuk-button--inverse govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-button--start"
43
+ data-module="govuk-button"
50
44
  >
51
- <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path>
52
- </svg>
53
- </a>
45
+ {buttonText}
46
+ <svg
47
+ class="govuk-button__start-icon"
48
+ xmlns="http://www.w3.org/2000/svg"
49
+ width="17.5"
50
+ height="19"
51
+ viewBox="0 0 33 40"
52
+ aria-hidden="true"
53
+ focusable="false"
54
+ >
55
+ <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path>
56
+ </svg>
57
+ </a>
58
+ {/if}
54
59
  </div>
55
60
 
56
61
  <div class="govuk-grid-column-one-third-from-desktop">
@@ -247,7 +252,10 @@
247
252
 
248
253
  /* GOV.UK Typography - Scoped to our component with high specificity */
249
254
  .app-masthead .govuk-heading-xl.govuk-heading-xl {
250
- color: #ffffff; /* Override to white for masthead */
255
+ color: var(
256
+ --masthead-text-color,
257
+ #ffffff
258
+ ); /* Override to textColor prop if specified otherwise fall back to white */
251
259
  font-family: "GDS Transport", arial, sans-serif;
252
260
  font-weight: 700;
253
261
  font-size: 2rem;
@@ -264,4 +272,8 @@
264
272
  margin-bottom: 3.125rem;
265
273
  }
266
274
  }
275
+
276
+ .app-masthead__description {
277
+ color: var(--masthead-text-color);
278
+ }
267
279
  </style>
@@ -1,11 +1,13 @@
1
1
  type $$ComponentProps = {
2
2
  title?: string;
3
3
  description?: string;
4
+ includeButton?: boolean;
4
5
  buttonText?: string;
5
6
  buttonHref?: string;
6
7
  imageSrc?: string;
7
8
  imageAlt?: string;
8
9
  backgroundColor?: string;
10
+ textColor?: string;
9
11
  };
10
12
  declare const Masthead: import("svelte").Component<$$ComponentProps, {}, "">;
11
13
  type Masthead = ReturnType<typeof Masthead>;