Skip to content

Commit

Permalink
component folders
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbes7878 committed Nov 19, 2024
1 parent 8b64cc4 commit aaaa257
Show file tree
Hide file tree
Showing 41 changed files with 45 additions and 42 deletions.
1 change: 1 addition & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const parameters = {
options: {
// https://storybook.js.org/docs/svelte/writing-stories/naming-components-and-hierarchy#sorting-stories
storySort: {
method: 'alphabetical-by-kind',
includeNames: true,
order: [
'Intro',
Expand Down
2 changes: 1 addition & 1 deletion src/components/AdSlot/InlineAd.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { withComponentDocs } from './../../docs/utils/withParams';
export const meta = {
title: 'Components/InlineAd',
title: 'Components/Ads & analytics/InlineAd',
component: InlineAd,
...withComponentDocs(adDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/AdSlot/LeaderboardAd.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { withComponentDocs } from './../../docs/utils/withParams';
export const meta = {
title: 'Components/LeaderboardAd',
title: 'Components/Ads & analytics/LeaderboardAd',
component: LeaderboardAd,
...withComponentDocs(adDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/AdSlot/SponsorshipAd.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { withComponentDocs } from './../../docs/utils/withParams';
export const meta = {
title: 'Components/SponsorshipAd',
title: 'Components/Ads & analytics/SponsorshipAd',
component: SponsorshipAd,
...withComponentDocs(adDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Analytics/Analytics.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/Analytics',
title: 'Components/Ads & analytics/Analytics',
component: Analytics,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Article/Article.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/Article',
title: 'Components/Page Layout/Article',
component: Article,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/BeforeAfter/BeforeAfter.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/BeforeAfter',
title: 'Components/Graphics/BeforeAfter',
component: BeforeAfter,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Block/Block.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/Block',
title: 'Components/Page layout/Block',
component: Block,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/BodyText/BodyText.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { withComponentDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/BodyText',
title: 'Components/Text elements/BodyText',
component: BodyText,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Byline/Byline.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { withComponentDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/Byline',
title: 'Components/Text elements/Byline',
component: Byline,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/DatawrapperChart',
title: 'Components/Graphics/DatawrapperChart',
component: DatawrapperChart,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/DocumentCloud/DocumentCloud.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/DocumentCloud',
title: 'Components/Multimedia/DocumentCloud',
component: DocumentCloud,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/EmbedPreviewerLink',
title: 'Components/Utilities/EmbedPreviewerLink',
component: EmbedPreviewerLink,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/EndNotes/EndNotes.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/EndNotes',
title: 'Components/Text elements/EndNotes',
component: EndNotes,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeaturePhoto/FeaturePhoto.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/FeaturePhoto',
title: 'Components/Multimedia/FeaturePhoto',
component: FeaturePhoto,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Framer/Framer.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Framer',
title: 'Components/Utilities/Framer',
component: Framer,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/GraphicBlock/GraphicBlock.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/GraphicBlock',
title: 'Components/Graphics/GraphicBlock',
component: GraphicBlock,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headline/Headline.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Headline',
title: 'Components/Text elements/Headline',
component: Headline,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeroHeadline/Hero.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/HeroHeadline',
title: 'Components/Text elements/HeroHeadline',
component: HeroHeadline,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoBox/InfoBox.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/InfoBox',
title: 'Components/Text elements/InfoBox',
component: InfoBox,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Markdown/Markdown.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Markdown',
title: 'Components/Text elements/Markdown',
component: Markdown,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/PaddingReset/PaddingReset.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/PaddingReset',
title: 'Components/Page layout/PaddingReset',
component: PaddingReset,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/PhotoCarousel/PhotoCarousel.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/PhotoCarousel',
title: 'Components/Multimedia/PhotoCarousel',
component: PhotoCarousel,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PhotoPack/PhotoPack.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/PhotoPack',
title: 'Components/Multimedia/PhotoPack',
component: PhotoPack,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PymChild/PymChild.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/PymChild',
title: 'Components/Utilities/PymChild',
component: PymChild,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReferralBlock/ReferralBlock.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/ReferralBlock',
title: 'Components/Page furniture/ReferralBlock',
component: ReferralBlock,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/ReutersGraphicsLogo',
title: 'Components/Logos/ReutersGraphicsLogo',
component: ReutersGraphicsLogo,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReutersLogo/ReutersLogo.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/ReutersLogo',
title: 'Components/Logos/ReutersLogo',
component: ReutersLogo,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SEO/SEO.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/SEO',
title: 'Components/Ads & analytics/SEO',
component: SEO,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Scroller/Scroller.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Scroller',
title: 'Components/Graphics/Scroller',
component: Scroller,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchInput/SearchInput.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/SearchInput',
title: 'Components/Controls/SearchInput',
component: SearchInput,
...withComponentDocs(componentDocs),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/SimpleTimeline',
title: 'Components/Text elements/SimpleTimeline',
component: SimpleTimeline,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SiteFooter/SiteFooter.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/SiteFooter',
title: 'Components/Page furniture/SiteFooter',
component: SiteFooter,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/SiteHeader/SiteHeader.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/SiteHeader',
title: 'Components/Page furniture/SiteHeader',
component: SiteHeader,
...withComponentDocs(componentDocs),
argsTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SiteHeadline/SiteHeadline.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import componentDocs from './stories/docs/component.md?raw';
export const meta = {
title: 'Components/SiteHeadline',
title: 'Components/Text elements/SiteHeadline',
component: SiteHeadline,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Spinner/Spinner.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Spinner',
title: 'Components/Utilities/Spinner',
component: Spinner,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
8 changes: 5 additions & 3 deletions src/components/Table/Table.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
export const meta = {
title: 'Components/Table',
title: 'Components/Text elements/Table',
component: Table,
...withComponentDocs(componentDocs),
argTypes: {
Expand All @@ -37,12 +37,14 @@
};
</script>

<script>
<script lang="ts">
import { Template, Story } from '@storybook/addon-svelte-csf';
import pressFreedom from './stories/pressFreedom.json';
import homeRuns from './stories/homeRuns.json';
import richestWomen from './stories/richestWomen.json';
const currencyFormat = (v: number) => '$' + v.toFixed(1);
</script>

<Template let:args>
Expand Down Expand Up @@ -154,7 +156,7 @@
sortable: true,
sortField: 'Net worth (in billions)',
sortDirection: 'descending',
fieldFormatters: { 'Net worth (in billions)': (v) => '$' + v.toFixed(1) },
fieldFormatters: { 'Net worth (in billions)': currencyFormat },
}}"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/components/Theme/Theme.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
} from '../../docs/utils/withParams.js';
export const meta = {
title: 'Components/Theme',
title: 'Components/Theming/Theme',
component: Theme,
...withComponentDocs(componentDocs),
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolsHeader/ToolsHeader.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/ToolsHeader',
title: 'Components/Page furniture/ToolsHeader',
component: ToolsHeader,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Video/Video.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
} from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Video',
title: 'Components/Multimedia/Video',
component: Video,
...withComponentDocs(componentDocs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Visible/Visible.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { withSource, withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
title: 'Components/Visible',
title: 'Components/Utilities/Visible',
component: Visible,
...withComponentDocs(componentDocs),
};
Expand Down

0 comments on commit aaaa257

Please sign in to comment.