@reuters-graphics/graphics-components 2.0.0 → 2.0.2

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.
Files changed (28) hide show
  1. package/dist/components/Block/Block.stories.svelte +7 -1
  2. package/dist/components/Block/Block.stories.svelte.d.ts +8 -5
  3. package/dist/components/FeaturePhoto/stories/docs/archieML.md +37 -0
  4. package/dist/components/GraphicBlock/stories/docs/archieML.md +40 -0
  5. package/dist/components/PhotoPack/stories/docs/archieML.md +63 -0
  6. package/dist/components/ReferralBlock/ReferralBlock.svelte +22 -8
  7. package/dist/components/ReferralBlock/filterCurrentPage.d.ts +2 -0
  8. package/dist/components/ReferralBlock/filterCurrentPage.js +32 -0
  9. package/dist/components/ReferralBlock/types.d.ts +99 -0
  10. package/dist/components/ReferralBlock/types.js +1 -0
  11. package/dist/components/SEO/stories/docs/archieML.md +36 -0
  12. package/dist/components/Scroller/stories/docs/ai2svelte.md +0 -82
  13. package/dist/components/Scroller/stories/docs/archieML.md +87 -0
  14. package/dist/components/SiteHeader/NavBar/NavDropdown/StoryCard/index.svelte +12 -5
  15. package/dist/components/SiteHeadline/stories/docs/archieML.md +26 -0
  16. package/dist/docs/docs-components/CopyColourTable/styles.module.scss +4 -2
  17. package/dist/docs/docs-components/Herbie/Herbie.d.ts +7 -0
  18. package/dist/docs/docs-components/Herbie/Herbie.tsx +47 -0
  19. package/dist/docs/docs-components/Highlight/Highlight.d.ts +6 -0
  20. package/dist/docs/docs-components/Highlight/Highlight.tsx +19 -0
  21. package/dist/docs/docs-components/SubtleHighlight/SubtleHighlight.d.ts +6 -0
  22. package/dist/docs/docs-components/SubtleHighlight/SubtleHighlight.tsx +16 -0
  23. package/dist/docs/docs-components/ThemeBuilder/NewTheme/styles.module.scss +3 -1
  24. package/dist/docs/docs-components/syntax/nord.d.ts +7 -0
  25. package/dist/docs/docs-components/syntax/nord.js +155 -0
  26. package/dist/docs/guides/archieml.mdx +441 -0
  27. package/dist/docs/guides/svelte-components.mdx +138 -0
  28. package/package.json +2 -1
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+
3
+ interface InlineNumberProps {
4
+ number: number;
5
+ children: React.ReactNode; // Allow children to be passed
6
+ }
7
+
8
+ const InlineNumber: React.FC<InlineNumberProps> = ({ number, children }) => {
9
+ const containerStyle: React.CSSProperties = {
10
+ display: 'flex',
11
+ alignItems: 'flex-start', // Align items at the top
12
+ gap: '0.5em',
13
+ marginTop: '1.5em',
14
+ };
15
+
16
+ const numberStyle: React.CSSProperties = {
17
+ display: 'flex',
18
+ justifyContent: 'center',
19
+ alignItems: 'center',
20
+ backgroundColor: 'rgb(0 156 253)',
21
+ color: 'white',
22
+ borderRadius: '50%',
23
+ width: '1.8em',
24
+ height: '1.8em',
25
+ fontSize: '1em',
26
+ fontWeight: 'bold',
27
+ lineHeight: '1',
28
+ boxShadow: '0 2px 4px rgba(0, 0, 0, 0.2)',
29
+ flexShrink: 0, // Prevent shrinking
30
+ };
31
+
32
+ const textStyle: React.CSSProperties = {
33
+ paddingTop: '0.25em',
34
+ fontSize: '1em',
35
+ lineHeight: '1.4em', // Adjust line height for readability
36
+ wordBreak: 'break-word', // Handle long words gracefully
37
+ };
38
+
39
+ return (
40
+ <div style={containerStyle}>
41
+ <div style={numberStyle}>{number}</div>
42
+ <div style={textStyle}>{children}</div>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ export default InlineNumber;
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface HighlightProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const Highlight: React.FC<HighlightProps>;
6
+ export default Highlight;
@@ -0,0 +1,19 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ interface HighlightProps {
4
+ children: ReactNode;
5
+ }
6
+
7
+ const Highlight: React.FC<HighlightProps> = ({ children }) => {
8
+ const style: React.CSSProperties = {
9
+ backgroundColor: '#FFF8DC', // Light yellow (Cornsilk)
10
+ padding: '0.15em 0.25em',
11
+ border: '1px solid rgb(255 239 177)',
12
+ boxShadow: '0 1px 2px rgba(0, 0, 0, 0.1)', // Subtle shadow for depth
13
+ fontWeight: 'bold',
14
+ };
15
+
16
+ return <span style={style}>{children}</span>;
17
+ };
18
+
19
+ export default Highlight;
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface HighlightProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const Highlight: React.FC<HighlightProps>;
6
+ export default Highlight;
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ interface HighlightProps {
4
+ children: ReactNode;
5
+ }
6
+
7
+ const Highlight: React.FC<HighlightProps> = ({ children }) => {
8
+ const style: React.CSSProperties = {
9
+ backgroundColor: '#fff5cd',
10
+ padding: '0.15em 0.3em',
11
+ };
12
+
13
+ return <span style={style}>{children}</span>;
14
+ };
15
+
16
+ export default Highlight;
@@ -8,7 +8,9 @@
8
8
  }
9
9
 
10
10
  pre {
11
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23) !important;
11
+ box-shadow:
12
+ 0 10px 20px rgba(0, 0, 0, 0.19),
13
+ 0 6px 6px rgba(0, 0, 0, 0.23) !important;
12
14
  border: 0 !important;
13
15
  padding: 1em 1.5em !important;
14
16
  }
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ type PrismStyles = Record<string, React.CSSProperties>;
3
+ /**
4
+ * Nord syntax highlighting to match syntax highlighting in .storybook/syntax.scss
5
+ */
6
+ export declare const prismNord: PrismStyles;
7
+ export {};
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Nord syntax highlighting to match syntax highlighting in .storybook/syntax.scss
3
+ */
4
+ export const prismNord = {
5
+ 'code[class*="language-"]': {
6
+ color: '#f8f8f2',
7
+ background: 'none',
8
+ fontFamily: "\"Fira Code\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
9
+ textAlign: 'left',
10
+ whiteSpace: 'pre',
11
+ wordSpacing: 'normal',
12
+ wordBreak: 'normal',
13
+ wordWrap: 'normal',
14
+ lineHeight: '1.5',
15
+ MozTabSize: '4',
16
+ OTabSize: '4',
17
+ tabSize: '4',
18
+ WebkitHyphens: 'none',
19
+ MozHyphens: 'none',
20
+ msHyphens: 'none',
21
+ hyphens: 'none',
22
+ },
23
+ 'pre[class*="language-"]': {
24
+ color: '#f8f8f2',
25
+ background: '#2E3440',
26
+ fontFamily: "\"Fira Code\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
27
+ textAlign: 'left',
28
+ whiteSpace: 'pre',
29
+ wordSpacing: 'normal',
30
+ wordBreak: 'normal',
31
+ wordWrap: 'normal',
32
+ lineHeight: '1.5',
33
+ MozTabSize: '4',
34
+ OTabSize: '4',
35
+ tabSize: '4',
36
+ WebkitHyphens: 'none',
37
+ MozHyphens: 'none',
38
+ msHyphens: 'none',
39
+ hyphens: 'none',
40
+ padding: '1em',
41
+ margin: '.5em 0',
42
+ overflow: 'auto',
43
+ borderRadius: '0.3em',
44
+ },
45
+ ':not(pre) > code[class*="language-"]': {
46
+ background: '#2E3440',
47
+ padding: '.1em',
48
+ borderRadius: '.3em',
49
+ whiteSpace: 'normal',
50
+ },
51
+ comment: {
52
+ color: '#9199aa',
53
+ },
54
+ prolog: {
55
+ color: '#9199aa',
56
+ },
57
+ doctype: {
58
+ color: '#9199aa',
59
+ },
60
+ cdata: {
61
+ color: '#9199aa',
62
+ },
63
+ punctuation: {
64
+ color: '#81A1C1',
65
+ },
66
+ '.namespace': {
67
+ opacity: '.7',
68
+ },
69
+ property: {
70
+ color: '#81A1C1',
71
+ },
72
+ tag: {
73
+ color: '#81A1C1',
74
+ },
75
+ constant: {
76
+ color: '#81A1C1',
77
+ },
78
+ symbol: {
79
+ color: '#81A1C1',
80
+ },
81
+ deleted: {
82
+ color: '#81A1C1',
83
+ },
84
+ number: {
85
+ color: '#B48EAD',
86
+ },
87
+ boolean: {
88
+ color: '#81A1C1',
89
+ },
90
+ selector: {
91
+ color: '#A3BE8C',
92
+ },
93
+ 'attr-name': {
94
+ color: '#A3BE8C',
95
+ },
96
+ string: {
97
+ color: '#A3BE8C',
98
+ },
99
+ char: {
100
+ color: '#A3BE8C',
101
+ },
102
+ builtin: {
103
+ color: '#A3BE8C',
104
+ },
105
+ inserted: {
106
+ color: '#A3BE8C',
107
+ },
108
+ operator: {
109
+ color: '#81A1C1',
110
+ },
111
+ entity: {
112
+ color: '#81A1C1',
113
+ cursor: 'help',
114
+ },
115
+ url: {
116
+ color: '#81A1C1',
117
+ },
118
+ '.language-css .token.string': {
119
+ color: '#81A1C1',
120
+ },
121
+ '.style .token.string': {
122
+ color: '#81A1C1',
123
+ },
124
+ variable: {
125
+ color: '#81A1C1',
126
+ },
127
+ atrule: {
128
+ color: '#88C0D0',
129
+ },
130
+ 'attr-value': {
131
+ color: '#88C0D0',
132
+ },
133
+ function: {
134
+ color: '#88C0D0',
135
+ },
136
+ 'class-name': {
137
+ color: '#88C0D0',
138
+ },
139
+ keyword: {
140
+ color: '#81A1C1',
141
+ },
142
+ regex: {
143
+ color: '#EBCB8B',
144
+ },
145
+ important: {
146
+ color: '#EBCB8B',
147
+ fontWeight: 'bold',
148
+ },
149
+ bold: {
150
+ fontWeight: 'bold',
151
+ },
152
+ italic: {
153
+ fontStyle: 'italic',
154
+ },
155
+ };