@kickstartds/ds-agency-premium 1.2.10--canary.171.76273d8.0 → 1.2.10--canary.178.33c3c92.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/BlogAsideProps-e1cbd5d3.d.ts +74 -0
- package/dist/BlogHeadProps-f9a49428.d.ts +31 -0
- package/dist/BlogTeaserProps-525f7f9f.d.ts +79 -0
- package/dist/FeatureProps-f8a75850.d.ts +52 -0
- package/dist/FeaturesProps-b05859d6.d.ts +34 -0
- package/dist/SeoProps-f2d6dcaa.d.ts +36 -0
- package/dist/{TeaserCardProps-3fce7be4.d.ts → TeaserCardProps-b9c28e78.d.ts} +1 -1
- package/dist/components/blog-aside/blog-aside.css +33 -5
- package/dist/components/blog-aside/blog-aside.schema.dereffed.json +5 -3
- package/dist/components/blog-aside/blog-aside.schema.json +5 -3
- package/dist/components/blog-aside/index.d.ts +6 -76
- package/dist/components/blog-aside/index.js +17 -10
- package/dist/components/blog-head/blog-head.css +22 -2
- package/dist/components/blog-head/blog-head.schema.dereffed.json +2 -1
- package/dist/components/blog-head/blog-head.schema.json +2 -1
- package/dist/components/blog-head/index.d.ts +6 -34
- package/dist/components/blog-head/index.js +10 -4
- package/dist/components/blog-overview/blog-overview.schema.dereffed.json +18 -0
- package/dist/components/blog-overview/index.d.ts +39 -0
- package/dist/components/blog-overview/index.js +17 -0
- package/dist/components/blog-post/blog-post.schema.dereffed.json +7 -4
- package/dist/components/blog-post/index.d.ts +39 -0
- package/dist/components/blog-post/index.js +24 -0
- package/dist/components/blog-teaser/blog-teaser.css +49 -25
- package/dist/components/blog-teaser/blog-teaser.schema.dereffed.json +6 -0
- package/dist/components/blog-teaser/blog-teaser.schema.json +6 -0
- package/dist/components/blog-teaser/index.d.ts +6 -81
- package/dist/components/blog-teaser/index.js +25 -16
- package/dist/components/button/button.css +109 -59
- package/dist/components/button/index.js +2 -1
- package/dist/components/cta/cta.css +1 -1
- package/dist/components/faq/faq.css +27 -14
- package/dist/components/faq/faq.schema.dereffed.json +2 -0
- package/dist/components/faq/faq.schema.json +2 -0
- package/dist/components/faq/index.d.ts +6 -3
- package/dist/components/faq/index.js +8 -4
- package/dist/components/feature/feature.css +99 -0
- package/dist/components/feature/feature.schema.dereffed.json +91 -0
- package/dist/components/feature/feature.schema.json +67 -0
- package/dist/components/feature/index.d.ts +7 -49
- package/dist/components/feature/index.js +19 -15
- package/dist/components/features/features.css +7 -93
- package/dist/components/features/features.schema.dereffed.json +36 -2
- package/dist/components/features/features.schema.json +3 -47
- package/dist/components/features/index.d.ts +7 -4
- package/dist/components/features/index.js +13 -20
- package/dist/components/footer/footer.css +21 -17
- package/dist/components/footer/footer.schema.dereffed.json +4 -83
- package/dist/components/footer/footer.schema.json +33 -2
- package/dist/components/footer/index.d.ts +23 -5
- package/dist/components/footer/index.js +1 -1
- package/dist/components/gallery/gallery.css +31 -23
- package/dist/components/gallery/gallery.schema.dereffed.json +2 -0
- package/dist/components/gallery/gallery.schema.json +2 -0
- package/dist/components/gallery/index.d.ts +6 -3
- package/dist/components/gallery/index.js +11 -6
- package/dist/components/header/header.css +19 -43
- package/dist/components/header/header.schema.dereffed.json +18 -93
- package/dist/components/header/header.schema.json +31 -1
- package/dist/components/header/index.d.ts +24 -5
- package/dist/components/header/index.js +1 -1
- package/dist/components/headline/headline.css +76 -46
- package/dist/components/headline/index.d.ts +1 -1
- package/dist/components/headline/index.js +1 -1
- package/dist/components/hero/hero.css +30 -16
- package/dist/components/image/image.css +12 -6
- package/dist/components/image/image.schema.dereffed.json +4 -4
- package/dist/components/image/image.schema.json +4 -4
- package/dist/components/image/index.d.ts +7 -7
- package/dist/components/image-text/image-text.css +14 -3
- package/dist/components/image-text/image-text.schema.dereffed.json +2 -0
- package/dist/components/image-text/image-text.schema.json +2 -0
- package/dist/components/image-text/index.d.ts +7 -4
- package/dist/components/image-text/index.js +19 -13
- package/dist/components/logo/index.d.ts +27 -0
- package/dist/components/logo/index.js +12 -0
- package/dist/components/logo/logo.schema.dereffed.json +38 -0
- package/dist/components/logo/logo.schema.json +31 -0
- package/dist/components/mosaic/mosaic.css +2 -2
- package/dist/components/nav-main/index.d.ts +2 -0
- package/dist/components/nav-main/index.js +3 -2
- package/dist/components/nav-main/nav-main.css +67 -64
- package/dist/components/nav-main/nav-main.schema.dereffed.json +17 -11
- package/dist/components/nav-main/nav-main.schema.json +15 -12
- package/dist/components/nav-main/nav-toggle.css +12 -7
- package/dist/components/page/page.schema.dereffed.json +46 -5
- package/dist/components/page/page.schema.json +1 -1
- package/dist/components/page-wrapper/index.d.ts +2 -3
- package/dist/components/page-wrapper/index.js +7 -472
- package/dist/components/page-wrapper/tokens.css +1 -1
- package/dist/components/providers/index.js +1 -1
- package/dist/components/raw-page-wrapper/index.d.ts +3 -0
- package/dist/components/raw-page-wrapper/index.js +492 -0
- package/dist/components/section/index.d.ts +2 -2
- package/dist/components/section/section.schema.dereffed.json +45 -4
- package/dist/components/settings/settings.schema.dereffed.json +22 -176
- package/dist/components/stat/index.d.ts +32 -0
- package/dist/components/stat/index.js +11 -0
- package/dist/components/stat/stat.schema.dereffed.json +64 -0
- package/dist/components/stat/stat.schema.json +48 -0
- package/dist/components/teaser-card/index.d.ts +4 -2
- package/dist/components/teaser-card/index.js +16 -13
- package/dist/components/teaser-card/teaser-card.css +68 -40
- package/dist/components/teaser-card/teaser-card.schema.dereffed.json +2 -2
- package/dist/components/teaser-card/teaser-card.schema.json +2 -2
- package/dist/components/testimonial/index.d.ts +44 -0
- package/dist/components/testimonial/index.js +19 -0
- package/dist/components/testimonial/testimonial.schema.dereffed.json +60 -0
- package/dist/components/testimonial/testimonial.schema.json +46 -0
- package/dist/components/text/index.d.ts +6 -3
- package/dist/components/text/index.js +10 -4
- package/dist/components/text/text.css +19 -9
- package/dist/components/text/text.schema.dereffed.json +1 -0
- package/dist/components/text/text.schema.json +1 -0
- package/dist/components/video-curtain/video-curtain.css +1 -1
- package/dist/global.css +238 -88
- package/dist/static/tokens-business.css +1 -1
- package/dist/static/tokens-google.css +1 -1
- package/dist/static/tokens-ngo.css +1 -1
- package/dist/static/tokens-telekom.css +1 -1
- package/dist/static/tokens.css +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/package.json +1 -1
- package/dist/FeaturesProps-32f5bc0d.d.ts +0 -284
- /package/dist/static/fonts/{lughausen → business}/novelpro-regular.woff +0 -0
- /package/dist/static/fonts/{lughausen → business}/novelsanspro-bold.woff +0 -0
- /package/dist/static/fonts/{lughausen → business}/novelsanspro-regular.woff +0 -0
- /package/dist/static/{logo-lughausen.svg → logo-business.svg} +0 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import "./blog-head.css";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, createContext, useContext } from 'react';
|
|
3
4
|
import { PostHead } from '@kickstartds/blog/lib/post-head';
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const BlogHeadContextDefault = forwardRef(({ date, tags = [], headline, image }, ref) => {
|
|
6
7
|
return (jsx(PostHead, { date: date, headline: { text: headline, level: "h1", align: "left" }, image: { src: image }, categories: tags.map((tag) => {
|
|
7
8
|
return { label: tag };
|
|
8
|
-
}) }));
|
|
9
|
-
};
|
|
9
|
+
}), ref: ref }));
|
|
10
|
+
});
|
|
11
|
+
const BlogHeadContext = createContext(BlogHeadContextDefault);
|
|
12
|
+
const BlogHead = forwardRef((props, ref) => {
|
|
13
|
+
const Component = useContext(BlogHeadContext);
|
|
14
|
+
return jsx(Component, { ...props, ref: ref });
|
|
15
|
+
});
|
|
10
16
|
|
|
11
|
-
export { BlogHead };
|
|
17
|
+
export { BlogHead, BlogHeadContext, BlogHeadContextDefault };
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"title": "Headline",
|
|
41
41
|
"description": "The headline of the blog post",
|
|
42
42
|
"type": "string",
|
|
43
|
+
"format": "markdown",
|
|
43
44
|
"examples": [
|
|
44
45
|
"This is a blog post headline"
|
|
45
46
|
]
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"title": "Teaser Text",
|
|
49
50
|
"description": "The teaser text of the blog post",
|
|
50
51
|
"type": "string",
|
|
52
|
+
"format": "markdown",
|
|
51
53
|
"examples": [
|
|
52
54
|
"This is a teaser text for the blog post"
|
|
53
55
|
]
|
|
@@ -123,6 +125,7 @@
|
|
|
123
125
|
"title": "Image",
|
|
124
126
|
"description": "The image URL of the author",
|
|
125
127
|
"type": "string",
|
|
128
|
+
"format": "image",
|
|
126
129
|
"examples": [
|
|
127
130
|
"img/people/author-emily.png"
|
|
128
131
|
]
|
|
@@ -133,6 +136,9 @@
|
|
|
133
136
|
"name"
|
|
134
137
|
]
|
|
135
138
|
},
|
|
139
|
+
"className": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
136
142
|
"type": {
|
|
137
143
|
"const": "blog-teaser"
|
|
138
144
|
}
|
|
@@ -179,6 +185,7 @@
|
|
|
179
185
|
"title": "Headline",
|
|
180
186
|
"description": "The headline of the blog post",
|
|
181
187
|
"type": "string",
|
|
188
|
+
"format": "markdown",
|
|
182
189
|
"examples": [
|
|
183
190
|
"This is a blog post headline"
|
|
184
191
|
]
|
|
@@ -187,6 +194,7 @@
|
|
|
187
194
|
"title": "Teaser Text",
|
|
188
195
|
"description": "The teaser text of the blog post",
|
|
189
196
|
"type": "string",
|
|
197
|
+
"format": "markdown",
|
|
190
198
|
"examples": [
|
|
191
199
|
"This is a teaser text for the blog post"
|
|
192
200
|
]
|
|
@@ -262,6 +270,7 @@
|
|
|
262
270
|
"title": "Image",
|
|
263
271
|
"description": "The image URL of the author",
|
|
264
272
|
"type": "string",
|
|
273
|
+
"format": "image",
|
|
265
274
|
"examples": [
|
|
266
275
|
"img/people/author-emily.png"
|
|
267
276
|
]
|
|
@@ -272,6 +281,9 @@
|
|
|
272
281
|
"name"
|
|
273
282
|
]
|
|
274
283
|
},
|
|
284
|
+
"className": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
275
287
|
"type": {
|
|
276
288
|
"const": "blog-teaser"
|
|
277
289
|
}
|
|
@@ -319,6 +331,7 @@
|
|
|
319
331
|
"title": "Headline",
|
|
320
332
|
"description": "The headline of the blog post",
|
|
321
333
|
"type": "string",
|
|
334
|
+
"format": "markdown",
|
|
322
335
|
"examples": [
|
|
323
336
|
"This is a blog post headline"
|
|
324
337
|
]
|
|
@@ -327,6 +340,7 @@
|
|
|
327
340
|
"title": "Teaser Text",
|
|
328
341
|
"description": "The teaser text of the blog post",
|
|
329
342
|
"type": "string",
|
|
343
|
+
"format": "markdown",
|
|
330
344
|
"examples": [
|
|
331
345
|
"This is a teaser text for the blog post"
|
|
332
346
|
]
|
|
@@ -402,6 +416,7 @@
|
|
|
402
416
|
"title": "Image",
|
|
403
417
|
"description": "The image URL of the author",
|
|
404
418
|
"type": "string",
|
|
419
|
+
"format": "image",
|
|
405
420
|
"examples": [
|
|
406
421
|
"img/people/author-emily.png"
|
|
407
422
|
]
|
|
@@ -412,6 +427,9 @@
|
|
|
412
427
|
"name"
|
|
413
428
|
]
|
|
414
429
|
},
|
|
430
|
+
"className": {
|
|
431
|
+
"type": "string"
|
|
432
|
+
},
|
|
415
433
|
"type": {
|
|
416
434
|
"const": "blog-teaser"
|
|
417
435
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
5
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
6
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
7
|
+
*/
|
|
8
|
+
import { BlogTeaserProps } from "../../BlogTeaserProps-525f7f9f.js";
|
|
9
|
+
import { CtaProps } from "../../CtaProps-93230a76.js";
|
|
10
|
+
import { SeoProps } from "../../SeoProps-f2d6dcaa.js";
|
|
11
|
+
/**
|
|
12
|
+
* Collection of posts to list on the page
|
|
13
|
+
*/
|
|
14
|
+
type Posts = BlogTeaserProps[];
|
|
15
|
+
/**
|
|
16
|
+
* Collection of posts to list on the page
|
|
17
|
+
*/
|
|
18
|
+
type Posts1 = BlogTeaserProps[];
|
|
19
|
+
/**
|
|
20
|
+
* Abstracts a blog overview concept into JSON schema
|
|
21
|
+
*/
|
|
22
|
+
interface BlogOverviewProps {
|
|
23
|
+
/**
|
|
24
|
+
* Referenced component BlogTeaserProps
|
|
25
|
+
*/
|
|
26
|
+
latest?: BlogTeaserProps;
|
|
27
|
+
list?: Posts;
|
|
28
|
+
more?: Posts1;
|
|
29
|
+
/**
|
|
30
|
+
* Referenced component CtaProps
|
|
31
|
+
*/
|
|
32
|
+
cta?: CtaProps;
|
|
33
|
+
/**
|
|
34
|
+
* Referenced component SeoProps
|
|
35
|
+
*/
|
|
36
|
+
seo: SeoProps;
|
|
37
|
+
}
|
|
38
|
+
declare const BlogOverview: ({ latest, more, }: BlogOverviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export { BlogOverview };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Section } from '../section/index.js';
|
|
4
|
+
import { BlogTeaser } from '../blog-teaser/index.js';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import '@kickstartds/core/lib/react';
|
|
7
|
+
import '@kickstartds/base/lib/section';
|
|
8
|
+
import '../section/js/Section.client.js';
|
|
9
|
+
import '@kickstartds/core/lib/component';
|
|
10
|
+
import '@kickstartds/blog/lib/post-teaser';
|
|
11
|
+
import '@kickstartds/core/lib/container';
|
|
12
|
+
|
|
13
|
+
const BlogOverview = ({ latest, more = [], }) => {
|
|
14
|
+
return (jsxs(Fragment, { children: [latest && (jsx(Section, { width: "wide", children: jsx(BlogTeaser, { ...latest }) })), more.length > 0 && (jsx(Section, { headline: { text: "More articles" }, children: more.map((article) => (createElement(BlogTeaser, { ...article, key: article.headline }))) }))] }));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { BlogOverview };
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"title": "Headline",
|
|
41
41
|
"description": "The headline of the blog post",
|
|
42
42
|
"type": "string",
|
|
43
|
+
"format": "markdown",
|
|
43
44
|
"examples": [
|
|
44
45
|
"This is a blog post headline"
|
|
45
46
|
]
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"title": "Cover Image",
|
|
49
50
|
"description": "The source of the cover image for the blog post",
|
|
50
51
|
"type": "string",
|
|
51
|
-
"format": "
|
|
52
|
+
"format": "image",
|
|
52
53
|
"examples": [
|
|
53
54
|
"img/close-up-young-business-team-working.png"
|
|
54
55
|
]
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"title": "Image",
|
|
95
96
|
"description": "The image URL of the author",
|
|
96
97
|
"type": "string",
|
|
97
|
-
"format": "
|
|
98
|
+
"format": "image",
|
|
98
99
|
"examples": [
|
|
99
100
|
"img/people/author-emily.png"
|
|
100
101
|
]
|
|
@@ -103,7 +104,6 @@
|
|
|
103
104
|
"title": "Twitter",
|
|
104
105
|
"description": "The Twitter name of the author",
|
|
105
106
|
"type": "string",
|
|
106
|
-
"format": "uri",
|
|
107
107
|
"examples": [
|
|
108
108
|
"johndoe"
|
|
109
109
|
]
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"title": "Email",
|
|
113
113
|
"description": "The Email of the author",
|
|
114
114
|
"type": "string",
|
|
115
|
-
"
|
|
115
|
+
"pattern": "^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+@[A-Za-z0-9.-]+$",
|
|
116
116
|
"examples": [
|
|
117
117
|
"johndoe@example.com"
|
|
118
118
|
]
|
|
@@ -182,6 +182,9 @@
|
|
|
182
182
|
"12/30/2022"
|
|
183
183
|
]
|
|
184
184
|
},
|
|
185
|
+
"className": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
185
188
|
"type": {
|
|
186
189
|
"const": "blog-aside"
|
|
187
190
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
5
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
6
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
7
|
+
*/
|
|
8
|
+
import { BlogHeadProps } from "../../BlogHeadProps-f9a49428.js";
|
|
9
|
+
import { BlogAsideProps } from "../../BlogAsideProps-e1cbd5d3.js";
|
|
10
|
+
import { CtaProps } from "../../CtaProps-93230a76.js";
|
|
11
|
+
import { SeoProps } from "../../SeoProps-f2d6dcaa.js";
|
|
12
|
+
/**
|
|
13
|
+
* Body text for the blog post
|
|
14
|
+
*/
|
|
15
|
+
type Text = string;
|
|
16
|
+
/**
|
|
17
|
+
* Abstracts a blog post concept into JSON schema
|
|
18
|
+
*/
|
|
19
|
+
interface BlogPostProps {
|
|
20
|
+
/**
|
|
21
|
+
* Referenced component BlogHeadProps
|
|
22
|
+
*/
|
|
23
|
+
head?: BlogHeadProps;
|
|
24
|
+
/**
|
|
25
|
+
* Referenced component BlogAsideProps
|
|
26
|
+
*/
|
|
27
|
+
aside?: BlogAsideProps;
|
|
28
|
+
content?: Text;
|
|
29
|
+
/**
|
|
30
|
+
* Referenced component CtaProps
|
|
31
|
+
*/
|
|
32
|
+
cta?: CtaProps;
|
|
33
|
+
/**
|
|
34
|
+
* Referenced component SeoProps
|
|
35
|
+
*/
|
|
36
|
+
seo: SeoProps;
|
|
37
|
+
}
|
|
38
|
+
declare const BlogPost: ({ head, content, aside, cta }: BlogPostProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export { BlogPost };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Split } from '../split/index.js';
|
|
3
|
+
import { BlogHead } from '../blog-head/index.js';
|
|
4
|
+
import { Section } from '../section/index.js';
|
|
5
|
+
import { BlogAside } from '../blog-aside/index.js';
|
|
6
|
+
import { Text } from '../text/index.js';
|
|
7
|
+
import { Cta } from '../cta/index.js';
|
|
8
|
+
import 'classnames';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '@kickstartds/blog/lib/post-head';
|
|
11
|
+
import '@kickstartds/core/lib/react';
|
|
12
|
+
import '@kickstartds/base/lib/section';
|
|
13
|
+
import '../section/js/Section.client.js';
|
|
14
|
+
import '@kickstartds/core/lib/component';
|
|
15
|
+
import '@kickstartds/blog/lib/post-aside';
|
|
16
|
+
import '@kickstartds/base/lib/rich-text';
|
|
17
|
+
import '@kickstartds/content/lib/storytelling';
|
|
18
|
+
import '@kickstartds/base/lib/button';
|
|
19
|
+
import '../button-group/index.js';
|
|
20
|
+
import '@kickstartds/base/lib/button-group';
|
|
21
|
+
|
|
22
|
+
const BlogPost = ({ head, content, aside, cta }) => (jsxs(Fragment, { children: [jsx(Section, { width: "wide", children: jsxs(Split, { layout: "sidebarRight", children: [jsxs("div", { children: [head && jsx(BlogHead, { ...head }), jsx(Text, { text: content })] }), jsx(BlogAside, { ...aside })] }) }), cta && (jsx(Section, { children: jsx(Cta, { ...cta }) }))] }));
|
|
23
|
+
|
|
24
|
+
export { BlogPost };
|
|
@@ -3,55 +3,79 @@
|
|
|
3
3
|
container-name: post-teaser;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
6
|
+
.dsa-blog-teaser {
|
|
7
|
+
--dsa-blog-teaser--background: transparent;
|
|
8
|
+
--dsa-blog-teaser__topic--font: var(--ks-font-display-l);
|
|
9
|
+
--dsa-blog-teaser__tag-label--font: var(--ks-font-interface-xs);
|
|
10
|
+
--dsa-blog-teaser__copy--font: var(--dsa-rich-text--font, var(--ks-font-copy-m));
|
|
11
|
+
--dsa-blog-teaser__copy--color: var(--dsa-rich-text--color);
|
|
12
|
+
--dsa-blog-teaser__copy--color_hover: var(--ks-text-color-copy-interface-interactive-hover);
|
|
13
|
+
--dsa-blog-teaser__copy--margin-top: var(--ks-spacing-stack-s);
|
|
14
|
+
--dsa-blog-teaser__meta--font: var(--ks-spacing-stack-s);
|
|
15
|
+
--dsa-blog-teaser__meta--color: var(--c-post-meta_item--color);
|
|
16
|
+
--dsa-blog-teaser__meta__author--font-weight: var(--ks-font-weight-semi-bold);
|
|
17
|
+
--dsa-post-teaser__image--border-radius: var(--ks-border-radius-card);
|
|
11
18
|
}
|
|
12
19
|
@container post-teaser (min-width: 640px) {
|
|
13
|
-
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
}
|
|
17
|
-
article.c-post-teaser .c-tag-label--s {
|
|
18
|
-
--c-tag-label--font: var(--ks-font-interface-s);
|
|
20
|
+
.dsa-blog-teaser {
|
|
21
|
+
--dsa-blog-teaser__topic--font: var(--ks-font-display-l);
|
|
22
|
+
--dsa-blog-teaser__tag-label--font: var(--ks-font-interface-s);
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
@container post-teaser (min-width: 1000px) {
|
|
22
|
-
|
|
23
|
-
--
|
|
26
|
+
.dsa-blog-teaser {
|
|
27
|
+
--dsa-blog-teaser__topic--font: var(--ks-font-display-xl);
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
|
-
|
|
30
|
+
|
|
31
|
+
.l-container--post-teaser {
|
|
32
|
+
/* stylelint-disable-next-line property-no-unknown */
|
|
33
|
+
container-name: post-teaser;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dsa-blog-teaser.c-post-teaser {
|
|
37
|
+
--c-teaser--background: var(--dsa-blog-teaser--background, transparent);
|
|
38
|
+
--c-post-teaser--gap: var(--dsa-blog-teaser--gap, var(--ks-spacing-stack-s) var(--ks-spacing-inline-s));
|
|
39
|
+
--c-teaser_text--spacing: var(--dsa-blog-teaser__copy--margin-top, var(--ks-spacing-stack-s));
|
|
40
|
+
--c-post-teaser--color: var(--dsa-blog-teaser__copy--color, var(--dsa-rich-text--color));
|
|
41
|
+
}
|
|
42
|
+
.dsa-blog-teaser.c-post-teaser .c-tag-label {
|
|
43
|
+
--c-tag-label--font: var(--dsa-blog-teaser__tag-label--font, var(--ks-font-interface-s));
|
|
44
|
+
}
|
|
45
|
+
.dsa-blog-teaser.c-post-teaser .c-teaser {
|
|
27
46
|
overflow: visible;
|
|
28
47
|
cursor: pointer;
|
|
29
48
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
article.c-post-teaser .c-teaser:hover .c-rich-text {
|
|
34
|
-
color: var(--ks-color-fg);
|
|
49
|
+
.dsa-blog-teaser.c-post-teaser .c-teaser:hover .c-rich-text {
|
|
50
|
+
color: var(--dsa-blog-teaser__copy--color_hover, var(--ks-text-color-copy-interface-interactive-hover));
|
|
35
51
|
}
|
|
36
|
-
|
|
52
|
+
.dsa-blog-teaser.c-post-teaser .c-teaser:hover .c-rich-text > :not(.c-post-meta) {
|
|
37
53
|
text-decoration: none;
|
|
38
54
|
}
|
|
39
|
-
|
|
40
|
-
border-radius: var(--ks-border-radius-card);
|
|
55
|
+
.dsa-blog-teaser.c-post-teaser .c-post-teaser__image img {
|
|
56
|
+
border-radius: var(--dsa-post-teaser__image--border-radius, var(--ks-border-radius-card));
|
|
41
57
|
}
|
|
42
|
-
|
|
58
|
+
.dsa-blog-teaser.c-post-teaser .c-post-meta {
|
|
43
59
|
--c-post-meta_author--font-weight: var(--ks-font-weight-semi-bold);
|
|
44
60
|
--c-post-meta--gap: 0.5em 1em;
|
|
61
|
+
--c-post-meta_item--font: var(--dsa-blog-teaser__meta--font, var(--ks-font-interface-s));
|
|
62
|
+
--c-post-meta_author--color: var(--dsa-blog-teaser__meta--color, var(--c-post-meta_item--color));
|
|
63
|
+
--c-post-meta_author--font-weight: var(
|
|
64
|
+
--dsa-blog-teaser__meta__author--font-weight,
|
|
65
|
+
var(--ks-font-weight-semi-bold)
|
|
66
|
+
);
|
|
45
67
|
margin: 0;
|
|
46
68
|
}
|
|
47
|
-
|
|
69
|
+
.dsa-blog-teaser.c-post-teaser .c-rich-text {
|
|
48
70
|
transition: var(--ks-transition-hover);
|
|
49
71
|
transition-property: color;
|
|
50
72
|
display: flex;
|
|
51
73
|
flex-direction: column;
|
|
52
74
|
gap: var(--c-post-teaser--gap);
|
|
53
75
|
}
|
|
54
|
-
|
|
76
|
+
.dsa-blog-teaser.c-post-teaser .c-teaser__topic {
|
|
77
|
+
font: var(--dsa-blog-teaser__topic--font, var(--dsa-topic--font, var(--ks-font-display-m)));
|
|
78
|
+
font-weight: var(--dsa-topic--font-weight);
|
|
55
79
|
text-align: left;
|
|
56
80
|
transition: var(--ks-transition-hover);
|
|
57
81
|
transition-property: text-shadow;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"title": "Headline",
|
|
31
31
|
"description": "The headline of the blog post",
|
|
32
32
|
"type": "string",
|
|
33
|
+
"format": "markdown",
|
|
33
34
|
"examples": [
|
|
34
35
|
"This is a blog post headline"
|
|
35
36
|
]
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"title": "Teaser Text",
|
|
39
40
|
"description": "The teaser text of the blog post",
|
|
40
41
|
"type": "string",
|
|
42
|
+
"format": "markdown",
|
|
41
43
|
"examples": [
|
|
42
44
|
"This is a teaser text for the blog post"
|
|
43
45
|
]
|
|
@@ -113,6 +115,7 @@
|
|
|
113
115
|
"title": "Image",
|
|
114
116
|
"description": "The image URL of the author",
|
|
115
117
|
"type": "string",
|
|
118
|
+
"format": "image",
|
|
116
119
|
"examples": [
|
|
117
120
|
"img/people/author-emily.png"
|
|
118
121
|
]
|
|
@@ -123,6 +126,9 @@
|
|
|
123
126
|
"name"
|
|
124
127
|
]
|
|
125
128
|
},
|
|
129
|
+
"className": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
126
132
|
"type": {
|
|
127
133
|
"const": "blog-teaser"
|
|
128
134
|
}
|
|
@@ -25,12 +25,14 @@
|
|
|
25
25
|
"title": "Headline",
|
|
26
26
|
"description": "The headline of the blog post",
|
|
27
27
|
"type": "string",
|
|
28
|
+
"format": "markdown",
|
|
28
29
|
"examples": ["This is a blog post headline"]
|
|
29
30
|
},
|
|
30
31
|
"teaserText": {
|
|
31
32
|
"title": "Teaser Text",
|
|
32
33
|
"description": "The teaser text of the blog post",
|
|
33
34
|
"type": "string",
|
|
35
|
+
"format": "markdown",
|
|
34
36
|
"examples": ["This is a teaser text for the blog post"]
|
|
35
37
|
},
|
|
36
38
|
"image": {
|
|
@@ -90,11 +92,15 @@
|
|
|
90
92
|
"title": "Image",
|
|
91
93
|
"description": "The image URL of the author",
|
|
92
94
|
"type": "string",
|
|
95
|
+
"format": "image",
|
|
93
96
|
"examples": ["img/people/author-emily.png"]
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
99
|
"additionalProperties": false,
|
|
97
100
|
"required": ["name"]
|
|
101
|
+
},
|
|
102
|
+
"className": {
|
|
103
|
+
"type": "string"
|
|
98
104
|
}
|
|
99
105
|
},
|
|
100
106
|
"additionalProperties": false,
|
|
@@ -1,81 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* The date of the blog post
|
|
10
|
-
*/
|
|
11
|
-
type Date = string;
|
|
12
|
-
/**
|
|
13
|
-
* The tags for the blog post
|
|
14
|
-
*/
|
|
15
|
-
type Tags = string[];
|
|
16
|
-
/**
|
|
17
|
-
* The headline of the blog post
|
|
18
|
-
*/
|
|
19
|
-
type Headline = string;
|
|
20
|
-
/**
|
|
21
|
-
* The teaser text of the blog post
|
|
22
|
-
*/
|
|
23
|
-
type TeaserText = string;
|
|
24
|
-
/**
|
|
25
|
-
* The preview image for the blog post
|
|
26
|
-
*/
|
|
27
|
-
type Image = string;
|
|
28
|
-
/**
|
|
29
|
-
* The blog entry URL to link
|
|
30
|
-
*/
|
|
31
|
-
type URL = string;
|
|
32
|
-
/**
|
|
33
|
-
* The label to use for the link
|
|
34
|
-
*/
|
|
35
|
-
type Label = string;
|
|
36
|
-
/**
|
|
37
|
-
* Time to read for the blog post
|
|
38
|
-
*/
|
|
39
|
-
type ReadingTime = string;
|
|
40
|
-
/**
|
|
41
|
-
* The name of the author
|
|
42
|
-
*/
|
|
43
|
-
type Name = string;
|
|
44
|
-
/**
|
|
45
|
-
* The title of the author
|
|
46
|
-
*/
|
|
47
|
-
type Title = string;
|
|
48
|
-
/**
|
|
49
|
-
* The image URL of the author
|
|
50
|
-
*/
|
|
51
|
-
type Image1 = string;
|
|
52
|
-
/**
|
|
53
|
-
* Display a blog teaser with date, tags, headline, teaser text and author
|
|
54
|
-
*/
|
|
55
|
-
interface BlogTeaserProps {
|
|
56
|
-
date?: Date;
|
|
57
|
-
tags?: Tags;
|
|
58
|
-
headline: Headline;
|
|
59
|
-
teaserText: TeaserText;
|
|
60
|
-
image?: Image;
|
|
61
|
-
link?: Link;
|
|
62
|
-
readingTime?: ReadingTime;
|
|
63
|
-
author?: Author;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* URL and label for the blog post linked
|
|
67
|
-
*/
|
|
68
|
-
interface Link {
|
|
69
|
-
url: URL;
|
|
70
|
-
label?: Label;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* The author of the blog post
|
|
74
|
-
*/
|
|
75
|
-
interface Author {
|
|
76
|
-
name: Name;
|
|
77
|
-
title?: Title;
|
|
78
|
-
image?: Image1;
|
|
79
|
-
}
|
|
80
|
-
declare const BlogTeaser: FC<BlogTeaserProps & HTMLAttributes<HTMLElement>>;
|
|
81
|
-
export { BlogTeaser };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BlogTeaserProps } from "../../BlogTeaserProps-525f7f9f.js";
|
|
3
|
+
declare const BlogTeaserContextDefault: import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const BlogTeaserContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
5
|
+
declare const BlogTeaser: import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { BlogTeaserContextDefault, BlogTeaserContext, BlogTeaser };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "./blog-teaser.css";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { forwardRef, createContext, useContext } from 'react';
|
|
3
5
|
import { PostTeaserContextDefault } from '@kickstartds/blog/lib/post-teaser';
|
|
4
6
|
import { Container } from '@kickstartds/core/lib/container';
|
|
5
7
|
|
|
6
|
-
const
|
|
8
|
+
const BlogTeaserContextDefault = forwardRef(({ date, tags = [], headline, teaserText, image, link, readingTime, author, className, }, ref) => {
|
|
7
9
|
const teaserMetaItems = [];
|
|
8
10
|
if (date)
|
|
9
11
|
teaserMetaItems.push({
|
|
@@ -15,23 +17,30 @@ const BlogTeaser = ({ date, tags, headline, teaserText, image, link, readingTime
|
|
|
15
17
|
icon: "time",
|
|
16
18
|
text: readingTime,
|
|
17
19
|
});
|
|
18
|
-
return (jsx(Container, { name: "post-teaser", children: jsx(PostTeaserContextDefault
|
|
19
|
-
// @ts-expect-error
|
|
20
|
-
, {
|
|
20
|
+
return (jsx(Container, { name: "post-teaser", children: jsx(PostTeaserContextDefault, { className: classnames(className, "dsa-blog-teaser"),
|
|
21
21
|
// @ts-expect-error
|
|
22
22
|
image: { src: image }, meta: {
|
|
23
|
-
author:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
author: author
|
|
24
|
+
? {
|
|
25
|
+
image: author.image && { src: author.image },
|
|
26
|
+
name: author.name,
|
|
27
|
+
}
|
|
28
|
+
: undefined,
|
|
27
29
|
items: teaserMetaItems,
|
|
28
|
-
}, link:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
}, link: link
|
|
31
|
+
? {
|
|
32
|
+
label: link.label || "Read more",
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
target: link.url,
|
|
35
|
+
}
|
|
36
|
+
: undefined, title: headline, body: teaserText, categories: tags.map((tag) => {
|
|
33
37
|
return { label: tag };
|
|
34
|
-
}) }) }));
|
|
35
|
-
};
|
|
38
|
+
}), ref: ref }) }));
|
|
39
|
+
});
|
|
40
|
+
const BlogTeaserContext = createContext(BlogTeaserContextDefault);
|
|
41
|
+
const BlogTeaser = forwardRef((props, ref) => {
|
|
42
|
+
const Component = useContext(BlogTeaserContext);
|
|
43
|
+
return jsx(Component, { ...props, ref: ref });
|
|
44
|
+
});
|
|
36
45
|
|
|
37
|
-
export { BlogTeaser };
|
|
46
|
+
export { BlogTeaser, BlogTeaserContext, BlogTeaserContextDefault };
|