@newskit-render/core 3.1.1-alpha.2 → 4.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.
Files changed (31) hide show
  1. package/__tests__/pages/__snapshots__/[articleSlug].test.tsx.snap +69 -69
  2. package/__tests__/pages/__snapshots__/brightcove.test.tsx.snap +1 -1
  3. package/__tests__/pages/__snapshots__/home.test.tsx.snap +101 -101
  4. package/__tests__/pages/__snapshots__/relatedArticles.test.tsx.snap +31 -31
  5. package/components/ErrorPage/ErrorPage.tsx +4 -4
  6. package/components/ad/index.tsx +3 -2
  7. package/components/article/Highlights.tsx +7 -4
  8. package/components/article/RelatedArticles.tsx +5 -2
  9. package/components/article/RelatedTopics.tsx +5 -5
  10. package/components/article/__tests__/__snapshots__/index.test.tsx.snap +93 -93
  11. package/components/article/index.tsx +14 -14
  12. package/components/common/BackToHomepage.tsx +5 -4
  13. package/components/common/SectionTitleBar.tsx +1 -1
  14. package/components/common/iconNavLink/IconNavLink.tsx +1 -1
  15. package/components/footer/__snapshots__/index.test.tsx.snap +15 -15
  16. package/components/footer/index.tsx +4 -4
  17. package/components/layout/MainGrid.tsx +2 -2
  18. package/components/section/ArticleSlice.tsx +1 -1
  19. package/components/section/index.tsx +1 -1
  20. package/components/section/layouts/Rows.tsx +1 -1
  21. package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +17 -17
  22. package/components/section/layouts/__tests__/__snapshots__/SectionTitle.test.tsx.snap +14 -14
  23. package/components/teaser/index.tsx +2 -2
  24. package/components/teaser/teaserVariants.ts +2 -2
  25. package/components/teaser/variant-types.ts +2 -2
  26. package/components/teaser/variants/featureVariant.ts +2 -2
  27. package/components/teaser/variants/horizontal.ts +1 -1
  28. package/components/teaser/variants/titleTeaserVariant.ts +2 -2
  29. package/components/teaser/variants/titleVertical.ts +1 -1
  30. package/package.json +6 -6
  31. package/pages/[section]/[articleId]/relatedArticles.tsx +6 -3
@@ -6,18 +6,18 @@ exports[`Recommendation render related article page when data is null page 1`] =
6
6
  class="css-1d2q07x"
7
7
  >
8
8
  <div
9
- class="css-1ayxvlu"
9
+ class="css-1l668x8"
10
10
  data-testid="NavigationPrimary"
11
11
  >
12
12
  <div
13
- class="css-2orcb8"
13
+ class="css-11pbejy"
14
14
  >
15
15
  <div
16
- class="css-wa08xy"
16
+ class="css-1mi1ly6"
17
17
  >
18
18
  <a
19
19
  aria-label="Logo Link"
20
- class="css-zk8dn3"
20
+ class="css-1ulbpfm"
21
21
  href="/"
22
22
  >
23
23
  <span
@@ -54,14 +54,14 @@ exports[`Recommendation render related article page when data is null page 1`] =
54
54
  </div>
55
55
  </div>
56
56
  <div
57
- class="css-15brxgw"
57
+ class="css-55favz"
58
58
  >
59
59
  <div
60
60
  class="css-1k3e0au"
61
61
  >
62
62
  <button
63
63
  aria-label="Mobile Menu Button"
64
- class="css-b1ufx8"
64
+ class="css-h8miwj"
65
65
  data-testid="mobile-menu-btn"
66
66
  type="button"
67
67
  >
@@ -86,7 +86,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
86
86
  </div>
87
87
  </div>
88
88
  <div
89
- class="css-oiffzn"
89
+ class="css-mniw6m"
90
90
  >
91
91
  <nav
92
92
  class="css-1le7q07"
@@ -100,7 +100,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
100
100
  >
101
101
  <a
102
102
  aria-label="Section One Link"
103
- class="css-zk8dn3"
103
+ class="css-1ulbpfm"
104
104
  href="/section-one"
105
105
  >
106
106
  <span
@@ -123,7 +123,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
123
123
  >
124
124
  <a
125
125
  aria-label="Section Two Link"
126
- class="css-zk8dn3"
126
+ class="css-1ulbpfm"
127
127
  href="/section-two"
128
128
  >
129
129
  <span
@@ -146,7 +146,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
146
146
  >
147
147
  <a
148
148
  aria-label="Section Three Link"
149
- class="css-zk8dn3"
149
+ class="css-1ulbpfm"
150
150
  href="/section-three"
151
151
  >
152
152
  <span
@@ -168,10 +168,10 @@ exports[`Recommendation render related article page when data is null page 1`] =
168
168
  </nav>
169
169
  </div>
170
170
  <div
171
- class="css-x6oa1l"
171
+ class="css-l657h8"
172
172
  >
173
173
  <div
