@onsvisual/svelte-components 1.1.34 → 1.1.36
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/dist/components/Accordion/AccordionItem.svelte +11 -1
- package/dist/components/Accordion/AccordionItem.svelte.d.ts +2 -0
- package/dist/components/Button/Button.svelte +6 -0
- package/dist/components/Button/Button.svelte.d.ts +2 -0
- package/dist/components/Footer/Footer.svelte +1 -1
- package/dist/components/Header/HeaderNav.svelte +94 -94
- package/dist/components/Input/Input.svelte +7 -0
- package/dist/components/Input/Input.svelte.d.ts +2 -0
- package/package.json +1 -1
|
@@ -17,11 +17,21 @@
|
|
|
17
17
|
* @type {"h2"|"h3"}
|
|
18
18
|
*/
|
|
19
19
|
export let headingTag = "h2";
|
|
20
|
+
/**
|
|
21
|
+
* Set the initial status of the accordion item to open (non-reactive)
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
*/
|
|
24
|
+
export let open = false;
|
|
20
25
|
|
|
21
26
|
const dataGroup = getContext("dataGroup");
|
|
22
27
|
</script>
|
|
23
28
|
|
|
24
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
{id}
|
|
31
|
+
class="ons-details ons-js-details ons-details--accordion"
|
|
32
|
+
data-group={dataGroup}
|
|
33
|
+
data-open={open}
|
|
34
|
+
>
|
|
25
35
|
<div class="ons-details__heading ons-js-details-heading" role="button">
|
|
26
36
|
{#if headingTag === "h3"}
|
|
27
37
|
<h3 class="ons-details__title ons-u-fs-r--b">{title}</h3>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export default class AccordionItem extends SvelteComponentTyped<{
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
title?: string | null | undefined;
|
|
7
|
+
open?: boolean | undefined;
|
|
7
8
|
headingTag?: "h2" | "h3" | undefined;
|
|
8
9
|
}, {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -19,6 +20,7 @@ declare const __propDef: {
|
|
|
19
20
|
props: {
|
|
20
21
|
id?: string | undefined;
|
|
21
22
|
title?: string | null | undefined;
|
|
23
|
+
open?: boolean | undefined;
|
|
22
24
|
headingTag?: "h2" | "h3" | undefined;
|
|
23
25
|
};
|
|
24
26
|
events: {
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
* @type {string|null}
|
|
26
26
|
*/
|
|
27
27
|
export let download = null;
|
|
28
|
+
/**
|
|
29
|
+
* HTML "rel" attribute for hyperlinks (Eg. rel="nofollow")
|
|
30
|
+
* @type {string|null}
|
|
31
|
+
*/
|
|
32
|
+
export let rel = null;
|
|
28
33
|
/**
|
|
29
34
|
* Don't scroll when link is followed (only if href is also specified)
|
|
30
35
|
* @type {boolean}
|
|
@@ -82,6 +87,7 @@
|
|
|
82
87
|
href={!disabled ? href : null}
|
|
83
88
|
role="button"
|
|
84
89
|
{download}
|
|
90
|
+
{rel}
|
|
85
91
|
class="ons-btn ons-btn--link ons-js-submit-btn {cls}"
|
|
86
92
|
class:ons-btn--small={small}
|
|
87
93
|
class:ons-btn--secondary={variant === "secondary"}
|
|
@@ -8,6 +8,7 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
8
8
|
download?: string | null | undefined;
|
|
9
9
|
type?: "button" | "reset" | "submit" | undefined;
|
|
10
10
|
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
11
|
+
rel?: string | null | undefined;
|
|
11
12
|
noScroll?: boolean | undefined;
|
|
12
13
|
icon?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "delete" | "download" | "edit" | "expand" | "external" | "pin" | "print" | "save" | "saveas" | "shrink" | "signout" | "tick" | "upload" | null | undefined;
|
|
13
14
|
iconPosition?: "before" | "after" | undefined;
|
|
@@ -37,6 +38,7 @@ declare const __propDef: {
|
|
|
37
38
|
download?: string | null | undefined;
|
|
38
39
|
type?: "button" | "reset" | "submit" | undefined;
|
|
39
40
|
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
41
|
+
rel?: string | null | undefined;
|
|
40
42
|
noScroll?: boolean | undefined;
|
|
41
43
|
icon?: "code" | "search" | "copy" | "arrow" | "carret" | "chevron" | "cog" | "cross" | "delete" | "download" | "edit" | "expand" | "external" | "pin" | "print" | "save" | "saveas" | "shrink" | "signout" | "tick" | "upload" | null | undefined;
|
|
42
44
|
iconPosition?: "before" | "after" | undefined;
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
</div>
|
|
107
107
|
<!-- Full footer columns -->
|
|
108
108
|
<div class="ons-grid__col ons-col-4@m ons-u-mt-l@2xs@m">
|
|
109
|
-
<h2 class="ons-footer__heading ons-u-fs-r--b">{i18n("About
|
|
109
|
+
<h2 class="ons-footer__heading ons-u-fs-r--b">{i18n("About ONS")}</h2>
|
|
110
110
|
<ul class="ons-list ons-u-mb-no ons-list--bare">
|
|
111
111
|
<li class="ons-list__item">
|
|
112
112
|
<a href="{baseurl}/aboutus" class="ons-list__link">{i18n("About us")}</a>
|
|
@@ -41,78 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
43
|
topics: [
|
|
44
|
-
{
|
|
45
|
-
label_en: "People, population and community",
|
|
46
|
-
label_cy: "Pobl, y boblogaeth a chymunedau",
|
|
47
|
-
url: "/peoplepopulationandcommunity",
|
|
48
|
-
children: [
|
|
49
|
-
{
|
|
50
|
-
label_en: "Armed forces community",
|
|
51
|
-
label_cy: "Cymuned y Lluoedd Arfog",
|
|
52
|
-
url: "/peoplepopulationandcommunity/armedforcescommunity"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label_en: "Births, deaths and marriages",
|
|
56
|
-
label_cy: "Genedigaethau, marwolaethau a phriodasau",
|
|
57
|
-
url: "/peoplepopulationandcommunity/birthsdeathsandmarriages"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label_en: "Crime and justice",
|
|
61
|
-
label_cy: "Troseddu a chyfiawnder",
|
|
62
|
-
url: "/peoplepopulationandcommunity/crimeandjustice"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label_en: "Cultural identity",
|
|
66
|
-
label_cy: "Hunaniaeth ddiwylliannol",
|
|
67
|
-
url: "/peoplepopulationandcommunity/culturalidentity"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
label_en: "Education and childcare",
|
|
71
|
-
label_cy: "Addysg a gofal plant",
|
|
72
|
-
url: "/peoplepopulationandcommunity/educationandchildcare"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label_en: "Elections",
|
|
76
|
-
label_cy: "Etholiadau",
|
|
77
|
-
url: "/peoplepopulationandcommunity/elections"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label_en: "Health and social care",
|
|
81
|
-
label_cy: "Iechyd a gofal cymdeithasol",
|
|
82
|
-
url: "/peoplepopulationandcommunity/healthandsocialcare"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label_en: "Household characteristics",
|
|
86
|
-
label_cy: "Nodweddion aelwydydd",
|
|
87
|
-
url: "/peoplepopulationandcommunity/householdcharacteristics"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
label_en: "Housing",
|
|
91
|
-
label_cy: "Tai",
|
|
92
|
-
url: "/peoplepopulationandcommunity/housing"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label_en: "Leisure and tourism",
|
|
96
|
-
label_cy: "Hamdden a thwristiaeth",
|
|
97
|
-
url: "/peoplepopulationandcommunity/leisureandtourism"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
label_en: "Personal and household finances",
|
|
101
|
-
label_cy: "Cyllid personol a chyllid aelwydydd",
|
|
102
|
-
url: "/peoplepopulationandcommunity/personalandhouseholdfinances"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
label_en: "Population and migration",
|
|
106
|
-
label_cy: "Poblogaeth ac ymfudo",
|
|
107
|
-
url: "/peoplepopulationandcommunity/populationandmigration"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label_en: "Well-being",
|
|
111
|
-
label_cy: "Lles",
|
|
112
|
-
url: "/peoplepopulationandcommunity/wellbeing"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
44
|
{
|
|
117
45
|
label_en: "Business, industry and trade",
|
|
118
46
|
label_cy: "Busnes, diwydiant a masnach",
|
|
@@ -133,16 +61,16 @@
|
|
|
133
61
|
label_cy: "Diwydiant adeiladu",
|
|
134
62
|
url: "/businessindustryandtrade/constructionindustry"
|
|
135
63
|
},
|
|
136
|
-
{
|
|
137
|
-
label_en: "International trade",
|
|
138
|
-
label_cy: "Masnach ryngwladol",
|
|
139
|
-
url: "/businessindustryandtrade/internationaltrade"
|
|
140
|
-
},
|
|
141
64
|
{
|
|
142
65
|
label_en: "IT and internet industry",
|
|
143
66
|
label_cy: "Y diwydiant TGCh a'r rhyngrwyd",
|
|
144
67
|
url: "/businessindustryandtrade/itandinternetindustry"
|
|
145
68
|
},
|
|
69
|
+
{
|
|
70
|
+
label_en: "International trade",
|
|
71
|
+
label_cy: "Masnach ryngwladol",
|
|
72
|
+
url: "/businessindustryandtrade/internationaltrade"
|
|
73
|
+
},
|
|
146
74
|
{
|
|
147
75
|
label_en: "Manufacturing and production industry",
|
|
148
76
|
label_cy: "Y diwydiant gweithgynhyrchu a chynhyrchu",
|
|
@@ -160,23 +88,6 @@
|
|
|
160
88
|
}
|
|
161
89
|
]
|
|
162
90
|
},
|
|
163
|
-
{
|
|
164
|
-
label_en: "Employment and labour market",
|
|
165
|
-
label_cy: "Cyflogaeth a'r farchnad lafur",
|
|
166
|
-
url: "/employmentandlabourmarket",
|
|
167
|
-
children: [
|
|
168
|
-
{
|
|
169
|
-
label_en: "People in work",
|
|
170
|
-
label_cy: "Pobl mewn gwaith",
|
|
171
|
-
url: "/employmentandlabourmarket/peopleinwork"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
label_en: "People not in work",
|
|
175
|
-
label_cy: "Pobl nad ydynt mewn gwaith",
|
|
176
|
-
url: "/employmentandlabourmarket/peoplenotinwork"
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
91
|
{
|
|
181
92
|
label_en: "Economy",
|
|
182
93
|
label_cy: "Yr economi",
|
|
@@ -228,6 +139,95 @@
|
|
|
228
139
|
url: "/economy/nationalaccounts"
|
|
229
140
|
}
|
|
230
141
|
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label_en: "Employment and labour market",
|
|
145
|
+
label_cy: "Cyflogaeth a'r farchnad lafur",
|
|
146
|
+
url: "/employmentandlabourmarket",
|
|
147
|
+
children: [
|
|
148
|
+
{
|
|
149
|
+
label_en: "People in work",
|
|
150
|
+
label_cy: "Pobl mewn gwaith",
|
|
151
|
+
url: "/employmentandlabourmarket/peopleinwork"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label_en: "People not in work",
|
|
155
|
+
label_cy: "Pobl nad ydynt mewn gwaith",
|
|
156
|
+
url: "/employmentandlabourmarket/peoplenotinwork"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label_en: "People, population and community",
|
|
162
|
+
label_cy: "Pobl, y boblogaeth a chymunedau",
|
|
163
|
+
url: "/peoplepopulationandcommunity",
|
|
164
|
+
children: [
|
|
165
|
+
{
|
|
166
|
+
label_en: "Armed forces community",
|
|
167
|
+
label_cy: "Cymuned y Lluoedd Arfog",
|
|
168
|
+
url: "/peoplepopulationandcommunity/armedforcescommunity"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label_en: "Births, deaths and marriages",
|
|
172
|
+
label_cy: "Genedigaethau, marwolaethau a phriodasau",
|
|
173
|
+
url: "/peoplepopulationandcommunity/birthsdeathsandmarriages"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label_en: "Crime and justice",
|
|
177
|
+
label_cy: "Troseddu a chyfiawnder",
|
|
178
|
+
url: "/peoplepopulationandcommunity/crimeandjustice"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label_en: "Cultural identity",
|
|
182
|
+
label_cy: "Hunaniaeth ddiwylliannol",
|
|
183
|
+
url: "/peoplepopulationandcommunity/culturalidentity"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
label_en: "Education and childcare",
|
|
187
|
+
label_cy: "Addysg a gofal plant",
|
|
188
|
+
url: "/peoplepopulationandcommunity/educationandchildcare"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
label_en: "Elections",
|
|
192
|
+
label_cy: "Etholiadau",
|
|
193
|
+
url: "/peoplepopulationandcommunity/elections"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label_en: "Health and social care",
|
|
197
|
+
label_cy: "Iechyd a gofal cymdeithasol",
|
|
198
|
+
url: "/peoplepopulationandcommunity/healthandsocialcare"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
label_en: "Household characteristics",
|
|
202
|
+
label_cy: "Nodweddion aelwydydd",
|
|
203
|
+
url: "/peoplepopulationandcommunity/householdcharacteristics"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
label_en: "Housing",
|
|
207
|
+
label_cy: "Tai",
|
|
208
|
+
url: "/peoplepopulationandcommunity/housing"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
label_en: "Leisure and tourism",
|
|
212
|
+
label_cy: "Hamdden a thwristiaeth",
|
|
213
|
+
url: "/peoplepopulationandcommunity/leisureandtourism"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
label_en: "Measuring progress, well-being and beyond GDP",
|
|
217
|
+
label_cy: "Lles",
|
|
218
|
+
url: "/peoplepopulationandcommunity/wellbeing"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label_en: "Personal and household finances",
|
|
222
|
+
label_cy: "Cyllid personol a chyllid aelwydydd",
|
|
223
|
+
url: "/peoplepopulationandcommunity/personalandhouseholdfinances"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
label_en: "Population and migration",
|
|
227
|
+
label_cy: "Poblogaeth ac ymfudo",
|
|
228
|
+
url: "/peoplepopulationandcommunity/populationandmigration"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
231
|
}
|
|
232
232
|
],
|
|
233
233
|
searches: [
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
export let description = null;
|
|
36
36
|
/**
|
|
37
37
|
* The maximum number of characters that can be entered (optional)
|
|
38
|
+
* @type {string|null}
|
|
39
|
+
*/
|
|
40
|
+
export let placeholder = null;
|
|
41
|
+
/**
|
|
42
|
+
* A placeholder text for the input (optional)
|
|
38
43
|
* @type {number|null}
|
|
39
44
|
*/
|
|
40
45
|
export let charLimit = null;
|
|
@@ -115,6 +120,7 @@
|
|
|
115
120
|
{id}
|
|
116
121
|
{name}
|
|
117
122
|
bind:value
|
|
123
|
+
{placeholder}
|
|
118
124
|
maxlength={charLimit}
|
|
119
125
|
pattern={pattern ? pattern : numeric ? "[0-9]*" : null}
|
|
120
126
|
inputmode={numeric ? "numeric" : null}
|
|
@@ -146,6 +152,7 @@
|
|
|
146
152
|
{id}
|
|
147
153
|
{name}
|
|
148
154
|
bind:value
|
|
155
|
+
{placeholder}
|
|
149
156
|
pattern={pattern ? pattern : numeric ? "[0-9]*" : null}
|
|
150
157
|
inputmode={numeric ? "numeric" : null}
|
|
151
158
|
class="ons-input ons-input--text ons-input-type__input {Number.isInteger(width)
|
|
@@ -14,6 +14,7 @@ export default class Input extends SvelteComponentTyped<{
|
|
|
14
14
|
hideLabel?: boolean | undefined;
|
|
15
15
|
description?: string | null | undefined;
|
|
16
16
|
value?: string | null | undefined;
|
|
17
|
+
placeholder?: string | null | undefined;
|
|
17
18
|
charLimit?: number | null | undefined;
|
|
18
19
|
prefix?: string | null | undefined;
|
|
19
20
|
suffix?: string | null | undefined;
|
|
@@ -45,6 +46,7 @@ declare const __propDef: {
|
|
|
45
46
|
hideLabel?: boolean | undefined;
|
|
46
47
|
description?: string | null | undefined;
|
|
47
48
|
value?: string | null | undefined;
|
|
49
|
+
placeholder?: string | null | undefined;
|
|
48
50
|
charLimit?: number | null | undefined;
|
|
49
51
|
prefix?: string | null | undefined;
|
|
50
52
|
suffix?: string | null | undefined;
|