@financial-times/cp-content-pipeline-ui 7.11.0 → 8.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/.storybook/preview-body.html +1 -0
- package/.toolkitrc.yml +1 -7
- package/CHANGELOG.md +51 -0
- package/lib/components/ArticleInfo/index.d.ts +3 -3
- package/lib/components/ArticleInfo/index.js +7 -7
- package/lib/components/ArticleInfo/index.js.map +1 -1
- package/lib/components/BackToTopButton/client/index.js +1 -1
- package/lib/components/BackToTopButton/client/index.js.map +1 -1
- package/lib/components/Byline/index.js +2 -2
- package/lib/components/Byline/index.js.map +1 -1
- package/lib/components/LiveBlogPost/ShareLinkButton.js +2 -2
- package/lib/components/LiveBlogPost/ShareLinkButton.js.map +1 -1
- package/lib/components/LiveBlogPost/Timestamp.js +2 -2
- package/lib/components/LiveBlogPost/Timestamp.js.map +1 -1
- package/lib/components/LiveBlogPost/index.d.ts +0 -7
- package/lib/components/LiveBlogPost/index.js +6 -9
- package/lib/components/LiveBlogPost/index.js.map +1 -1
- package/lib/components/LiveBlogWrapper/test/index.spec.js +0 -2
- package/lib/components/LiveBlogWrapper/test/index.spec.js.map +1 -1
- package/lib/components/RichText/BasicComponents.js +4 -4
- package/lib/components/RichText/BasicComponents.js.map +1 -1
- package/lib/components/Topper/LiveBlogIndicator.js +1 -1
- package/lib/components/Topper/LiveBlogIndicator.js.map +1 -1
- package/lib/components/body-components/ArticleBody/index.js +1 -1
- package/lib/components/body-components/ArticleBody/index.js.map +1 -1
- package/lib/components/body-components/ContentPackageBody/index.js +2 -2
- package/lib/components/body-components/ContentPackageBody/index.js.map +1 -1
- package/lib/components/body-components/PodcastBody/index.js +2 -2
- package/lib/components/body-components/PodcastBody/index.js.map +1 -1
- package/lib/components/content-tree/BigNumber/index.js +3 -3
- package/lib/components/content-tree/BigNumber/index.js.map +1 -1
- package/lib/components/content-tree/Clip/client/index.js +4 -2
- package/lib/components/content-tree/Clip/client/index.js.map +1 -1
- package/lib/components/content-tree/Clip/components/Caption.js +1 -1
- package/lib/components/content-tree/Clip/components/Caption.js.map +1 -1
- package/lib/components/content-tree/Clip/components/VideoDescription.js +7 -8
- package/lib/components/content-tree/Clip/components/VideoDescription.js.map +1 -1
- package/lib/components/content-tree/Clip/components/VideoInfoBox.js +1 -1
- package/lib/components/content-tree/Clip/components/VideoInfoBox.js.map +1 -1
- package/lib/components/content-tree/Heading/index.js +3 -3
- package/lib/components/content-tree/Heading/index.js.map +1 -1
- package/lib/components/content-tree/ImageSet/index.js +1 -1
- package/lib/components/content-tree/ImageSet/index.js.map +1 -1
- package/lib/components/content-tree/Pullquote/index.js +3 -4
- package/lib/components/content-tree/Pullquote/index.js.map +1 -1
- package/lib/components/content-tree/Recommended/index.js +1 -1
- package/lib/components/content-tree/Recommended/index.js.map +1 -1
- package/lib/components/content-tree/Table/TableCell.js +3 -1
- package/lib/components/content-tree/Table/TableCell.js.map +1 -1
- package/lib/stories/BackToTop.stories.js +1 -1
- package/lib/stories/BackToTop.stories.js.map +1 -1
- package/lib/stories/Clip.stories.js +2 -2
- package/lib/stories/Clip.stories.js.map +1 -1
- package/lib/stories/Expander.stories.js +2 -2
- package/lib/stories/Expander.stories.js.map +1 -1
- package/lib/stories/LiveBlogPost.stories.js +0 -1
- package/lib/stories/LiveBlogPost.stories.js.map +1 -1
- package/package.json +12 -12
- package/src/components/ArticleInfo/index.tsx +13 -13
- package/src/components/BackToTopButton/client/index.tsx +2 -1
- package/src/components/BackToTopButton/client/main.scss +5 -23
- package/src/components/Body/__snapshots__/index.test.tsx.snap +10 -10
- package/src/components/Byline/index.tsx +2 -2
- package/src/components/Expander/client/main.scss +18 -11
- package/src/components/LiveBlogPost/ShareLinkButton.tsx +5 -2
- package/src/components/LiveBlogPost/Timestamp.tsx +2 -2
- package/src/components/LiveBlogPost/index.tsx +10 -20
- package/src/components/LiveBlogWrapper/test/index.spec.tsx +0 -2
- package/src/components/RichText/BasicComponents.tsx +14 -4
- package/src/components/Topper/LiveBlogIndicator.tsx +1 -1
- package/src/components/Topper/__snapshots__/LiveBlogIndicator.spec.tsx.snap +2 -2
- package/src/components/body-components/ArticleBody/index.tsx +1 -1
- package/src/components/body-components/ContentPackageBody/index.tsx +2 -2
- package/src/components/body-components/PodcastBody/index.tsx +2 -2
- package/src/components/content-tree/BigNumber/index.tsx +5 -3
- package/src/components/content-tree/Clip/client/index.ts +4 -2
- package/src/components/content-tree/Clip/client/main.scss +94 -47
- package/src/components/content-tree/Clip/client/progressBar.scss +6 -5
- package/src/components/content-tree/Clip/components/Caption.tsx +4 -1
- package/src/components/content-tree/Clip/components/VideoDescription.tsx +21 -19
- package/src/components/content-tree/Clip/components/VideoInfoBox.tsx +3 -1
- package/src/components/content-tree/Clip/components/_caption.scss +2 -3
- package/src/components/content-tree/Clip/components/_clip-tag.scss +2 -1
- package/src/components/content-tree/Clip/components/_video-description.scss +42 -39
- package/src/components/content-tree/Clip/components/_video-info-box.scss +30 -35
- package/src/components/content-tree/Clip/test/__snapshots__/snapshot.spec.tsx.snap +62 -23
- package/src/components/content-tree/Heading/index.tsx +15 -3
- package/src/components/content-tree/ImageSet/index.tsx +1 -1
- package/src/components/content-tree/Pullquote/index.tsx +12 -8
- package/src/components/content-tree/Recommended/index.tsx +3 -1
- package/src/components/content-tree/Table/TableCell.tsx +3 -1
- package/src/stories/BackToTop.stories.tsx +1 -1
- package/src/stories/Clip.stories.tsx +2 -2
- package/src/stories/Expander.stories.tsx +2 -2
- package/src/stories/LiveBlogPost.stories.tsx +0 -1
- package/src/stories/article-page.scss +9 -32
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/cp-content-pipeline-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,16 +15,11 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@babel/preset-env": "^7.22.5",
|
|
17
17
|
"@babel/preset-react": "^7.22.5",
|
|
18
|
-
"@dotcom-tool-kit/npm": "^3.3.2",
|
|
19
18
|
"@financial-times/content-tree": "github:financial-times/content-tree#056af70",
|
|
20
19
|
"@financial-times/n-scrollytelling-image": "^1.1.0",
|
|
21
|
-
"@financial-times/o-
|
|
22
|
-
"@financial-times/o-
|
|
23
|
-
"@financial-times/o-icons": "^7.7.0",
|
|
24
|
-
"@financial-times/o-share": "^10.0.1",
|
|
25
|
-
"@financial-times/o-spacing": "^3.2.3",
|
|
20
|
+
"@financial-times/o-grid": "^6.1.8",
|
|
21
|
+
"@financial-times/o-share": "^11.0.0",
|
|
26
22
|
"@financial-times/o-tracking": "^4.5.0",
|
|
27
|
-
"@financial-times/o-typography": "^7.4.1",
|
|
28
23
|
"@financial-times/x-engine": "^14.6.5",
|
|
29
24
|
"@storybook/addon-essentials": "^7.0.24",
|
|
30
25
|
"@storybook/addon-interactions": "^7.0.24",
|
|
@@ -53,17 +48,22 @@
|
|
|
53
48
|
"webpack": "^5.88.1"
|
|
54
49
|
},
|
|
55
50
|
"dependencies": {
|
|
51
|
+
"@dotcom-tool-kit/npm": "^4.2.11",
|
|
56
52
|
"@financial-times/ft-date-format": "^2.1.0",
|
|
57
|
-
"@financial-times/o-expander": "^
|
|
58
|
-
"@financial-times/o-labels": "^
|
|
53
|
+
"@financial-times/o-expander": "^7.0.0",
|
|
54
|
+
"@financial-times/o-labels": "^7.0.0",
|
|
59
55
|
"@financial-times/o-loading": "^5.2.3",
|
|
60
|
-
"@financial-times/o-teaser": "^
|
|
56
|
+
"@financial-times/o-teaser": "^7.0.1",
|
|
57
|
+
"@financial-times/o3-button": "^3.0.1",
|
|
58
|
+
"@financial-times/o3-editorial-typography": "^3.1.1",
|
|
59
|
+
"@financial-times/o3-foundation": "^3.2.2",
|
|
61
60
|
"@financial-times/o3-tooltip": "^1.0.4",
|
|
61
|
+
"@financial-times/o-visual-effects": "^4.2.1",
|
|
62
|
+
"@financial-times/x-interaction": "^15.0.0",
|
|
62
63
|
"@financial-times/x-teaser": "^14.6.5",
|
|
63
64
|
"classnames": "^2.5.1"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
|
-
"@financial-times/x-interaction": ">=14",
|
|
67
67
|
"react": "16 || 17 || 18"
|
|
68
68
|
},
|
|
69
69
|
"x-dash": {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import Byline from
|
|
3
|
-
import type { ArticleQuery } from
|
|
4
|
-
import ftDateFormat from
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Byline from '../Byline'
|
|
3
|
+
import type { ArticleQuery } from '@financial-times/cp-content-pipeline-client'
|
|
4
|
+
import ftDateFormat from '@financial-times/ft-date-format'
|
|
5
5
|
|
|
6
6
|
type ArticleInfoProps = {
|
|
7
|
-
content: ArticleQuery[
|
|
7
|
+
content: ArticleQuery['content']
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const ArticleInfo: React.FC<React.PropsWithChildren<ArticleInfoProps>> = ({
|
|
11
11
|
children,
|
|
12
12
|
content,
|
|
13
13
|
}) => {
|
|
14
|
-
const isLiveBlogPackage = content.__typename ===
|
|
14
|
+
const isLiveBlogPackage = content.__typename === 'LiveBlogPackage'
|
|
15
15
|
const formattedFirstPublishedDate = ftDateFormat.format(
|
|
16
16
|
new Date(content.firstPublishedDate),
|
|
17
|
-
|
|
17
|
+
'date'
|
|
18
18
|
)
|
|
19
19
|
const formattedPublishedDate = ftDateFormat.format(
|
|
20
20
|
new Date(content.publishedTimestamp),
|
|
21
|
-
|
|
21
|
+
'date'
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
const displayPublishedDate = content.publishedDate && !isLiveBlogPackage
|
|
@@ -33,7 +33,7 @@ const ArticleInfo: React.FC<React.PropsWithChildren<ArticleInfoProps>> = ({
|
|
|
33
33
|
<div className="article-info">
|
|
34
34
|
<div className="article-info__time-byline-row">
|
|
35
35
|
<div className="article-info__time-byline-content">
|
|
36
|
-
{content.byline && content.__typename !==
|
|
36
|
+
{content.byline && content.__typename !== 'Audio' && (
|
|
37
37
|
<Byline
|
|
38
38
|
structuredContent={content.byline}
|
|
39
39
|
showEditedBy={isLiveBlogPackage}
|
|
@@ -50,9 +50,9 @@ const ArticleInfo: React.FC<React.PropsWithChildren<ArticleInfoProps>> = ({
|
|
|
50
50
|
<time
|
|
51
51
|
data-o-component="o-date"
|
|
52
52
|
{...(isPublishedMoreThanOneDayAgo
|
|
53
|
-
? {
|
|
53
|
+
? { 'data-o-date-format': 'MMM d yyyy' }
|
|
54
54
|
: {})}
|
|
55
|
-
className="article-info__timestamp o-date"
|
|
55
|
+
className="article-info__timestamp o3-editorial-typography-byline-timestamp o-date"
|
|
56
56
|
dateTime={content.firstPublishedDate}
|
|
57
57
|
>
|
|
58
58
|
{formattedFirstPublishedDate}
|
|
@@ -64,9 +64,9 @@ const ArticleInfo: React.FC<React.PropsWithChildren<ArticleInfoProps>> = ({
|
|
|
64
64
|
<time
|
|
65
65
|
data-o-component="o-date"
|
|
66
66
|
data-o-date-format={
|
|
67
|
-
isPublishedMoreThanOneDayAgo ?
|
|
67
|
+
isPublishedMoreThanOneDayAgo ? 'MMM d yyyy, HH:mm' : 'HH:mm'
|
|
68
68
|
}
|
|
69
|
-
className="article-info__timestamp o-date"
|
|
69
|
+
className="article-info__timestamp o3-editorial-typography-byline-timestamp o-date"
|
|
70
70
|
dateTime={content.publishedDate}
|
|
71
71
|
>
|
|
72
72
|
{formattedPublishedDate}
|
|
@@ -120,8 +120,9 @@ const BackToTop: React.FC<BackToTopProps> = ({
|
|
|
120
120
|
ref={element}
|
|
121
121
|
type="button"
|
|
122
122
|
onClick={handleClick}
|
|
123
|
-
className="
|
|
123
|
+
className="o3-button o-visual-effects-shadow-high o3-button--big o3-button--primary o3-button-icon o3-button-icon--chevron-up"
|
|
124
124
|
aria-live="polite"
|
|
125
|
+
data-o3-theme="mono"
|
|
125
126
|
{...attributes}
|
|
126
127
|
>
|
|
127
128
|
Back to top
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
@import '@financial-times/
|
|
1
|
+
@import '@financial-times/o3-foundation/css/core.css';
|
|
2
|
+
@import '@financial-times/o3-button/css/core.css';
|
|
2
3
|
@import '@financial-times/o-visual-effects/main';
|
|
3
4
|
@import '@financial-times/o-header/main';
|
|
4
|
-
@import '@financial-times/o-spacing/main';
|
|
5
5
|
@import '@financial-times/o-grid/main';
|
|
6
6
|
@import 'n-ui-foundations/mixins';
|
|
7
|
-
|
|
8
|
-
$opts: (
|
|
9
|
-
'sizes': (
|
|
10
|
-
'big'
|
|
11
|
-
),
|
|
12
|
-
'types': (
|
|
13
|
-
'primary'
|
|
14
|
-
),
|
|
15
|
-
'icons': (
|
|
16
|
-
'arrow-up'
|
|
17
|
-
)
|
|
18
|
-
)
|
|
19
|
-
);
|
|
7
|
+
|
|
20
8
|
@include oVisualEffects(
|
|
21
9
|
$opts: (
|
|
22
10
|
'shadows': (
|
|
@@ -26,21 +14,15 @@
|
|
|
26
14
|
);
|
|
27
15
|
|
|
28
16
|
$button-height: 40px;
|
|
29
|
-
$notification-top: calc(100vh - $button-height -
|
|
30
|
-
|
|
31
|
-
.back-to-top__button {
|
|
32
|
-
height: $button-height;
|
|
33
|
-
background-color: oColorsByName('black');
|
|
34
|
-
}
|
|
17
|
+
$notification-top: calc(100vh - $button-height - var(--o3-spacing-s));
|
|
35
18
|
|
|
36
19
|
.back-to-top__container {
|
|
37
20
|
text-align: center;
|
|
38
21
|
width: 100%;
|
|
39
22
|
height: 0;
|
|
40
|
-
@include nUiZIndexFor('sticky-header');
|
|
41
23
|
position: sticky;
|
|
42
24
|
top: $notification-top;
|
|
43
|
-
z-index:
|
|
25
|
+
z-index: var(--o3-z-nav-popover);
|
|
44
26
|
@media print {
|
|
45
27
|
display: none;
|
|
46
28
|
}
|
|
@@ -33,7 +33,7 @@ exports[`Body content type override renderers renders override renderer for Vide
|
|
|
33
33
|
exports[`Body default renderers renders default renderer for Article 1`] = `
|
|
34
34
|
<DocumentFragment>
|
|
35
35
|
<article
|
|
36
|
-
class="n-content-body"
|
|
36
|
+
class="n-content-body o3-type-body-content-base"
|
|
37
37
|
>
|
|
38
38
|
<p>
|
|
39
39
|
Lorem ipsum dolor sit amet
|
|
@@ -45,7 +45,7 @@ exports[`Body default renderers renders default renderer for Article 1`] = `
|
|
|
45
45
|
exports[`Body default renderers renders default renderer for Audio 1`] = `
|
|
46
46
|
<DocumentFragment>
|
|
47
47
|
<div
|
|
48
|
-
class="article__content-body n-content-body js-article__content-body"
|
|
48
|
+
class="article__content-body n-content-body js-article__content-body o3-type-body-content-base"
|
|
49
49
|
data-attribute="article-content-body"
|
|
50
50
|
data-trackable="article-body"
|
|
51
51
|
>
|
|
@@ -75,7 +75,7 @@ exports[`Body default renderers renders default renderer for Audio 1`] = `
|
|
|
75
75
|
</audio>
|
|
76
76
|
</div>
|
|
77
77
|
<article
|
|
78
|
-
class="n-content-body"
|
|
78
|
+
class="n-content-body o3-type-body-content-base"
|
|
79
79
|
>
|
|
80
80
|
<p>
|
|
81
81
|
Lorem ipsum dolor sit amet
|
|
@@ -96,7 +96,7 @@ exports[`Body default renderers renders default renderer for Audio 1`] = `
|
|
|
96
96
|
exports[`Body default renderers renders default renderer for ContentPackage 1`] = `
|
|
97
97
|
<DocumentFragment>
|
|
98
98
|
<article
|
|
99
|
-
class="article n-content-body js-article__content-body
|
|
99
|
+
class="article n-content-body js-article__content-body o3-type-body-content-base"
|
|
100
100
|
data-attribute="article-content-body"
|
|
101
101
|
data-content-id="00000000-0000-0000-0000-000000000000"
|
|
102
102
|
id="site-content"
|
|
@@ -169,10 +169,10 @@ exports[`Body default renderers renders default renderer for LiveBlogPackage 1`]
|
|
|
169
169
|
>
|
|
170
170
|
<span>
|
|
171
171
|
<span
|
|
172
|
-
class="x-live-blog-post__timestamp-container"
|
|
172
|
+
class="x-live-blog-post__timestamp-container o3-type-detail"
|
|
173
173
|
>
|
|
174
174
|
<time
|
|
175
|
-
class="o-date
|
|
175
|
+
class="o-date"
|
|
176
176
|
data-o-component="o-date"
|
|
177
177
|
data-o-date-format="MMM dd, HH:mm"
|
|
178
178
|
data-o-date-text-case="sentence"
|
|
@@ -192,18 +192,18 @@ exports[`Body default renderers renders default renderer for LiveBlogPackage 1`]
|
|
|
192
192
|
class="x-live-blog-post__byline"
|
|
193
193
|
>
|
|
194
194
|
<p
|
|
195
|
-
class="article-info__byline"
|
|
195
|
+
class="article-info__byline o3-editorial-typography-byline"
|
|
196
196
|
/>
|
|
197
197
|
</div>
|
|
198
198
|
</div>
|
|
199
199
|
</div>
|
|
200
200
|
<h2
|
|
201
|
-
class="
|
|
201
|
+
class="o3-type-display-sm"
|
|
202
202
|
>
|
|
203
203
|
live post 1
|
|
204
204
|
</h2>
|
|
205
205
|
<div
|
|
206
|
-
class="x-live-blog-post__body n-content-body article--body"
|
|
206
|
+
class="x-live-blog-post__body n-content-body article--body o3-type-body-content-base"
|
|
207
207
|
data-trackable="truncated-post"
|
|
208
208
|
data-trackable-category="live-blog"
|
|
209
209
|
data-trackable-context-post="00000000-0000-0000-0000-000000000000"
|
|
@@ -369,7 +369,7 @@ exports[`Body default renderers renders default renderer for LiveBlogPackage 1`]
|
|
|
369
369
|
exports[`Body default renderers renders default renderer for Video 1`] = `
|
|
370
370
|
<DocumentFragment>
|
|
371
371
|
<article
|
|
372
|
-
class="n-content-body"
|
|
372
|
+
class="n-content-body o3-type-body-content-base"
|
|
373
373
|
>
|
|
374
374
|
<p>
|
|
375
375
|
Lorem ipsum dolor sit amet
|
|
@@ -15,7 +15,7 @@ interface AuthorLinkProps extends ContentProps<ComponentWorkarounds.Author> {}
|
|
|
15
15
|
const AuthorLink: React.FC<PropsWithChildren<AuthorLinkProps>> = (props) =>
|
|
16
16
|
props.content.concept ? (
|
|
17
17
|
<a
|
|
18
|
-
className="
|
|
18
|
+
className="o3-editorial-typography-byline-author"
|
|
19
19
|
href={props.content.concept.relativeUrl}
|
|
20
20
|
data-trackable="author"
|
|
21
21
|
>
|
|
@@ -29,7 +29,7 @@ const bylineComponents = {
|
|
|
29
29
|
|
|
30
30
|
const Byline: React.FC<BylineProps> = ({ structuredContent, showEditedBy }) => {
|
|
31
31
|
return (
|
|
32
|
-
<p className="article-info__byline">
|
|
32
|
+
<p className="article-info__byline o3-editorial-typography-byline">
|
|
33
33
|
{showEditedBy && (
|
|
34
34
|
<span>
|
|
35
35
|
Edited by <br />
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
@import '@financial-times/
|
|
2
|
-
@import '@financial-times/o-colors/main';
|
|
1
|
+
@import '@financial-times/o3-foundation/css/core.css';
|
|
3
2
|
@import '@financial-times/o-grid/main';
|
|
4
|
-
@import '@financial-times/o-spacing/main';
|
|
5
3
|
|
|
6
4
|
$dataComponentVisibleElements: (
|
|
7
5
|
'clip-set',
|
|
@@ -129,16 +127,18 @@ $dataComponentVisibleElements: (
|
|
|
129
127
|
.cp-expander__expand,
|
|
130
128
|
.cp-expander__collapse {
|
|
131
129
|
display: block;
|
|
132
|
-
padding-bottom:
|
|
130
|
+
padding-bottom: var(--o3-spacing-s);
|
|
133
131
|
> a {
|
|
134
|
-
|
|
135
|
-
--_o-typography-body-color: $icon-color;
|
|
132
|
+
color: var(--o3-color-palette-ft-grey);
|
|
136
133
|
font-feature-settings: 'clig' off, 'liga' off;
|
|
137
134
|
|
|
138
|
-
|
|
139
|
-
font-
|
|
135
|
+
font-family: var(--o3-font-family-metric);
|
|
136
|
+
font-size: var(--o3-font-size-metric2-1);
|
|
137
|
+
line-height: var(--o3-font-lineheight-metric2-1);
|
|
138
|
+
font-weight: var(--o3-font-weight-regular);
|
|
139
|
+
|
|
140
140
|
text-decoration: none;
|
|
141
|
-
|
|
141
|
+
|
|
142
142
|
&:hover {
|
|
143
143
|
|
|
144
144
|
cursor: pointer;
|
|
@@ -146,8 +146,15 @@ $dataComponentVisibleElements: (
|
|
|
146
146
|
|
|
147
147
|
&:after {
|
|
148
148
|
content: '';
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
display: inline-block;
|
|
150
|
+
width: 18px;
|
|
151
|
+
height: 18px;
|
|
152
|
+
background-color: var(--o3-color-palette-ft-grey);
|
|
153
|
+
mask-image: var(--o3-icon-chevron-down);
|
|
154
|
+
mask-repeat: no-repeat;
|
|
155
|
+
mask-size: contain;
|
|
156
|
+
|
|
157
|
+
margin: 0 6px;
|
|
151
158
|
vertical-align: middle;
|
|
152
159
|
}
|
|
153
160
|
}
|
|
@@ -30,10 +30,13 @@ const ShareLinkButton: React.FC<ShareLinkButtonProps> = ({
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
<div
|
|
33
|
+
<div
|
|
34
|
+
className="x-live-blog-post__link-container o3-type-detail"
|
|
35
|
+
data-tooltip="hide"
|
|
36
|
+
>
|
|
34
37
|
<span className="x-live-blog-post__link-copied-message">Link copied</span>
|
|
35
38
|
<button
|
|
36
|
-
className="x-live-blog-post__link-icon"
|
|
39
|
+
className="x-live-blog-post__link-icon o3-button o3-button--ghost o3-button-icon o3-button-icon--icon-only"
|
|
37
40
|
data-component="share-link-button"
|
|
38
41
|
aria-label="Share link"
|
|
39
42
|
data-trackable="share-link"
|
|
@@ -27,10 +27,10 @@ const TimeStamp: React.FC<TimestampProps> = ({
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<span className="x-live-blog-post__timestamp-container">
|
|
30
|
+
<span className="x-live-blog-post__timestamp-container o3-type-detail">
|
|
31
31
|
<time
|
|
32
32
|
data-o-component="o-date"
|
|
33
|
-
className="o-date
|
|
33
|
+
className="o-date"
|
|
34
34
|
dateTime={publishedTimestamp}
|
|
35
35
|
data-o-date-format={format}
|
|
36
36
|
data-o-date-text-case={textCase}
|
|
@@ -26,7 +26,7 @@ const TruncatedPost: React.FC<React.PropsWithChildren<{ id: string }>> = ({
|
|
|
26
26
|
data-trackable="truncated-post"
|
|
27
27
|
data-trackable-context-post={id}
|
|
28
28
|
data-trackable-category="live-blog"
|
|
29
|
-
className="x-live-blog-post__body n-content-body article--body"
|
|
29
|
+
className="x-live-blog-post__body n-content-body article--body o3-type-body-content-base"
|
|
30
30
|
>
|
|
31
31
|
<Expander
|
|
32
32
|
expandLabel="Expand post"
|
|
@@ -66,14 +66,7 @@ export type LiveBlogPostProps = {
|
|
|
66
66
|
body: any // cp-content-pipeline
|
|
67
67
|
publishedTimestamp: string // Remove once wordpress is no longer in use
|
|
68
68
|
publishedDate: string
|
|
69
|
-
isBreakingNews: boolean // Remove once wordpress is no longer in use
|
|
70
69
|
isPinned: boolean
|
|
71
|
-
standout?: {
|
|
72
|
-
breakingNews?: boolean
|
|
73
|
-
editorsChoice?: boolean
|
|
74
|
-
exclusive?: boolean
|
|
75
|
-
scoop?: boolean
|
|
76
|
-
}
|
|
77
70
|
articleUrl: string
|
|
78
71
|
showShareButtons: boolean
|
|
79
72
|
showShareLinkButton: boolean
|
|
@@ -91,8 +84,6 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
91
84
|
body, // cp-content-pipeline
|
|
92
85
|
publishedTimestamp, // Remove once wordpress is no longer in use
|
|
93
86
|
publishedDate,
|
|
94
|
-
isBreakingNews, // Remove once wordpress is no longer in use
|
|
95
|
-
standout = {},
|
|
96
87
|
articleUrl,
|
|
97
88
|
showShareButtons = false,
|
|
98
89
|
showShareLinkButton = false,
|
|
@@ -102,8 +93,6 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
102
93
|
indicators = {},
|
|
103
94
|
authors,
|
|
104
95
|
}) => {
|
|
105
|
-
const showBreakingNewsLabel = standout.breakingNews || isBreakingNews
|
|
106
|
-
|
|
107
96
|
let postBody
|
|
108
97
|
if (body && 'structured' in body) {
|
|
109
98
|
// Content comes from cp-content-pipeline-api
|
|
@@ -116,7 +105,7 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
116
105
|
// Content comes from next-es or wordpress
|
|
117
106
|
postBody = (
|
|
118
107
|
<div
|
|
119
|
-
className="x-live-blog-post__body n-content-body article--body"
|
|
108
|
+
className="x-live-blog-post__body n-content-body article--body o3-editorial-typography-body"
|
|
120
109
|
dangerouslySetInnerHTML={{ __html: bodyHTML || content }}
|
|
121
110
|
/>
|
|
122
111
|
)
|
|
@@ -132,7 +121,9 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
132
121
|
>
|
|
133
122
|
<div className="o-expander__content">{postBody}</div>
|
|
134
123
|
<a className="o-expander__toggle o-expander__text--custom">
|
|
135
|
-
<span className="o-expander__visually-hidden"
|
|
124
|
+
<span className="o-expander__visually-hidden o3-type-detail">
|
|
125
|
+
|
|
126
|
+
</span>
|
|
136
127
|
</a>
|
|
137
128
|
</div>
|
|
138
129
|
) : (
|
|
@@ -175,11 +166,13 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
175
166
|
<div className="x-live-blog-post__meta-container">
|
|
176
167
|
<div className="x-live-blog-post__meta">
|
|
177
168
|
{indicators.isOpinion ? (
|
|
178
|
-
<span className="x-live-blog-post__label--opinion x-live-blog-post__label">
|
|
169
|
+
<span className="x-live-blog-post__label--opinion x-live-blog-post__label o3-type-label">
|
|
179
170
|
Live Opinion
|
|
180
171
|
</span>
|
|
181
172
|
) : isPinned ? (
|
|
182
|
-
<span className="x-live-blog-post__label">
|
|
173
|
+
<span className="x-live-blog-post__label o3-type-label">
|
|
174
|
+
Editor's pick
|
|
175
|
+
</span>
|
|
183
176
|
) : (
|
|
184
177
|
''
|
|
185
178
|
)}
|
|
@@ -199,10 +192,7 @@ const LiveBlogPost: React.FC<LiveBlogPostProps> = ({
|
|
|
199
192
|
)}
|
|
200
193
|
</div>
|
|
201
194
|
|
|
202
|
-
{
|
|
203
|
-
<div className="x-live-blog-post__breaking-news">Breaking news</div>
|
|
204
|
-
)}
|
|
205
|
-
{title && <h2 className="x-live-blog-post__title">{title}</h2>}
|
|
195
|
+
{title && <h2 className="o3-type-display-sm">{title}</h2>}
|
|
206
196
|
{postBody}
|
|
207
197
|
<div className="x-live-blog-post__controls">
|
|
208
198
|
{showShareButtons && (
|
|
@@ -10,7 +10,6 @@ const post1 = {
|
|
|
10
10
|
title: 'Post 1 Title',
|
|
11
11
|
bodyHTML: '<p>Post 1 body</p>',
|
|
12
12
|
publishedDate: '2020-10-09T10:00:00.000Z',
|
|
13
|
-
isBreakingNews: true,
|
|
14
13
|
articleUrl: 'https://www.ft.com',
|
|
15
14
|
showShareButtons: true,
|
|
16
15
|
showShareLinkButton: true,
|
|
@@ -21,7 +20,6 @@ const post2 = {
|
|
|
21
20
|
title: 'Post 2 Title',
|
|
22
21
|
bodyHTML: '<p>Post 2 body</p>',
|
|
23
22
|
publishedDate: '2020-10-09T11:00:00.000Z',
|
|
24
|
-
isBreakingNews: false,
|
|
25
23
|
articleUrl: 'https://www.ft.com',
|
|
26
24
|
showShareButtons: true,
|
|
27
25
|
showShareLinkButton: true,
|
|
@@ -6,7 +6,11 @@ import { ContentProps } from '../types'
|
|
|
6
6
|
export const List: React.FC<
|
|
7
7
|
React.PropsWithChildren<ContentProps<ContentTree.List>>
|
|
8
8
|
> = (props) =>
|
|
9
|
-
props.content.ordered ?
|
|
9
|
+
props.content.ordered ? (
|
|
10
|
+
<ol className="o3-editorial-typography-list-ordered">{props.children}</ol>
|
|
11
|
+
) : (
|
|
12
|
+
<ul className="o3-editorial-typography-list-unordered">{props.children}</ul>
|
|
13
|
+
)
|
|
10
14
|
|
|
11
15
|
export const ListItem: React.FC<
|
|
12
16
|
React.PropsWithChildren<ContentProps<ContentTree.ListItem>>
|
|
@@ -24,14 +28,20 @@ export const Blockquote: React.FC<
|
|
|
24
28
|
React.PropsWithChildren<ContentProps<ContentTree.Blockquote>>
|
|
25
29
|
> = (props) => {
|
|
26
30
|
return (
|
|
27
|
-
<blockquote className="n-content-blockquote">
|
|
31
|
+
<blockquote className="n-content-blockquote o3-editorial-typography-blockquote">
|
|
32
|
+
{props.children}
|
|
33
|
+
</blockquote>
|
|
28
34
|
)
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
export const Cite: React.FC<
|
|
32
38
|
React.PropsWithChildren<ContentProps<ContentTreeWorkarounds.Cite>>
|
|
33
39
|
> = (props) => {
|
|
34
|
-
return
|
|
40
|
+
return (
|
|
41
|
+
<cite className="o3-editorial-typography-blockquote__author">
|
|
42
|
+
{props.children}
|
|
43
|
+
</cite>
|
|
44
|
+
)
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
export const LineBreak: React.FC = () => <br />
|
|
@@ -73,7 +83,7 @@ export const TableFooter: React.FC<
|
|
|
73
83
|
export const TableCaption: React.FC<
|
|
74
84
|
React.PropsWithChildren<ContentProps<ContentTreeWorkarounds.TableCaption>>
|
|
75
85
|
> = (props) => (
|
|
76
|
-
<caption className="n-content-body__caption n-content-body__caption--auto">
|
|
86
|
+
<caption className="n-content-body__caption n-content-body__caption--auto o3-editorial-typography-subheading">
|
|
77
87
|
{props.children}
|
|
78
88
|
</caption>
|
|
79
89
|
)
|
|
@@ -35,7 +35,7 @@ const LiveBlogIndicator: React.FC<LiveBlogIndicatorProps> = ({
|
|
|
35
35
|
<time
|
|
36
36
|
id="live-blog-updated-timestamp"
|
|
37
37
|
data-o-component="o-date"
|
|
38
|
-
className="o-date live-blog-indicator__timestamp"
|
|
38
|
+
className="o-date live-blog-indicator__timestamp o3-type-label"
|
|
39
39
|
dateTime={lastUpdatedDateTime}
|
|
40
40
|
data-o-date-format="time-ago-no-seconds"
|
|
41
41
|
>
|
|
@@ -6,7 +6,7 @@ exports[`LiveBlogIndicator component does not show a label but does show the las
|
|
|
6
6
|
class="live-blog-indicator"
|
|
7
7
|
>
|
|
8
8
|
<time
|
|
9
|
-
class="o-date live-blog-indicator__timestamp"
|
|
9
|
+
class="o-date live-blog-indicator__timestamp o3-type-label"
|
|
10
10
|
data-o-component="o-date"
|
|
11
11
|
data-o-date-format="time-ago-no-seconds"
|
|
12
12
|
datetime="2024-11-05T10:48:03.442Z"
|
|
@@ -42,7 +42,7 @@ exports[`LiveBlogIndicator component shows a live label and the last updated tim
|
|
|
42
42
|
</span>
|
|
43
43
|
</span>
|
|
44
44
|
<time
|
|
45
|
-
class="o-date live-blog-indicator__timestamp"
|
|
45
|
+
class="o-date live-blog-indicator__timestamp o3-type-label"
|
|
46
46
|
data-o-component="o-date"
|
|
47
47
|
data-o-date-format="time-ago-no-seconds"
|
|
48
48
|
datetime="2024-11-15T10:38:03.442Z"
|
|
@@ -9,7 +9,7 @@ const ArticleBody: React.FC<BodyProps> = ({ content, richTextComponents }) => {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<ComponentsContext.Provider value={richTextComponents}>
|
|
12
|
-
<article className="n-content-body">
|
|
12
|
+
<article className="n-content-body o3-type-body-content-base">
|
|
13
13
|
<RichText
|
|
14
14
|
structuredContent={content.body.structured}
|
|
15
15
|
components={richTextComponents}
|
|
@@ -72,8 +72,8 @@ const ContentPackageBody: React.FC<ContentPackageBodyProps> = ({
|
|
|
72
72
|
data-syndicatable={content.canBeSyndicated}
|
|
73
73
|
className={
|
|
74
74
|
design && design.theme
|
|
75
|
-
? `design-theme--${design.theme} article`
|
|
76
|
-
: 'article n-content-body js-article__content-body
|
|
75
|
+
? `design-theme--${design.theme} article o3-type-body-content-base`
|
|
76
|
+
: 'article n-content-body js-article__content-body o3-type-body-content-base'
|
|
77
77
|
}
|
|
78
78
|
>
|
|
79
79
|
<PackageTeasers
|
|
@@ -24,7 +24,7 @@ const PodcastBody: React.FC<PodcastBodyProps> = ({
|
|
|
24
24
|
return (
|
|
25
25
|
<div
|
|
26
26
|
// HACK:20230712:IM use next-article's CSS classes until we bundle styles
|
|
27
|
-
className="article__content-body n-content-body js-article__content-body"
|
|
27
|
+
className="article__content-body n-content-body js-article__content-body o3-type-body-content-base"
|
|
28
28
|
data-trackable="article-body"
|
|
29
29
|
data-attribute="article-content-body"
|
|
30
30
|
>
|
|
@@ -47,7 +47,7 @@ const PodcastBody: React.FC<PodcastBodyProps> = ({
|
|
|
47
47
|
)}
|
|
48
48
|
|
|
49
49
|
{content.body?.structured && (
|
|
50
|
-
<article className="n-content-body">
|
|
50
|
+
<article className="n-content-body o3-type-body-content-base">
|
|
51
51
|
<RichText
|
|
52
52
|
structuredContent={content.body.structured}
|
|
53
53
|
components={richTextComponents}
|
|
@@ -13,9 +13,11 @@ const BigNumber: React.FC<BigNumberProps> = ({
|
|
|
13
13
|
content: { description, number },
|
|
14
14
|
}) => {
|
|
15
15
|
return (
|
|
16
|
-
<div className="n-content-big-number">
|
|
17
|
-
<
|
|
18
|
-
<
|
|
16
|
+
<div className="o3-editorial-typography-big-number n-content-big-number">
|
|
17
|
+
<div className="o3-editorial-typography-big-number__title">{number}</div>
|
|
18
|
+
<div className="o3-editorial-typography-big-number__content">
|
|
19
|
+
{description}
|
|
20
|
+
</div>
|
|
19
21
|
</div>
|
|
20
22
|
)
|
|
21
23
|
}
|
|
@@ -505,6 +505,7 @@ class Clip extends ClipInterface {
|
|
|
505
505
|
|
|
506
506
|
const playIconContainer = document.createElement('div')
|
|
507
507
|
playIconContainer.classList.add('cp-clip__play-icon-container')
|
|
508
|
+
playIconContainer.setAttribute('data-o3-theme', 'inverse')
|
|
508
509
|
playIconContainer.append(playIcon)
|
|
509
510
|
|
|
510
511
|
const loadingIndicator = document.createElement('div')
|
|
@@ -516,13 +517,14 @@ class Clip extends ClipInterface {
|
|
|
516
517
|
|
|
517
518
|
const loadingIconContainer = document.createElement('div')
|
|
518
519
|
loadingIconContainer.classList.add('cp-clip__loading-icon-container')
|
|
520
|
+
loadingIconContainer.setAttribute('data-o3-theme', 'inverse')
|
|
519
521
|
const loadingIconBg = document.createElement('div')
|
|
520
522
|
loadingIconBg.classList.add('cp-clip__loading-icon-bg')
|
|
521
523
|
loadingIconContainer.append(loadingIconBg)
|
|
522
524
|
loadingIconBg.append(loadingIndicator)
|
|
523
525
|
const loadingText = document.createElement('span')
|
|
524
526
|
loadingText.innerText = 'LOADING'
|
|
525
|
-
loadingText.classList.add('cp-clip__loading-text')
|
|
527
|
+
loadingText.classList.add('cp-clip__loading-text', 'o3-type-label')
|
|
526
528
|
loadingIconContainer.append(loadingText)
|
|
527
529
|
this.loadingText = loadingText
|
|
528
530
|
|
|
@@ -672,7 +674,7 @@ class Clip extends ClipInterface {
|
|
|
672
674
|
const duration = formatTime(this.getDuration())
|
|
673
675
|
this.playText = document.createElement('span')
|
|
674
676
|
this.playText.innerText = `PLAY | ${duration}`
|
|
675
|
-
this.playText.classList.add('cp-clip__play-text')
|
|
677
|
+
this.playText.classList.add('cp-clip__play-text', 'o3-type-label')
|
|
676
678
|
playIconContainer.append(this.playText)
|
|
677
679
|
this.containerEl.classList.add('cp-clip--ready')
|
|
678
680
|
}
|