174
- class="css-30qa7x"
174
+ class="css-13byt3y"
175
175
  />
176
176
  </div>
177
177
  </div>
@@ -195,16 +195,16 @@ exports[`Recommendation render related article page when data is null page 1`] =
195
195
  data-testid="SectionCell"
196
196
  >
197
197
  <div
198
- class="css-gxh9kv"
198
+ class="css-11s9frs"
199
199
  />
200
200
  <div
201
- class="css-gxh9kv"
201
+ class="css-11s9frs"
202
202
  >
203
203
  <div
204
- class="css-mw8mt7"
204
+ class="css-w282mr"
205
205
  >
206
206
  <div
207
- class="css-dzecoh"
207
+ class="css-1aiajnh"
208
208
  >
209
209
  <section
210
210
  class="css-3bvy7k"
@@ -238,7 +238,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
238
238
  data-testid="PageLayout"
239
239
  >
240
240
  <div
241
- class="css-a1yn46"
241
+ class="css-2e5lv5"
242
242
  >
243
243
  <svg
244
244
  class="css-kgdu16"
@@ -265,7 +265,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
265
265
  </svg>
266
266
  </div>
267
267
  <div
268
- class="css-a1yn46"
268
+ class="css-2e5lv5"
269
269
  >
270
270
  <hr
271
271
  aria-hidden="true"
@@ -277,11 +277,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
277
277
  class="css-hx18jh"
278
278
  >
279
279
  <span
280
- class="css-1v0p1qz"
280
+ class="css-1cpcft7"
281
281
  >
282
282
  <a
283
283
  aria-label="NavLink One"
284
- class="css-zk8dn3"
284
+ class="css-1ulbpfm"
285
285
  href="/link-one"
286
286
  >
287
287
  <span
@@ -296,11 +296,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
296
296
  </a>
297
297
  </span>
298
298
  <span
299
- class="css-1v0p1qz"
299
+ class="css-1cpcft7"
300
300
  >
301
301
  <a
302
302
  aria-label="NavLink Two"
303
- class="css-zk8dn3"
303
+ class="css-1ulbpfm"
304
304
  href="/link-two"
305
305
  >
306
306
  <span
@@ -315,11 +315,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
315
315
  </a>
316
316
  </span>
317
317
  <span
318
- class="css-1v0p1qz"
318
+ class="css-1cpcft7"
319
319
  >
320
320
  <a
321
321
  aria-label="NavLink Three"
322
- class="css-zk8dn3"
322
+ class="css-1ulbpfm"
323
323
  href="/link-three"
324
324
  >
325
325
  <span
@@ -334,11 +334,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
334
334
  </a>
335
335
  </span>
336
336
  <span
337
- class="css-1v0p1qz"
337
+ class="css-1cpcft7"
338
338
  >
339
339
  <a
340
340
  aria-label="NavLink Four"
341
- class="css-zk8dn3"
341
+ class="css-1ulbpfm"
342
342
  href="/link-four"
343
343
  >
344
344
  <span
@@ -353,11 +353,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
353
353
  </a>
354
354
  </span>
355
355
  <span
356
- class="css-1v0p1qz"
356
+ class="css-1cpcft7"
357
357
  >
358
358
  <a
359
359
  aria-label="NavLink Five"
360
- class="css-zk8dn3"
360
+ class="css-1ulbpfm"
361
361
  href="/link-five"
362
362
  >
363
363
  <span
@@ -372,11 +372,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
372
372
  </a>
373
373
  </span>
374
374
  <span
375
- class="css-1v0p1qz"
375
+ class="css-1cpcft7"
376
376
  >
377
377
  <a
378
378
  aria-label="NavLink Six"
379
- class="css-zk8dn3"
379
+ class="css-1ulbpfm"
380
380
  href="/link-six"
381
381
  >
382
382
  <span
@@ -392,7 +392,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
392
392
  </span>
393
393
  </div>
394
394
  <div
395
- class="css-a1yn46"
395
+ class="css-2e5lv5"
396
396
  >
397
397
  <hr
398
398
  aria-hidden="true"
