@communitiesuk/svelte-component-library 0.1.18 → 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 +30 -6
  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 -40
  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
package/dist/index.d.ts CHANGED
@@ -29,12 +29,14 @@ export { default as Accordion } from './components/ui/Accordion.svelte';
29
29
  export { default as Button } from './components/ui/Button.svelte';
30
30
  export { default as CheckBox } from './components/ui/CheckBox.svelte';
31
31
  export { default as ContentsList } from './components/ui/ContentsList.svelte';
32
+ export { default as CookieBanner } from './components/ui/CookieBanner.svelte';
32
33
  export { default as DateInput } from './components/ui/DateInput.svelte';
33
34
  export { default as Details } from './components/ui/Details.svelte';
34
35
  export { default as FilterPanel } from './components/ui/FilterPanel.svelte';
35
36
  export { default as Masthead } from './components/ui/Masthead.svelte';
36
37
  export { default as NavigationExample } from './components/ui/NavigationExample.svelte';
37
38
  export { default as NotificationBanner } from './components/ui/NotificationBanner.svelte';
39
+ export { default as PostcodeOrAreaSearch } from './components/ui/PostcodeOrAreaSearch.svelte';
38
40
  export { default as Radios } from './components/ui/Radios.svelte';
39
41
  export { default as RelatedContent } from './components/ui/RelatedContent.svelte';
40
42
  export { default as Search } from './components/ui/Search.svelte';
package/dist/index.js CHANGED
@@ -30,12 +30,14 @@ export { default as Accordion } from './components/ui/Accordion.svelte';
30
30
  export { default as Button } from './components/ui/Button.svelte';
31
31
  export { default as CheckBox } from './components/ui/CheckBox.svelte';
32
32
  export { default as ContentsList } from './components/ui/ContentsList.svelte';
33
+ export { default as CookieBanner } from './components/ui/CookieBanner.svelte';
33
34
  export { default as DateInput } from './components/ui/DateInput.svelte';
34
35
  export { default as Details } from './components/ui/Details.svelte';
35
36
  export { default as FilterPanel } from './components/ui/FilterPanel.svelte';
36
37
  export { default as Masthead } from './components/ui/Masthead.svelte';
37
38
  export { default as NavigationExample } from './components/ui/NavigationExample.svelte';
38
39
  export { default as NotificationBanner } from './components/ui/NotificationBanner.svelte';
40
+ export { default as PostcodeOrAreaSearch } from './components/ui/PostcodeOrAreaSearch.svelte';
39
41
  export { default as Radios } from './components/ui/Radios.svelte';
40
42
  export { default as RelatedContent } from './components/ui/RelatedContent.svelte';
41
43
  export { default as Search } from './components/ui/Search.svelte';
@@ -34,39 +34,6 @@
34
34
  </div>
35
35
  {/if}
36
36
 
