@ilo-org/react 0.11.0 → 0.12.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/CHANGELOG.md +11 -0
- package/lib/cjs/components/Cards/Card.js +40 -0
- package/lib/cjs/components/Cards/CardGroup.js +33 -0
- package/lib/cjs/components/Cards/DataCard/index.js +27 -0
- package/lib/cjs/components/Cards/DetailCard/index.js +20 -0
- package/lib/cjs/components/Cards/FactlistCard/index.js +23 -0
- package/lib/cjs/components/Cards/FeatureCard/index.js +24 -0
- package/lib/cjs/components/Cards/MultilinkCard/index.js +24 -0
- package/lib/cjs/components/Cards/PromoCard/index.js +23 -0
- package/lib/cjs/components/Cards/StatCard/index.js +21 -0
- package/lib/cjs/components/Cards/TextCard/index.js +25 -0
- package/lib/cjs/components/Cards/index.js +37 -0
- package/lib/cjs/components/LinkList/LinkList.js +1 -1
- package/lib/cjs/components/index.js +12 -4
- package/lib/cjs/index.js +12 -4
- package/lib/esm/components/Cards/Card.js +38 -0
- package/lib/esm/components/{Card → Cards}/CardGroup.js +14 -6
- package/lib/esm/components/Cards/DataCard/index.js +25 -0
- package/lib/esm/components/Cards/DetailCard/index.js +18 -0
- package/lib/esm/components/Cards/FactlistCard/index.js +21 -0
- package/lib/esm/components/Cards/FeatureCard/index.js +22 -0
- package/lib/esm/components/Cards/MultilinkCard/index.js +22 -0
- package/lib/esm/components/Cards/PromoCard/index.js +21 -0
- package/lib/esm/components/Cards/StatCard/index.js +19 -0
- package/lib/esm/components/Cards/TextCard/index.js +23 -0
- package/lib/esm/components/Cards/index.js +22 -0
- package/lib/esm/components/LinkList/LinkList.js +1 -1
- package/lib/esm/components/index.js +10 -2
- package/lib/esm/index.js +10 -2
- package/lib/types/react/src/components/Cards/Card.props.d.ts +307 -0
- package/lib/types/react/src/components/{Card → Cards}/CardGroup.props.d.ts +1 -1
- package/lib/types/react/src/components/Cards/DataCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/StatCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/TextCard/index.d.ts +4 -0
- package/lib/types/react/src/components/Cards/index.d.ts +11 -0
- package/lib/types/react/src/components/index.d.ts +1 -1
- package/lib/types/react/src/types/index.d.ts +3 -3
- package/package.json +2 -2
- package/src/components/{Card → Cards}/Card.args.ts +41 -36
- package/src/components/Cards/Card.props.ts +382 -0
- package/src/components/Cards/Card.tsx +36 -0
- package/src/components/{Card → Cards}/CardGroup.args.ts +26 -26
- package/src/components/{Card → Cards}/CardGroup.props.ts +1 -1
- package/src/components/{Card → Cards}/CardGroup.tsx +12 -13
- package/src/components/Cards/DataCard/index.tsx +107 -0
- package/src/components/Cards/DetailCard/index.tsx +62 -0
- package/src/components/Cards/FactlistCard/index.tsx +42 -0
- package/src/components/Cards/FeatureCard/index.tsx +69 -0
- package/src/components/Cards/MultilinkCard/index.tsx +76 -0
- package/src/components/Cards/PromoCard/index.tsx +60 -0
- package/src/components/Cards/StatCard/index.tsx +36 -0
- package/src/components/Cards/TextCard/index.tsx +63 -0
- package/src/components/Cards/index.ts +22 -0
- package/src/components/LinkList/LinkList.tsx +1 -1
- package/src/components/index.ts +1 -1
- package/src/types/index.ts +4 -4
- package/lib/cjs/components/Card/Card.js +0 -43
- package/lib/cjs/components/Card/CardGroup.js +0 -25
- package/lib/cjs/components/Card/index.js +0 -21
- package/lib/esm/components/Card/Card.js +0 -41
- package/lib/esm/components/Card/index.js +0 -14
- package/lib/types/react/src/components/Card/Card.props.d.ts +0 -110
- package/lib/types/react/src/components/Card/index.d.ts +0 -2
- package/src/components/Card/Card.props.ts +0 -142
- package/src/components/Card/Card.tsx +0 -183
- package/src/components/Card/index.ts +0 -2
- /package/lib/types/react/src/components/{Card → Cards}/Card.d.ts +0 -0
- /package/lib/types/react/src/components/{Card → Cards}/CardGroup.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CardGroupProps } from "./CardGroup.props";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const textCardGroup: CardGroupProps = {
|
|
4
4
|
cards: [
|
|
5
5
|
{
|
|
6
|
-
|
|
6
|
+
type: "text",
|
|
7
7
|
title: "Why we need greater social justice",
|
|
8
8
|
eyebrow: "Podcast",
|
|
9
9
|
date: {
|
|
@@ -45,7 +45,7 @@ const graphicCardGroup: CardGroupProps = {
|
|
|
45
45
|
const statCardGroup: CardGroupProps = {
|
|
46
46
|
cards: [
|
|
47
47
|
{
|
|
48
|
-
|
|
48
|
+
type: "stat",
|
|
49
49
|
title: "Global employment growth down by half in 2023",
|
|
50
50
|
eyebrow: "Report",
|
|
51
51
|
intro:
|
|
@@ -71,7 +71,7 @@ const statCardGroup: CardGroupProps = {
|
|
|
71
71
|
date: {},
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
|
|
74
|
+
type: "stat",
|
|
75
75
|
title: "Global employment growth down by half in 2023",
|
|
76
76
|
eyebrow: "Report",
|
|
77
77
|
intro:
|
|
@@ -97,7 +97,7 @@ const statCardGroup: CardGroupProps = {
|
|
|
97
97
|
date: {},
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
|
|
100
|
+
type: "stat",
|
|
101
101
|
title: "Global employment growth down by half in 2023",
|
|
102
102
|
eyebrow: "Report",
|
|
103
103
|
intro:
|
|
@@ -123,7 +123,7 @@ const statCardGroup: CardGroupProps = {
|
|
|
123
123
|
date: {},
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
|
|
126
|
+
type: "stat",
|
|
127
127
|
title: "Global employment growth down by half in 2023",
|
|
128
128
|
eyebrow: "Report",
|
|
129
129
|
intro:
|
|
@@ -159,7 +159,7 @@ const statCardGroup: CardGroupProps = {
|
|
|
159
159
|
const multilinkCardGroup: CardGroupProps = {
|
|
160
160
|
cards: [
|
|
161
161
|
{
|
|
162
|
-
|
|
162
|
+
type: "multilink",
|
|
163
163
|
title:
|
|
164
164
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
165
165
|
eyebrow: "High-level meeting",
|
|
@@ -206,7 +206,7 @@ const multilinkCardGroup: CardGroupProps = {
|
|
|
206
206
|
link: "",
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
|
-
|
|
209
|
+
type: "multilink",
|
|
210
210
|
title:
|
|
211
211
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
212
212
|
eyebrow: "High-level meeting",
|
|
@@ -260,10 +260,10 @@ const multilinkCardGroup: CardGroupProps = {
|
|
|
260
260
|
},
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
const
|
|
263
|
+
const promoCardGroup: CardGroupProps = {
|
|
264
264
|
cards: [
|
|
265
265
|
{
|
|
266
|
-
|
|
266
|
+
type: "promo",
|
|
267
267
|
title:
|
|
268
268
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
269
269
|
eyebrow: "High-level meeting",
|
|
@@ -290,7 +290,7 @@ const graphicPromoCardGroup: CardGroupProps = {
|
|
|
290
290
|
date: {},
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
|
-
|
|
293
|
+
type: "promo",
|
|
294
294
|
title:
|
|
295
295
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
296
296
|
eyebrow: "High-level meeting",
|
|
@@ -317,7 +317,7 @@ const graphicPromoCardGroup: CardGroupProps = {
|
|
|
317
317
|
date: {},
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
|
-
|
|
320
|
+
type: "promo",
|
|
321
321
|
title:
|
|
322
322
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
323
323
|
eyebrow: "High-level meeting",
|
|
@@ -354,7 +354,7 @@ const graphicPromoCardGroup: CardGroupProps = {
|
|
|
354
354
|
const featureCardGroup: CardGroupProps = {
|
|
355
355
|
cards: [
|
|
356
356
|
{
|
|
357
|
-
|
|
357
|
+
type: "feature",
|
|
358
358
|
isvideo: false,
|
|
359
359
|
title:
|
|
360
360
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
@@ -392,7 +392,7 @@ const featureCardGroup: CardGroupProps = {
|
|
|
392
392
|
source: {},
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
|
-
|
|
395
|
+
type: "feature",
|
|
396
396
|
isvideo: true,
|
|
397
397
|
title:
|
|
398
398
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
@@ -430,7 +430,7 @@ const featureCardGroup: CardGroupProps = {
|
|
|
430
430
|
source: {},
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
|
-
|
|
433
|
+
type: "feature",
|
|
434
434
|
isvideo: false,
|
|
435
435
|
title:
|
|
436
436
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
@@ -468,7 +468,7 @@ const featureCardGroup: CardGroupProps = {
|
|
|
468
468
|
source: {},
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
|
-
|
|
471
|
+
type: "feature",
|
|
472
472
|
isvideo: false,
|
|
473
473
|
title:
|
|
474
474
|
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
@@ -516,7 +516,7 @@ const featureCardGroup: CardGroupProps = {
|
|
|
516
516
|
const detailCardGroup: CardGroupProps = {
|
|
517
517
|
cards: [
|
|
518
518
|
{
|
|
519
|
-
|
|
519
|
+
type: "detail",
|
|
520
520
|
title: "Technical meeting on digitalization in the construction sector",
|
|
521
521
|
eyebrow: "Meeting",
|
|
522
522
|
intro:
|
|
@@ -542,7 +542,7 @@ const detailCardGroup: CardGroupProps = {
|
|
|
542
542
|
source: {},
|
|
543
543
|
},
|
|
544
544
|
{
|
|
545
|
-
|
|
545
|
+
type: "detail",
|
|
546
546
|
title: "Technical meeting on digitalization in the construction sector",
|
|
547
547
|
eyebrow: "Meeting",
|
|
548
548
|
intro:
|
|
@@ -578,7 +578,7 @@ const detailCardGroup: CardGroupProps = {
|
|
|
578
578
|
const factListCardGroup: CardGroupProps = {
|
|
579
579
|
cards: [
|
|
580
580
|
{
|
|
581
|
-
|
|
581
|
+
type: "factlist",
|
|
582
582
|
title:
|
|
583
583
|
"Economic slowdown likely to force workers to accept lower quality jobs",
|
|
584
584
|
eyebrow: "Report",
|
|
@@ -606,7 +606,7 @@ const factListCardGroup: CardGroupProps = {
|
|
|
606
606
|
image: "",
|
|
607
607
|
},
|
|
608
608
|
{
|
|
609
|
-
|
|
609
|
+
type: "factlist",
|
|
610
610
|
title:
|
|
611
611
|
"Economic slowdown likely to force workers to accept lower quality jobs",
|
|
612
612
|
eyebrow: "Report",
|
|
@@ -644,7 +644,7 @@ const factListCardGroup: CardGroupProps = {
|
|
|
644
644
|
const dataCardGroup: CardGroupProps = {
|
|
645
645
|
cards: [
|
|
646
646
|
{
|
|
647
|
-
|
|
647
|
+
type: "data",
|
|
648
648
|
title: "Technical meeting on digitalization in the construction sector",
|
|
649
649
|
eyebrow: "Meeting",
|
|
650
650
|
eventdetails:
|
|
@@ -714,7 +714,7 @@ const dataCardGroup: CardGroupProps = {
|
|
|
714
714
|
image: "",
|
|
715
715
|
},
|
|
716
716
|
{
|
|
717
|
-
|
|
717
|
+
type: "data",
|
|
718
718
|
title: "Technical meeting on digitalization in the construction sector",
|
|
719
719
|
eyebrow: "Meeting",
|
|
720
720
|
eventdetails:
|
|
@@ -784,7 +784,7 @@ const dataCardGroup: CardGroupProps = {
|
|
|
784
784
|
image: "",
|
|
785
785
|
},
|
|
786
786
|
{
|
|
787
|
-
|
|
787
|
+
type: "data",
|
|
788
788
|
title: "Technical meeting on digitalization in the construction sector",
|
|
789
789
|
eyebrow: "Meeting",
|
|
790
790
|
eventdetails:
|
|
@@ -854,7 +854,7 @@ const dataCardGroup: CardGroupProps = {
|
|
|
854
854
|
image: "",
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
|
-
|
|
857
|
+
type: "data",
|
|
858
858
|
title: "Technical meeting on digitalization in the construction sector",
|
|
859
859
|
eyebrow: "Meeting",
|
|
860
860
|
eventdetails:
|
|
@@ -932,10 +932,10 @@ const dataCardGroup: CardGroupProps = {
|
|
|
932
932
|
};
|
|
933
933
|
|
|
934
934
|
const CardGroupArgs = {
|
|
935
|
-
|
|
935
|
+
textCardGroup,
|
|
936
936
|
statCardGroup,
|
|
937
937
|
multilinkCardGroup,
|
|
938
|
-
|
|
938
|
+
promoCardGroup,
|
|
939
939
|
featureCardGroup,
|
|
940
940
|
detailCardGroup,
|
|
941
941
|
factListCardGroup,
|
|
@@ -2,7 +2,7 @@ import { FC } from "react";
|
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
4
|
import { CardGroupProps } from "./CardGroup.props";
|
|
5
|
-
import { Card } from "
|
|
5
|
+
import { Card } from ".";
|
|
6
6
|
|
|
7
7
|
const CardGroup: FC<CardGroupProps> = ({ cards, cardcount, cta }) => {
|
|
8
8
|
const { prefix } = useGlobalSettings();
|
|
@@ -32,22 +32,21 @@ const CardGroup: FC<CardGroupProps> = ({ cards, cardcount, cta }) => {
|
|
|
32
32
|
theme={card.theme}
|
|
33
33
|
cornercut={card.cornercut}
|
|
34
34
|
alignment={card.alignment}
|
|
35
|
-
|
|
35
|
+
type={card.type}
|
|
36
36
|
size={card.size}
|
|
37
37
|
/>
|
|
38
38
|
))}
|
|
39
|
-
|
|
40
|
-
{cta && (
|
|
41
|
-
<div className={`${baseClass}--button-wrap`}>
|
|
42
|
-
<a
|
|
43
|
-
className={`${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`}
|
|
44
|
-
href={cta.url}
|
|
45
|
-
>
|
|
46
|
-
<span className="button__label">{cta.label}</span>
|
|
47
|
-
</a>
|
|
48
|
-
</div>
|
|
49
|
-
)}
|
|
50
39
|
</div>
|
|
40
|
+
{cta && (
|
|
41
|
+
<div className={`${baseClass}--button-wrap`}>
|
|
42
|
+
<a
|
|
43
|
+
className={`${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`}
|
|
44
|
+
href={cta.url}
|
|
45
|
+
>
|
|
46
|
+
<span className="button__label">{cta.label}</span>
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
51
50
|
</div>
|
|
52
51
|
);
|
|
53
52
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { DataCardProps } from "../Card.props";
|
|
5
|
+
import { Link } from "../../Link";
|
|
6
|
+
|
|
7
|
+
const DataCard: FC<DataCardProps> = ({
|
|
8
|
+
eyebrow,
|
|
9
|
+
size = "narrow",
|
|
10
|
+
image,
|
|
11
|
+
dataset,
|
|
12
|
+
columns = "one",
|
|
13
|
+
}) => {
|
|
14
|
+
const { prefix } = useGlobalSettings();
|
|
15
|
+
|
|
16
|
+
const baseClass = `${prefix}--card`;
|
|
17
|
+
|
|
18
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__data`, {
|
|
19
|
+
[`${baseClass}__size__${size}`]: size,
|
|
20
|
+
[`${baseClass}__type__data__columns__${columns}`]: columns,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div className={cardClasses}>
|
|
25
|
+
<div className={`${baseClass}--wrap`}>
|
|
26
|
+
{eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
|
|
27
|
+
<div className={`${baseClass}--content`}>
|
|
28
|
+
{image && (
|
|
29
|
+
<div className={`${baseClass}--image--wrapper`}>
|
|
30
|
+
<picture>
|
|
31
|
+
<img
|
|
32
|
+
className={`${baseClass}--picture`}
|
|
33
|
+
src={image}
|
|
34
|
+
alt={eyebrow}
|
|
35
|
+
/>
|
|
36
|
+
</picture>
|
|
37
|
+
</div>
|
|
38
|
+
)}
|
|
39
|
+
{dataset &&
|
|
40
|
+
dataset.content &&
|
|
41
|
+
dataset.content.items &&
|
|
42
|
+
dataset.content.items.map((item) => (
|
|
43
|
+
<div className={`${baseClass}--area--content`}>
|
|
44
|
+
<p className={`${baseClass}__type__data--content-label`}>
|
|
45
|
+
{item.label}
|
|
46
|
+
</p>
|
|
47
|
+
<p className={`${baseClass}__type__data--content-copy`}>
|
|
48
|
+
{item.copy}
|
|
49
|
+
</p>
|
|
50
|
+
</div>
|
|
51
|
+
))}
|
|
52
|
+
{dataset && dataset.files && (
|
|
53
|
+
<div className={`${baseClass}--data--content-files`}>
|
|
54
|
+
<p className={`${baseClass}__type__data--content-label`}>
|
|
55
|
+
{dataset.files.headline}
|
|
56
|
+
</p>
|
|
57
|
+
{dataset.files.items &&
|
|
58
|
+
dataset.files.items.map((item) => (
|
|
59
|
+
<a
|
|
60
|
+
className={`${baseClass}--data--file ${prefix}--button ${prefix}--button--primary ${prefix}--button--small`}
|
|
61
|
+
href={item.url}
|
|
62
|
+
download
|
|
63
|
+
>
|
|
64
|
+
<span className="button__label">{item.label}</span>
|
|
65
|
+
</a>
|
|
66
|
+
))}
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
{dataset && dataset.cta && (
|
|
70
|
+
<div className={`${baseClass}--area--cta`}>
|
|
71
|
+
<div className={`${baseClass}--data--content-cta`}>
|
|
72
|
+
<p className={`${baseClass}__type__data--content-label`}>
|
|
73
|
+
{dataset.cta.headline}
|
|
74
|
+
</p>
|
|
75
|
+
{dataset.cta.items &&
|
|
76
|
+
dataset.cta.items.map((item) => (
|
|
77
|
+
<a
|
|
78
|
+
className={`${baseClass}--cta ${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`}
|
|
79
|
+
href={item.url}
|
|
80
|
+
>
|
|
81
|
+
<span className="link__label">{item.label}</span>
|
|
82
|
+
</a>
|
|
83
|
+
))}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
{dataset && dataset.links && (
|
|
88
|
+
<div className={`${baseClass}--data--content-links`}>
|
|
89
|
+
<p className={`${baseClass}__type__data--content-label`}>
|
|
90
|
+
{dataset.links.headline}
|
|
91
|
+
</p>
|
|
92
|
+
{dataset.links.items &&
|
|
93
|
+
dataset.links.items.map((item) => (
|
|
94
|
+
<>
|
|
95
|
+
<Link url={item.url}>{item.label}</Link>
|
|
96
|
+
<span> </span>
|
|
97
|
+
</>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
)}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default DataCard;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { DetailCardProps } from "../Card.props";
|
|
5
|
+
|
|
6
|
+
const DetailCard: FC<DetailCardProps> = ({
|
|
7
|
+
eyebrow,
|
|
8
|
+
title,
|
|
9
|
+
size = "narrow",
|
|
10
|
+
intro,
|
|
11
|
+
date,
|
|
12
|
+
eventdetails,
|
|
13
|
+
link,
|
|
14
|
+
image,
|
|
15
|
+
}) => {
|
|
16
|
+
const { prefix } = useGlobalSettings();
|
|
17
|
+
|
|
18
|
+
const baseClass = `${prefix}--card`;
|
|
19
|
+
|
|
20
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__detail`, {
|
|
21
|
+
[`${baseClass}__action`]: link,
|
|
22
|
+
[`${baseClass}__size__${size}`]: size,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className={cardClasses}>
|
|
27
|
+
{link && (
|
|
28
|
+
<a className={`${baseClass}--link`} href={link} title={title}>
|
|
29
|
+
<span className={`${baseClass}--link--text`}>{title}</span>
|
|
30
|
+
</a>
|
|
31
|
+
)}
|
|
32
|
+
<div className={`${baseClass}--wrap`}>
|
|
33
|
+
{image && (
|
|
34
|
+
<div className={`${baseClass}--image--wrapper`}>
|
|
35
|
+
<picture>
|
|
36
|
+
<img
|
|
37
|
+
className={`${baseClass}--picture`}
|
|
38
|
+
src={image}
|
|
39
|
+
alt={title}
|
|
40
|
+
/>
|
|
41
|
+
</picture>
|
|
42
|
+
</div>
|
|
43
|
+
)}
|
|
44
|
+
<div className={`${baseClass}--content`}>
|
|
45
|
+
{eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
|
|
46
|
+
{title && <h5 className={`${baseClass}--title`}>{title}</h5>}
|
|
47
|
+
{intro && <p className={`${baseClass}--intro`}>{intro}</p>}
|
|
48
|
+
{date && (
|
|
49
|
+
<time className={`${baseClass}--date`} dateTime={date.unix}>
|
|
50
|
+
{date.human}
|
|
51
|
+
</time>
|
|
52
|
+
)}
|
|
53
|
+
{eventdetails && (
|
|
54
|
+
<p className={`${baseClass}--date-extra`}>{eventdetails}</p>
|
|
55
|
+
)}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default DetailCard;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { FactlistCardProps } from "../Card.props";
|
|
5
|
+
import { List, ListItem } from "../../List";
|
|
6
|
+
|
|
7
|
+
const FactlistCard: FC<FactlistCardProps> = ({
|
|
8
|
+
title,
|
|
9
|
+
theme = "narrow",
|
|
10
|
+
size,
|
|
11
|
+
list,
|
|
12
|
+
}) => {
|
|
13
|
+
const { prefix } = useGlobalSettings();
|
|
14
|
+
|
|
15
|
+
const baseClass = `${prefix}--card`;
|
|
16
|
+
|
|
17
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__factlist`, {
|
|
18
|
+
[`${baseClass}__size__${size}`]: size,
|
|
19
|
+
[`${baseClass}__theme__${theme}`]: theme,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className={cardClasses}>
|
|
24
|
+
<div className={`${baseClass}--wrap`}>
|
|
25
|
+
<div className={`${baseClass}--content`}>
|
|
26
|
+
{title && <h5 className={`${baseClass}--title`}>{title}</h5>}
|
|
27
|
+
{list && (
|
|
28
|
+
<List alignment="default" ordered="unordered">
|
|
29
|
+
{list.map((item, index) => (
|
|
30
|
+
<ListItem id={`list${index}`}>
|
|
31
|
+
<p>{item}</p>
|
|
32
|
+
</ListItem>
|
|
33
|
+
))}
|
|
34
|
+
</List>
|
|
35
|
+
)}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default FactlistCard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { FeatureCardProps } from "../Card.props";
|
|
5
|
+
import { LinkList } from "../../LinkList";
|
|
6
|
+
|
|
7
|
+
const FeatureCard: FC<FeatureCardProps> = ({
|
|
8
|
+
isvideo,
|
|
9
|
+
eyebrow,
|
|
10
|
+
title,
|
|
11
|
+
theme,
|
|
12
|
+
size = "narrow",
|
|
13
|
+
date,
|
|
14
|
+
link,
|
|
15
|
+
linklist,
|
|
16
|
+
image,
|
|
17
|
+
}) => {
|
|
18
|
+
const { prefix } = useGlobalSettings();
|
|
19
|
+
|
|
20
|
+
const baseClass = `${prefix}--card`;
|
|
21
|
+
|
|
22
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__feature`, {
|
|
23
|
+
[`${baseClass}__action`]: link,
|
|
24
|
+
[`${baseClass}__size__${size}`]: size,
|
|
25
|
+
[`${baseClass}__isvideo`]: isvideo,
|
|
26
|
+
[`${baseClass}__linklist`]: linklist,
|
|
27
|
+
[`${baseClass}__theme__${theme}`]: theme,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={cardClasses}>
|
|
32
|
+
{link && (
|
|
33
|
+
<a className={`${baseClass}--link`} href={link} title={title}>
|
|
34
|
+
<span className={`${baseClass}--link--text`}>{title}</span>
|
|
35
|
+
</a>
|
|
36
|
+
)}
|
|
37
|
+
<div className={`${baseClass}--wrap`}>
|
|
38
|
+
{image && (
|
|
39
|
+
<div className={`${baseClass}--image--wrapper`}>
|
|
40
|
+
<picture>
|
|
41
|
+
<img
|
|
42
|
+
className={`${baseClass}--picture`}
|
|
43
|
+
src={image}
|
|
44
|
+
alt={title}
|
|
45
|
+
/>
|
|
46
|
+
</picture>
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
<div className={`${baseClass}--content`}>
|
|
50
|
+
{eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
|
|
51
|
+
{title && <h5 className={`${baseClass}--title`}>{title}</h5>}
|
|
52
|
+
{date && (
|
|
53
|
+
<time className={`${baseClass}--date`} dateTime={date.unix}>
|
|
54
|
+
{date.human}
|
|
55
|
+
</time>
|
|
56
|
+
)}
|
|
57
|
+
{linklist && (
|
|
58
|
+
<LinkList
|
|
59
|
+
headline={linklist.headline}
|
|
60
|
+
linkgroup={linklist.linkgroup}
|
|
61
|
+
/>
|
|
62
|
+
)}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export default FeatureCard;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { MultilinkCardProps } from "../Card.props";
|
|
5
|
+
import { LinkList } from "../../LinkList";
|
|
6
|
+
|
|
7
|
+
const MultilinkCard: FC<MultilinkCardProps> = ({
|
|
8
|
+
isvideo,
|
|
9
|
+
eyebrow,
|
|
10
|
+
title,
|
|
11
|
+
size = "narrow",
|
|
12
|
+
alignment,
|
|
13
|
+
intro,
|
|
14
|
+
link,
|
|
15
|
+
linklist,
|
|
16
|
+
image,
|
|
17
|
+
}) => {
|
|
18
|
+
const { prefix } = useGlobalSettings();
|
|
19
|
+
|
|
20
|
+
const baseClass = `${prefix}--card`;
|
|
21
|
+
|
|
22
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__multilink`, {
|
|
23
|
+
[`${baseClass}__align__${alignment}`]: alignment,
|
|
24
|
+
[`${baseClass}__action`]: link,
|
|
25
|
+
[`${baseClass}__size__${size}`]: size,
|
|
26
|
+
[`${baseClass}__isvideo`]: isvideo,
|
|
27
|
+
[`${baseClass}__linklist`]: linklist,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={cardClasses}>
|
|
32
|
+
{link && (
|
|
33
|
+
<a className={`${baseClass}--link`} href={link} title={title}>
|
|
34
|
+
<span className={`${baseClass}--link--text`}>{title}</span>
|
|
35
|
+
</a>
|
|
36
|
+
)}
|
|
37
|
+
<div className={`${baseClass}--wrap`}>
|
|
38
|
+
{image && (
|
|
39
|
+
<div className={`${baseClass}--image--wrapper`}>
|
|
40
|
+
<picture>
|
|
41
|
+
<img
|
|
42
|
+
className={`${baseClass}--picture`}
|
|
43
|
+
src={image}
|
|
44
|
+
alt={title}
|
|
45
|
+
/>
|
|
46
|
+
</picture>
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
<div className={`${baseClass}--content`}>
|
|
50
|
+
{eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
|
|
51
|
+
{title && <h5 className={`${baseClass}--title`}>{title}</h5>}
|
|
52
|
+
{image && (
|
|
53
|
+
<div className={`${baseClass}--image--wrapper`}>
|
|
54
|
+
<picture>
|
|
55
|
+
<img
|
|
56
|
+
className={`${baseClass}--picture`}
|
|
57
|
+
src={image}
|
|
58
|
+
alt={title}
|
|
59
|
+
/>
|
|
60
|
+
</picture>
|
|
61
|
+
</div>
|
|
62
|
+
)}
|
|
63
|
+
{intro && <p className={`${baseClass}--intro`}>{intro}</p>}
|
|
64
|
+
{linklist && (
|
|
65
|
+
<LinkList
|
|
66
|
+
headline={linklist.headline}
|
|
67
|
+
linkgroup={linklist.linkgroup}
|
|
68
|
+
/>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default MultilinkCard;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../../hooks/useGlobalSettings";
|
|
4
|
+
import { PromoCardProps } from "../Card.props";
|
|
5
|
+
|
|
6
|
+
const PromoCard: FC<PromoCardProps> = ({
|
|
7
|
+
eyebrow,
|
|
8
|
+
title,
|
|
9
|
+
theme,
|
|
10
|
+
size = "narrow",
|
|
11
|
+
cornercut,
|
|
12
|
+
intro,
|
|
13
|
+
link,
|
|
14
|
+
cta,
|
|
15
|
+
}) => {
|
|
16
|
+
const { prefix } = useGlobalSettings();
|
|
17
|
+
|
|
18
|
+
const baseClass = `${prefix}--card`;
|
|
19
|
+
|
|
20
|
+
const wrapperClass = classnames(
|
|
21
|
+
`${baseClass}--wrapper`,
|
|
22
|
+
`${baseClass}--wrapper__type__promo ${baseClass}--wrapper__type__promo__size__${size}`
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const cardClasses = classnames(baseClass, `${baseClass}__type__promo`, {
|
|
26
|
+
[`${baseClass}__cornercut`]: cornercut,
|
|
27
|
+
[`${baseClass}__action`]: link,
|
|
28
|
+
[`${baseClass}__size__${size}`]: size,
|
|
29
|
+
[`${baseClass}__theme__${theme}`]: theme,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className={wrapperClass}>
|
|
34
|
+
<div className={cardClasses}>
|
|
35
|
+
{link && (
|
|
36
|
+
<a className={`${baseClass}--link`} href={link} title={title}>
|
|
37
|
+
<span className={`${baseClass}--link--text`}>{title}</span>
|
|
38
|
+
</a>
|
|
39
|
+
)}
|
|
40
|
+
<div className={`${baseClass}--wrap`}>
|
|
41
|
+
<div className={`${baseClass}--content`}>
|
|
42
|
+
{eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
|
|
43
|
+
{title && <h5 className={`${baseClass}--title`}>{title}</h5>}
|
|
44
|
+
{intro && <p className={`${baseClass}--intro`}>{intro}</p>}
|
|
45
|
+
{cta && cta.label && (
|
|
46
|
+
<a
|
|
47
|
+
className={`${baseClass}--cta ${prefix}--button ${prefix}--button--medium ${prefix}--button--primary`}
|
|
48
|
+
href={cta.url}
|
|
49
|
+
>
|
|
50
|
+
<span className="link__label">{cta.label}</span>
|
|
51
|
+
</a>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default PromoCard;
|