@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,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/blocks';
|
|
2
2
|
import { parameters } from '../utils/docsPage.js';
|
|
3
|
+
import Highlight from '../docs-components/Highlight/Highlight';
|
|
3
4
|
|
|
4
5
|
import startImg from './imgs/scss-start.png';
|
|
5
6
|
import highlightImg from './imgs/scss-highlight.png';
|
|
@@ -13,8 +14,6 @@ import winningImg from './imgs/scss-winning.png';
|
|
|
13
14
|
parameters={{ ...parameters }}
|
|
14
15
|
/>
|
|
15
16
|
|
|
16
|
-

|
|
17
|
-
|
|
18
17
|
# Customising components with SCSS
|
|
19
18
|
|
|
20
19
|
One of the most powerful ways to customise components isn't props or, even, Svelte.
|
|
@@ -31,13 +30,13 @@ Let's say you wanted to change our `BeforeAfter` component. You want the text ov
|
|
|
31
30
|
|
|
32
31
|
<img src={startImg} width="600" />
|
|
33
32
|
|
|
34
|
-
The first thing you should do is <
|
|
33
|
+
The first thing you should do is <Highlight>check out the elements you want to change in your web inspector</Highlight> and see if CSS can make the change you want.
|
|
35
34
|
|
|
36
35
|
<img src={highlightImg} width="300" style={{ margin: '0 0 1rem' }} />
|
|
37
36
|
|
|
38
37
|
<img src={inspectorImg} width="100%" />
|
|
39
38
|
|
|
40
|
-
In our case, we want to change the absolute position of those elements. To test that'll actually work, we can <
|
|
39
|
+
In our case, we want to change the absolute position of those elements. To test that'll actually work, we can <Highlight>try it directly in the inspector first!</Highlight>
|
|
41
40
|
|
|
42
41
|
<img src={changeImg} width="500" style={{ margin: '0 0 1rem' }} />
|
|
43
42
|
|
|
@@ -49,7 +48,7 @@ First, let's look at the class of the style rule we changed in the inspector:
|
|
|
49
48
|
|
|
50
49
|
`figure.before-after-container.s-khJY-w4TYkp5 .overlay-container.before.s-khJY-w4TYkp5`
|
|
51
50
|
|
|
52
|
-
One thing we always need to do is <
|
|
51
|
+
One thing we always need to do is <Highlight>strip out any Svelte class names</Highlight>, i.e., those weird `.s-khJY-w4TYkp5` classes. Why? Those are random classes Svelte adds to CSS, and we can't guarantee they won't change.
|
|
53
52
|
|
|
54
53
|
That leaves us with:
|
|
55
54
|
|
|
@@ -57,7 +56,7 @@ That leaves us with:
|
|
|
57
56
|
|
|
58
57
|
But we need our style rule to _beat_ the original style in the CSS cascade, and right now, it's less specific without those class names we stripped.
|
|
59
58
|
|
|
60
|
-
The easiest way to make sure your style rule wins out is to <
|
|
59
|
+
The easiest way to make sure your style rule wins out is to <Highlight>add an ID either directly to the element or to a parent</Highlight>. In our case, let's add an ID through the `BeforeAfter` `id` prop. Now we can use it! (For extra credit, though, we'll drop the `.before` so our new style rule applies to _both_ overlays.)
|
|
61
60
|
|
|
62
61
|
```scss
|
|
63
62
|
figure#my-before-after .overlay-container {
|
|
@@ -83,12 +82,14 @@ div#my-before-after figure .overlay-container {
|
|
|
83
82
|
}
|
|
84
83
|
```
|
|
85
84
|
|
|
86
|
-
We can <
|
|
85
|
+
We can <Highlight>confirm the new style rule is winning by looking at its order back in our web inspector!</Highlight>
|
|
87
86
|
|
|
88
87
|
<img src={winningImg} width="500" style={{ margin: '0 0 1rem' }} />
|
|
89
88
|
|
|
90
89
|
Done!
|
|
91
90
|
|
|
92
|
-
|
|
91
|
+
### Can I just... `important!` it?
|
|
92
|
+
|
|
93
|
+
Yep! Just be sure your style rule is **very specific** and not something generic that might apply to other elements in your page like `div.container`.
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
Many of the components have `class` or `id` props you can use to attach additional classes or an id that will add more specificity to your components.
|
|
@@ -3,8 +3,6 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Guides/Getting help" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Getting help
|
|
9
7
|
|
|
10
8
|
🚨 **If you're on deadline**, talk to your editor who can point you to the nearest developer.
|
|
@@ -15,16 +13,16 @@ If you're _off_ deadline, we use GitHub issues to track things that need fixing
|
|
|
15
13
|
|
|
16
14
|
### Is something wrong in the code?
|
|
17
15
|
|
|
18
|
-
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels
|
|
16
|
+
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels=bug&assignees=hobbes7878) to create an issue on GitHub and report any bugs you've found. It's **very** helpful if you also share a link to any repo you're working in where you've spotted the bug.
|
|
19
17
|
|
|
20
18
|
---
|
|
21
19
|
|
|
22
20
|
### Is something wrong in the docs?
|
|
23
21
|
|
|
24
|
-
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels
|
|
22
|
+
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels=documentation&assignees=hobbes7878) and tell us which docs are incorrect, unclear or could otherwise be improved.
|
|
25
23
|
|
|
26
24
|
---
|
|
27
25
|
|
|
28
26
|
### Have an idea for a new component or how to improve an existing one?
|
|
29
27
|
|
|
30
|
-
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels
|
|
28
|
+
🏷️ [Click here](https://github.com/reuters-graphics/graphics-components/issues/new?labels=new%20feature&assignees=hobbes7878) and tell us more.
|
|
@@ -1,56 +1,34 @@
|
|
|
1
1
|
import { Meta } from '@storybook/blocks';
|
|
2
2
|
import { parameters } from '../utils/docsPage.js';
|
|
3
|
+
import Highlight from '../docs-components/Highlight/Highlight';
|
|
3
4
|
|
|
4
5
|
<Meta
|
|
5
6
|
title="Guides/Using with the Graphics Kit"
|
|
6
7
|
parameters={{ ...parameters }}
|
|
7
8
|
/>
|
|
8
9
|
|
|
9
|
-

|
|
10
|
-
|
|
11
10
|
# Using with the Graphics Kit
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Quickit
|
|
16
|
-
|
|
17
|
-
Look <span className="highlight">for <strong>🚀 QUICKIT</strong> stories</span> (Quick Kit 🤣🙄) for some of our most commonly used components. These stories
|
|
18
|
-
include easy copy/paste snippets as well as Google Doc block examples that should
|
|
19
|
-
shortcut getting a component working in the Graphics Kit.
|
|
20
|
-
|
|
21
|
-
(Want a QUICKIT story for another component? [Just ask us!](https://github.com/reuters-graphics/graphics-components/issues/new?labels=%F0%9F%93%9A%20documentation&assignees=hobbes7878))
|
|
22
|
-
|
|
23
|
-
## FAQs
|
|
24
|
-
|
|
25
|
-
### How do I write my Google Doc?
|
|
12
|
+
Our graphics components are designed to work seemlessly with the [Graphics Kit](https://github.com/reuters-graphics/bluprint_graphics-kit) as well as just about any Svelte-based page builder.
|
|
26
13
|
|
|
27
|
-
|
|
14
|
+
**There is, however, one gotcha to watch out for:**
|
|
28
15
|
|
|
29
|
-
|
|
16
|
+
When working with multimedia files like images or videos, components expect all paths to be <Highlight>absolute URLs.</Highlight>
|
|
30
17
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### How do I use this image/video/etc.?
|
|
34
|
-
|
|
35
|
-
Remember, all references to images, videos and other media must be _absolute paths_:
|
|
36
|
-
|
|
37
|
-
✅ `https://.../myImage.jpg`
|
|
18
|
+
✅ `https://reuters.com/graphics/.../myImage.jpg`
|
|
38
19
|
|
|
39
20
|
❌ `./myImage.jpg`
|
|
40
21
|
|
|
41
|
-
In
|
|
22
|
+
In the Graphics Kit, that means you'll need to prefix relative paths with the special [`assets`](https://svelte.dev/docs/kit/$app-paths#assets) SvelteKit module that contains the root URL for your project. Many examples in these docs show how to do it. But it's also easy enough to demo again here!
|
|
42
23
|
|
|
43
24
|
```svelte
|
|
44
25
|
<script>
|
|
45
26
|
import { FeaturePhoto } from '@reuters-graphics/graphics-components';
|
|
46
27
|
|
|
47
|
-
//
|
|
28
|
+
// Import the assets module if it's not already there.
|
|
48
29
|
import { assets } from '$app/paths';
|
|
49
30
|
</script>
|
|
50
31
|
|
|
32
|
+
<!-- Use the assets module to prefix the path to your image. -->
|
|
51
33
|
<FeautrePhoto src="{`${assets}/imgs/myImage.jpg`}" />
|
|
52
34
|
```
|
|
53
|
-
|
|
54
|
-
### How do I change this component's styles?
|
|
55
|
-
|
|
56
|
-
Check out our guide on [customising components with SCSS](?path=/docs/guides-customising-components-with-scss--page)
|
|
Binary file
|
|
Binary file
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import { Meta } from '@storybook/blocks';
|
|
2
2
|
import { parameters } from '../utils/docsPage.js';
|
|
3
|
+
import Highlight from '../docs-components/Highlight/Highlight';
|
|
3
4
|
|
|
4
5
|
import storiesImg from './imgs/stories.png';
|
|
5
6
|
import introImg from './imgs/intro.png';
|
|
6
7
|
import argsImg from './imgs/argstable.png';
|
|
7
8
|
import frameImg from './imgs/frame.png';
|
|
8
|
-
import copyImg from './imgs/copy-code.png';
|
|
9
9
|
import moreStoriesImg from './imgs/more-stories.png';
|
|
10
10
|
|
|
11
11
|
<Meta title="Guides/Using these docs" parameters={{ ...parameters }} />
|
|
12
12
|
|
|
13
|
-

|
|
14
|
-
|
|
15
13
|
# Using these docs
|
|
16
14
|
|
|
17
15
|
The docs in this site include interactive examples of how to use our components, explanations of how our basic design system works and helpful docs on SCSS tools you can use to customise your page.
|
|
18
16
|
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
Reuters Graphics components are written using Svelte, and we assume in these docs you have a very basic understanding of how those components work.
|
|
20
|
+
|
|
21
|
+
If you don't, **🛑 STOP NOW** and read ["Bare minimum Svelte"](./?path=/docs/guides-bare-minimum-svelte--docs).
|
|
22
|
+
|
|
19
23
|
## How component docs are organised
|
|
20
24
|
|
|
21
25
|
Component docs are written using a framework called [Storybook](https://storybook.js.org/docs/svelte/get-started/introduction), which creates a page for each component. You can find those pages in left-hand nav on the site.
|
|
22
26
|
|
|
23
|
-
Each component has a Docs page and one or more
|
|
27
|
+
Each component has a Docs page and one or more <Highlight>stories</Highlight> or demos that show how the component works:
|
|
24
28
|
|
|
25
29
|
<img
|
|
26
30
|
src={storiesImg}
|
|
27
31
|
style={{ maxWidth: '300px', width: '100%', margin: '0 0 2rem' }}
|
|
28
32
|
/>
|
|
29
33
|
|
|
30
|
-
### Parts of a component page
|
|
34
|
+
### Parts of a component docs page
|
|
31
35
|
|
|
32
|
-
Each component page starts with an intro that includes a little documentation and a code snippet
|
|
36
|
+
Each component page starts with an intro that includes a little documentation and a code <Highlight>snippet</Highlight>. The intro always shows the simplest way to import and use a component.
|
|
33
37
|
|
|
34
38
|
<img src={introImg} width="650" style={{ margin: '0 0 2rem' }} />
|
|
35
39
|
|
|
36
|
-
Next is a
|
|
40
|
+
Next is a <Highlight>frame</Highlight> that shows how the component looks. Each story will have its own frame.
|
|
37
41
|
|
|
38
42
|
<img src={frameImg} width="650" style={{ margin: '0 0 2rem' }} />
|
|
39
43
|
|
|
40
|
-
Below the story frame is an
|
|
44
|
+
Below the story frame is an <Highlight>args table</Highlight>. This is the most important part of every component’s page. The args table documents all the [props](https://learn.svelte.dev/tutorial/declaring-props) and [slots](https://learn.svelte.dev/tutorial/slots) a component has — i.e., all the ways you can customise it.
|
|
41
45
|
|
|
42
46
|
<img src={argsImg} width="100%" style={{ margin: '0 0 2rem', maxWidth: 800 }} />
|
|
43
47
|
|
|
@@ -45,10 +49,6 @@ Each prop includes its name and a description with the data type that prop expec
|
|
|
45
49
|
|
|
46
50
|
The `Control` column in the table gives you a way to play with the value of that prop in the live demo. Make changes here, and for most components, they'll update the demo frame to reflect your changes.
|
|
47
51
|
|
|
48
|
-
Click the "Show code" button in the frame to see how your component looks with the props you set.
|
|
49
|
-
|
|
50
|
-
<img src={copyImg} width="100%" style={{ margin: '2rem 0', maxWidth: 800 }} />
|
|
51
|
-
|
|
52
52
|
From there, more stories show other ways you might use a component, also with a snippet you can copy into your own page.
|
|
53
53
|
|
|
54
54
|
<img
|
package/dist/docs/intro.mdx
CHANGED
|
@@ -3,8 +3,6 @@ import { parameters } from './utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Intro" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# @reuters-graphics/graphics-components
|
|
9
7
|
|
|
10
8
|
<p>
|
|
@@ -24,7 +22,7 @@ Svelte components, SCSS and more you can use in graphics projects.
|
|
|
24
22
|
1. Install
|
|
25
23
|
|
|
26
24
|
```bash
|
|
27
|
-
|
|
25
|
+
pnpm i @reuters-graphics/graphics-components
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
2. Checkout the [guides](?path=/docs/guides-using-these-docs--page), if you haven't, or dive straight into the docs to start using components.
|
|
@@ -3,9 +3,7 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
import WellImg from './article-well.jpg';
|
|
5
5
|
|
|
6
|
-
<Meta title="
|
|
7
|
-
|
|
8
|
-

|
|
6
|
+
<Meta title="Components/Page layout/Intro" parameters={{ ...parameters }} />
|
|
9
7
|
|
|
10
8
|
# Layout
|
|
11
9
|
|
|
@@ -3,15 +3,13 @@ import { parameters } from '../../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Styles/Colours/Intro" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Working with colours
|
|
9
7
|
|
|
10
8
|
Colour palettes are provided as [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) you can use in your own styles. Some are included by default, others can be imported in your global stylesheet and then used.
|
|
11
9
|
|
|
12
10
|
```scss
|
|
13
11
|
/* global.scss */
|
|
14
|
-
@
|
|
12
|
+
@use '@reuters-graphics/graphics-components/scss/colours/primary/blue';
|
|
15
13
|
|
|
16
14
|
p {
|
|
17
15
|
color: var(--grey-400); // Included by default
|
|
@@ -27,8 +27,6 @@ import roseScheme from '../../../scss/colours/primary/_rose.scss?raw';
|
|
|
27
27
|
|
|
28
28
|
<Meta title="Styles/Colours/Primary" parameters={{ ...parameters }} />
|
|
29
29
|
|
|
30
|
-

|
|
31
|
-
|
|
32
30
|
# Primary colours
|
|
33
31
|
|
|
34
32
|
<CopyColourTable
|
|
@@ -8,8 +8,6 @@ import nordScheme from '../../../scss/colours/thematic/_nord.scss?raw';
|
|
|
8
8
|
|
|
9
9
|
<Meta title="Styles/Colours/Thematic" parameters={{ ...parameters }} />
|
|
10
10
|
|
|
11
|
-

|
|
12
|
-
|
|
13
11
|
# Thematic colours
|
|
14
12
|
|
|
15
13
|
<CopyColourTable
|
|
@@ -3,8 +3,6 @@ import { parameters } from './../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
<Meta title="Styles/Intro" parameters={{ ...parameters }} />
|
|
5
5
|
|
|
6
|
-

|
|
7
|
-
|
|
8
6
|
# Styles
|
|
9
7
|
|
|
10
8
|
This library also includes our main SCSS stylesheets with pre-defined classes you can use to style your page.
|
|
@@ -7,13 +7,11 @@ import visibilityStyles from '../../../../scss/tokens/accessibility/_visibility.
|
|
|
7
7
|
|
|
8
8
|
<Meta title="Styles/Tokens/Accessibility" parameters={{ ...parameters }} />
|
|
9
9
|
|
|
10
|
-

|
|
11
|
-
|
|
12
10
|
# Accessibility tokens
|
|
13
11
|
|
|
14
12
|
<CopyTable
|
|
15
13
|
title="Visibility"
|
|
16
14
|
header={['Class', 'Include', 'Properties']}
|
|
17
15
|
body={cssStringToTableArray(visibilityStyles, true)}
|
|
18
|
-
copyable={[true, (t) => `@include
|
|
16
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
19
17
|
/>
|
|
@@ -7,8 +7,6 @@ import backgroundColor from '../../../../scss/tokens/backgrounds/_background-col
|
|
|
7
7
|
|
|
8
8
|
<Meta title="Styles/Tokens/Backgrounds" parameters={{ ...parameters }} />
|
|
9
9
|
|
|
10
|
-

|
|
11
|
-
|
|
12
10
|
# Background tokens
|
|
13
11
|
|
|
14
12
|
<CopyTable
|
|
@@ -16,5 +14,5 @@ import backgroundColor from '../../../../scss/tokens/backgrounds/_background-col
|
|
|
16
14
|
mdnLink="background-color"
|
|
17
15
|
header={['Class', 'Include', 'Properties']}
|
|
18
16
|
body={cssStringToTableArray(backgroundColor, true)}
|
|
19
|
-
copyable={[true, (t) => `@include
|
|
17
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
20
18
|
/>
|
|
@@ -9,8 +9,6 @@ import borderWidth from '../../../../scss/tokens/borders/_border-width.scss?raw'
|
|
|
9
9
|
|
|
10
10
|
<Meta title="Styles/Tokens/Borders" parameters={{ ...parameters }} />
|
|
11
11
|
|
|
12
|
-

|
|
13
|
-
|
|
14
12
|
# Border tokens
|
|
15
13
|
|
|
16
14
|
<CopyTable
|
|
@@ -16,8 +16,6 @@ import justifySelf from '../../../../scss/tokens/layout/flex/_justify-self.scss?
|
|
|
16
16
|
|
|
17
17
|
<Meta title="Styles/Tokens/Flexbox" parameters={{ ...parameters }} />
|
|
18
18
|
|
|
19
|
-

|
|
20
|
-
|
|
21
19
|
# Flexbox tokens
|
|
22
20
|
|
|
23
21
|
Flexbox is a modern way to lay out elements on your page while controling their alignment, distribution, space between and more. If flexbox is new, checkout the excellent [CSS tricks guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/).
|
|
@@ -8,8 +8,6 @@ import pointerEvents from '../../../../scss/tokens/interactivity/_pointer-events
|
|
|
8
8
|
|
|
9
9
|
<Meta title="Styles/Tokens/Interactivity" parameters={{ ...parameters }} />
|
|
10
10
|
|
|
11
|
-

|
|
12
|
-
|
|
13
11
|
# Interactivity tokens
|
|
14
12
|
|
|
15
13
|
<CopyTable
|
|
@@ -9,8 +9,6 @@ import color from '../../../scss/tokens/text/_color.scss?inline';
|
|
|
9
9
|
|
|
10
10
|
<Meta title="Styles/Tokens/Intro" parameters={{ ...parameters }} />
|
|
11
11
|
|
|
12
|
-

|
|
13
|
-
|
|
14
12
|
# Style tokens
|
|
15
13
|
|
|
16
14
|
All of the components in this library have been styled using a system of tokens. The style tokens give us a lot of flexibility and ultimately make for the most concise CSS possible.
|
|
@@ -69,7 +67,7 @@ Here's our table of text colour tokens, which set the `text-color` style.
|
|
|
69
67
|
mdnLink="color"
|
|
70
68
|
header={['Class', 'Include', 'Properties']}
|
|
71
69
|
body={cssStringToTableArray(color, true)}
|
|
72
|
-
copyable={[true, (t) => `@include
|
|
70
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
73
71
|
/>
|
|
74
72
|
|
|
75
73
|
This table's tokens can be used through either a class or an SCSS mixin. (The table lets you click-to-copy for either.)
|
|
@@ -86,16 +84,14 @@ If you'd like to set the style in SCSS, you'd use the `Include` token like this:
|
|
|
86
84
|
<p>Lorem ipsum...</p>
|
|
87
85
|
|
|
88
86
|
<style lang="scss">
|
|
89
|
-
@
|
|
87
|
+
@use '@reuters-graphics/graphics-components/scss/mixins' as mixins;
|
|
90
88
|
|
|
91
89
|
p {
|
|
92
|
-
@include text-primary;
|
|
90
|
+
@include mixins.text-primary;
|
|
93
91
|
}
|
|
94
92
|
</style>
|
|
95
93
|
```
|
|
96
94
|
|
|
97
|
-
> **Note:** If you're writing SCSS _inside a component_, the `@import` above is required. If you're writing in `global.scss`, this is already included for you.
|
|
98
|
-
|
|
99
95
|
To use multiple tokens, you'd simply add another class or include:
|
|
100
96
|
|
|
101
97
|
```svelte
|
|
@@ -104,8 +100,8 @@ To use multiple tokens, you'd simply add another class or include:
|
|
|
104
100
|
|
|
105
101
|
```scss
|
|
106
102
|
p {
|
|
107
|
-
@include text-primary;
|
|
108
|
-
@include font-bold;
|
|
103
|
+
@include mixins.text-primary;
|
|
104
|
+
@include mixins.font-bold;
|
|
109
105
|
}
|
|
110
106
|
```
|
|
111
107
|
|
|
@@ -123,6 +119,6 @@ For SCSS includes, the concept is the same, but you need to escape the `!` by ad
|
|
|
123
119
|
|
|
124
120
|
```scss
|
|
125
121
|
p {
|
|
126
|
-
@include
|
|
122
|
+
@include mixins.\!font-bold;
|
|
127
123
|
}
|
|
128
124
|
```
|
|
@@ -12,8 +12,6 @@ import position from '../../../../scss/tokens/layout/_position.scss?raw';
|
|
|
12
12
|
|
|
13
13
|
<Meta title="Styles/Tokens/Layout" parameters={{ ...parameters }} />
|
|
14
14
|
|
|
15
|
-

|
|
16
|
-
|
|
17
15
|
# Layout tokens
|
|
18
16
|
|
|
19
17
|
<CopyTable
|
|
@@ -11,8 +11,6 @@ import width from '../../../../scss/tokens/sizing/_width.scss?inline';
|
|
|
11
11
|
|
|
12
12
|
<Meta title="Styles/Tokens/Sizing" parameters={{ ...parameters }} />
|
|
13
13
|
|
|
14
|
-

|
|
15
|
-
|
|
16
14
|
# Sizing tokens
|
|
17
15
|
|
|
18
16
|
<CopyTable
|
|
@@ -9,8 +9,6 @@ import fluidPadding from '../../../../scss/tokens/spacers/_fluid-padding.scss?in
|
|
|
9
9
|
|
|
10
10
|
<Meta title="Styles/Tokens/Spacers" parameters={{ ...parameters }} />
|
|
11
11
|
|
|
12
|
-

|
|
13
|
-
|
|
14
12
|
# Spacer tokens
|
|
15
13
|
|
|
16
14
|
Spacers include tokens that control static and fluid margins and paddings.
|
|
@@ -46,7 +44,7 @@ As a rule of thumb, if you're setting space between or adjacent to _text element
|
|
|
46
44
|
mdnLink="margin"
|
|
47
45
|
header={['Class', 'Include', 'Properties']}
|
|
48
46
|
body={cssStringToTableArray(fluidMargin, true)}
|
|
49
|
-
copyable={[true, (t) => `@include
|
|
47
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
50
48
|
/>
|
|
51
49
|
|
|
52
50
|
<CopyTable
|
|
@@ -54,5 +52,5 @@ As a rule of thumb, if you're setting space between or adjacent to _text element
|
|
|
54
52
|
mdnLink="margin"
|
|
55
53
|
header={['Class', 'Include', 'Properties']}
|
|
56
54
|
body={cssStringToTableArray(fluidPadding, true)}
|
|
57
|
-
copyable={[true, (t) => `@include
|
|
55
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
58
56
|
/>
|
|
@@ -22,8 +22,6 @@ import './styles.scss';
|
|
|
22
22
|
|
|
23
23
|
<Meta title="Styles/Tokens/Typography" parameters={{ ...parameters }} />
|
|
24
24
|
|
|
25
|
-

|
|
26
|
-
|
|
27
25
|
# Typography tokens
|
|
28
26
|
|
|
29
27
|
<CopyTable
|
|
@@ -31,7 +29,7 @@ import './styles.scss';
|
|
|
31
29
|
note="Role tokens group several individual style tokens for common text elements like headers, body text, notes and links. You can use them as a shorthand for our default typography styles."
|
|
32
30
|
header={['Class', 'Include', 'Properties']}
|
|
33
31
|
body={cssStringToTableArray(role, true)}
|
|
34
|
-
copyable={[true, (t) => `@include
|
|
32
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
35
33
|
/>
|
|
36
34
|
|
|
37
35
|
<CopyTable
|
|
@@ -39,7 +37,7 @@ import './styles.scss';
|
|
|
39
37
|
mdnLink="color"
|
|
40
38
|
header={['Class', 'Include', 'Properties']}
|
|
41
39
|
body={cssStringToTableArray(color, true)}
|
|
42
|
-
copyable={[true, (t) => `@include
|
|
40
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
43
41
|
/>
|
|
44
42
|
|
|
45
43
|
<CopyTable
|
|
@@ -47,7 +45,7 @@ import './styles.scss';
|
|
|
47
45
|
mdnLink="font-family"
|
|
48
46
|
header={['Class', 'Include', 'Properties']}
|
|
49
47
|
body={cssStringToTableArray(fontFamily, true)}
|
|
50
|
-
copyable={[true, (t) => `@include
|
|
48
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
51
49
|
/>
|
|
52
50
|
|
|
53
51
|
<CopyTable
|
|
@@ -55,7 +53,7 @@ import './styles.scss';
|
|
|
55
53
|
mdnLink="font-size"
|
|
56
54
|
header={['Class', 'Include', 'Properties']}
|
|
57
55
|
body={cssStringToTableArray(fontSize, true)}
|
|
58
|
-
copyable={[true, (t) => `@include
|
|
56
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
59
57
|
/>
|
|
60
58
|
|
|
61
59
|
<CopyTable
|
|
@@ -71,7 +69,7 @@ import './styles.scss';
|
|
|
71
69
|
mdnLink="font-weight"
|
|
72
70
|
header={['Class', 'Include', 'Properties']}
|
|
73
71
|
body={cssStringToTableArray(fontWeight, true)}
|
|
74
|
-
copyable={[true, (t) => `@include
|
|
72
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
75
73
|
/>
|
|
76
74
|
|
|
77
75
|
<CopyTable
|
|
@@ -79,7 +77,7 @@ import './styles.scss';
|
|
|
79
77
|
mdnLink="letter-spacing"
|
|
80
78
|
header={['Class', 'Include', 'Properties']}
|
|
81
79
|
body={cssStringToTableArray(letterSpacing, true)}
|
|
82
|
-
copyable={[true, (t) => `@include
|
|
80
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
83
81
|
/>
|
|
84
82
|
|
|
85
83
|
<CopyTable
|
|
@@ -87,7 +85,7 @@ import './styles.scss';
|
|
|
87
85
|
mdnLink="line-height"
|
|
88
86
|
header={['Class', 'Include', 'Properties']}
|
|
89
87
|
body={cssStringToTableArray(lineHeight, true)}
|
|
90
|
-
copyable={[true, (t) => `@include
|
|
88
|
+
copyable={[true, (t) => `@include mixins.${t};`, false]}
|
|
91
89
|
/>
|
|
92
90
|
|
|
93
91
|
<CopyTable
|
|
@@ -8,8 +8,6 @@ import block from '../../../../scss/tokens/variables/_block.scss?raw';
|
|
|
8
8
|
|
|
9
9
|
<Meta title="Styles/Tokens/SCSS Variables" parameters={{ ...parameters }} />
|
|
10
10
|
|
|
11
|
-

|
|
12
|
-
|
|
13
11
|
# Token variables
|
|
14
12
|
|
|
15
13
|
These are SCSS mirrors of some of the default CSS variables used in the `Theme`. Use them in places where CSS variables cannot be used. e.g. You can write `media-queries` to target the block widths using the `block` vars, which is not possible using CSS variables.
|
|
@@ -3,9 +3,7 @@ import { parameters } from '../utils/docsPage.js';
|
|
|
3
3
|
|
|
4
4
|
import ThemeBuilder from './../docs-components/ThemeBuilder/ThemeBuilder.jsx';
|
|
5
5
|
|
|
6
|
-
<Meta title="Theming/Theme builder" parameters={{ ...parameters }} />
|
|
7
|
-
|
|
8
|
-

|
|
6
|
+
<Meta title="Components/Theming/Theme builder" parameters={{ ...parameters }} />
|
|
9
7
|
|
|
10
8
|
# Theme builder
|
|
11
9
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/blocks';
|
|
2
2
|
import { parameters } from '../utils/docsPage.js';
|
|
3
3
|
|
|
4
|
-
<Meta title="Theming/CSS variables" parameters={{ ...parameters }} />
|
|
5
|
-
|
|
6
|
-

|
|
4
|
+
<Meta title="Components/Theming/CSS variables" parameters={{ ...parameters }} />
|
|
7
5
|
|
|
8
6
|
# CSS variables
|
|
9
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -41,8 +41,5 @@ export { default as Table } from "./components/Table/Table.svelte";
|
|
|
41
41
|
export { default as ToolsHeader } from "./components/ToolsHeader/ToolsHeader.svelte";
|
|
42
42
|
export { default as Video } from "./components/Video/Video.svelte";
|
|
43
43
|
export { default as Visible } from "./components/Visible/Visible.svelte";
|
|
44
|
-
export { getEndNotesPropsFromDoc } from "./components/EndNotes/docProps.js";
|
|
45
|
-
export { getPhotoPackPropsFromDoc } from "./components/PhotoPack/docProps.js";
|
|
46
|
-
export { getScrollerPropsFromDoc } from "./components/Scroller/docProps.js";
|
|
47
44
|
export { default as Analytics, registerPageview } from "./components/Analytics/Analytics.svelte";
|
|
48
45
|
export { default as Theme, themes } from "./components/Theme/Theme.svelte";
|
package/dist/index.js
CHANGED
|
@@ -49,8 +49,3 @@ export { default as Theme, themes } from './components/Theme/Theme.svelte';
|
|
|
49
49
|
export { default as ToolsHeader } from './components/ToolsHeader/ToolsHeader.svelte';
|
|
50
50
|
export { default as Video } from './components/Video/Video.svelte';
|
|
51
51
|
export { default as Visible } from './components/Visible/Visible.svelte';
|
|
52
|
-
|
|
53
|
-
// Utilities
|
|
54
|
-
export { getEndNotesPropsFromDoc } from './components/EndNotes/docProps.js';
|
|
55
|
-
export { getPhotoPackPropsFromDoc } from './components/PhotoPack/docProps.js';
|
|
56
|
-
export { getScrollerPropsFromDoc } from './components/Scroller/docProps.js';
|