@@ -75,14 +75,14 @@ const ErrorPage = ({ title, errorMassage }: ErrorPageProps) => (
75
75
  <Layout backgroundColor="white" gridOverride={gridOverride}>
76
76
  <Cell xs={10} xsOffset={1} md={12} mdOffset={0}>
77
77
  <StyledMain>
78
- <Block spaceStack="space070">
78
+ <Block marginBlockEnd="space070">
79
79
  <Image
80
80
  aspectRatio="16/9"
81
81
  src="https://plchldr.co/i/594x364?bg=F0F0F0&fc=111111&text=IMG"
82
82
  alt="404 page"
83
83
  />
84
84
  </Block>
85
- <Block spaceStack={{ xs: 'space040', md: 'space050' }}>
85
+ <Block marginBlockEnd={{ xs: 'space040', md: 'space050' }}>
86
86
  <TextBlock
87
87
  as="h1"
88
88
  typographyPreset={{
@@ -95,7 +95,7 @@ const ErrorPage = ({ title, errorMassage }: ErrorPageProps) => (
95
95
  </TextBlock>
96
96
  </Block>
97
97
 
98
- <Block spaceStack={{ xs: 'space050', md: 'space060' }}>
98
+ <Block marginBlockEnd={{ xs: 'space050', md: 'space060' }}>
99
99
  <TextBlock
100
100
  typographyPreset={{
101
101
  xs: 'utilityBody010',
@@ -108,7 +108,7 @@ const ErrorPage = ({ title, errorMassage }: ErrorPageProps) => (
108
108
  </TextBlock>
109
109
  </Block>
110
110
  <Block
111
- spaceStack={{ xs: 'space070', sm: 'space080', md: 'space090' }}
111
+ marginBlockEnd={{ xs: 'space070', sm: 'space080', md: 'space090' }}
112
112
  >
113
113
  <StyledLink
114
114
  type="standalone"
@@ -21,8 +21,9 @@ const AdComponent: React.FC<{
21
21
  }> = ({ id, height, maxWidth }) => (
22
22
  <Block
23
23
  data-testid="Ads"
24
- spaceInset="spaceInsetSquish020"
25
- spaceStack={{
24
+ paddingInline="spaceInsetSquish020"
25
+ paddingBlock="spaceInsetSquish020"
26
+ marginBlockEnd={{
26
27
  xs: 'space070',
27
28
  lg: 'space050',
28
29
  }}
@@ -14,8 +14,8 @@ import { RecommendedArticleList } from '@newskit-render/standalone-components'
14
14
  import ViewMoreButton from '../common/ViewMoreButton'
15
15
 
16
16
  const Highlights: React.FC = () => (
17
- <Block data-testid="Highlights" spaceStack="space060">
18
- <Block spaceStack="space060">
17
+ <Block data-testid="Highlights" marginBlockEnd="space060">
18
+ <Block marginBlockEnd="space060">
19
19
  <Visible xs lg xl>
20
20
  <Headline
21
21
  overrides={{
@@ -34,7 +34,10 @@ const Highlights: React.FC = () => (
34
34
  <Visible sm md>
35
35
  <TitleBar
36
36
  overrides={{
37
- spaceInset: {
37
+ paddingInline: {
38
+ xs: 'spaceInsetSquish000',
39
+ },
40
+ paddingBlock: {
38
41
  xs: 'spaceInsetSquish000',
39
42
  },
40
43
  heading: {
@@ -52,7 +55,7 @@ const Highlights: React.FC = () => (
52
55
  </Visible>
53
56
  </Block>
54
57
 
55
- <Block spaceStack="space040">
58
+ <Block marginBlockEnd="space040">
56
59
  <Grid xsMargin="space000">
57
60
  <RecommendedArticleList templateId="list-1" />
58
61
  <Cell xs={12}>
@@ -13,10 +13,13 @@ const RelatedArticles: React.FC = () => {
13
13
 
14
14
  return (
15
15
  <Block data-testid="RelatedArticles">
16
- <Block spaceStack="space080">
16
+ <Block marginBlockEnd="space080">
17
17
  <TitleBar
18
18
  overrides={{
19
- spaceInset: {
19
+ paddingInline: {
20
+ xs: 'spaceInsetSquish000',
21
+ },
22
+ paddingBlock: {
20
23
  xs: 'spaceInsetSquish000',
21
24
  },
22
25
  heading: {
@@ -6,7 +6,7 @@ const RelatedTopics: React.FC<{
6
6
  topics: Topic[]
7
7
  }> = ({ topics }) => (
8
8
  <Block>
9
- <Block spaceStack="space050">
9
+ <Block marginBlockEnd="space050">
10
10
  <Headline
11
11
  overrides={{
12
12
  typographyPreset: {
@@ -22,17 +22,17 @@ const RelatedTopics: React.FC<{
22
22
  Related topics
23
23
  </Headline>
24
24
  </Block>
25
- <Block spaceStack="space060">
25
+ <Block marginBlockEnd="space060">
26
26
  <Stack
27
27
  flow="horizontal-center"
28
28
  stackDistribution="flex-start"
29
- spaceStack="sizing020"
29
+ marginBlockEnd="sizing020"
30
30
  spaceInline="space040"
31
31
  wrap="wrap"
32
32
  data-testid="RelatedTopics"
33
33
  >
34
34
  {topics.map(({ name, link }) => (
35
- <Block key={link} spaceStack="space040">
35
+ <Block key={link} marginBlockEnd="space040">
36
36
  <Tag
37
37
  href={link}
38
38
  size="medium"
@@ -50,7 +50,7 @@ const RelatedTopics: React.FC<{
50
50
  ))}
51
51
  </Stack>
52
52
  </Block>
53
- <Block spaceStack="space080">
53
+ <Block marginBlockEnd="space080">
54
54
  <Divider />
55
55
  </Block>
56
56
  </Block>