@reuters-graphics/graphics-components 1.1.7 → 2.0.0
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/actions/cssVariables/cssVariables.mdx +0 -2
- package/dist/actions/resizeObserver/resizeObserver.mdx +0 -2
- package/dist/components/AdSlot/InlineAd.stories.svelte +7 -5
- package/dist/components/AdSlot/InlineAd.stories.svelte.d.ts +7 -0
- package/dist/components/AdSlot/InlineAd.svelte +1 -1
- package/dist/components/AdSlot/InlineAd.svelte.d.ts +1 -1
- package/dist/components/AdSlot/LeaderboardAd.stories.svelte +11 -14
- package/dist/components/AdSlot/LeaderboardAd.stories.svelte.d.ts +15 -17
- package/dist/components/AdSlot/LeaderboardAd.svelte +1 -1
- package/dist/components/AdSlot/LeaderboardAd.svelte.d.ts +1 -1
- package/dist/components/AdSlot/SponsorshipAd.stories.svelte +11 -13
- package/dist/components/AdSlot/SponsorshipAd.stories.svelte.d.ts +15 -17
- package/dist/components/AdSlot/SponsorshipAd.svelte +1 -1
- package/dist/components/AdSlot/SponsorshipAd.svelte.d.ts +1 -1
- package/dist/components/Analytics/Analytics.stories.svelte +13 -18
- package/dist/components/Analytics/Analytics.stories.svelte.d.ts +15 -17
- package/dist/components/Analytics/Analytics.svelte +1 -1
- package/dist/components/Analytics/Analytics.svelte.d.ts +1 -1
- package/dist/components/Article/Article.stories.svelte +10 -12
- package/dist/components/Article/Article.stories.svelte.d.ts +7 -0
- package/dist/components/Article/Article.svelte +1 -1
- package/dist/components/Article/Article.svelte.d.ts +1 -1
- package/dist/components/BeforeAfter/BeforeAfter.stories.svelte +20 -28
- package/dist/components/BeforeAfter/BeforeAfter.stories.svelte.d.ts +24 -17
- package/dist/components/BeforeAfter/BeforeAfter.svelte +1 -1
- package/dist/components/BeforeAfter/BeforeAfter.svelte.d.ts +1 -1
- package/dist/components/Block/Block.stories.svelte +27 -35
- package/dist/components/Block/Block.stories.svelte.d.ts +21 -17
- package/dist/components/Block/Block.svelte +1 -1
- package/dist/components/Block/Block.svelte.d.ts +1 -1
- package/dist/components/Block/stories/docs/snapWidths.md +2 -2
- package/dist/components/BodyText/BodyText.stories.svelte +11 -14
- package/dist/components/BodyText/BodyText.stories.svelte.d.ts +15 -17
- package/dist/components/BodyText/BodyText.svelte +1 -1
- package/dist/components/BodyText/BodyText.svelte.d.ts +1 -1
- package/dist/components/BodyText/stories/docs/component.md +16 -3
- package/dist/components/Byline/Byline.stories.svelte +17 -21
- package/dist/components/Byline/Byline.stories.svelte.d.ts +21 -17
- package/dist/components/Byline/Byline.svelte +1 -0
- package/dist/components/Byline/Byline.svelte.d.ts +1 -0
- package/dist/components/DatawrapperChart/DatawrapperChart.stories.svelte +21 -29
- package/dist/components/DatawrapperChart/DatawrapperChart.stories.svelte.d.ts +21 -17
- package/dist/components/DatawrapperChart/DatawrapperChart.svelte +1 -1
- package/dist/components/DatawrapperChart/DatawrapperChart.svelte.d.ts +1 -1
- package/dist/components/DocumentCloud/DocumentCloud.stories.svelte +17 -24
- package/dist/components/DocumentCloud/DocumentCloud.stories.svelte.d.ts +21 -17
- package/dist/components/DocumentCloud/DocumentCloud.svelte +1 -1
- package/dist/components/DocumentCloud/DocumentCloud.svelte.d.ts +1 -1
- package/dist/components/EmbedPreviewerLink/EmbedPreviewerLink.stories.svelte +11 -14
- package/dist/components/EmbedPreviewerLink/EmbedPreviewerLink.stories.svelte.d.ts +15 -17
- package/dist/components/EndNotes/EndNotes.stories.svelte +18 -21
- package/dist/components/EndNotes/EndNotes.stories.svelte.d.ts +15 -17
- package/dist/components/EndNotes/EndNotes.svelte +2 -1
- package/dist/components/EndNotes/EndNotes.svelte.d.ts +1 -1
- package/dist/components/FeaturePhoto/FeaturePhoto.stories.svelte +28 -37
- package/dist/components/FeaturePhoto/FeaturePhoto.stories.svelte.d.ts +25 -17
- package/dist/components/FeaturePhoto/FeaturePhoto.svelte +1 -1
- package/dist/components/FeaturePhoto/FeaturePhoto.svelte.d.ts +1 -1
- package/dist/components/Framer/Framer.stories.svelte +11 -14
- package/dist/components/Framer/Framer.stories.svelte.d.ts +15 -17
- package/dist/components/Framer/Typeahead/index.svelte +13 -0
- package/dist/components/GraphicBlock/GraphicBlock.stories.svelte +26 -37
- package/dist/components/GraphicBlock/GraphicBlock.stories.svelte.d.ts +25 -17
- package/dist/components/GraphicBlock/GraphicBlock.svelte +1 -1
- package/dist/components/GraphicBlock/GraphicBlock.svelte.d.ts +1 -1
- package/dist/components/Headline/Headline.stories.svelte +29 -38
- package/dist/components/Headline/Headline.stories.svelte.d.ts +25 -17
- package/dist/components/Headline/Headline.svelte +1 -1
- package/dist/components/Headline/Headline.svelte.d.ts +1 -1
- package/dist/components/HeroHeadline/Hero.stories.svelte +38 -51
- package/dist/components/HeroHeadline/Hero.stories.svelte.d.ts +34 -17
- package/dist/components/HeroHeadline/Hero.svelte +3 -1
- package/dist/components/HeroHeadline/Hero.svelte.d.ts +1 -1
- package/dist/components/InfoBox/InfoBox.stories.svelte +21 -22
- package/dist/components/InfoBox/InfoBox.stories.svelte.d.ts +25 -17
- package/dist/components/InfoBox/InfoBox.svelte +1 -1
- package/dist/components/InfoBox/InfoBox.svelte.d.ts +1 -1
- package/dist/components/Markdown/Markdown.stories.svelte +11 -14
- package/dist/components/Markdown/Markdown.stories.svelte.d.ts +15 -17
- package/dist/components/Markdown/Markdown.svelte +1 -1
- package/dist/components/Markdown/Markdown.svelte.d.ts +1 -1
- package/dist/components/PaddingReset/PaddingReset.stories.svelte +11 -14
- package/dist/components/PaddingReset/PaddingReset.stories.svelte.d.ts +15 -17
- package/dist/components/PaddingReset/PaddingReset.svelte +1 -0
- package/dist/components/PaddingReset/PaddingReset.svelte.d.ts +1 -0
- package/dist/components/PhotoCarousel/PhotoCarousel.stories.svelte +18 -26
- package/dist/components/PhotoCarousel/PhotoCarousel.stories.svelte.d.ts +21 -17
- package/dist/components/PhotoCarousel/PhotoCarousel.svelte +1 -1
- package/dist/components/PhotoCarousel/PhotoCarousel.svelte.d.ts +1 -1
- package/dist/components/PhotoPack/PhotoPack.stories.svelte +52 -58
- package/dist/components/PhotoPack/PhotoPack.stories.svelte.d.ts +25 -17
- package/dist/components/PhotoPack/PhotoPack.svelte +2 -1
- package/dist/components/PhotoPack/PhotoPack.svelte.d.ts +1 -1
- package/dist/components/PymChild/PymChild.stories.svelte +11 -14
- package/dist/components/PymChild/PymChild.stories.svelte.d.ts +15 -17
- package/dist/components/PymChild/PymChild.svelte +1 -1
- package/dist/components/PymChild/PymChild.svelte.d.ts +1 -1
- package/dist/components/ReferralBlock/ReferralBlock.stories.svelte +33 -41
- package/dist/components/ReferralBlock/ReferralBlock.stories.svelte.d.ts +29 -17
- package/dist/components/ReferralBlock/ReferralBlock.svelte +75 -54
- package/dist/components/ReferralBlock/ReferralBlock.svelte.d.ts +1 -1
- package/dist/components/ReutersGraphicsLogo/ReutersGraphicsLogo.stories.svelte +11 -14
- package/dist/components/ReutersGraphicsLogo/ReutersGraphicsLogo.stories.svelte.d.ts +15 -17
- package/dist/components/ReutersGraphicsLogo/ReutersGraphicsLogo.svelte +193 -45
- package/dist/components/ReutersGraphicsLogo/ReutersGraphicsLogo.svelte.d.ts +2 -3
- package/dist/components/ReutersGraphicsLogo/stories/docs/component.md +2 -2
- package/dist/components/ReutersLogo/ReutersLogo.stories.svelte +15 -18
- package/dist/components/ReutersLogo/ReutersLogo.stories.svelte.d.ts +23 -17
- package/dist/components/ReutersLogo/ReutersLogo.svelte +3 -3
- package/dist/components/ReutersLogo/ReutersLogo.svelte.d.ts +1 -1
- package/dist/components/ReutersLogo/stories/docs/component.md +1 -1
- package/dist/components/SEO/SEO.stories.svelte +17 -21
- package/dist/components/SEO/SEO.stories.svelte.d.ts +16 -17
- package/dist/components/SEO/SEO.svelte +1 -1
- package/dist/components/SEO/SEO.svelte.d.ts +1 -1
- package/dist/components/Scroller/Scroller.stories.svelte +48 -60
- package/dist/components/Scroller/Scroller.stories.svelte.d.ts +32 -17
- package/dist/components/Scroller/Scroller.svelte +1 -1
- package/dist/components/Scroller/Scroller.svelte.d.ts +1 -1
- package/dist/components/Scroller/stories/docs/ai2svelte.md +1 -1
- package/dist/components/SearchInput/SearchInput.stories.svelte +11 -14
- package/dist/components/SearchInput/SearchInput.stories.svelte.d.ts +15 -17
- package/dist/components/SearchInput/SearchInput.svelte +1 -1
- package/dist/components/SearchInput/SearchInput.svelte.d.ts +1 -1
- package/dist/components/SimpleTimeline/SimpleTimeline.stories.svelte +15 -22
- package/dist/components/SimpleTimeline/SimpleTimeline.stories.svelte.d.ts +23 -17
- package/dist/components/SimpleTimeline/SimpleTimeline.svelte +1 -1
- package/dist/components/SimpleTimeline/SimpleTimeline.svelte.d.ts +1 -1
- package/dist/components/SiteFooter/SiteFooter.stories.svelte +16 -47
- package/dist/components/SiteFooter/SiteFooter.stories.svelte.d.ts +15 -17
- package/dist/components/SiteFooter/SiteFooter.svelte +10 -4
- package/dist/components/SiteFooter/SiteFooter.svelte.d.ts +1 -9
- package/dist/components/SiteFooter/svgs/Twitter.svelte +6 -4
- package/dist/components/SiteHeader/SiteHeader.stories.svelte +18 -21
- package/dist/components/SiteHeader/SiteHeader.stories.svelte.d.ts +22 -17
- package/dist/components/SiteHeader/SiteHeader.svelte +1 -1
- package/dist/components/SiteHeader/SiteHeader.svelte.d.ts +1 -1
- package/dist/components/SiteHeadline/SiteHeadline.stories.svelte +3 -3
- package/dist/components/SiteHeadline/SiteHeadline.svelte +1 -0
- package/dist/components/SiteHeadline/SiteHeadline.svelte.d.ts +1 -0
- package/dist/components/Spinner/Spinner.stories.svelte +20 -23
- package/dist/components/Spinner/Spinner.stories.svelte.d.ts +52 -17
- package/dist/components/Spinner/Spinner.svelte +1 -1
- package/dist/components/Spinner/Spinner.svelte.d.ts +1 -1
- package/dist/components/Table/Select.svelte +1 -8
- package/dist/components/Table/Table.stories.svelte +30 -44
- package/dist/components/Table/Table.stories.svelte.d.ts +21 -17
- package/dist/components/Table/Table.svelte +5 -1
- package/dist/components/Table/Table.svelte.d.ts +1 -1
- package/dist/components/Theme/Theme.stories.svelte +9 -7
- package/dist/components/Theme/Theme.stories.svelte.d.ts +16 -0
- package/dist/components/Theme/Theme.svelte +1 -1
- package/dist/components/Theme/Theme.svelte.d.ts +1 -1
- package/dist/components/ToolsHeader/ToolsHeader.stories.svelte +11 -14
- package/dist/components/ToolsHeader/ToolsHeader.stories.svelte.d.ts +15 -17
- package/dist/components/ToolsHeader/ToolsHeader.svelte +1 -1
- package/dist/components/ToolsHeader/ToolsHeader.svelte.d.ts +2 -3
- package/dist/components/Video/Video.stories.svelte +16 -23
- package/dist/components/Video/Video.stories.svelte.d.ts +15 -17
- package/dist/components/Video/Video.svelte +1 -1
- package/dist/components/Video/Video.svelte.d.ts +1 -1
- package/dist/components/Visible/Visible.stories.svelte +12 -16
- package/dist/components/Visible/Visible.stories.svelte.d.ts +15 -17
- package/dist/components/Visible/Visible.svelte +1 -1
- package/dist/components/Visible/Visible.svelte.d.ts +1 -1
- package/dist/docs/actions/intro.mdx +0 -2
- package/dist/docs/contributing/component-guidelines.mdx +0 -2
- package/dist/docs/contributing/quickstart.mdx +2 -4
- package/dist/docs/contributing/story-recipes/basic-story.mdx +0 -2
- package/dist/docs/contributing/story-recipes/story-with-custom-controls.mdx +0 -2
- package/dist/docs/contributing/story-recipes/story-with-custom-docs.mdx +0 -2
- package/dist/docs/contributing/story-recipes/story-with-media.mdx +0 -2
- package/dist/docs/contributing/writing-component-stories.mdx +0 -2
- package/dist/docs/contributing/writing-docs-stories.mdx +0 -4
- package/dist/docs/docs-components/CopyColourTable/ImportSnippet.d.ts +2 -1
- package/dist/docs/docs-components/CopyColourTable/ImportSnippet.jsx +4 -4
- package/dist/docs/docs-components/CopyColourTable/Table.d.ts +2 -1
- package/dist/docs/docs-components/CopyColourTable/styles.module.scss +2 -0
- package/dist/docs/docs-components/CopyTable/Table.d.ts +2 -1
- package/dist/docs/docs-components/MdxTheme/Theme.d.ts +2 -1
- package/dist/docs/docs-components/Mermaid/Mermaid.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/CSSVariables/VariableTable.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/Customiser/ColourPicker.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Customiser.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Key.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Value.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/NewTheme/NewTheme.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/NewTheme/NewTheme.jsx +3 -3
- package/dist/docs/docs-components/ThemeBuilder/NewTheme/styles.module.scss +6 -0
- package/dist/docs/docs-components/ThemeBuilder/ThemeBuilder.d.ts +2 -1
- package/dist/docs/docs-components/ThemeBuilder/ThemeSwitch/Switch.d.ts +2 -1
- package/dist/docs/guides/customising-with-scss.mdx +10 -9
- package/dist/docs/guides/getting-help.mdx +3 -5
- package/dist/docs/guides/graphics-kit.mdx +8 -30
- package/dist/docs/guides/imgs/intro.png +0 -0
- package/dist/docs/guides/imgs/more-stories.png +0 -0
- package/dist/docs/guides/using-docs.mdx +12 -12
- package/dist/docs/intro.mdx +1 -3
- package/dist/docs/layout/intro.mdx +1 -3
- package/dist/docs/styles/colours/intro.mdx +1 -3
- package/dist/docs/styles/colours/primary.mdx +0 -2
- package/dist/docs/styles/colours/thematic.mdx +0 -2
- package/dist/docs/styles/intro.mdx +0 -2
- package/dist/docs/styles/tokens/accessibility/main.mdx +1 -3
- package/dist/docs/styles/tokens/backgrounds/main.mdx +1 -3
- package/dist/docs/styles/tokens/borders/main.mdx +0 -2
- package/dist/docs/styles/tokens/flexbox/main.mdx +0 -2
- package/dist/docs/styles/tokens/interactivity/_main.mdx +0 -2
- package/dist/docs/styles/tokens/intro.mdx +6 -10
- package/dist/docs/styles/tokens/layout/main.mdx +0 -2
- package/dist/docs/styles/tokens/sizing/main.mdx +0 -2
- package/dist/docs/styles/tokens/spacers/main.mdx +2 -4
- package/dist/docs/styles/tokens/typography/main.mdx +7 -9
- package/dist/docs/styles/tokens/variables/main.mdx +0 -2
- package/dist/docs/theme-builder/theme-builder.mdx +1 -3
- package/dist/docs/theming/css-variables.mdx +1 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -5
- package/dist/scss/reset/_main.scss +2 -2
- package/package.json +29 -22
- package/dist/components/EndNotes/docProps.d.ts +0 -10
- package/dist/components/EndNotes/docProps.js +0 -8
- package/dist/components/FeaturePhoto/stories/docs/quickit.md +0 -38
- package/dist/components/GraphicBlock/stories/docs/quickit.md +0 -35
- package/dist/components/PhotoPack/docProps.d.ts +0 -38
- package/dist/components/PhotoPack/docProps.js +0 -26
- package/dist/components/PhotoPack/stories/docs/quickit.md +0 -67
- package/dist/components/SEO/stories/docs/quickit.md +0 -29
- package/dist/components/Scroller/docProps.d.ts +0 -36
- package/dist/components/Scroller/docProps.js +0 -16
- package/dist/components/Scroller/stories/docs/quickit.md +0 -60
- package/dist/components/SiteFooter/Referrals/IntersectionObserver.svelte +0 -45
- package/dist/components/SiteFooter/Referrals/IntersectionObserver.svelte.d.ts +0 -41
- package/dist/components/SiteFooter/Referrals/Link.svelte +0 -80
- package/dist/components/SiteFooter/Referrals/Link.svelte.d.ts +0 -31
- package/dist/components/SiteFooter/Referrals/Referrals.svelte +0 -56
- package/dist/components/SiteFooter/Referrals/Referrals.svelte.d.ts +0 -25
- package/dist/components/SiteFooter/Referrals/index.svelte +0 -49
- package/dist/components/SiteFooter/Referrals/index.svelte.d.ts +0 -25
- package/dist/components/SiteFooter/stories/docs/customReferrals.md +0 -26
- package/dist/components/SiteHeadline/stories/docs/quickit.md +0 -30
- package/dist/docs/guides/google-docs.mdx +0 -74
- package/dist/docs/guides/imgs/copy-code.png +0 -0
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import darkThemeDocs from "./stories/docs/darkTheme.md?raw";
|
|
3
|
+
import removeReferralsDocs from "./stories/docs/removeReferrals.md?raw";
|
|
4
|
+
import SiteFooter from "./SiteFooter.svelte";
|
|
5
|
+
import {
|
|
6
|
+
withComponentDocs,
|
|
7
|
+
withStoryDocs
|
|
8
|
+
} from "../../lib/docs/utils/withParams.js";
|
|
9
|
+
export const meta = {
|
|
10
|
+
title: "Components/Page furniture/SiteFooter",
|
|
11
|
+
component: SiteFooter,
|
|
12
|
+
...withComponentDocs(componentDocs)
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
3
15
|
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
// @ts-ignore raw
|
|
7
|
-
import darkThemeDocs from './stories/docs/darkTheme.md?raw';
|
|
8
|
-
// @ts-ignore raw
|
|
9
|
-
import customReferralsDocs from './stories/docs/customReferrals.md?raw';
|
|
10
|
-
// @ts-ignore raw
|
|
11
|
-
import removeReferralsDocs from './stories/docs/removeReferrals.md?raw';
|
|
16
|
+
<script>
|
|
17
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
12
18
|
|
|
13
|
-
import SiteFooter from './SiteFooter.svelte';
|
|
14
19
|
import Theme from '../Theme/Theme.svelte';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
withComponentDocs,
|
|
18
|
-
withStoryDocs,
|
|
19
|
-
} from '../../lib/docs/utils/withParams.js';
|
|
20
|
-
|
|
21
|
-
const customReferrals = [
|
|
22
|
-
{
|
|
23
|
-
url: 'https://graphics.reuters.com/world-coronavirus-tracker-and-maps/',
|
|
24
|
-
title: 'COVID-19: the latest global statistics, charts and maps',
|
|
25
|
-
description: 'Tracking the global coronavirus outbreak, updated daily',
|
|
26
|
-
image:
|
|
27
|
-
'https://graphics.thomsonreuters.com/cdn/2020/covid-global-tracker/share-cards/global/en/share.png',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
url: 'https://graphics.reuters.com/world-coronavirus-tracker-and-maps/regions/europe',
|
|
31
|
-
title: 'Coronavirus in Europe: the latest counts, charts and maps',
|
|
32
|
-
description: 'Tracking the global coronavirus outbreak, updated daily',
|
|
33
|
-
image:
|
|
34
|
-
'https://graphics.thomsonreuters.com/cdn/2020/covid-global-tracker/share-cards/regions/en/europe.png',
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
20
|
</script>
|
|
38
21
|
|
|
39
|
-
<Meta
|
|
40
|
-
title="Components/SiteFooter"
|
|
41
|
-
component="{SiteFooter}"
|
|
42
|
-
{...withComponentDocs(componentDocs)}
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
22
|
<Template let:args>
|
|
46
23
|
<div>
|
|
47
24
|
<SiteFooter {...args} />
|
|
@@ -58,14 +35,6 @@
|
|
|
58
35
|
</div>
|
|
59
36
|
</Story>
|
|
60
37
|
|
|
61
|
-
<Story
|
|
62
|
-
name="Customised referrals"
|
|
63
|
-
args="{{
|
|
64
|
-
referrals: customReferrals,
|
|
65
|
-
}}"
|
|
66
|
-
{...withStoryDocs(customReferralsDocs)}
|
|
67
|
-
/>
|
|
68
|
-
|
|
69
38
|
<Story
|
|
70
39
|
name="Remove referrals"
|
|
71
40
|
args="{{ includeReferrals: false }}"
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SiteFooterProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SiteFooterEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SiteFooterSlots */
|
|
4
|
-
export default class SiteFooter extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type SiteFooterProps = typeof __propDef.props;
|
|
11
|
-
export type SiteFooterEvents = typeof __propDef.events;
|
|
12
|
-
export type SiteFooterSlots = typeof __propDef.slots;
|
|
13
1
|
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
parameters: {
|
|
4
|
+
docs: any;
|
|
17
5
|
};
|
|
6
|
+
title: string;
|
|
7
|
+
component: typeof SiteFooter;
|
|
8
|
+
};
|
|
9
|
+
declare const __propDef: {
|
|
10
|
+
props: Record<string, never>;
|
|
18
11
|
events: {
|
|
19
12
|
[evt: string]: CustomEvent<any>;
|
|
20
13
|
};
|
|
21
14
|
slots: {};
|
|
22
|
-
exports?: undefined;
|
|
23
|
-
bindings?: undefined;
|
|
15
|
+
exports?: {} | undefined;
|
|
16
|
+
bindings?: string | undefined;
|
|
24
17
|
};
|
|
18
|
+
export type SiteFooterProps = typeof __propDef.props;
|
|
19
|
+
export type SiteFooterEvents = typeof __propDef.events;
|
|
20
|
+
export type SiteFooterSlots = typeof __propDef.slots;
|
|
21
|
+
export default class SiteFooter extends SvelteComponent<SiteFooterProps, SiteFooterEvents, SiteFooterSlots> {
|
|
22
|
+
}
|
|
25
23
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<!-- @component `SiteFooter` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `SiteFooter` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-sitefooter--docs) -->
|
|
2
2
|
<script>import QuickLinks from "./QuickLinks.svelte";
|
|
3
3
|
import CompanyLinks from "./CompanyLinks.svelte";
|
|
4
4
|
import LegalLinks from "./LegalLinks.svelte";
|
|
5
|
-
import
|
|
5
|
+
import ReferralBlock from "../ReferralBlock/ReferralBlock.svelte";
|
|
6
|
+
import PaddingReset from "../PaddingReset/PaddingReset.svelte";
|
|
6
7
|
import starterData from "./data.json";
|
|
7
8
|
import { onMount } from "svelte";
|
|
8
|
-
export let referrals = [];
|
|
9
9
|
export let includeReferrals = true;
|
|
10
10
|
let data = starterData;
|
|
11
11
|
onMount(async () => {
|
|
@@ -39,7 +39,13 @@ onMount(async () => {
|
|
|
39
39
|
>
|
|
40
40
|
<div>
|
|
41
41
|
{#if includeReferrals}
|
|
42
|
-
<
|
|
42
|
+
<PaddingReset>
|
|
43
|
+
<ReferralBlock
|
|
44
|
+
heading="More from Reuters Graphics"
|
|
45
|
+
collection="graphics"
|
|
46
|
+
class="fpy-4"
|
|
47
|
+
/>
|
|
48
|
+
</PaddingReset>
|
|
43
49
|
{/if}
|
|
44
50
|
<QuickLinks links="{data[0]}" />
|
|
45
51
|
<CompanyLinks links="{data[0]}" />
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
/**
|
|
5
|
-
* Custom referrals to other Reuters Graphics projects
|
|
6
|
-
*/ referrals?: {
|
|
7
|
-
url: URL;
|
|
8
|
-
image: URL;
|
|
9
|
-
title: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
}[];
|
|
12
4
|
/**
|
|
13
5
|
* Set to `false` to remove graphics referrals
|
|
14
6
|
*/ includeReferrals?: boolean;
|
|
@@ -23,7 +15,7 @@ declare const __propDef: {
|
|
|
23
15
|
export type SiteFooterProps = typeof __propDef.props;
|
|
24
16
|
export type SiteFooterEvents = typeof __propDef.events;
|
|
25
17
|
export type SiteFooterSlots = typeof __propDef.slots;
|
|
26
|
-
/** `SiteFooter` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
18
|
+
/** `SiteFooter` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-sitefooter--docs) */
|
|
27
19
|
export default class SiteFooter extends SvelteComponent<SiteFooterProps, SiteFooterEvents, SiteFooterSlots> {
|
|
28
20
|
}
|
|
29
21
|
export {};
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 30 30"
|
|
8
|
+
aria-labelledby="TwitterIconId"
|
|
9
|
+
role="presentation"
|
|
6
10
|
aria-hidden="true"
|
|
7
11
|
focusable="false"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
viewBox="0 0 16 13"
|
|
10
12
|
style="width: {width}px;"
|
|
11
|
-
><path
|
|
12
|
-
d="
|
|
13
|
+
><title id="TwitterIconId">X</title><path
|
|
14
|
+
d="M17.923 14.387 25.569 5.5h-1.812l-6.64 7.717L11.817 5.5H5.7l8.018 11.67L5.7 26.49h1.812l7.01-8.15 5.6 8.15h6.116l-8.316-12.102Zm-2.482 2.885-.812-1.162-6.464-9.246h2.783l5.216 7.462.813 1.162 6.78 9.7h-2.782l-5.534-7.915Z"
|
|
13
15
|
></path></svg
|
|
14
16
|
>
|
|
15
17
|
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import darkThemeDocs from "./stories/docs/darkTheme.md?raw";
|
|
3
|
+
import SiteHeader from "./SiteHeader.svelte";
|
|
4
|
+
import {
|
|
5
|
+
withComponentDocs,
|
|
6
|
+
withStoryDocs
|
|
7
|
+
} from "../../lib/docs/utils/withParams.js";
|
|
8
|
+
export const meta = {
|
|
9
|
+
title: "Components/Page furniture/SiteHeader",
|
|
10
|
+
component: SiteHeader,
|
|
11
|
+
...withComponentDocs(componentDocs),
|
|
12
|
+
argsTypes: {
|
|
13
|
+
themes: { control: { disable: true } }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
3
17
|
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
// @ts-ignore raw
|
|
7
|
-
import darkThemeDocs from './stories/docs/darkTheme.md?raw';
|
|
18
|
+
<script>
|
|
19
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
8
20
|
|
|
9
|
-
import SiteHeader from './SiteHeader.svelte';
|
|
10
21
|
import Theme from '../Theme/Theme.svelte';
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
withComponentDocs,
|
|
14
|
-
withStoryDocs,
|
|
15
|
-
} from '../../lib/docs/utils/withParams.js';
|
|
16
|
-
|
|
17
|
-
const metaProps = {
|
|
18
|
-
...withComponentDocs(componentDocs),
|
|
19
|
-
argsTypes: {
|
|
20
|
-
themes: { control: { disable: true } },
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
22
|
</script>
|
|
24
23
|
|
|
25
|
-
<Meta title="Components/SiteHeader" component="{SiteHeader}" {...metaProps} />
|
|
26
|
-
|
|
27
24
|
<Template let:args>
|
|
28
25
|
<div>
|
|
29
26
|
<SiteHeader {...args} />
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SiteHeaderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SiteHeaderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SiteHeaderSlots */
|
|
4
|
-
export default class SiteHeader extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type SiteHeaderProps = typeof __propDef.props;
|
|
11
|
-
export type SiteHeaderEvents = typeof __propDef.events;
|
|
12
|
-
export type SiteHeaderSlots = typeof __propDef.slots;
|
|
13
1
|
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
argsTypes: {
|
|
4
|
+
themes: {
|
|
5
|
+
control: {
|
|
6
|
+
disable: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: any;
|
|
17
12
|
};
|
|
13
|
+
title: string;
|
|
14
|
+
component: typeof SiteHeader;
|
|
15
|
+
};
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: Record<string, never>;
|
|
18
18
|
events: {
|
|
19
19
|
[evt: string]: CustomEvent<any>;
|
|
20
20
|
};
|
|
21
21
|
slots: {};
|
|
22
|
-
exports?: undefined;
|
|
23
|
-
bindings?: undefined;
|
|
22
|
+
exports?: {} | undefined;
|
|
23
|
+
bindings?: string | undefined;
|
|
24
24
|
};
|
|
25
|
+
export type SiteHeaderProps = typeof __propDef.props;
|
|
26
|
+
export type SiteHeaderEvents = typeof __propDef.events;
|
|
27
|
+
export type SiteHeaderSlots = typeof __propDef.slots;
|
|
28
|
+
export default class SiteHeader extends SvelteComponent<SiteHeaderProps, SiteHeaderEvents, SiteHeaderSlots> {
|
|
29
|
+
}
|
|
25
30
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `SiteHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `SiteHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-siteheader--docs) -->
|
|
2
2
|
<script>import ReutersLogo from "../ReutersLogo/ReutersLogo.svelte";
|
|
3
3
|
import NavBar from "./NavBar/index.svelte";
|
|
4
4
|
import starterData from "./data.json";
|
|
@@ -11,7 +11,7 @@ declare const __propDef: {
|
|
|
11
11
|
export type SiteHeaderProps = typeof __propDef.props;
|
|
12
12
|
export type SiteHeaderEvents = typeof __propDef.events;
|
|
13
13
|
export type SiteHeaderSlots = typeof __propDef.slots;
|
|
14
|
-
/** `SiteHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
14
|
+
/** `SiteHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-siteheader--docs) */
|
|
15
15
|
export default class SiteHeader extends SvelteComponent<SiteHeaderProps, SiteHeaderEvents, SiteHeaderSlots> {
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import componentDocs from './stories/docs/component.md?raw';
|
|
6
6
|
|
|
7
7
|
export const meta = {
|
|
8
|
-
title: 'Components/SiteHeadline',
|
|
8
|
+
title: 'Components/Text elements/SiteHeadline',
|
|
9
9
|
component: SiteHeadline,
|
|
10
10
|
...withComponentDocs(componentDocs),
|
|
11
11
|
argTypes: {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
22
22
|
|
|
23
23
|
// @ts-ignore raw
|
|
24
|
-
import
|
|
24
|
+
import archieML from './stories/docs/archieML.md?raw';
|
|
25
25
|
|
|
26
26
|
import { withStoryDocs } from '../../lib/docs/utils/withParams.js';
|
|
27
27
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}}"
|
|
57
57
|
/>
|
|
58
58
|
|
|
59
|
-
<Story name="
|
|
59
|
+
<Story name="ArchieML" {...withStoryDocs(archieML)}>
|
|
60
60
|
<SiteHeadline
|
|
61
61
|
hed="{content.Hed}"
|
|
62
62
|
section="{content.Section}"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- @component `SiteHeadline` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-text-elements-siteheadline--docs) -->
|
|
1
2
|
<script>export let hed = "Reuters Graphics Interactive";
|
|
2
3
|
export let hedSize = "normal";
|
|
3
4
|
export let section = "Graphics";
|
|
@@ -49,6 +49,7 @@ declare const __propDef: {
|
|
|
49
49
|
export type SiteHeadlineProps = typeof __propDef.props;
|
|
50
50
|
export type SiteHeadlineEvents = typeof __propDef.events;
|
|
51
51
|
export type SiteHeadlineSlots = typeof __propDef.slots;
|
|
52
|
+
/** `SiteHeadline` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-text-elements-siteheadline--docs) */
|
|
52
53
|
export default class SiteHeadline extends SvelteComponent<SiteHeadlineProps, SiteHeadlineEvents, SiteHeadlineSlots> {
|
|
53
54
|
}
|
|
54
55
|
export {};
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
containerPadding: {
|
|
19
|
-
control: { type: 'range', min: 5, max: 100, step: 5 },
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import Spinner from "./Spinner.svelte";
|
|
3
|
+
import { withComponentDocs } from "../../lib/docs/utils/withParams.js";
|
|
4
|
+
export const meta = {
|
|
5
|
+
title: "Components/Utilities/Spinner",
|
|
6
|
+
component: Spinner,
|
|
7
|
+
...withComponentDocs(componentDocs),
|
|
8
|
+
argTypes: {
|
|
9
|
+
colour: { control: "color" },
|
|
10
|
+
ringWidth: { control: { type: "range", min: 2, max: 20, step: 1 } },
|
|
11
|
+
width: { control: { type: "range", min: 5, max: 100, step: 5 } },
|
|
12
|
+
speed: { control: { type: "range", min: 0.2, max: 1, step: 0.1 } },
|
|
13
|
+
containerPadding: {
|
|
14
|
+
control: { type: "range", min: 5, max: 100, step: 5 }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
23
18
|
</script>
|
|
24
19
|
|
|
25
|
-
<
|
|
20
|
+
<script>
|
|
21
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
22
|
+
</script>
|
|
26
23
|
|
|
27
24
|
<Template let:args>
|
|
28
25
|
<Spinner {...args} />
|
|
@@ -1,25 +1,60 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SpinnerProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SpinnerEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SpinnerSlots */
|
|
4
|
-
export default class Spinner extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type SpinnerProps = typeof __propDef.props;
|
|
11
|
-
export type SpinnerEvents = typeof __propDef.events;
|
|
12
|
-
export type SpinnerSlots = typeof __propDef.slots;
|
|
13
1
|
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
argTypes: {
|
|
4
|
+
colour: {
|
|
5
|
+
control: string;
|
|
6
|
+
};
|
|
7
|
+
ringWidth: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
step: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
width: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
step: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
speed: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
min: number;
|
|
27
|
+
max: number;
|
|
28
|
+
step: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
containerPadding: {
|
|
32
|
+
control: {
|
|
33
|
+
type: string;
|
|
34
|
+
min: number;
|
|
35
|
+
max: number;
|
|
36
|
+
step: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
parameters: {
|
|
41
|
+
docs: any;
|
|
17
42
|
};
|
|
43
|
+
title: string;
|
|
44
|
+
component: typeof Spinner;
|
|
45
|
+
};
|
|
46
|
+
declare const __propDef: {
|
|
47
|
+
props: Record<string, never>;
|
|
18
48
|
events: {
|
|
19
49
|
[evt: string]: CustomEvent<any>;
|
|
20
50
|
};
|
|
21
51
|
slots: {};
|
|
22
|
-
exports?: undefined;
|
|
23
|
-
bindings?: undefined;
|
|
52
|
+
exports?: {} | undefined;
|
|
53
|
+
bindings?: string | undefined;
|
|
24
54
|
};
|
|
55
|
+
export type SpinnerProps = typeof __propDef.props;
|
|
56
|
+
export type SpinnerEvents = typeof __propDef.events;
|
|
57
|
+
export type SpinnerSlots = typeof __propDef.slots;
|
|
58
|
+
export default class Spinner extends SvelteComponent<SpinnerProps, SpinnerEvents, SpinnerSlots> {
|
|
59
|
+
}
|
|
25
60
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `Spinner` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `Spinner` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-utilities-spinner--docs) -->
|
|
2
2
|
<script>export let colour = "#666";
|
|
3
3
|
export let width = 40;
|
|
4
4
|
export let ringWidth = 6;
|
|
@@ -25,7 +25,7 @@ declare const __propDef: {
|
|
|
25
25
|
export type SpinnerProps = typeof __propDef.props;
|
|
26
26
|
export type SpinnerEvents = typeof __propDef.events;
|
|
27
27
|
export type SpinnerSlots = typeof __propDef.slots;
|
|
28
|
-
/** `Spinner` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
28
|
+
/** `Spinner` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-utilities-spinner--docs) */
|
|
29
29
|
export default class Spinner extends SvelteComponent<SpinnerProps, SpinnerEvents, SpinnerSlots> {
|
|
30
30
|
}
|
|
31
31
|
export {};
|
|
@@ -24,14 +24,7 @@ function input(event) {
|
|
|
24
24
|
</select>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
|
-
<style
|
|
28
|
-
https://utopia.fyi/space/calculator/?c=320,18,1.125,1280,21,1.25,7,3,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12
|
|
29
|
-
*/
|
|
30
|
-
/* Generated from
|
|
31
|
-
https://utopia.fyi/space/calculator/?c=320,18,1.125,1280,21,1.25,7,3,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12
|
|
32
|
-
*/
|
|
33
|
-
/* Scales by 1.125 */
|
|
34
|
-
.select {
|
|
27
|
+
<style>.select {
|
|
35
28
|
width: 250px;
|
|
36
29
|
}
|
|
37
30
|
.select .select--input {
|
|
@@ -1,47 +1,34 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import Table from './Table.svelte';
|
|
26
|
-
|
|
27
|
-
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
|
28
|
-
|
|
29
|
-
import pressFreedom from './stories/pressFreedom.json';
|
|
30
|
-
import homeRuns from './stories/homeRuns.json';
|
|
31
|
-
import richestWomen from './stories/richestWomen.json';
|
|
32
|
-
|
|
33
|
-
const metaProps = {
|
|
34
|
-
...withComponentDocs(componentDocs),
|
|
35
|
-
argTypes: {
|
|
36
|
-
width: {
|
|
37
|
-
control: 'select',
|
|
38
|
-
options: ['normal', 'wide', 'wider', 'widest', 'fluid'],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import metadataDocs from "./stories/docs/metadata.md?raw";
|
|
3
|
+
import truncateDocs from "./stories/docs/truncate.md?raw";
|
|
4
|
+
import paginateDocs from "./stories/docs/paginate.md?raw";
|
|
5
|
+
import searchDocs from "./stories/docs/search.md?raw";
|
|
6
|
+
import filterDocs from "./stories/docs/filter.md?raw";
|
|
7
|
+
import bothDocs from "./stories/docs/both.md?raw";
|
|
8
|
+
import sortDocs from "./stories/docs/sort.md?raw";
|
|
9
|
+
import formatDocs from "./stories/docs/format.md?raw";
|
|
10
|
+
import styleDocs from "./stories/docs/style.md?raw";
|
|
11
|
+
import Table from "./Table.svelte";
|
|
12
|
+
import { withComponentDocs, withStoryDocs } from "$docs/utils/withParams.js";
|
|
13
|
+
export const meta = {
|
|
14
|
+
title: "Components/Text elements/Table",
|
|
15
|
+
component: Table,
|
|
16
|
+
...withComponentDocs(componentDocs),
|
|
17
|
+
argTypes: {
|
|
18
|
+
width: {
|
|
19
|
+
control: "select",
|
|
20
|
+
options: ["normal", "wide", "wider", "widest", "fluid"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
42
24
|
</script>
|
|
43
25
|
|
|
44
|
-
<
|
|
26
|
+
<script>import { Template, Story } from "@storybook/addon-svelte-csf";
|
|
27
|
+
import pressFreedom from "./stories/pressFreedom.json";
|
|
28
|
+
import homeRuns from "./stories/homeRuns.json";
|
|
29
|
+
import richestWomen from "./stories/richestWomen.json";
|
|
30
|
+
const currencyFormat = (v) => "$" + v.toFixed(1);
|
|
31
|
+
</script>
|
|
45
32
|
|
|
46
33
|
<Template let:args>
|
|
47
34
|
<Table {...args} />
|
|
@@ -152,7 +139,7 @@
|
|
|
152
139
|
sortable: true,
|
|
153
140
|
sortField: 'Net worth (in billions)',
|
|
154
141
|
sortDirection: 'descending',
|
|
155
|
-
fieldFormatters: { 'Net worth (in billions)':
|
|
142
|
+
fieldFormatters: { 'Net worth (in billions)': currencyFormat },
|
|
156
143
|
}}"
|
|
157
144
|
/>
|
|
158
145
|
|
|
@@ -165,5 +152,4 @@
|
|
|
165
152
|
title: 'The Richest Women in the World',
|
|
166
153
|
source: 'Source: Forbes',
|
|
167
154
|
}}"
|
|
168
|
-
,
|
|
169
155
|
/>
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TableProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TableEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TableSlots */
|
|
4
|
-
export default class Table extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type TableProps = typeof __propDef.props;
|
|
11
|
-
export type TableEvents = typeof __propDef.events;
|
|
12
|
-
export type TableSlots = typeof __propDef.slots;
|
|
13
1
|
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
argTypes: {
|
|
4
|
+
width: {
|
|
5
|
+
control: string;
|
|
6
|
+
options: string[];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: any;
|
|
17
11
|
};
|
|
12
|
+
title: string;
|
|
13
|
+
component: typeof Table;
|
|
14
|
+
};
|
|
15
|
+
declare const __propDef: {
|
|
16
|
+
props: Record<string, never>;
|
|
18
17
|
events: {
|
|
19
18
|
[evt: string]: CustomEvent<any>;
|
|
20
19
|
};
|
|
21
20
|
slots: {};
|
|
22
|
-
exports?: undefined;
|
|
23
|
-
bindings?: undefined;
|
|
21
|
+
exports?: {} | undefined;
|
|
22
|
+
bindings?: string | undefined;
|
|
24
23
|
};
|
|
24
|
+
export type TableProps = typeof __propDef.props;
|
|
25
|
+
export type TableEvents = typeof __propDef.events;
|
|
26
|
+
export type TableSlots = typeof __propDef.slots;
|
|
27
|
+
export default class Table extends SvelteComponent<TableProps, TableEvents, TableSlots> {
|
|
28
|
+
}
|
|
25
29
|
export {};
|