@onsvisual/svelte-components 0.1.76 → 0.1.79
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.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} RelatedContentProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} RelatedContentEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} RelatedContentSlots */
|
|
4
|
+
export default class RelatedContent extends SvelteComponentTyped<{
|
|
5
|
+
title?: string;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type RelatedContentProps = typeof __propDef.props;
|
|
11
|
+
export type RelatedContentEvents = typeof __propDef.events;
|
|
12
|
+
export type RelatedContentSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
title?: string;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
* @type {function}
|
|
113
113
|
*/
|
|
114
114
|
export let itemFilter = (label, filterText, option) =>
|
|
115
|
-
label.match(new RegExp(`\\b${filterText}`, "i")) &&
|
|
115
|
+
label.match(new RegExp(`\\b${filterText.replace(/[^\w\s]/gi, "")}`, "i")) &&
|
|
116
116
|
!(multiple && value?.length >= maxSelected) &&
|
|
117
117
|
!(mode === "search" && filterText?.length < 3);
|
|
118
118
|
/**
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
>
|
|
176
176
|
<div slot="item" let:item>
|
|
177
177
|
{@html item[labelKey].replace(
|
|
178
|
-
new RegExp(`\\b${filterText}`, "i"),
|
|
178
|
+
new RegExp(`\\b${filterText.replace(/[^\w\s]/gi, "")}`, "i"),
|
|
179
179
|
(str) => `<b>${str}</b>`
|
|
180
180
|
)}
|
|
181
181
|
{#if groupKey && !clusterByGroup}<span class="item-group">{item[groupKey]}</span>{/if}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* H2 title
|
|
4
|
+
* @type {string}
|
|
5
|
+
*/
|
|
6
|
+
export let title = "Help with the census";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<aside class="ons-related-content" aria-label="Related content">
|
|
10
|
+
<div class="ons-related-content__section">
|
|
11
|
+
<h2
|
|
12
|
+
class="ons-related-content__title ons-u-fs-r--b ons-u-mb-xs"
|
|
13
|
+
id="related-help-with-the-census"
|
|
14
|
+
>
|
|
15
|
+
{title}
|
|
16
|
+
</h2>
|
|
17
|
+
<div class="ons-related-content__content">
|
|
18
|
+
<nav class="ons-related-content__navigation" aria-labelledby="related-help-with-the-census">
|
|
19
|
+
<ul class="ons-list ons-list--bare">
|
|
20
|
+
<li class="ons-list__item">
|
|
21
|
+
<a href="#0" class="ons-list__link">I’m moving house</a>
|
|
22
|
+
</li>
|
|
23
|
+
<li class="ons-list__item">
|
|
24
|
+
<a href="#0" class="ons-list__link">What if I’m away or abroad on Census Day?</a>
|
|
25
|
+
</li>
|
|
26
|
+
<li class="ons-list__item">
|
|
27
|
+
<a href="#0" class="ons-list__link">Get an access code or paper census</a>
|
|
28
|
+
</li>
|
|
29
|
+
<li class="ons-list__item">
|
|
30
|
+
<a href="#0" class="ons-list__link">Find a census support centre</a>
|
|
31
|
+
</li>
|
|
32
|
+
<li class="ons-list__item">
|
|
33
|
+
<a href="#0" class="ons-list__link">Languages</a>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="ons-list__item">
|
|
36
|
+
<a href="#0" class="ons-list__link">Accessibility</a>
|
|
37
|
+
</li>
|
|
38
|
+
</ul>
|
|
39
|
+
</nav>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="ons-related-content__section">
|
|
43
|
+
<h2 class="ons-related-content__title ons-u-fs-r--b ons-u-mb-xs" id="related-content">
|
|
44
|
+
Related content
|
|
45
|
+
</h2>
|
|
46
|
+
<div class="ons-related-content__content">
|
|
47
|
+
<nav class="ons-related-content__navigation" aria-labelledby="related-content">
|
|
48
|
+
<ul class="ons-list ons-list--bare">
|
|
49
|
+
<li class="ons-list__item">
|
|
50
|
+
<a href="#0" class="ons-list__link">How we will contact or visit you</a>
|
|
51
|
+
</li>
|
|
52
|
+
<li class="ons-list__item">
|
|
53
|
+
<a href="#0" class="ons-list__link">Media enquiries</a>
|
|
54
|
+
</li>
|
|
55
|
+
</ul>
|
|
56
|
+
</nav>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</aside>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onsvisual/svelte-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://onsvisual.github.io/svelte-components",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"eslint-plugin-storybook": "^0.6.12",
|
|
69
69
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
70
70
|
"fs-extra": "^11.1.1",
|
|
71
|
-
"gh-pages": "^6.
|
|
71
|
+
"gh-pages": "^6.2.0",
|
|
72
72
|
"kleur": "^4.1.5",
|
|
73
73
|
"npm-run-all": "^4.1.5",
|
|
74
74
|
"postcss": "^8.4.24",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"./layout/Accordion/Accordion.svelte": "./dist/layout/Accordion/Accordion.svelte",
|
|
145
145
|
"./layout/Accordion/AccordionItem.svelte": "./dist/layout/Accordion/AccordionItem.svelte",
|
|
146
146
|
"./layout/AnalyticsBanner/AnalyticsBanner.svelte": "./dist/layout/AnalyticsBanner/AnalyticsBanner.svelte",
|
|
147
|
-
"./layout/
|
|
147
|
+
"./layout/BackLink/Backlink.svelte": "./dist/layout/BackLink/Backlink.svelte",
|
|
148
148
|
"./layout/Breadcrumb/Breadcrumb.svelte": "./dist/layout/Breadcrumb/Breadcrumb.svelte",
|
|
149
149
|
"./layout/Cards/Card.svelte": "./dist/layout/Cards/Card.svelte",
|
|
150
150
|
"./layout/Cards/Cards.svelte": "./dist/layout/Cards/Cards.svelte",
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
"./layout/NavSections/SectionBacklink.svelte": "./dist/layout/NavSections/SectionBacklink.svelte",
|
|
164
164
|
"./layout/Notice/Notice.svelte": "./dist/layout/Notice/Notice.svelte",
|
|
165
165
|
"./layout/PhaseBanner/PhaseBanner.svelte": "./dist/layout/PhaseBanner/PhaseBanner.svelte",
|
|
166
|
+
"./layout/RelatedContent/RelatedContent.svelte": "./dist/layout/RelatedContent/RelatedContent.svelte",
|
|
166
167
|
"./layout/Scroller/Scroller.svelte": "./dist/layout/Scroller/Scroller.svelte",
|
|
167
168
|
"./layout/Scroller/ScrollerSection.svelte": "./dist/layout/Scroller/ScrollerSection.svelte",
|
|
168
169
|
"./layout/Section/Section.svelte": "./dist/layout/Section/Section.svelte",
|
|
File without changes
|