@onsvisual/svelte-components 1.0.44 → 1.0.45
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 +24 -24
- package/dist/css/main.css +513 -2
- package/dist/datavis/BarChart/BarChart.stories.svelte +84 -84
- package/dist/datavis/BarChart/docs/component.md +19 -19
- package/dist/datavis/Chart/Chart.stories.svelte +128 -128
- package/dist/datavis/Chart/docs/component.md +31 -31
- package/dist/datavis/Chart/docs/example.md +28 -28
- package/dist/datavis/ColumnChart/ColumnChart.stories.svelte +84 -84
- package/dist/datavis/ColumnChart/docs/component.md +19 -19
- package/dist/datavis/DataCard/DataCard.stories.svelte +45 -45
- package/dist/datavis/DataCard/DataCard.svelte +70 -70
- package/dist/datavis/DataCard/Sparkline.svelte +117 -117
- package/dist/datavis/DataCard/docs/component.md +20 -20
- package/dist/datavis/DataCard/docs/example.md +25 -25
- package/dist/datavis/DotPlotChart/DotPlotChart.stories.svelte +40 -40
- package/dist/datavis/DotPlotChart/docs/component.md +19 -19
- package/dist/datavis/LineChart/LineChart.stories.svelte +64 -64
- package/dist/datavis/LineChart/docs/component.md +31 -31
- package/dist/datavis/ScatterChart/ScatterChart.stories.svelte +55 -55
- package/dist/datavis/ScatterChart/docs/component.md +53 -53
- package/dist/datavis/Table/Table.stories.svelte +48 -48
- package/dist/datavis/Table/Table.svelte +161 -161
- package/dist/datavis/Table/docs/component.md +20 -20
- package/dist/datavis/demo-data/data-scatter.js +40 -40
- package/dist/datavis/demo-data/data.js +18 -18
- package/dist/datavis/intro.mdx +21 -21
- package/dist/decorators/Blockquote/Blockquote.stories.svelte +25 -25
- package/dist/decorators/Blockquote/Blockquote.svelte +27 -27
- package/dist/decorators/Blockquote/docs/component.md +10 -10
- package/dist/decorators/Divider/Divider.stories.svelte +29 -29
- package/dist/decorators/Divider/Divider.svelte +52 -52
- package/dist/decorators/Divider/docs/component.md +12 -12
- package/dist/decorators/Em/Em.stories.svelte +30 -30
- package/dist/decorators/Em/Em.svelte +58 -58
- package/dist/decorators/Em/docs/component.md +12 -12
- package/dist/decorators/Icon/Icon.stories.svelte +27 -27
- package/dist/decorators/Icon/Icon.svelte +101 -93
- package/dist/decorators/Icon/Icon.svelte.d.ts +2 -2
- package/dist/decorators/Icon/docs/component.md +10 -10
- package/dist/decorators/Indent/Indent.stories.svelte +22 -22
- package/dist/decorators/Indent/Indent.svelte +3 -3
- package/dist/decorators/Indent/docs/component.md +10 -10
- package/dist/index.js +86 -86
- package/dist/inputs/Button/Button.stories.svelte +70 -70
- package/dist/inputs/Button/Button.svelte +152 -152
- package/dist/inputs/Button/Button.svelte.d.ts +2 -2
- package/dist/inputs/Button/docs/component.md +17 -17
- package/dist/inputs/ButtonGroup/ButtonGroup.stories.svelte +40 -40
- package/dist/inputs/ButtonGroup/ButtonGroup.svelte +57 -57
- package/dist/inputs/ButtonGroup/ButtonGroupItem.svelte +101 -101
- package/dist/inputs/ButtonGroup/docs/component.md +23 -23
- package/dist/inputs/Checkbox/Checkbox.stories.svelte +34 -34
- package/dist/inputs/Checkbox/Checkbox.svelte +180 -180
- package/dist/inputs/Checkbox/docs/component.md +14 -14
- package/dist/inputs/Checkboxes/Checkboxes.stories.svelte +34 -34
- package/dist/inputs/Checkboxes/Checkboxes.svelte +62 -62
- package/dist/inputs/Checkboxes/docs/component.md +20 -20
- package/dist/inputs/Checkboxes/docs/example.md +16 -16
- package/dist/inputs/Dropdown/Dropdown.stories.svelte +54 -54
- package/dist/inputs/Dropdown/Dropdown.svelte +66 -66
- package/dist/inputs/Dropdown/docs/component.md +22 -22
- package/dist/inputs/ErrorPanel/ErrorPanel.stories.svelte +25 -25
- package/dist/inputs/ErrorPanel/ErrorPanel.svelte +24 -24
- package/dist/inputs/ErrorPanel/docs/component.md +14 -14
- package/dist/inputs/ErrorSummary/ErrorSummary.stories.svelte +34 -34
- package/dist/inputs/ErrorSummary/ErrorSummary.svelte +47 -47
- package/dist/inputs/ErrorSummary/docs/component.md +17 -17
- package/dist/inputs/ErrorSummary/docs/example.md +12 -12
- package/dist/inputs/Input/Input.stories.svelte +73 -73
- package/dist/inputs/Input/Input.svelte +151 -151
- package/dist/inputs/Input/docs/component.md +16 -16
- package/dist/inputs/Radios/Radio.svelte +90 -90
- package/dist/inputs/Radios/Radios.stories.svelte +51 -51
- package/dist/inputs/Radios/Radios.svelte +62 -62
- package/dist/inputs/Radios/docs/component.md +24 -24
- package/dist/inputs/Radios/docs/example.md +21 -21
- package/dist/inputs/Select/Select.stories.svelte +63 -63
- package/dist/inputs/Select/Select.svelte +326 -326
- package/dist/inputs/Select/docs/component.md +27 -27
- package/dist/inputs/Textarea/Textarea.stories.svelte +40 -40
- package/dist/inputs/Textarea/Textarea.svelte +113 -113
- package/dist/inputs/Textarea/docs/component.md +16 -16
- package/dist/inputs/Toolbar/HelpModal.svelte +234 -234
- package/dist/inputs/Toolbar/ToolControl.svelte +23 -23
- package/dist/inputs/Toolbar/ToolControls.svelte +9 -9
- package/dist/inputs/Toolbar/Toolbar.stories.svelte +148 -148
- package/dist/inputs/Toolbar/Toolbar.svelte +70 -70
- package/dist/inputs/Toolbar/ToolbarButton.svelte +184 -184
- package/dist/inputs/Toolbar/ToolbarDivider.svelte +29 -29
- package/dist/inputs/Toolbar/ToolbarIcon.svelte +106 -106
- package/dist/inputs/Toolbar/ToolbarsContainer.svelte +69 -69
- package/dist/inputs/Toolbar/docs/component.md +101 -101
- package/dist/intro.mdx +66 -66
- package/dist/js/menuOptions.js +14 -14
- package/dist/js/utils.js +133 -133
- package/dist/js/withParams.js +43 -43
- package/dist/layout/Accordion/Accordion.stories.svelte +30 -30
- package/dist/layout/Accordion/Accordion.svelte +55 -55
- package/dist/layout/Accordion/AccordionItem.svelte +51 -51
- package/dist/layout/Accordion/accordion.js +64 -64
- package/dist/layout/Accordion/details.js +83 -83
- package/dist/layout/Accordion/docs/component.md +19 -19
- package/dist/layout/AnalyticsBanner/AnalyticsBanner.stories.svelte +16 -16
- package/dist/layout/AnalyticsBanner/AnalyticsBanner.svelte +314 -314
- package/dist/layout/AnalyticsBanner/docs/component.md +44 -44
- package/dist/layout/BackLink/BackLink.stories.svelte +16 -16
- package/dist/layout/BackLink/BackLink.svelte +30 -30
- package/dist/layout/BackLink/docs/component.md +12 -12
- package/dist/layout/Breadcrumb/Breadcrumb.stories.svelte +31 -31
- package/dist/layout/Breadcrumb/Breadcrumb.svelte +69 -69
- package/dist/layout/Breadcrumb/docs/component.md +15 -15
- package/dist/layout/Card/Card.stories.svelte +39 -39
- package/dist/layout/Card/Card.svelte +127 -127
- package/dist/layout/Card/docs/component.md +14 -14
- package/dist/layout/Card/docs/eg-images.md +27 -27
- package/dist/layout/Card/docs/eg-links.md +12 -12
- package/dist/layout/Card/docs/eg-spans.md +12 -12
- package/dist/layout/Contents/Contents.stories.svelte +27 -27
- package/dist/layout/Contents/Contents.svelte +51 -51
- package/dist/layout/Contents/docs/component.md +18 -18
- package/dist/layout/DescriptionList/DescriptionList.stories.svelte +22 -22
- package/dist/layout/DescriptionList/DescriptionList.svelte +59 -59
- package/dist/layout/DescriptionList/docs/component.md +18 -18
- package/dist/layout/Details/Details.stories.svelte +32 -32
- package/dist/layout/Details/Details.svelte +75 -75
- package/dist/layout/Details/docs/component.md +14 -14
- package/dist/layout/DocumentList/Document.svelte +103 -103
- package/dist/layout/DocumentList/DocumentList.stories.svelte +88 -88
- package/dist/layout/DocumentList/DocumentList.svelte +33 -33
- package/dist/layout/DocumentList/docs/component.md +28 -28
- package/dist/layout/DocumentList/docs/example.md +23 -23
- package/dist/layout/ErrorPage/ErrorPage.stories.svelte +18 -18
- package/dist/layout/ErrorPage/ErrorPage.svelte +48 -48
- package/dist/layout/ErrorPage/docs/component.md +13 -13
- package/dist/layout/Footer/Footer.stories.svelte +24 -24
- package/dist/layout/Footer/Footer.svelte +366 -366
- package/dist/layout/Footer/docs/component.md +10 -10
- package/dist/layout/Grid/Grid.stories.svelte +50 -50
- package/dist/layout/Grid/Grid.svelte +117 -117
- package/dist/layout/Grid/GridCell.svelte +65 -65
- package/dist/layout/Grid/docs/component.md +14 -14
- package/dist/layout/Header/Header.stories.svelte +26 -26
- package/dist/layout/Header/Header.svelte +875 -875
- package/dist/layout/Header/docs/component.md +11 -11
- package/dist/layout/Hero/Hero.stories.svelte +79 -79
- package/dist/layout/Hero/Hero.svelte +364 -364
- package/dist/layout/Hero/docs/component.md +14 -14
- package/dist/layout/Highlight/Highlight.stories.svelte +29 -29
- package/dist/layout/Highlight/Highlight.svelte +77 -77
- package/dist/layout/Highlight/docs/component.md +12 -12
- package/dist/layout/Image/Image.stories.svelte +23 -23
- package/dist/layout/Image/Image.svelte +29 -29
- package/dist/layout/Image/docs/component.md +15 -15
- package/dist/layout/List/Li.svelte +3 -3
- package/dist/layout/List/List.stories.svelte +40 -40
- package/dist/layout/List/List.svelte +46 -46
- package/dist/layout/List/docs/component.md +14 -14
- package/dist/layout/List/docs/example.md +12 -12
- package/dist/layout/NavSections/NavSection.svelte +90 -90
- package/dist/layout/NavSections/NavSections.stories.svelte +51 -51
- package/dist/layout/NavSections/NavSections.svelte +160 -160
- package/dist/layout/NavSections/docs/component.md +25 -25
- package/dist/layout/Notice/Notice.stories.svelte +61 -61
- package/dist/layout/Notice/Notice.svelte +56 -56
- package/dist/layout/Notice/docs/component.md +14 -14
- package/dist/layout/PhaseBanner/PhaseBanner.stories.svelte +24 -24
- package/dist/layout/PhaseBanner/PhaseBanner.svelte +66 -66
- package/dist/layout/PhaseBanner/docs/component.md +14 -14
- package/dist/layout/RelatedContent/RelatedContent.stories.svelte +36 -36
- package/dist/layout/RelatedContent/RelatedContent.svelte +54 -54
- package/dist/layout/RelatedContent/docs/component.md +16 -16
- package/dist/layout/Scroller/Scroller.stories.svelte +60 -60
- package/dist/layout/Scroller/Scroller.svelte +368 -368
- package/dist/layout/Scroller/ScrollerSection.svelte +70 -70
- package/dist/layout/Scroller/docs/component.md +39 -39
- package/dist/layout/Section/Section.stories.svelte +33 -33
- package/dist/layout/Section/Section.svelte +60 -60
- package/dist/layout/Section/docs/component.md +12 -12
- package/dist/layout/ShareButtons/ShareButtons.stories.svelte +20 -20
- package/dist/layout/ShareButtons/ShareButtons.svelte +131 -131
- package/dist/layout/ShareButtons/docs/component.md +14 -14
- package/dist/layout/SkipLink/SkipLink.stories.svelte +16 -16
- package/dist/layout/SkipLink/SkipLink.svelte +9 -9
- package/dist/layout/SkipLink/docs/component.md +11 -11
- package/dist/layout/Summary/Summary.stories.svelte +21 -21
- package/dist/layout/Summary/Summary.svelte +60 -60
- package/dist/layout/Summary/docs/component.md +17 -17
- package/dist/layout/Tabs/Tab.svelte +53 -53
- package/dist/layout/Tabs/Tabs.stories.svelte +29 -29
- package/dist/layout/Tabs/Tabs.svelte +89 -89
- package/dist/layout/Tabs/docs/component.md +16 -16
- package/dist/layout/Tabs/tabs.js +302 -302
- package/dist/layout/Timeline/Timeline.stories.svelte +44 -44
- package/dist/layout/Timeline/Timeline.svelte +17 -17
- package/dist/layout/Timeline/TimelineItem.svelte +14 -14
- package/dist/layout/Timeline/docs/component.md +27 -27
- package/dist/layout/Timeline/docs/example.md +20 -20
- package/dist/templates/EmbedArticle/EmbedArticle.stories.svelte +72 -72
- package/dist/templates/EmbedArticle/docs/component.md +56 -56
- package/dist/templates/FeatureArticle/FeatureArticle.stories.svelte +150 -150
- package/dist/templates/FeatureArticle/docs/component.md +125 -125
- package/dist/templates/StandardArticle/StandardArticle.stories.svelte +86 -86
- package/dist/templates/StandardArticle/docs/component.md +76 -76
- package/dist/templates/intro.mdx +18 -18
- package/dist/wrappers/Container/Container.stories.svelte +38 -38
- package/dist/wrappers/Container/Container.svelte +77 -77
- package/dist/wrappers/Container/docs/component.md +12 -12
- package/dist/wrappers/Embed/Embed.stories.svelte +24 -24
- package/dist/wrappers/Embed/Embed.svelte +44 -44
- package/dist/wrappers/Embed/docs/component.md +15 -15
- package/dist/wrappers/LazyLoad/LazyLoad.stories.svelte +37 -37
- package/dist/wrappers/LazyLoad/LazyLoad.svelte +50 -50
- package/dist/wrappers/LazyLoad/docs/component.md +29 -29
- package/dist/wrappers/Main/Main.stories.svelte +24 -24
- package/dist/wrappers/Main/Main.svelte +11 -11
- package/dist/wrappers/Main/docs/component.md +16 -16
- package/dist/wrappers/Observe/Observe.stories.svelte +29 -29
- package/dist/wrappers/Observe/Observe.svelte +40 -40
- package/dist/wrappers/Observe/docs/component.md +22 -22
- package/dist/wrappers/Theme/Theme.stories.svelte +70 -70
- package/dist/wrappers/Theme/Theme.svelte +76 -76
- package/dist/wrappers/Theme/docs/component.md +10 -10
- package/dist/wrappers/Theme/themes.js +70 -70
- package/package.json +88 -88
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { onMount } from "svelte";
|
|
3
|
-
import Container from "../../wrappers/Container/Container.svelte";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Set the title/call to action
|
|
7
|
-
* @type {string}
|
|
8
|
-
*/
|
|
9
|
-
export let title = "Share this page";
|
|
10
|
-
/**
|
|
11
|
-
* Adds margin above section
|
|
12
|
-
* @type {boolean}
|
|
13
|
-
*/
|
|
14
|
-
export let marginTop = false;
|
|
15
|
-
/**
|
|
16
|
-
* Adds margin below section
|
|
17
|
-
* @type {boolean}
|
|
18
|
-
*/
|
|
19
|
-
export let marginBottom = true;
|
|
20
|
-
/**
|
|
21
|
-
* Optional: Set an additional CSS class for the component
|
|
22
|
-
* @type {string|null}
|
|
23
|
-
*/
|
|
24
|
-
export let cls = null;
|
|
25
|
-
|
|
26
|
-
let href = "";
|
|
27
|
-
let pageTitle = "";
|
|
28
|
-
|
|
29
|
-
onMount(() => {
|
|
30
|
-
href = document.location.href;
|
|
31
|
-
pageTitle = document.title;
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<Container width="wide" {marginTop} {marginBottom} {cls}>
|
|
36
|
-
<h2 class="ons-u-fs-r--b ons-u-mb-2xs">{title}</h2>
|
|
37
|
-
<ul class="ons-list ons-list--inline ons-list--icons">
|
|
38
|
-
<li class="ons-list__item">
|
|
39
|
-
<span class="ons-list__prefix" aria-hidden="true">
|
|
40
|
-
<svg
|
|
41
|
-
class="ons-icon ons-icon--2xl"
|
|
42
|
-
id="icon-facebook"
|
|
43
|
-
viewBox="0 0 32 32"
|
|
44
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
-
focusable="false"
|
|
46
|
-
aria-hidden="true"
|
|
47
|
-
role="img"
|
|
48
|
-
title="ons-icon-facebook"
|
|
49
|
-
>
|
|
50
|
-
<path
|
|
51
|
-
d="M32,16.0986285 C32.0009185,7.5342974 25.337417,0.468462963 16.8372092,0.0203294753 C8.33700136,-0.427804013 0.97607758,5.89865855 0.0874346352,14.4161886 C-0.801208309,22.9337186 5.09355054,30.6602611 13.5009524,31.9979281 L13.5009524,20.7518951 L9.44,20.7518951 L9.44,16.0986285 L13.5009524,16.0986285 L13.5009524,12.549267 C13.5009524,8.5169471 15.8857143,6.28613892 19.5428571,6.28613892 C20.742535,6.30277426 21.9393895,6.40782423 23.1238095,6.60044523 L23.1238095,10.5637711 L21.1047619,10.5637711 C19.1161905,10.5637711 18.4990476,11.8056643 18.4990476,13.0782216 L18.4990476,16.0986285 L22.9409524,16.0986285 L22.2247619,20.7518951 L18.4990476,20.7518951 L18.4990476,31.9979281 C26.2735701,30.760956 31.9991507,24.0182672 32,16.0986285 L32,16.0986285 Z"
|
|
52
|
-
/>
|
|
53
|
-
</svg></span
|
|
54
|
-
><a
|
|
55
|
-
href="https://www.facebook.com/sharer/sharer.php?u={href}"
|
|
56
|
-
class="ons-list__link"
|
|
57
|
-
target="_blank">Facebook<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
58
|
-
>
|
|
59
|
-
</li>
|
|
60
|
-
<li class="ons-list__item">
|
|
61
|
-
<span class="ons-list__prefix" aria-hidden="true">
|
|
62
|
-
<svg
|
|
63
|
-
class="ons-icon ons-icon--2xl"
|
|
64
|
-
id="icon-twitter"
|
|
65
|
-
viewBox="0 0 90.01 90.01"
|
|
66
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
-
focusable="false"
|
|
68
|
-
aria-hidden="true"
|
|
69
|
-
role="img"
|
|
70
|
-
title="ons-icon-twitter"
|
|
71
|
-
>
|
|
72
|
-
<polygon points="24.89,23.01 57.79,66.99 65.24,66.99 32.34,23.01" />
|
|
73
|
-
<path
|
|
74
|
-
d="M 45 0 L 45 0 C 20.147 0 0 20.147 0 45 v 0 c 0 24.853 20.147 45 45 45 h 0 c 24.853 0 45 -20.147 45 -45 v 0 C 90 20.147 69.853 0 45 0 z M 56.032 70.504 L 41.054 50.477 L 22.516 70.504 h -4.765 L 38.925 47.63 L 17.884 19.496 h 16.217 L 47.895 37.94 l 17.072 -18.444 h 4.765 L 50.024 40.788 l 22.225 29.716 H 56.032 z"
|
|
75
|
-
/>
|
|
76
|
-
</svg></span
|
|
77
|
-
><a
|
|
78
|
-
href="https://x.com/intent/post?text={pageTitle}&url={href}"
|
|
79
|
-
class="ons-list__link"
|
|
80
|
-
target="_blank">Twitter<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
81
|
-
>
|
|
82
|
-
</li>
|
|
83
|
-
<li class="ons-list__item">
|
|
84
|
-
<span class="ons-list__prefix" aria-hidden="true">
|
|
85
|
-
<svg
|
|
86
|
-
class="ons-icon ons-icon--2xl"
|
|
87
|
-
id="icon-linkedin"
|
|
88
|
-
viewBox="0 0 32 32"
|
|
89
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
90
|
-
focusable="false"
|
|
91
|
-
aria-hidden="true"
|
|
92
|
-
role="img"
|
|
93
|
-
title="ons-icon-linkedin"
|
|
94
|
-
>
|
|
95
|
-
<path
|
|
96
|
-
d="M16,-3.41060513e-13 C20.2434638,-3.41060513e-13 24.3131264,1.68570945 27.3137085,4.6862915 C30.3142906,7.68687356 32,11.7565362 32,16 C32,24.836556 24.836556,32 16,32 C7.163444,32 0,24.836556 0,16 C0,7.163444 7.163444,-3.41060513e-13 16,-3.41060513e-13 Z M11.3505859,12.4641113 L7.45385744,12.4641113 L7.45385744,24.1875 L11.3505859,24.1875 L11.3505859,12.4641113 Z M20.9152832,12.1889649 C18.8479004,12.1889649 17.9213867,13.3251953 17.4035644,14.1240234 L17.4035644,14.1240234 L17.4035644,12.4641113 L13.5070801,12.4641113 C13.5212538,12.7696262 13.5275532,13.809993 13.5292593,15.1533871 L13.5293118,16.8832762 C13.5292156,16.9843911 13.5291048,17.0860852 13.5289803,17.1882303 L13.5280782,17.8054916 L13.5280782,17.8054916 L13.5268961,18.427439 C13.5216699,20.9164121 13.5108442,23.3704557 13.5078578,24.0208157 L13.5070801,24.1875 L17.4035644,24.1875 L17.4035644,17.640625 C17.4035644,17.2902832 17.4287109,16.9401856 17.5317382,16.6896972 C17.8134766,15.9897461 18.4545899,15.2646484 19.5310059,15.2646484 C20.940918,15.2646484 21.5051269,16.3395996 21.5051269,17.9157715 L21.5051269,17.9157715 L21.5051269,24.1875 L25.4013672,24.1875 L25.4013672,17.465332 C25.4013672,13.8645019 23.4790039,12.1889649 20.9152832,12.1889649 Z M9.42822263,6.8125 C8.09521488,6.8125 7.22363281,7.68774412 7.22363281,8.83813475 C7.22363281,9.96313475 8.06933594,10.8632812 9.37695313,10.8632812 L9.37695313,10.8632812 L9.40234375,10.8632812 C10.7612305,10.8632812 11.6069336,9.96313475 11.6069336,8.83813475 C11.581543,7.68774412 10.7612305,6.8125 9.42822263,6.8125 Z"
|
|
97
|
-
/>
|
|
98
|
-
</svg>
|
|
99
|
-
</span><a
|
|
100
|
-
href="https://www.linkedin.com/sharing/share-offsite/?url={href}"
|
|
101
|
-
class="ons-list__link"
|
|
102
|
-
target="_blank">LinkedIn<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
103
|
-
>
|
|
104
|
-
</li>
|
|
105
|
-
<li class="ons-list__item">
|
|
106
|
-
<span class="ons-list__prefix" aria-hidden="true">
|
|
107
|
-
<svg
|
|
108
|
-
class="ons-icon ons-icon--2xl"
|
|
109
|
-
id="icon-email"
|
|
110
|
-
viewBox="0 0 36 36"
|
|
111
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
112
|
-
focusable="false"
|
|
113
|
-
aria-hidden="true"
|
|
114
|
-
role="img"
|
|
115
|
-
title="ons-icon-email"
|
|
116
|
-
>
|
|
117
|
-
<path
|
|
118
|
-
fill-rule="evenodd"
|
|
119
|
-
clip-rule="evenodd"
|
|
120
|
-
d="M30.7279 5.27208C27.3523 1.89642 22.7739 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36C27.9411 36 36
|
|
121
|
-
27.9411 36 18C36 13.2261 34.1036 8.64773 30.7279 5.27208ZM18 19L26 14V12L18 17L10 12V14L18 19ZM8 10H28V26H8V10Z"
|
|
122
|
-
></path>
|
|
123
|
-
</svg>
|
|
124
|
-
</span><a
|
|
125
|
-
href="mailto:?subject={pageTitle}&body={pageTitle}%0A{href}"
|
|
126
|
-
class="ons-list__link"
|
|
127
|
-
target="_blank">Email<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
128
|
-
>
|
|
129
|
-
</li>
|
|
130
|
-
</ul>
|
|
131
|
-
</Container>
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
import Container from "../../wrappers/Container/Container.svelte";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Set the title/call to action
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
export let title = "Share this page";
|
|
10
|
+
/**
|
|
11
|
+
* Adds margin above section
|
|
12
|
+
* @type {boolean}
|
|
13
|
+
*/
|
|
14
|
+
export let marginTop = false;
|
|
15
|
+
/**
|
|
16
|
+
* Adds margin below section
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export let marginBottom = true;
|
|
20
|
+
/**
|
|
21
|
+
* Optional: Set an additional CSS class for the component
|
|
22
|
+
* @type {string|null}
|
|
23
|
+
*/
|
|
24
|
+
export let cls = null;
|
|
25
|
+
|
|
26
|
+
let href = "";
|
|
27
|
+
let pageTitle = "";
|
|
28
|
+
|
|
29
|
+
onMount(() => {
|
|
30
|
+
href = document.location.href;
|
|
31
|
+
pageTitle = document.title;
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<Container width="wide" {marginTop} {marginBottom} {cls}>
|
|
36
|
+
<h2 class="ons-u-fs-r--b ons-u-mb-2xs">{title}</h2>
|
|
37
|
+
<ul class="ons-list ons-list--inline ons-list--icons">
|
|
38
|
+
<li class="ons-list__item">
|
|
39
|
+
<span class="ons-list__prefix" aria-hidden="true">
|
|
40
|
+
<svg
|
|
41
|
+
class="ons-icon ons-icon--2xl"
|
|
42
|
+
id="icon-facebook"
|
|
43
|
+
viewBox="0 0 32 32"
|
|
44
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
focusable="false"
|
|
46
|
+
aria-hidden="true"
|
|
47
|
+
role="img"
|
|
48
|
+
title="ons-icon-facebook"
|
|
49
|
+
>
|
|
50
|
+
<path
|
|
51
|
+
d="M32,16.0986285 C32.0009185,7.5342974 25.337417,0.468462963 16.8372092,0.0203294753 C8.33700136,-0.427804013 0.97607758,5.89865855 0.0874346352,14.4161886 C-0.801208309,22.9337186 5.09355054,30.6602611 13.5009524,31.9979281 L13.5009524,20.7518951 L9.44,20.7518951 L9.44,16.0986285 L13.5009524,16.0986285 L13.5009524,12.549267 C13.5009524,8.5169471 15.8857143,6.28613892 19.5428571,6.28613892 C20.742535,6.30277426 21.9393895,6.40782423 23.1238095,6.60044523 L23.1238095,10.5637711 L21.1047619,10.5637711 C19.1161905,10.5637711 18.4990476,11.8056643 18.4990476,13.0782216 L18.4990476,16.0986285 L22.9409524,16.0986285 L22.2247619,20.7518951 L18.4990476,20.7518951 L18.4990476,31.9979281 C26.2735701,30.760956 31.9991507,24.0182672 32,16.0986285 L32,16.0986285 Z"
|
|
52
|
+
/>
|
|
53
|
+
</svg></span
|
|
54
|
+
><a
|
|
55
|
+
href="https://www.facebook.com/sharer/sharer.php?u={href}"
|
|
56
|
+
class="ons-list__link"
|
|
57
|
+
target="_blank">Facebook<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
58
|
+
>
|
|
59
|
+
</li>
|
|
60
|
+
<li class="ons-list__item">
|
|
61
|
+
<span class="ons-list__prefix" aria-hidden="true">
|
|
62
|
+
<svg
|
|
63
|
+
class="ons-icon ons-icon--2xl"
|
|
64
|
+
id="icon-twitter"
|
|
65
|
+
viewBox="0 0 90.01 90.01"
|
|
66
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
+
focusable="false"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
role="img"
|
|
70
|
+
title="ons-icon-twitter"
|
|
71
|
+
>
|
|
72
|
+
<polygon points="24.89,23.01 57.79,66.99 65.24,66.99 32.34,23.01" />
|
|
73
|
+
<path
|
|
74
|
+
d="M 45 0 L 45 0 C 20.147 0 0 20.147 0 45 v 0 c 0 24.853 20.147 45 45 45 h 0 c 24.853 0 45 -20.147 45 -45 v 0 C 90 20.147 69.853 0 45 0 z M 56.032 70.504 L 41.054 50.477 L 22.516 70.504 h -4.765 L 38.925 47.63 L 17.884 19.496 h 16.217 L 47.895 37.94 l 17.072 -18.444 h 4.765 L 50.024 40.788 l 22.225 29.716 H 56.032 z"
|
|
75
|
+
/>
|
|
76
|
+
</svg></span
|
|
77
|
+
><a
|
|
78
|
+
href="https://x.com/intent/post?text={pageTitle}&url={href}"
|
|
79
|
+
class="ons-list__link"
|
|
80
|
+
target="_blank">Twitter<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
81
|
+
>
|
|
82
|
+
</li>
|
|
83
|
+
<li class="ons-list__item">
|
|
84
|
+
<span class="ons-list__prefix" aria-hidden="true">
|
|
85
|
+
<svg
|
|
86
|
+
class="ons-icon ons-icon--2xl"
|
|
87
|
+
id="icon-linkedin"
|
|
88
|
+
viewBox="0 0 32 32"
|
|
89
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
90
|
+
focusable="false"
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
role="img"
|
|
93
|
+
title="ons-icon-linkedin"
|
|
94
|
+
>
|
|
95
|
+
<path
|
|
96
|
+
d="M16,-3.41060513e-13 C20.2434638,-3.41060513e-13 24.3131264,1.68570945 27.3137085,4.6862915 C30.3142906,7.68687356 32,11.7565362 32,16 C32,24.836556 24.836556,32 16,32 C7.163444,32 0,24.836556 0,16 C0,7.163444 7.163444,-3.41060513e-13 16,-3.41060513e-13 Z M11.3505859,12.4641113 L7.45385744,12.4641113 L7.45385744,24.1875 L11.3505859,24.1875 L11.3505859,12.4641113 Z M20.9152832,12.1889649 C18.8479004,12.1889649 17.9213867,13.3251953 17.4035644,14.1240234 L17.4035644,14.1240234 L17.4035644,12.4641113 L13.5070801,12.4641113 C13.5212538,12.7696262 13.5275532,13.809993 13.5292593,15.1533871 L13.5293118,16.8832762 C13.5292156,16.9843911 13.5291048,17.0860852 13.5289803,17.1882303 L13.5280782,17.8054916 L13.5280782,17.8054916 L13.5268961,18.427439 C13.5216699,20.9164121 13.5108442,23.3704557 13.5078578,24.0208157 L13.5070801,24.1875 L17.4035644,24.1875 L17.4035644,17.640625 C17.4035644,17.2902832 17.4287109,16.9401856 17.5317382,16.6896972 C17.8134766,15.9897461 18.4545899,15.2646484 19.5310059,15.2646484 C20.940918,15.2646484 21.5051269,16.3395996 21.5051269,17.9157715 L21.5051269,17.9157715 L21.5051269,24.1875 L25.4013672,24.1875 L25.4013672,17.465332 C25.4013672,13.8645019 23.4790039,12.1889649 20.9152832,12.1889649 Z M9.42822263,6.8125 C8.09521488,6.8125 7.22363281,7.68774412 7.22363281,8.83813475 C7.22363281,9.96313475 8.06933594,10.8632812 9.37695313,10.8632812 L9.37695313,10.8632812 L9.40234375,10.8632812 C10.7612305,10.8632812 11.6069336,9.96313475 11.6069336,8.83813475 C11.581543,7.68774412 10.7612305,6.8125 9.42822263,6.8125 Z"
|
|
97
|
+
/>
|
|
98
|
+
</svg>
|
|
99
|
+
</span><a
|
|
100
|
+
href="https://www.linkedin.com/sharing/share-offsite/?url={href}"
|
|
101
|
+
class="ons-list__link"
|
|
102
|
+
target="_blank">LinkedIn<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
103
|
+
>
|
|
104
|
+
</li>
|
|
105
|
+
<li class="ons-list__item">
|
|
106
|
+
<span class="ons-list__prefix" aria-hidden="true">
|
|
107
|
+
<svg
|
|
108
|
+
class="ons-icon ons-icon--2xl"
|
|
109
|
+
id="icon-email"
|
|
110
|
+
viewBox="0 0 36 36"
|
|
111
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
112
|
+
focusable="false"
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
role="img"
|
|
115
|
+
title="ons-icon-email"
|
|
116
|
+
>
|
|
117
|
+
<path
|
|
118
|
+
fill-rule="evenodd"
|
|
119
|
+
clip-rule="evenodd"
|
|
120
|
+
d="M30.7279 5.27208C27.3523 1.89642 22.7739 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36C27.9411 36 36
|
|
121
|
+
27.9411 36 18C36 13.2261 34.1036 8.64773 30.7279 5.27208ZM18 19L26 14V12L18 17L10 12V14L18 19ZM8 10H28V26H8V10Z"
|
|
122
|
+
></path>
|
|
123
|
+
</svg>
|
|
124
|
+
</span><a
|
|
125
|
+
href="mailto:?subject={pageTitle}&body={pageTitle}%0A{href}"
|
|
126
|
+
class="ons-list__link"
|
|
127
|
+
target="_blank">Email<span class="ons-u-vh"> (opens in a new tab)</span></a
|
|
128
|
+
>
|
|
129
|
+
</li>
|
|
130
|
+
</ul>
|
|
131
|
+
</Container>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
Add social sharing buttons to a page.
|
|
2
|
-
|
|
3
|
-
Based on this [ONS Design System component](https://service-manual.ons.gov.uk/design-system/components/share-page).
|
|
4
|
-
|
|
5
|
-
<!-- prettier-ignore -->
|
|
6
|
-
```html
|
|
7
|
-
<script>
|
|
8
|
-
import { ShareButtons } from "@onsvisual/svelte-components";
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<!-- page contents -->
|
|
12
|
-
<ShareButtons />
|
|
13
|
-
<!-- page footer -->
|
|
14
|
-
```
|
|
1
|
+
Add social sharing buttons to a page.
|
|
2
|
+
|
|
3
|
+
Based on this [ONS Design System component](https://service-manual.ons.gov.uk/design-system/components/share-page).
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```html
|
|
7
|
+
<script>
|
|
8
|
+
import { ShareButtons } from "@onsvisual/svelte-components";
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<!-- page contents -->
|
|
12
|
+
<ShareButtons />
|
|
13
|
+
<!-- page footer -->
|
|
14
|
+
```
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
-
import { withComponentDocs } from "../../js/withParams.js";
|
|
4
|
-
import SkipLink from "./SkipLink.svelte";
|
|
5
|
-
import componentDocs from "./docs/component.md?raw";
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: "Layout/SkipLink",
|
|
9
|
-
component: SkipLink,
|
|
10
|
-
tags: ["autodocs"],
|
|
11
|
-
argTypes: {},
|
|
12
|
-
parameters: withComponentDocs(componentDocs)
|
|
13
|
-
});
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<Story name="Default" args={{}} />
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import { withComponentDocs } from "../../js/withParams.js";
|
|
4
|
+
import SkipLink from "./SkipLink.svelte";
|
|
5
|
+
import componentDocs from "./docs/component.md?raw";
|
|
6
|
+
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
title: "Layout/SkipLink",
|
|
9
|
+
component: SkipLink,
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {},
|
|
12
|
+
parameters: withComponentDocs(componentDocs)
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Story name="Default" args={{}} />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
/**
|
|
3
|
-
* Anchor link to <main> page element
|
|
4
|
-
* @type {string}
|
|
5
|
-
*/
|
|
6
|
-
export let href = "#main";
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<a class="ons-skip-to-content" {href}>Skip to main content</a>
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* Anchor link to <main> page element
|
|
4
|
+
* @type {string}
|
|
5
|
+
*/
|
|
6
|
+
export let href = "#main";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<a class="ons-skip-to-content" {href}>Skip to main content</a>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
An invisible link to skip from the top of the page header to the content of the page. Should be the first focusable item on the page, and is included by default in the [Header](/docs/layout-header--docs) component
|
|
2
|
-
|
|
3
|
-
<!-- prettier-ignore -->
|
|
4
|
-
```html
|
|
5
|
-
<script>
|
|
6
|
-
import { SkipLink } from "@onsvisual/svelte-components";
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<SkipLink/>
|
|
10
|
-
<!-- page body -->
|
|
11
|
-
```
|
|
1
|
+
An invisible link to skip from the top of the page header to the content of the page. Should be the first focusable item on the page, and is included by default in the [Header](/docs/layout-header--docs) component
|
|
2
|
+
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
```html
|
|
5
|
+
<script>
|
|
6
|
+
import { SkipLink } from "@onsvisual/svelte-components";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<SkipLink/>
|
|
10
|
+
<!-- page body -->
|
|
11
|
+
```
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
-
import { withComponentDocs } from "../../js/withParams.js";
|
|
4
|
-
import Summary from "./Summary.svelte";
|
|
5
|
-
import componentDocs from "./docs/component.md?raw";
|
|
6
|
-
|
|
7
|
-
const items = [
|
|
8
|
-
{ key: "First item", value: "Value of first item" },
|
|
9
|
-
{ key: "Second item", value: "Value of second item (that can be changed)", href: "#" }
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
const { Story } = defineMeta({
|
|
13
|
-
title: "Layout/Summary",
|
|
14
|
-
component: Summary,
|
|
15
|
-
tags: ["autodocs"],
|
|
16
|
-
argTypes: {},
|
|
17
|
-
parameters: withComponentDocs(componentDocs)
|
|
18
|
-
});
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<Story name="Default" args={{ items }} />
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import { withComponentDocs } from "../../js/withParams.js";
|
|
4
|
+
import Summary from "./Summary.svelte";
|
|
5
|
+
import componentDocs from "./docs/component.md?raw";
|
|
6
|
+
|
|
7
|
+
const items = [
|
|
8
|
+
{ key: "First item", value: "Value of first item" },
|
|
9
|
+
{ key: "Second item", value: "Value of second item (that can be changed)", href: "#" }
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const { Story } = defineMeta({
|
|
13
|
+
title: "Layout/Summary",
|
|
14
|
+
component: Summary,
|
|
15
|
+
tags: ["autodocs"],
|
|
16
|
+
argTypes: {},
|
|
17
|
+
parameters: withComponentDocs(componentDocs)
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<Story name="Default" args={{ items }} />
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { createEventDispatcher } from "svelte";
|
|
3
|
-
|
|
4
|
-
const dispatch = createEventDispatcher();
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A unique ID for the summary table
|
|
8
|
-
* @type {string|null}
|
|
9
|
-
*/
|
|
10
|
-
export let id = null;
|
|
11
|
-
/**
|
|
12
|
-
* Title for summary table
|
|
13
|
-
* @type {string|null}
|
|
14
|
-
*/
|
|
15
|
-
export let title = null;
|
|
16
|
-
/**
|
|
17
|
-
* Array of items in format {key, value, href?}
|
|
18
|
-
* @type {object[]}
|
|
19
|
-
*/
|
|
20
|
-
export let items = [];
|
|
21
|
-
/**
|
|
22
|
-
* Optional: Set an additional CSS class for the component
|
|
23
|
-
* @type {string|null}
|
|
24
|
-
*/
|
|
25
|
-
export let cls = null;
|
|
26
|
-
|
|
27
|
-
function handleChange(item) {
|
|
28
|
-
dispatch("change", { item });
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<div class="ons-summary {cls}">
|
|
33
|
-
<div {id} class="ons-summary__group">
|
|
34
|
-
{#if title}<h2 class="ons-summary__group-title">{title}</h2>{/if}
|
|
35
|
-
<dl class="ons-summary__items">
|
|
36
|
-
{#each items as item}
|
|
37
|
-
<div class="ons-summary__item">
|
|
38
|
-
<dt class="ons-summary__item-title">
|
|
39
|
-
<div class="ons-summary__item--text">{item.key}</div>
|
|
40
|
-
</dt>
|
|
41
|
-
<dd class="ons-summary__values">
|
|
42
|
-
<span class="ons-summary__text">{item.value}</span>
|
|
43
|
-
</dd>
|
|
44
|
-
<dd class="ons-summary__actions" id="sales-dates">
|
|
45
|
-
{#if item.href || item.editable}
|
|
46
|
-
<a
|
|
47
|
-
href={item.href || "#0"}
|
|
48
|
-
on:click={() => handleChange(item)}
|
|
49
|
-
class="ons-summary__button"
|
|
50
|
-
>
|
|
51
|
-
<span class="ons-summary__button-text" aria-hidden="true">Change</span>
|
|
52
|
-
<span class="ons-u-vh">Change value</span>
|
|
53
|
-
</a>
|
|
54
|
-
{/if}
|
|
55
|
-
</dd>
|
|
56
|
-
</div>
|
|
57
|
-
{/each}
|
|
58
|
-
</dl>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
import { createEventDispatcher } from "svelte";
|
|
3
|
+
|
|
4
|
+
const dispatch = createEventDispatcher();
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A unique ID for the summary table
|
|
8
|
+
* @type {string|null}
|
|
9
|
+
*/
|
|
10
|
+
export let id = null;
|
|
11
|
+
/**
|
|
12
|
+
* Title for summary table
|
|
13
|
+
* @type {string|null}
|
|
14
|
+
*/
|
|
15
|
+
export let title = null;
|
|
16
|
+
/**
|
|
17
|
+
* Array of items in format {key, value, href?}
|
|
18
|
+
* @type {object[]}
|
|
19
|
+
*/
|
|
20
|
+
export let items = [];
|
|
21
|
+
/**
|
|
22
|
+
* Optional: Set an additional CSS class for the component
|
|
23
|
+
* @type {string|null}
|
|
24
|
+
*/
|
|
25
|
+
export let cls = null;
|
|
26
|
+
|
|
27
|
+
function handleChange(item) {
|
|
28
|
+
dispatch("change", { item });
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div class="ons-summary {cls}">
|
|
33
|
+
<div {id} class="ons-summary__group">
|
|
34
|
+
{#if title}<h2 class="ons-summary__group-title">{title}</h2>{/if}
|
|
35
|
+
<dl class="ons-summary__items">
|
|
36
|
+
{#each items as item}
|
|
37
|
+
<div class="ons-summary__item">
|
|
38
|
+
<dt class="ons-summary__item-title">
|
|
39
|
+
<div class="ons-summary__item--text">{item.key}</div>
|
|
40
|
+
</dt>
|
|
41
|
+
<dd class="ons-summary__values">
|
|
42
|
+
<span class="ons-summary__text">{item.value}</span>
|
|
43
|
+
</dd>
|
|
44
|
+
<dd class="ons-summary__actions" id="sales-dates">
|
|
45
|
+
{#if item.href || item.editable}
|
|
46
|
+
<a
|
|
47
|
+
href={item.href || "#0"}
|
|
48
|
+
on:click={() => handleChange(item)}
|
|
49
|
+
class="ons-summary__button"
|
|
50
|
+
>
|
|
51
|
+
<span class="ons-summary__button-text" aria-hidden="true">Change</span>
|
|
52
|
+
<span class="ons-u-vh">Change value</span>
|
|
53
|
+
</a>
|
|
54
|
+
{/if}
|
|
55
|
+
</dd>
|
|
56
|
+
</div>
|
|
57
|
+
{/each}
|
|
58
|
+
</dl>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
A summary table for selected variables etc.
|
|
2
|
-
|
|
3
|
-
Based on this [ONS Design System component](https://service-manual.ons.gov.uk/design-system/components/summary).
|
|
4
|
-
|
|
5
|
-
<!-- prettier-ignore -->
|
|
6
|
-
```html
|
|
7
|
-
<script>
|
|
8
|
-
import { Summary } from "@onsvisual/svelte-components";
|
|
9
|
-
|
|
10
|
-
let items = [
|
|
11
|
-
{ key: "First item", value: "Value of first item" },
|
|
12
|
-
{ key: "Second item", value: "Value of second item (that can be changed)", href: "#" }
|
|
13
|
-
];
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<Summary {items}/>
|
|
17
|
-
```
|
|
1
|
+
A summary table for selected variables etc.
|
|
2
|
+
|
|
3
|
+
Based on this [ONS Design System component](https://service-manual.ons.gov.uk/design-system/components/summary).
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```html
|
|
7
|
+
<script>
|
|
8
|
+
import { Summary } from "@onsvisual/svelte-components";
|
|
9
|
+
|
|
10
|
+
let items = [
|
|
11
|
+
{ key: "First item", value: "Value of first item" },
|
|
12
|
+
{ key: "Second item", value: "Value of second item (that can be changed)", href: "#" }
|
|
13
|
+
];
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Summary {items}/>
|
|
17
|
+
```
|