@reuters-graphics/graphics-components 1.1.6 → 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/Video/stories/videos/silent-video.mp4 +0 -0
- package/dist/components/Video/stories/videos/sound-video.mp4 +0 -0
- 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.jsx +4 -4
- package/dist/docs/docs-components/CopyColourTable/styles.module.scss +2 -0
- 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/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 +41 -38
- 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,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `Table` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `Table` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-text-elements-table--docs) -->
|
|
2
2
|
<script>import { onMount } from "svelte";
|
|
3
3
|
export let data;
|
|
4
4
|
export let title = null;
|
|
@@ -234,6 +234,7 @@ https://utopia.fyi/space/calculator/?c=320,18,1.125,1280,21,1.25,7,3,&s=0.75|0.5
|
|
|
234
234
|
section.table {
|
|
235
235
|
overflow-x: auto;
|
|
236
236
|
}
|
|
237
|
+
|
|
237
238
|
section.table table {
|
|
238
239
|
background-color: transparent;
|
|
239
240
|
border-collapse: separate;
|
|
@@ -279,9 +280,11 @@ section.table table.truncated tbody tr:last-child:not(:first-child) {
|
|
|
279
280
|
mask-image: linear-gradient(to bottom, var(--theme-colour-text-primary) 0%, transparent 100%);
|
|
280
281
|
-webkit-mask-image: linear-gradient(to bottom, var(--theme-colour-text-primary) 0%, transparent 100%);
|
|
281
282
|
}
|
|
283
|
+
|
|
282
284
|
.avoid-clicks {
|
|
283
285
|
pointer-events: none;
|
|
284
286
|
}
|
|
287
|
+
|
|
285
288
|
nav.input {
|
|
286
289
|
padding: 0;
|
|
287
290
|
width: 100%;
|
|
@@ -292,6 +295,7 @@ nav.input {
|
|
|
292
295
|
flex-wrap: wrap;
|
|
293
296
|
gap: clamp(0.31rem, 0.29rem + 0.1vw, 0.38rem);
|
|
294
297
|
}
|
|
298
|
+
|
|
295
299
|
nav.show-all button {
|
|
296
300
|
min-width: 13rem;
|
|
297
301
|
height: 2.15rem;
|
|
@@ -89,7 +89,7 @@ declare const __propDef: {
|
|
|
89
89
|
export type TableProps = typeof __propDef.props;
|
|
90
90
|
export type TableEvents = typeof __propDef.events;
|
|
91
91
|
export type TableSlots = typeof __propDef.slots;
|
|
92
|
-
/** `Table` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
92
|
+
/** `Table` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-text-elements-table--docs) */
|
|
93
93
|
export default class Table extends SvelteComponent<TableProps, TableEvents, TableSlots> {
|
|
94
94
|
}
|
|
95
95
|
export {};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import componentDocs from "./stories/docs/component.md?raw";
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
3
2
|
import customiseDocs from "./stories/docs/customise.md?raw";
|
|
4
3
|
import customiseFontDocs from "./stories/docs/customise-font.md?raw";
|
|
5
4
|
import patternDocs from "./stories/docs/pattern.md?raw";
|
|
6
5
|
import inheritanceDocs from "./stories/docs/inheritance.md?raw";
|
|
7
|
-
import ThemedPage from "./stories/ThemedPage.svelte";
|
|
8
|
-
import SiteHeader from "../SiteHeader/SiteHeader.svelte";
|
|
9
6
|
import Theme, { themes } from "./Theme.svelte";
|
|
10
|
-
import Headline from "./../Headline/Headline.svelte";
|
|
11
7
|
import {
|
|
12
8
|
withComponentDocs,
|
|
13
9
|
withStoryDocs
|
|
14
10
|
} from "../../docs/utils/withParams.js";
|
|
15
|
-
const
|
|
11
|
+
export const meta = {
|
|
12
|
+
title: "Components/Theming/Theme",
|
|
13
|
+
component: Theme,
|
|
16
14
|
...withComponentDocs(componentDocs),
|
|
17
15
|
argTypes: {
|
|
18
16
|
base: {
|
|
@@ -24,7 +22,11 @@ const metaProps = {
|
|
|
24
22
|
};
|
|
25
23
|
</script>
|
|
26
24
|
|
|
27
|
-
<
|
|
25
|
+
<script>import { Template, Story } from "@storybook/addon-svelte-csf";
|
|
26
|
+
import ThemedPage from "./stories/ThemedPage.svelte";
|
|
27
|
+
import SiteHeader from "../SiteHeader/SiteHeader.svelte";
|
|
28
|
+
import Headline from "./../Headline/Headline.svelte";
|
|
29
|
+
</script>
|
|
28
30
|
|
|
29
31
|
<Template let:args>
|
|
30
32
|
<div class="reset-article">
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
argTypes: {
|
|
4
|
+
base: {
|
|
5
|
+
control: string;
|
|
6
|
+
options: string[];
|
|
7
|
+
};
|
|
8
|
+
themes: {
|
|
9
|
+
control: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: any;
|
|
14
|
+
};
|
|
15
|
+
title: string;
|
|
16
|
+
component: typeof Theme;
|
|
17
|
+
};
|
|
2
18
|
declare const __propDef: {
|
|
3
19
|
props: Record<string, never>;
|
|
4
20
|
events: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `Theme` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/theming-
|
|
1
|
+
<!-- @component `Theme` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-theming-theme--docs) -->
|
|
2
2
|
<script context="module">import light from "./themes/light.js";
|
|
3
3
|
import dark from "./themes/dark.js";
|
|
4
4
|
export const themes = { light, dark };
|
|
@@ -31,7 +31,7 @@ declare const __propDef: {
|
|
|
31
31
|
export type ThemeProps = typeof __propDef.props;
|
|
32
32
|
export type ThemeEvents = typeof __propDef.events;
|
|
33
33
|
export type ThemeSlots = typeof __propDef.slots;
|
|
34
|
-
/** `Theme` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/theming-
|
|
34
|
+
/** `Theme` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-theming-theme--docs) */
|
|
35
35
|
export default class Theme extends SvelteComponent<ThemeProps, ThemeEvents, ThemeSlots> {
|
|
36
36
|
}
|
|
37
37
|
export {};
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { withComponentDocs } from '$docs/utils/withParams.js';
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import ToolsHeader from "./ToolsHeader.svelte";
|
|
3
|
+
import { withComponentDocs } from "../../lib/docs/utils/withParams.js";
|
|
4
|
+
export const meta = {
|
|
5
|
+
title: "Components/Page furniture/ToolsHeader",
|
|
6
|
+
component: ToolsHeader,
|
|
7
|
+
...withComponentDocs(componentDocs)
|
|
8
|
+
};
|
|
10
9
|
</script>
|
|
11
10
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{...withComponentDocs(componentDocs)}
|
|
16
|
-
/>
|
|
11
|
+
<script>
|
|
12
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
13
|
+
</script>
|
|
17
14
|
|
|
18
15
|
<Template let:args>
|
|
19
16
|
<div>
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ToolsHeaderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ToolsHeaderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ToolsHeaderSlots */
|
|
4
|
-
export default class ToolsHeader extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type ToolsHeaderProps = typeof __propDef.props;
|
|
11
|
-
export type ToolsHeaderEvents = typeof __propDef.events;
|
|
12
|
-
export type ToolsHeaderSlots = 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 ToolsHeader;
|
|
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 ToolsHeaderProps = typeof __propDef.props;
|
|
19
|
+
export type ToolsHeaderEvents = typeof __propDef.events;
|
|
20
|
+
export type ToolsHeaderSlots = typeof __propDef.slots;
|
|
21
|
+
export default class ToolsHeader extends SvelteComponent<ToolsHeaderProps, ToolsHeaderEvents, ToolsHeaderSlots> {
|
|
22
|
+
}
|
|
25
23
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `ToolsHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `ToolsHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-toolsheader--docs) -->
|
|
2
2
|
<script>export let id = "";
|
|
3
3
|
let cls = "";
|
|
4
4
|
export { cls as class };
|
|
@@ -16,8 +16,7 @@ declare const __propDef: {
|
|
|
16
16
|
* Colour props passed to `ReutersGraphicsLogo` component.
|
|
17
17
|
*/ logoProps?: {
|
|
18
18
|
logoColour?: string;
|
|
19
|
-
|
|
20
|
-
secondaryTextColor?: string;
|
|
19
|
+
textColor?: string;
|
|
21
20
|
};
|
|
22
21
|
/**
|
|
23
22
|
* Link the logo points to.
|
|
@@ -35,7 +34,7 @@ declare const __propDef: {
|
|
|
35
34
|
export type ToolsHeaderProps = typeof __propDef.props;
|
|
36
35
|
export type ToolsHeaderEvents = typeof __propDef.events;
|
|
37
36
|
export type ToolsHeaderSlots = typeof __propDef.slots;
|
|
38
|
-
/** `ToolsHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
37
|
+
/** `ToolsHeader` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-page-furniture-toolsheader--docs) */
|
|
39
38
|
export default class ToolsHeader extends SvelteComponent<ToolsHeaderProps, ToolsHeaderEvents, ToolsHeaderSlots> {
|
|
40
39
|
}
|
|
41
40
|
export {};
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import playAndLoopDocs from "./stories/docs/playAndLoop.md?raw";
|
|
3
|
+
import controlsDocs from "./stories/docs/controls.md?raw";
|
|
4
|
+
import Video from "./Video.svelte";
|
|
5
|
+
import {
|
|
6
|
+
withComponentDocs,
|
|
7
|
+
withStoryDocs
|
|
8
|
+
} from "../../lib/docs/utils/withParams.js";
|
|
9
|
+
export const meta = {
|
|
10
|
+
title: "Components/Multimedia/Video",
|
|
11
|
+
component: Video,
|
|
12
|
+
...withComponentDocs(componentDocs)
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
3
15
|
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
// @ts-ignore raw
|
|
7
|
-
import playAndLoopDocs from './stories/docs/playAndLoop.md?raw';
|
|
8
|
-
// @ts-ignore raw
|
|
9
|
-
import controlsDocs from './stories/docs/controls.md?raw';
|
|
10
|
-
// @ts-ignore raw
|
|
11
|
-
// import withSoundDocs from './stories/docs/withSound.md?raw';
|
|
16
|
+
<script>
|
|
17
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
12
18
|
|
|
13
19
|
// @ts-ignore raw
|
|
14
20
|
import SilentVideo from './stories/videos/silent-video.mp4';
|
|
15
21
|
// @ts-ignore raw
|
|
16
22
|
import SoundVideo from './stories/videos/sound-video.mp4';
|
|
17
|
-
|
|
18
|
-
import Video from './Video.svelte';
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
withComponentDocs,
|
|
22
|
-
withStoryDocs,
|
|
23
|
-
} from '../../lib/docs/utils/withParams.js';
|
|
24
23
|
</script>
|
|
25
24
|
|
|
26
|
-
<Meta
|
|
27
|
-
title="Components/Video"
|
|
28
|
-
component="{Video}"
|
|
29
|
-
{...withComponentDocs(componentDocs)}
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
25
|
<Template let:args>
|
|
33
26
|
<Video {...args} />
|
|
34
27
|
</Template>
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} VideoProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} VideoEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} VideoSlots */
|
|
4
|
-
export default class Video extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type VideoProps = typeof __propDef.props;
|
|
11
|
-
export type VideoEvents = typeof __propDef.events;
|
|
12
|
-
export type VideoSlots = 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 Video;
|
|
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 VideoProps = typeof __propDef.props;
|
|
19
|
+
export type VideoEvents = typeof __propDef.events;
|
|
20
|
+
export type VideoSlots = typeof __propDef.slots;
|
|
21
|
+
export default class Video extends SvelteComponent<VideoProps, VideoEvents, VideoSlots> {
|
|
22
|
+
}
|
|
25
23
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `Video` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `Video` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-multimedia-video--docs) -->
|
|
2
2
|
<script>import IntersectionObserver from "svelte-intersection-observer";
|
|
3
3
|
import Controls from "./Controls.svelte";
|
|
4
4
|
import GraphicBlock from "../GraphicBlock/GraphicBlock.svelte";
|
|
@@ -73,7 +73,7 @@ declare const __propDef: {
|
|
|
73
73
|
export type VideoProps = typeof __propDef.props;
|
|
74
74
|
export type VideoEvents = typeof __propDef.events;
|
|
75
75
|
export type VideoSlots = typeof __propDef.slots;
|
|
76
|
-
/** `Video` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
76
|
+
/** `Video` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-multimedia-video--docs) */
|
|
77
77
|
export default class Video extends SvelteComponent<VideoProps, VideoEvents, VideoSlots> {
|
|
78
78
|
}
|
|
79
79
|
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { withSource, withComponentDocs } from '../../lib/docs/utils/withParams.js';
|
|
1
|
+
<script context="module">import componentDocs from "./stories/docs/component.md?raw";
|
|
2
|
+
import defaultSnippet from "./stories/snippets/default.svelte?raw";
|
|
3
|
+
import Visible from "./Visible.svelte";
|
|
4
|
+
import { withSource, withComponentDocs } from "../../lib/docs/utils/withParams.js";
|
|
5
|
+
export const meta = {
|
|
6
|
+
title: "Components/Utilities/Visible",
|
|
7
|
+
component: Visible,
|
|
8
|
+
...withComponentDocs(componentDocs)
|
|
9
|
+
};
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{...withComponentDocs(componentDocs)}
|
|
18
|
-
/>
|
|
12
|
+
<script>
|
|
13
|
+
import { Template, Story } from '@storybook/addon-svelte-csf';
|
|
14
|
+
</script>
|
|
19
15
|
|
|
20
16
|
<Template let:args>
|
|
21
17
|
<Visible {...args} let:visible>
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} VisibleProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} VisibleEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} VisibleSlots */
|
|
4
|
-
export default class Visible extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type VisibleProps = typeof __propDef.props;
|
|
11
|
-
export type VisibleEvents = typeof __propDef.events;
|
|
12
|
-
export type VisibleSlots = 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 Visible;
|
|
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 VisibleProps = typeof __propDef.props;
|
|
19
|
+
export type VisibleEvents = typeof __propDef.events;
|
|
20
|
+
export type VisibleSlots = typeof __propDef.slots;
|
|
21
|
+
export default class Visible extends SvelteComponent<VisibleProps, VisibleEvents, VisibleSlots> {
|
|
22
|
+
}
|
|
25
23
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @component `Visible` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
1
|
+
<!-- @component `Visible` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-utilities-visible--docs) -->
|
|
2
2
|
<script>import { onMount } from "svelte";
|
|
3
3
|
export let once = false;
|
|
4
4
|
export let top = 0;
|
|
@@ -26,7 +26,7 @@ declare const __propDef: {
|
|
|
26
26
|
export type VisibleProps = typeof __propDef.props;
|
|
27
27
|
export type VisibleEvents = typeof __propDef.events;
|
|
28
28
|
export type VisibleSlots = typeof __propDef.slots;
|
|
29
|
-
/** `Visible` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-
|
|
29
|
+
/** `Visible` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-utilities-visible--docs) */
|
|
30
30
|
export default class Visible extends SvelteComponent<VisibleProps, VisibleEvents, VisibleSlots> {
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -3,8 +3,6 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Actions/Intro" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Actions
|
|
9
7
|
|
|
10
8
|
Svelte [actions](https://svelte.dev/tutorial/actions) are arbitrary functions that run after Svelte "mounts" an element in the DOM.
|
|
@@ -3,8 +3,6 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Contributing/Quickstart" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Contributing
|
|
9
7
|
|
|
10
8
|
Reuters Graphics team members can contribute new components, and we welcome pull requests for any of our existing components from the community.
|
|
@@ -30,7 +28,7 @@ This library includes a basic template for creating and documenting your compone
|
|
|
30
28
|
Just run...
|
|
31
29
|
|
|
32
30
|
```
|
|
33
|
-
|
|
31
|
+
pnpm new
|
|
34
32
|
```
|
|
35
33
|
|
|
36
34
|
... which will create a new directory for your component and copy over an example Svelte component and story page.
|
|
@@ -38,7 +36,7 @@ yarn new
|
|
|
38
36
|
To start developing your component, start the dev server with...
|
|
39
37
|
|
|
40
38
|
```
|
|
41
|
-
|
|
39
|
+
pnpm start
|
|
42
40
|
```
|
|
43
41
|
|
|
44
42
|
When you're ready to share your chart, commit your branch to GitHub, make a PR and we'll get it published!
|
|
@@ -6,8 +6,6 @@ import { parameters } from '../../utils/docsPage.js';
|
|
|
6
6
|
parameters={{ ...parameters }}
|
|
7
7
|
/>
|
|
8
8
|
|
|
9
|
-

|
|
10
|
-
|
|
11
9
|
# Recipes: Basic story
|
|
12
10
|
|
|
13
11
|
To make a basic story, you'll need to setup a few things from storybook's Svelte [Component Story Framework (CSF)](https://storybook.js.org/docs/svelte/api/csf) library.
|
|
@@ -6,8 +6,6 @@ import { parameters } from '../../utils/docsPage.js';
|
|
|
6
6
|
parameters={{ ...parameters }}
|
|
7
7
|
/>
|
|
8
8
|
|
|
9
|
-

|
|
10
|
-
|
|
11
9
|
# Recipes: Story with custom controls
|
|
12
10
|
|
|
13
11
|
You can customise the controls in Storybook's built-in [controls panel](https://storybook.js.org/docs/svelte/essentials/controls) by passing [argTypes](https://storybook.js.org/docs/svelte/api/argtypes) to `Meta` like this:
|
|
@@ -10,8 +10,6 @@ import '../../docStyles.scss';
|
|
|
10
10
|
parameters={{ ...parameters }}
|
|
11
11
|
/>
|
|
12
12
|
|
|
13
|
-

|
|
14
|
-
|
|
15
13
|
# Recipes: Story with custom docs
|
|
16
14
|
|
|
17
15
|
You can add custom markdown to your story page by importing and using markdown files.
|
|
@@ -6,8 +6,6 @@ import { parameters } from '../../utils/docsPage.js';
|
|
|
6
6
|
parameters={{ ...parameters }}
|
|
7
7
|
/>
|
|
8
8
|
|
|
9
|
-

|
|
10
|
-
|
|
11
9
|
# Recipes: Story with media
|
|
12
10
|
|
|
13
11
|
To use media files in your stories, import them directly.
|
|
@@ -3,8 +3,6 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Contributing/Writing stories" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Writing component stories
|
|
9
7
|
|
|
10
8
|
As well as writing your component, you should also document how to use it using Storybook "stories."
|
|
@@ -3,8 +3,6 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Contributing/Writing docs pages" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Writing docs-only pages
|
|
9
7
|
|
|
10
8
|
You can write docs-only pages in simple markdown using MDX format.
|
|
@@ -29,8 +27,6 @@ import { parameters } from '$docs/utils/docsPage.js';
|
|
|
29
27
|
|
|
30
28
|
<Meta title="SCSS/Special rules" parameters={{ ...parameters }} />
|
|
31
29
|
|
|
32
|
-

|
|
33
|
-
|
|
34
30
|
# My docs page
|
|
35
31
|
|
|
36
32
|
Your docs TK...
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light';
|
|
4
4
|
// @ts-ignore scss
|
|
5
5
|
import classes from './styles.module.scss';
|
|
6
|
-
import
|
|
6
|
+
import { prismNord } from '../syntax/nord';
|
|
7
7
|
import scss from 'react-syntax-highlighter/dist/esm/languages/prism/scss';
|
|
8
8
|
|
|
9
9
|
SyntaxHighlighter.registerLanguage('scss', scss);
|
|
@@ -25,7 +25,7 @@ const Copyable = (props) => {
|
|
|
25
25
|
}, [copied]);
|
|
26
26
|
|
|
27
27
|
const handleClick = async ({ partial }) => {
|
|
28
|
-
const copyText = `@
|
|
28
|
+
const copyText = `@use "@reuters-graphics/graphics-components/scss/colours/${formatPartial(partial)}";`;
|
|
29
29
|
await navigator.clipboard.writeText(copyText);
|
|
30
30
|
setCopied(true);
|
|
31
31
|
};
|
|
@@ -44,8 +44,8 @@ const ImportSnippet = ({ included = false, partial = 'thematic/_tr.scss' }) => {
|
|
|
44
44
|
<p>Included</p>
|
|
45
45
|
</div>
|
|
46
46
|
: <div className={classes.importsnippet}>
|
|
47
|
-
<SyntaxHighlighter language="scss" style={
|
|
48
|
-
{`// global.scss \n@
|
|
47
|
+
<SyntaxHighlighter language="scss" style={prismNord}>
|
|
48
|
+
{`// global.scss \n@use "@reuters-graphics/graphics-components/scss/colours/${formatPartial(partial)}";`}
|
|
49
49
|
</SyntaxHighlighter>
|
|
50
50
|
<Copyable partial={partial} />
|
|
51
51
|
</div>;
|
|
@@ -134,6 +134,7 @@ $header: #5e81ac;
|
|
|
134
134
|
.importsnippet :global {
|
|
135
135
|
max-width: 600px;
|
|
136
136
|
position: relative;
|
|
137
|
+
|
|
137
138
|
p {
|
|
138
139
|
font-size: 0.8rem;
|
|
139
140
|
line-height: 1;
|
|
@@ -146,6 +147,7 @@ $header: #5e81ac;
|
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
pre {
|
|
150
|
+
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.19), 0 3px 3px rgba(0, 0, 0, 0.23) !important;
|
|
149
151
|
margin-top: 0 !important;
|
|
150
152
|
border-radius: 4px;
|
|
151
153
|
border: 1px solid hsla(203, 50%, 30%, 0.15);
|
|
@@ -6,7 +6,7 @@ import VariableTable from '../CSSVariables/VariableTable';
|
|
|
6
6
|
import classes from './styles.module.scss';
|
|
7
7
|
import darkTheme from '../../../../components/Theme/themes/dark';
|
|
8
8
|
import lightTheme from '../../../../components/Theme/themes/light';
|
|
9
|
-
import
|
|
9
|
+
import { prismNord } from '../../syntax/nord';
|
|
10
10
|
import scss from 'react-syntax-highlighter/dist/esm/languages/prism/scss';
|
|
11
11
|
import svelteSyntax from '../../../../../.storybook/svelte-highlighting';
|
|
12
12
|
import { updatedDiff } from 'deep-object-diff';
|
|
@@ -26,7 +26,7 @@ const NewTheme = ({ theme, themeName }) => {
|
|
|
26
26
|
Use the code below to adapt the <code>Theme</code> component for your
|
|
27
27
|
new design:
|
|
28
28
|
</p>
|
|
29
|
-
<SyntaxHighlighter language="svelte" style={
|
|
29
|
+
<SyntaxHighlighter language="svelte" style={prismNord}>
|
|
30
30
|
{`<Theme
|
|
31
31
|
base="${themeName}"
|
|
32
32
|
theme={${JSON.stringify(updates, null, 2).replaceAll('"', "'")}}
|
|
@@ -38,7 +38,7 @@ const NewTheme = ({ theme, themeName }) => {
|
|
|
38
38
|
{bgChanged && (
|
|
39
39
|
<SyntaxHighlighter
|
|
40
40
|
language="scss"
|
|
41
|
-
style={
|
|
41
|
+
style={prismNord}
|
|
42
42
|
customStyle={{ maxHeight: '140px' }}
|
|
43
43
|
>
|
|
44
44
|
{`// global.scss
|