@communitiesuk/svelte-component-library 0.1.19-beta.3 → 0.1.19-beta.33
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.
- package/README.md +7 -0
- package/dist/components/content/Tag.svelte +32 -0
- package/dist/components/content/Tag.svelte.d.ts +13 -0
- package/dist/components/data-vis/Histogram.svelte +302 -0
- package/dist/components/data-vis/Histogram.svelte.d.ts +75 -0
- package/dist/components/data-vis/axis/Axis.svelte +217 -34
- package/dist/components/data-vis/axis/Axis.svelte.d.ts +38 -30
- package/dist/components/data-vis/axis/Ticks.svelte +142 -78
- package/dist/components/data-vis/axis/Ticks.svelte.d.ts +28 -31
- package/dist/components/data-vis/line-chart/LineChart.svelte +51 -21
- package/dist/components/data-vis/line-chart/LineChart.svelte.d.ts +14 -6
- package/dist/components/data-vis/line-chart/ValueLabel.svelte +2 -1
- package/dist/components/data-vis/line-chart/ValueLabel.svelte.d.ts +2 -0
- package/dist/components/data-vis/position-chart/PositionChart.svelte +278 -122
- package/dist/components/data-vis/position-chart/PositionChart.svelte.d.ts +37 -5
- package/dist/components/data-vis/position-chart/PositionChartAxis.svelte +59 -48
- package/dist/components/data-vis/position-chart/PositionChartAxis.svelte.d.ts +4 -4
- package/dist/components/layout/Footer.svelte +9 -0
- package/dist/components/layout/Footer.svelte.d.ts +1 -0
- package/dist/components/layout/PhaseBanner.svelte +10 -1
- package/dist/components/layout/PhaseBanner.svelte.d.ts +1 -0
- package/dist/components/layout/ServiceNavigation.svelte +19 -1
- package/dist/components/layout/ServiceNavigation.svelte.d.ts +2 -0
- package/dist/components/ui/BasicMultiSelect.svelte +716 -0
- package/dist/components/ui/BasicMultiSelect.svelte.d.ts +18 -0
- package/dist/components/ui/Button.svelte +1 -0
- package/dist/components/ui/Card.svelte +48 -60
- package/dist/components/ui/Card.svelte.d.ts +26 -12
- package/dist/components/ui/CardHeader.svelte +46 -0
- package/dist/components/ui/CardHeader.svelte.d.ts +21 -0
- package/dist/components/ui/ChartExporter.svelte +142 -0
- package/dist/components/ui/ChartExporter.svelte.d.ts +16 -0
- package/dist/components/ui/CheckBox.svelte +1 -0
- package/dist/components/ui/Details.svelte +47 -8
- package/dist/components/ui/Details.svelte.d.ts +8 -10
- package/dist/components/ui/Masthead.svelte +44 -6
- package/dist/components/ui/Masthead.svelte.d.ts +6 -0
- package/dist/components/ui/RelatedContent.svelte +4 -1
- package/dist/components/ui/RelatedContent.svelte.d.ts +1 -0
- package/dist/components/ui/SearchAutocomplete.svelte +69 -44
- package/dist/components/ui/SearchAutocomplete.svelte.d.ts +1 -0
- package/dist/components/ui/Select.svelte +18 -7
- package/dist/components/ui/Tabs.svelte +192 -18
- package/dist/components/ui/Tabs.svelte.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/package.json +4 -1
|
@@ -1,70 +1,81 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
let {
|
|
2
|
+
let { textSize = "s", axisLabels = ["Left", "Right"] } = $props();
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<div class="axis
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
<div class="axis govuk-body-{textSize}">
|
|
6
|
+
<div class="left-label">
|
|
7
|
+
<div class="arrow-container">
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
width="18"
|
|
11
|
+
height="16"
|
|
12
|
+
viewBox="0 0 18 16"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M8 1L1 8L8 15M1 8H17"
|
|
16
|
+
stroke="darkgrey"
|
|
17
|
+
stroke-width="2"
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke-linecap="round"
|
|
20
|
+
stroke-linejoin="round"
|
|
21
|
+
></path>
|
|
22
|
+
</svg>
|
|
23
|
+
</div>
|
|
24
|
+
<span class="axis-text">{axisLabels[0]}</span>
|
|
20
25
|
</div>
|
|
21
|
-
<div class="
|
|
22
|
-
<span
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
<div class="right-label">
|
|
27
|
+
<span class="axis-text">{axisLabels[1]}</span>
|
|
28
|
+
<div class="arrow-container">
|
|
29
|
+
<svg
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
width="18"
|
|
32
|
+
height="16"
|
|
33
|
+
viewBox="0 0 18 16"
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M10 1L17 8L10 15M17 8H1"
|
|
37
|
+
stroke="darkgrey"
|
|
38
|
+
stroke-width="2"
|
|
39
|
+
fill="none"
|
|
40
|
+
stroke-linecap="round"
|
|
41
|
+
stroke-linejoin="round"
|
|
42
|
+
></path>
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|
|
35
45
|
</div>
|
|
36
46
|
</div>
|
|
37
47
|
|
|
38
48
|
<style>
|
|
49
|
+
svg {
|
|
50
|
+
overflow: visible;
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
.axis {
|
|
40
54
|
display: flex;
|
|
41
55
|
justify-content: space-between;
|
|
42
|
-
|
|
43
|
-
padding: 0 var(--axis-padding);
|
|
56
|
+
margin-bottom: 0;
|
|
44
57
|
}
|
|
45
58
|
|
|
46
|
-
.
|
|
47
|
-
.
|
|
59
|
+
.left-label,
|
|
60
|
+
.right-label {
|
|
48
61
|
display: flex;
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
gap: 4px;
|
|
63
|
+
max-width: 120px;
|
|
51
64
|
}
|
|
52
65
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
container-type: inline-size;
|
|
66
|
+
.right-label {
|
|
67
|
+
text-align: end;
|
|
56
68
|
}
|
|
57
69
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
.axis-text {
|
|
71
|
+
font-family: "GDS Transport";
|
|
72
|
+
line-height: 0.9;
|
|
73
|
+
color: #666666;
|
|
74
|
+
font-style: italic;
|
|
63
75
|
}
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
77
|
+
.arrow-container {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
69
80
|
}
|
|
70
81
|
</style>
|
|
@@ -4,10 +4,10 @@ type PositionChartAxis = {
|
|
|
4
4
|
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
5
|
};
|
|
6
6
|
declare const PositionChartAxis: import("svelte").Component<{
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
textSize?: string;
|
|
8
|
+
axisLabels?: any[];
|
|
9
9
|
}, {}, "">;
|
|
10
10
|
type $$ComponentProps = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
textSize?: string;
|
|
12
|
+
axisLabels?: any[];
|
|
13
13
|
};
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
copyrightHref = "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
|
|
52
52
|
rebrand = true,
|
|
53
53
|
borderTopColor = "#00625E",
|
|
54
|
+
removeCopyrightPadding = false,
|
|
54
55
|
} = $props<{
|
|
55
56
|
sections?: FooterSection[];
|
|
56
57
|
inlineLinks?: FooterItem[];
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
copyrightHref?: string;
|
|
69
70
|
rebrand?: boolean;
|
|
70
71
|
borderTopColor?: string;
|
|
72
|
+
removeCopyrightPadding?: boolean;
|
|
71
73
|
}>();
|
|
72
74
|
</script>
|
|
73
75
|
|
|
@@ -218,6 +220,7 @@
|
|
|
218
220
|
<a
|
|
219
221
|
class={[
|
|
220
222
|
"govuk-footer__link",
|
|
223
|
+
{ "no-copyright-padding": removeCopyrightPadding },
|
|
221
224
|
{
|
|
222
225
|
"govuk-footer__copyright-logo": !copyrightLogoUrl && rebrand,
|
|
223
226
|
},
|
|
@@ -234,3 +237,9 @@
|
|
|
234
237
|
</div>
|
|
235
238
|
</div>
|
|
236
239
|
</footer>
|
|
240
|
+
|
|
241
|
+
<style>
|
|
242
|
+
.no-copyright-padding {
|
|
243
|
+
padding: 0;
|
|
244
|
+
}
|
|
245
|
+
</style>
|
|
@@ -27,6 +27,7 @@ type $$ComponentProps = {
|
|
|
27
27
|
copyrightHref?: string;
|
|
28
28
|
rebrand?: boolean;
|
|
29
29
|
borderTopColor?: string;
|
|
30
|
+
removeCopyrightPadding?: boolean;
|
|
30
31
|
};
|
|
31
32
|
declare const Footer: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
32
33
|
type Footer = ReturnType<typeof Footer>;
|
|
@@ -5,15 +5,21 @@
|
|
|
5
5
|
bannerText = "This is a new service. Help us improve it and ",
|
|
6
6
|
linkText = "give your feedback by email",
|
|
7
7
|
linkHref = "#",
|
|
8
|
+
bottomBorder = true,
|
|
8
9
|
} = $props<{
|
|
9
10
|
tagText?: string;
|
|
10
11
|
bannerText?: string;
|
|
11
12
|
linkText?: string;
|
|
12
13
|
linkHref?: string;
|
|
14
|
+
bottomBorder?: boolean;
|
|
13
15
|
}>();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
|
-
<div
|
|
18
|
+
<div
|
|
19
|
+
class="govuk-phase-banner govuk-width-container {bottomBorder
|
|
20
|
+
? ''
|
|
21
|
+
: 'no-bottom-border'}"
|
|
22
|
+
>
|
|
17
23
|
<p class="govuk-phase-banner__content">
|
|
18
24
|
<strong class="govuk-tag govuk-phase-banner__content__tag">
|
|
19
25
|
{tagText}
|
|
@@ -25,4 +31,7 @@
|
|
|
25
31
|
</div>
|
|
26
32
|
|
|
27
33
|
<style>
|
|
34
|
+
.no-bottom-border {
|
|
35
|
+
border-bottom: none;
|
|
36
|
+
}
|
|
28
37
|
</style>
|
|
@@ -17,11 +17,15 @@ Use the component with or without navigation items based on your needs. -->
|
|
|
17
17
|
serviceUrl = "#",
|
|
18
18
|
navigationItems = undefined,
|
|
19
19
|
collapseOnDesktop = false,
|
|
20
|
+
customiseServiceNameLink = false,
|
|
21
|
+
serviceNameLinkStyle = "govuk-link no-underline",
|
|
20
22
|
} = $props<{
|
|
21
23
|
serviceName?: string;
|
|
22
24
|
serviceUrl?: string;
|
|
23
25
|
navigationItems?: NavigationItem[];
|
|
24
26
|
collapseOnDesktop?: boolean;
|
|
27
|
+
customiseServiceNameLink?: boolean;
|
|
28
|
+
serviceNameLinkStyle?: string;
|
|
25
29
|
}>();
|
|
26
30
|
|
|
27
31
|
// Reactive state declarations
|
|
@@ -94,7 +98,12 @@ Use the component with or without navigation items based on your needs. -->
|
|
|
94
98
|
<div class="govuk-width-container">
|
|
95
99
|
<div class="govuk-service-navigation__container">
|
|
96
100
|
<span class="govuk-service-navigation__service-name">
|
|
97
|
-
<a
|
|
101
|
+
<a
|
|
102
|
+
href={serviceUrl}
|
|
103
|
+
class={customiseServiceNameLink
|
|
104
|
+
? serviceNameLinkStyle
|
|
105
|
+
: "govuk-service-navigation__link"}
|
|
106
|
+
>
|
|
98
107
|
{serviceName}
|
|
99
108
|
</a>
|
|
100
109
|
</span>
|
|
@@ -145,3 +154,12 @@ Use the component with or without navigation items based on your needs. -->
|
|
|
145
154
|
</div>
|
|
146
155
|
</div>
|
|
147
156
|
</section>
|
|
157
|
+
|
|
158
|
+
<style>
|
|
159
|
+
.no-underline {
|
|
160
|
+
text-decoration: none;
|
|
161
|
+
}
|
|
162
|
+
.no-underline:hover {
|
|
163
|
+
text-decoration: underline;
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -8,6 +8,8 @@ type $$ComponentProps = {
|
|
|
8
8
|
serviceUrl?: string;
|
|
9
9
|
navigationItems?: NavigationItem[];
|
|
10
10
|
collapseOnDesktop?: boolean;
|
|
11
|
+
customiseServiceNameLink?: boolean;
|
|
12
|
+
serviceNameLinkStyle?: string;
|
|
11
13
|
};
|
|
12
14
|
declare const ServiceNavigation: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
15
|
type ServiceNavigation = ReturnType<typeof ServiceNavigation>;
|