37
- {#if connectedComponentsArray}
38
- {#each connectedComponentsArray as connectedComponents}
39
- {#if (!homepage || connectedComponents?.visibleOnHomepage) && connectedComponents.arr.length > 0}
40
- <DividerLine></DividerLine>
41
- <!-- CSS Grid layout for label:content pairs with constrained second column -->
42
- <div
43
- data-role="component-information-detail-grid-container"
44
- class="grid grid-cols-[auto,minmax(0,1fr)] gap-2 items-baseline"
45
- >
46
- <dt>{connectedComponents.label}:</dt>
47
- <dd>
48
- <!-- flex-wrap allows items to wrap to new lines -->
49
- <ul class="flex flex-row flex-wrap gap-4 gap-y-2">
50
- {#each connectedComponents.arr as child}
51
- <li>
52
- <a
53
- class="link-to-other-page"
54
- href="/components-update/{child.folder}/{textStringConversion(
55
- child.name,
56
- 'kebab',
57
- )}"
58
- >
59
- {child.name}
60
- </a>
61
- </li>
62
- {/each}
63
- </ul>
64
- </dd>
65
- </div>
66
- {/if}
67
- {/each}
68
- {/if}
69
-
70
37
  <style>
71
38
  /* Constrain all grid containers and their content to prevent overflow */
72
39
  [data-role="component-information-detail-grid-container"] {
@@ -39,13 +39,6 @@
39
39
  {/each}
40
40
  </div>
41
41
  </TabItem>
42
- <TabItem
43
- open={false}
44
- title={"Container width"}
45
- defaultClass="text-lg"
46
- ><ScreenSizeRadioUpdated bind:demoScreenWidth
47
- ></ScreenSizeRadioUpdated>
48
- </TabItem>
49
42
  </div>
50
43
  <DoubleChevronButton
51
44
  bind:open={sideBarOpen}
@@ -0,0 +1,435 @@
1
+ export declare const geoNames: {
2
+ W04: {
3
+ label: string;
4
+ plural: string;
5
+ childGroup: boolean;
6
+ };
7
+ E06: {
8
+ label: string;
9
+ plural: string;
10
+ };
11
+ W06: {
12
+ label: string;
13
+ plural: string;
14
+ childGroup: boolean;
15
+ };
16
+ E07: {
17
+ label: string;
18
+ plural: string;
19
+ childGroup: boolean;
20
+ };
21
+ E08: {
22
+ label: string;
23
+ plural: string;
24
+ };
25
+ E09: {
26
+ label: string;
27
+ plural: string;
28
+ childGroup: boolean;
29
+ };
30
+ E10: {
31
+ label: string;
32
+ plural: string;
33
+ };
34
+ E11: {
35
+ label: string;
36
+ plural: string;
37
+ };
38
+ S12: {
39
+ label: string;
40
+ plural: string;
41
+ childGroup: boolean;
42
+ };
43
+ N09: {
44
+ label: string;
45
+ plural: string;
46
+ childGroup: boolean;
47
+ };
48
+ };
49
+ export declare const sources: ({
50
+ id: string;
51
+ type: string;
52
+ url?: undefined;
53
+ layer?: undefined;
54
+ minzoom?: undefined;
55
+ } | {
56
+ id: string;
57
+ type: string;
58
+ url: string;
59
+ layer: string;
60
+ minzoom: number;
61
+ } | {
62
+ id: string;
63
+ type: string;
64
+ url: string;
65
+ layer: string;
66
+ minzoom?: undefined;
67
+ })[];
68
+ export declare const geoTypes: ({
69
+ key: string;
70
+ codes: string[];
71
+ source: string;
72
+ label: string;
73
+ plural: string;
74
+ index: boolean;
75
+ alt?: undefined;
76
+ pcio?: undefined;
77
+ ess?: undefined;
78
+ filter?: undefined;
79
+ } | {
80
+ key: string;
81
+ alt: string;
82
+ codes: string[];
83
+ pcio: string;
84
+ label: string;
85
+ plural: string;
86
+ source: string;
87
+ index: boolean;
88
+ ess: boolean;
89
+ filter?: undefined;
90
+ } | {
91
+ key: string;
92
+ alt: string;
93
+ codes: string[];
94
+ label: string;
95
+ plural: string;
96
+ source: string;
97
+ filter: any[];
98
+ index: boolean;
99
+ ess: boolean;
100
+ pcio?: undefined;
101
+ } | {
102
+ key: string;
103
+ alt: string;
104
+ codes: string[];
105
+ pcio: string;
106
+ label: string;
107
+ plural: string;
108
+ source: string;
109
+ filter: any[];
110
+ index: boolean;
111
+ ess: boolean;
112
+ } | {
113
+ key: string;
114
+ codes: string[];
115
+ pcio: string;
116
+ label: string;
117
+ plural: string;
118
+ source: string;
119
+ index: boolean;
120
+ alt?: undefined;
121
+ ess?: undefined;
122
+ filter?: undefined;
123
+ } | {
124
+ key: string;
125
+ codes: string[];
126
+ pcio: string;
127
+ label: string;
128
+ plural: string;
129
+ source: string;
130
+ index?: undefined;
131
+ alt?: undefined;
132
+ ess?: undefined;
133
+ filter?: undefined;
134
+ } | {
135
+ key: string;
136
+ codes: string[];
137
+ label: string;
138
+ plural: string;
139
+ source: string;
140
+ index?: undefined;
141
+ alt?: undefined;
142
+ pcio?: undefined;
143
+ ess?: undefined;
144
+ filter?: undefined;
145
+ })[];
146
+ export declare const geoTypeMap: {};
147
+ export declare const oldGeoCodesLookup: {
148
+ E06000048: string;
149
+ E08000020: string;
150
+ E07000097: string;
151
+ E07000100: string;
152
+ E07000101: string;
153
+ E07000104: string;
154
+ };
155
+ export declare const noIndex: string[];
156
+ export declare const essGeocodes: string[];
157
+ export declare const mapSources: ({
158
+ layers: ({
159
+ key: string;
160
+ codes: string[];
161
+ source: string;
162
+ label: string;
163
+ plural: string;
164
+ index: boolean;
165
+ alt?: undefined;
166
+ pcio?: undefined;
167
+ ess?: undefined;
168
+ filter?: undefined;
169
+ } | {
170
+ key: string;
171
+ alt: string;
172
+ codes: string[];
173
+ pcio: string;
174
+ label: string;
175
+ plural: string;
176
+ source: string;
177
+ index: boolean;
178
+ ess: boolean;
179
+ filter?: undefined;
180
+ } | {
181
+ key: string;
182
+ alt: string;
183
+ codes: string[];
184
+ label: string;
185
+ plural: string;
186
+ source: string;
187
+ filter: any[];
188
+ index: boolean;
189
+ ess: boolean;
190
+ pcio?: undefined;
191
+ } | {
192
+ key: string;
193
+ alt: string;
194
+ codes: string[];
195
+ pcio: string;
196
+ label: string;
197
+ plural: string;
198
+ source: string;
199
+ filter: any[];
200
+ index: boolean;
201
+ ess: boolean;
202
+ } | {
203
+ key: string;
204
+ codes: string[];
205
+ pcio: string;
206
+ label: string;
207
+ plural: string;
208
+ source: string;
209
+ index: boolean;
210
+ alt?: undefined;
211
+ ess?: undefined;
212
+ filter?: undefined;
213
+ } | {
214
+ key: string;
215
+ codes: string[];
216
+ pcio: string;
217
+ label: string;
218
+ plural: string;
219
+ source: string;
220
+ index?: undefined;
221
+ alt?: undefined;
222
+ ess?: undefined;
223
+ filter?: undefined;
224
+ } | {
225
+ key: string;
226
+ codes: string[];
227
+ label: string;
228
+ plural: string;
229
+ source: string;
230
+ index?: undefined;
231
+ alt?: undefined;
232
+ pcio?: undefined;
233
+ ess?: undefined;
234
+ filter?: undefined;
235
+ })[];
236
+ id: string;
237
+ type: string;
238
+ url?: undefined;
239
+ layer?: undefined;
240
+ minzoom?: undefined;
241
+ } | {
242
+ layers: ({
243
+ key: string;
244
+ codes: string[];
245
+ source: string;
246
+ label: string;
247
+ plural: string;
248
+ index: boolean;
249
+ alt?: undefined;
250
+ pcio?: undefined;
251
+ ess?: undefined;
252
+ filter?: undefined;
253
+ } | {
254
+ key: string;
255
+ alt: string;
256
+ codes: string[];
257
+ pcio: string;
258
+ label: string;
259
+ plural: string;
260
+ source: string;
261
+ index: boolean;
262
+ ess: boolean;
263
+ filter?: undefined;
264
+ } | {
265
+ key: string;
266
+ alt: string;
267
+ codes: string[];
268
+ label: string;
269
+ plural: string;
270
+ source: string;
271
+ filter: any[];
272
+ index: boolean;
273
+ ess: boolean;
274
+ pcio?: undefined;
275
+ } | {
276
+ key: string;
277
+ alt: string;
278
+ codes: string[];
279
+ pcio: string;
280
+ label: string;
281
+ plural: string;
282
+ source: string;
283
+ filter: any[];
284
+ index: boolean;
285
+ ess: boolean;
286
+ } | {
287
+ key: string;
288
+ codes: string[];
289
+ pcio: string;
290
+ label: string;
291
+ plural: string;
292
+ source: string;
293
+ index: boolean;
294
+ alt?: undefined;
295
+ ess?: undefined;
296
+ filter?: undefined;
297
+ } | {
298
+ key: string;
299
+ codes: string[];
300
+ pcio: string;
301
+ label: string;
302
+ plural: string;
303
+ source: string;
304
+ index?: undefined;
305
+ alt?: undefined;
306
+ ess?: undefined;
307
+ filter?: undefined;
308
+ } | {
309
+ key: string;
310
+ codes: string[];
311
+ label: string;
312
+ plural: string;
313
+ source: string;
314
+ index?: undefined;
315
+ alt?: undefined;
316
+ pcio?: undefined;
317
+ ess?: undefined;
318
+ filter?: undefined;
319
+ })[];
320
+ id: string;
321
+ type: string;
322
+ url: string;
323
+ layer: string;
324
+ minzoom: number;
325
+ } | {
326
+ layers: ({
327
+ key: string;
328
+ codes: string[];
329
+ source: string;
330
+ label: string;
331
+ plural: string;
332
+ index: boolean;
333
+ alt?: undefined;
334
+ pcio?: undefined;
335
+ ess?: undefined;
336
+ filter?: undefined;
337
+ } | {
338
+ key: string;
339
+ alt: string;
340
+ codes: string[];
341
+ pcio: string;
342
+ label: string;
343
+ plural: string;
344
+ source: string;
345
+ index: boolean;
346
+ ess: boolean;
347
+ filter?: undefined;
348
+ } | {
349
+ key: string;
350
+ alt: string;
351
+ codes: string[];
352
+ label: string;
353
+ plural: string;
354
+ source: string;
355
+ filter: any[];
356
+ index: boolean;
357
+ ess: boolean;
358
+ pcio?: undefined;
359
+ } | {
360
+ key: string;
361
+ alt: string;
362
+ codes: string[];
363
+ pcio: string;
364
+ label: string;
365
+ plural: string;
366
+ source: string;
367
+ filter: any[];
368
+ index: boolean;
369
+ ess: boolean;
370
+ } | {
371
+ key: string;
372
+ codes: string[];
373
+ pcio: string;
374
+ label: string;
375
+ plural: string;
376
+ source: string;
377
+ index: boolean;
378
+ alt?: undefined;
379
+ ess?: undefined;
380
+ filter?: undefined;
381
+ } | {
382
+ key: string;
383
+ codes: string[];
384
+ pcio: string;
385
+ label: string;
386
+ plural: string;
387
+ source: string;
388
+ index?: undefined;
389
+ alt?: undefined;
390
+ ess?: undefined;
391
+ filter?: undefined;
392
+ } | {
393
+ key: string;
394
+ codes: string[];
395
+ label: string;
396
+ plural: string;
397
+ source: string;
398
+ index?: undefined;
399
+ alt?: undefined;
400
+ pcio?: undefined;
401
+ ess?: undefined;
402
+ filter?: undefined;
403
+ })[];
404
+ id: string;
405
+ type: string;
406
+ url: string;
407
+ layer: string;
408
+ minzoom?: undefined;
409
+ })[];
410
+ export declare const geoCodesLookup: {};
411
+ export declare const geoTypesLookup: {};
412
+ export declare const countryLookup: {
413
+ E92000001: string;
414
+ N92000002: string;
415
+ S92000003: string;
416
+ W92000004: string;
417
+ };
418
+ export declare const regionLookup: {
419
+ E92000001: string;
420
+ N92000002: string;
421
+ S92000003: string;
422
+ W92000004: string;
423
+ E12000001: string;
424
+ E12000002: string;
425
+ E12000003: string;
426
+ E12000004: string;
427
+ E12000005: string;
428
+ E12000006: string;
429
+ E12000007: string;
430
+ E12000008: string;
431
+ E12000009: string;
432
+ };
433
+ export declare const regionReverseLookup: {
434
+ [key: string]: string;
435
+ };