@ilo-org/react 0.11.0 → 0.13.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 +28 -0
- package/lib/cjs/components/Cards/CardGroup/CardGroup.js +42 -0
- package/lib/cjs/components/Cards/CardGroup/index.js +759 -0
- package/lib/cjs/components/Cards/DataCard/DataCard.js +27 -0
- package/lib/cjs/components/Cards/DataCard/index.js +81 -0
- package/lib/cjs/components/Cards/DetailCard/DetailCard.js +20 -0
- package/lib/cjs/components/Cards/DetailCard/index.js +25 -0
- package/lib/cjs/components/Cards/FactlistCard/FactListCard.js +23 -0
- package/lib/cjs/components/Cards/FactlistCard/index.js +25 -0
- package/lib/cjs/components/Cards/FeatureCard/FeatureCard.js +24 -0
- package/lib/cjs/components/Cards/FeatureCard/index.js +39 -0
- package/lib/cjs/components/Cards/MultilinkCard/MultiLinkCard.js +24 -0
- package/lib/cjs/components/Cards/MultilinkCard/index.js +43 -0
- package/lib/cjs/components/Cards/PromoCard/PromoCard.js +23 -0
- package/lib/cjs/components/Cards/PromoCard/index.js +26 -0
- package/lib/cjs/components/Cards/StatCard/StatCard.js +21 -0
- package/lib/cjs/components/Cards/StatCard/index.js +23 -0
- package/lib/cjs/components/Cards/TextCard/TextCard.js +23 -0
- package/lib/cjs/components/Cards/TextCard/index.js +30 -0
- package/lib/cjs/components/Footer/Footer.js +1 -1
- package/lib/cjs/components/LinkList/LinkList.js +1 -1
- package/lib/cjs/components/Navigation/Navigation.js +3 -3
- package/lib/cjs/components/Pagination/Pagination.js +1 -1
- package/lib/cjs/components/index.js +10 -4
- package/lib/cjs/index.js +10 -4
- package/lib/esm/components/Cards/CardGroup/CardGroup.js +40 -0
- package/lib/esm/components/Cards/CardGroup/index.js +756 -0
- package/lib/esm/components/Cards/DataCard/DataCard.js +25 -0
- package/lib/esm/components/Cards/DataCard/index.js +78 -0
- package/lib/esm/components/Cards/DetailCard/DetailCard.js +18 -0
- package/lib/esm/components/Cards/DetailCard/index.js +22 -0
- package/lib/esm/components/Cards/FactlistCard/FactListCard.js +21 -0
- package/lib/esm/components/Cards/FactlistCard/index.js +22 -0
- package/lib/esm/components/Cards/FeatureCard/FeatureCard.js +22 -0
- package/lib/esm/components/Cards/FeatureCard/index.js +36 -0
- package/lib/esm/components/Cards/MultilinkCard/MultiLinkCard.js +22 -0
- package/lib/esm/components/Cards/MultilinkCard/index.js +40 -0
- package/lib/esm/components/Cards/PromoCard/PromoCard.js +21 -0
- package/lib/esm/components/Cards/PromoCard/index.js +23 -0
- package/lib/esm/components/Cards/StatCard/StatCard.js +19 -0
- package/lib/esm/components/Cards/StatCard/index.js +20 -0
- package/lib/esm/components/Cards/TextCard/TextCard.js +21 -0
- package/lib/esm/components/Cards/TextCard/index.js +27 -0
- package/lib/esm/components/Footer/Footer.js +1 -1
- package/lib/esm/components/LinkList/LinkList.js +1 -1
- package/lib/esm/components/Navigation/Navigation.js +3 -3
- package/lib/esm/components/Pagination/Pagination.js +1 -1
- package/lib/esm/components/index.js +9 -2
- package/lib/esm/index.js +9 -2
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.args.d.ts +13 -0
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.props.d.ts +58 -0
- package/lib/types/react/src/components/Cards/CardGroup/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.props.d.ts +50 -0
- package/lib/types/react/src/components/Cards/DataCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.props.d.ts +35 -0
- package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.props.d.ts +16 -0
- package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.props.d.ts +31 -0
- package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultiLinkCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.props.d.ts +25 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.props.d.ts +30 -0
- package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.props.d.ts +18 -0
- package/lib/types/react/src/components/Cards/StatCard/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.props.d.ts +26 -0
- package/lib/types/react/src/components/Cards/TextCard/index.d.ts +3 -0
- package/lib/types/react/src/components/index.d.ts +1 -1
- package/lib/types/react/src/types/index.d.ts +7 -3
- package/package.json +2 -2
- package/src/components/{Card → Cards/CardGroup}/CardGroup.args.ts +199 -376
- package/src/components/Cards/CardGroup/CardGroup.props.ts +78 -0
- package/src/components/Cards/CardGroup/CardGroup.tsx +54 -0
- package/src/components/Cards/CardGroup/index.tsx +3 -0
- package/src/components/Cards/DataCard/DataCard.args.ts +69 -0
- package/src/components/Cards/DataCard/DataCard.props.ts +60 -0
- package/src/components/Cards/DataCard/DataCard.tsx +107 -0
- package/src/components/Cards/DataCard/index.tsx +3 -0
- package/src/components/Cards/DetailCard/DetailCard.args.ts +17 -0
- package/src/components/Cards/DetailCard/DetailCard.props.ts +43 -0
- package/src/components/Cards/DetailCard/DetailCard.tsx +62 -0
- package/src/components/Cards/DetailCard/index.tsx +3 -0
- package/src/components/Cards/FactlistCard/FactListCard.args.ts +14 -0
- package/src/components/Cards/FactlistCard/FactListCard.props.ts +19 -0
- package/src/components/Cards/FactlistCard/FactListCard.tsx +42 -0
- package/src/components/Cards/FactlistCard/index.tsx +3 -0
- package/src/components/Cards/FeatureCard/FeatureCard.args.ts +30 -0
- package/src/components/Cards/FeatureCard/FeatureCard.props.ts +38 -0
- package/src/components/Cards/FeatureCard/FeatureCard.tsx +69 -0
- package/src/components/Cards/FeatureCard/index.tsx +3 -0
- package/src/components/Cards/MultilinkCard/MultiLinkCard.tsx +76 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.args.ts +33 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.props.ts +30 -0
- package/src/components/Cards/MultilinkCard/index.tsx +3 -0
- package/src/components/Cards/PromoCard/PromoCard.args.ts +19 -0
- package/src/components/Cards/PromoCard/PromoCard.props.ts +36 -0
- package/src/components/Cards/PromoCard/PromoCard.tsx +60 -0
- package/src/components/Cards/PromoCard/index.tsx +3 -0
- package/src/components/Cards/StatCard/StatCard.args.ts +14 -0
- package/src/components/Cards/StatCard/StatCard.props.ts +21 -0
- package/src/components/Cards/StatCard/StatCard.tsx +36 -0
- package/src/components/Cards/StatCard/index.tsx +3 -0
- package/src/components/Cards/TextCard/TextCard.args.ts +21 -0
- package/src/components/Cards/TextCard/TextCard.props.ts +32 -0
- package/src/components/Cards/TextCard/TextCard.tsx +62 -0
- package/src/components/Cards/TextCard/index.tsx +3 -0
- package/src/components/Footer/Footer.args.ts +4 -16
- package/src/components/Footer/Footer.tsx +41 -37
- package/src/components/LinkList/LinkList.tsx +1 -1
- package/src/components/Navigation/Navigation.tsx +5 -5
- package/src/components/Pagination/Pagination.tsx +2 -1
- package/src/components/index.ts +1 -1
- package/src/types/index.ts +10 -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/CardGroup.js +0 -23
- package/lib/esm/components/Card/index.js +0 -14
- package/lib/types/react/src/components/Card/Card.d.ts +0 -4
- package/lib/types/react/src/components/Card/Card.props.d.ts +0 -110
- package/lib/types/react/src/components/Card/CardGroup.props.d.ts +0 -16
- package/lib/types/react/src/components/Card/index.d.ts +0 -2
- package/public/fao-logo.svg +0 -195
- package/public/favicon.ico +0 -0
- package/public/hero.jpg +0 -0
- package/public/ilo-dg.jpg +0 -0
- package/public/ilo-headquarters.jpg +0 -0
- package/public/large.jpg +0 -0
- package/public/media-file-poster.jpg +0 -0
- package/public/medium.jpg +0 -0
- package/public/small.jpg +0 -0
- package/public/unhcr-logo.svg +0 -1
- package/public/unicef-logo.png +0 -0
- package/public/video-example.mp4 +0 -0
- package/public/wfp-logo.svg +0 -1
- package/public/who-logo.svg +0 -1
- package/public/youtube-video-poster.avif +0 -0
- package/src/components/Card/Card.args.ts +0 -215
- package/src/components/Card/Card.props.ts +0 -142
- package/src/components/Card/Card.tsx +0 -183
- package/src/components/Card/CardGroup.props.ts +0 -19
- package/src/components/Card/CardGroup.tsx +0 -55
- package/src/components/Card/index.ts +0 -2
- /package/lib/types/react/src/components/{Card → Cards/CardGroup}/CardGroup.d.ts +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
2
|
+
import { StatCardProps } from "../StatCard";
|
|
3
|
+
import { MultilinkCardProps } from "../MultilinkCard";
|
|
4
|
+
import { TextCardProps } from "../TextCard";
|
|
5
|
+
import { PromoCardProps } from "../PromoCard";
|
|
6
|
+
import { FeatureCardProps } from "../FeatureCard";
|
|
7
|
+
import { DetailCardProps } from "../DetailCard";
|
|
8
|
+
import { FactlistCardProps } from "../FactlistCard";
|
|
9
|
+
import { DataCardProps } from "../DataCard";
|
|
10
|
+
export interface CommonCardGroupProps {
|
|
11
|
+
/**
|
|
12
|
+
* Number of cards in the group
|
|
13
|
+
*/
|
|
14
|
+
cardCount: string;
|
|
15
|
+
/**
|
|
16
|
+
* A Button to display after all the cards in the group
|
|
17
|
+
*/
|
|
18
|
+
cta?: LinkProps;
|
|
19
|
+
}
|
|
20
|
+
export interface StatCardGroup extends CommonCardGroupProps {
|
|
21
|
+
/**
|
|
22
|
+
* Represents different types of card groups:
|
|
23
|
+
*/
|
|
24
|
+
type: "stat";
|
|
25
|
+
/**
|
|
26
|
+
* An array of card objects corresponding to the respective card type:
|
|
27
|
+
*/
|
|
28
|
+
cards: StatCardProps[];
|
|
29
|
+
}
|
|
30
|
+
export interface MultilinkCardGroup extends CommonCardGroupProps {
|
|
31
|
+
type: "multilink";
|
|
32
|
+
cards: MultilinkCardProps[];
|
|
33
|
+
}
|
|
34
|
+
export interface TextCardGroup extends CommonCardGroupProps {
|
|
35
|
+
type: "text";
|
|
36
|
+
cards: TextCardProps[];
|
|
37
|
+
}
|
|
38
|
+
export interface PromoCardGroup extends CommonCardGroupProps {
|
|
39
|
+
type: "promo";
|
|
40
|
+
cards: PromoCardProps[];
|
|
41
|
+
}
|
|
42
|
+
export interface FeatureCardGroup extends CommonCardGroupProps {
|
|
43
|
+
type: "feature";
|
|
44
|
+
cards: FeatureCardProps[];
|
|
45
|
+
}
|
|
46
|
+
export interface DetailCardGroup extends CommonCardGroupProps {
|
|
47
|
+
type: "detail";
|
|
48
|
+
cards: DetailCardProps[];
|
|
49
|
+
}
|
|
50
|
+
export interface FactlistCardGroup extends CommonCardGroupProps {
|
|
51
|
+
type: "factlist";
|
|
52
|
+
cards: FactlistCardProps[];
|
|
53
|
+
}
|
|
54
|
+
export interface DataCardGroup extends CommonCardGroupProps {
|
|
55
|
+
type: "data";
|
|
56
|
+
cards: DataCardProps[];
|
|
57
|
+
}
|
|
58
|
+
export type CardGroupProps = StatCardGroup | MultilinkCardGroup | TextCardGroup | PromoCardGroup | FeatureCardGroup | DetailCardGroup | FactlistCardGroup | DataCardGroup;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CardSize } from "../../../types";
|
|
2
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type DataCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* A line of text that appears as a small heading at the top of the card
|
|
6
|
+
*/
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
/**
|
|
9
|
+
* How big should the card be
|
|
10
|
+
*/
|
|
11
|
+
size?: Omit<CardSize, "standard">;
|
|
12
|
+
/**
|
|
13
|
+
* The image to show in the card
|
|
14
|
+
*/
|
|
15
|
+
image?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Array of Content (label, copy), Files object (optional headline, array of items with label and url) and Links * * object (optional headline, array of items with label and url)
|
|
18
|
+
*/
|
|
19
|
+
dataset?: CardDataset;
|
|
20
|
+
/**
|
|
21
|
+
* Make the content appear in one or two columns. Only applies when the size is set to `wide` or `fluid`
|
|
22
|
+
*/
|
|
23
|
+
columns?: string;
|
|
24
|
+
};
|
|
25
|
+
interface CardDataset {
|
|
26
|
+
content?: DataContent;
|
|
27
|
+
files?: DataFile;
|
|
28
|
+
links?: DataLink;
|
|
29
|
+
cta?: Cta;
|
|
30
|
+
}
|
|
31
|
+
interface DataContent {
|
|
32
|
+
items?: Array<ContentItem>;
|
|
33
|
+
}
|
|
34
|
+
interface ContentItem {
|
|
35
|
+
label?: string;
|
|
36
|
+
copy?: string;
|
|
37
|
+
}
|
|
38
|
+
interface DataFile {
|
|
39
|
+
headline?: string;
|
|
40
|
+
items?: Array<LinkProps>;
|
|
41
|
+
}
|
|
42
|
+
interface DataLink {
|
|
43
|
+
headline?: string;
|
|
44
|
+
items?: Array<LinkProps>;
|
|
45
|
+
}
|
|
46
|
+
interface Cta {
|
|
47
|
+
headline?: string;
|
|
48
|
+
items?: Array<LinkProps>;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CardSize, EventDate } from "../../../types";
|
|
2
|
+
export type DetailCardProps = {
|
|
3
|
+
/**
|
|
4
|
+
* A line of text that appears as a small heading above the title of the card
|
|
5
|
+
*/
|
|
6
|
+
eyebrow?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The title of the card
|
|
9
|
+
*/
|
|
10
|
+
title: string;
|
|
11
|
+
/**
|
|
12
|
+
* Introductory text in the card
|
|
13
|
+
*/
|
|
14
|
+
intro?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Specify the event Date, in both human and Unix format.
|
|
17
|
+
*/
|
|
18
|
+
date?: EventDate;
|
|
19
|
+
/**
|
|
20
|
+
* Information about an event
|
|
21
|
+
*/
|
|
22
|
+
eventdetails?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A URL to link to
|
|
25
|
+
*/
|
|
26
|
+
link?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The image to show in the card
|
|
29
|
+
*/
|
|
30
|
+
image?: string;
|
|
31
|
+
/**
|
|
32
|
+
* How big should the card be
|
|
33
|
+
*/
|
|
34
|
+
size?: Omit<CardSize, "standard">;
|
|
35
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ThemeTypes, CardSize } from "../../../types";
|
|
2
|
+
export type FactlistCardProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The title of the card
|
|
5
|
+
*/
|
|
6
|
+
title: string;
|
|
7
|
+
/**
|
|
8
|
+
* Will render the card to appear on light or dark backgrounds
|
|
9
|
+
*/
|
|
10
|
+
theme?: ThemeTypes;
|
|
11
|
+
/**
|
|
12
|
+
* How big should the card be
|
|
13
|
+
*/
|
|
14
|
+
size?: Omit<CardSize, "standard">;
|
|
15
|
+
list?: string[];
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ThemeTypes, CardSize, EventDate } from "../../../types";
|
|
2
|
+
import { LinkListProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type FeatureCardProps = {
|
|
4
|
+
isvideo?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A line of text that appears as a small heading above the title of the card
|
|
7
|
+
*/
|
|
8
|
+
eyebrow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The title of the card
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Will render the card to appear on light or dark backgrounds
|
|
15
|
+
*/
|
|
16
|
+
theme?: ThemeTypes;
|
|
17
|
+
/**
|
|
18
|
+
* How big should the card be
|
|
19
|
+
*/
|
|
20
|
+
size?: Omit<CardSize, "standard">;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the event Date, in both human and Unix format.
|
|
23
|
+
*/
|
|
24
|
+
date?: EventDate;
|
|
25
|
+
link?: string;
|
|
26
|
+
linklist?: LinkListProps;
|
|
27
|
+
/**
|
|
28
|
+
* The image to show in the card
|
|
29
|
+
*/
|
|
30
|
+
image?: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CardAlignment, CardSize } from "../../../types";
|
|
2
|
+
import { LinkListProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type MultilinkCardProps = {
|
|
4
|
+
isvideo?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A line of text that appears as a small heading above the title of the card
|
|
7
|
+
*/
|
|
8
|
+
eyebrow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The title of the card
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* How big should the card be
|
|
15
|
+
*/
|
|
16
|
+
size?: CardSize;
|
|
17
|
+
alignment?: CardAlignment;
|
|
18
|
+
intro?: string;
|
|
19
|
+
link?: string;
|
|
20
|
+
linklist?: LinkListProps;
|
|
21
|
+
/**
|
|
22
|
+
* The image to show in the card
|
|
23
|
+
*/
|
|
24
|
+
image?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ThemeTypes, CardCornerType, CardSize } from "../../../types";
|
|
2
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type PromoCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* A line of text that appears as a small heading above the title of the card
|
|
6
|
+
*/
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The title of the card
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* Will render the card to appear on light or dark backgrounds
|
|
14
|
+
*/
|
|
15
|
+
theme?: ThemeTypes;
|
|
16
|
+
/**
|
|
17
|
+
* How big should the card be
|
|
18
|
+
*/
|
|
19
|
+
size?: CardSize;
|
|
20
|
+
/**
|
|
21
|
+
* Apply an optional corner cut to the top of the card
|
|
22
|
+
*/
|
|
23
|
+
cornercut?: CardCornerType;
|
|
24
|
+
/**
|
|
25
|
+
* Introductory text in the card
|
|
26
|
+
*/
|
|
27
|
+
intro?: string;
|
|
28
|
+
link?: string;
|
|
29
|
+
cta?: LinkProps;
|
|
30
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CardColor, CardSize } from "../../../types";
|
|
2
|
+
import { LinkProps } from "../../LinkList/LinkList.props";
|
|
3
|
+
export type StatCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The title of the card
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
color?: CardColor;
|
|
9
|
+
/**
|
|
10
|
+
* How big should the card be
|
|
11
|
+
*/
|
|
12
|
+
size?: Omit<CardSize, "narrow" | "wide">;
|
|
13
|
+
/**
|
|
14
|
+
* Introductory text in the card
|
|
15
|
+
*/
|
|
16
|
+
intro?: string;
|
|
17
|
+
source?: LinkProps;
|
|
18
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ThemeTypes, CardSize, EventDate } from "../../../types";
|
|
2
|
+
import { ProfileProps } from "../../Profile/Profile.props";
|
|
3
|
+
export type TextCardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* A line of text that appears as a small heading above the title of the card
|
|
6
|
+
*/
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The title of the card
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* Will render the card to appear on light or dark backgrounds
|
|
14
|
+
*/
|
|
15
|
+
theme?: ThemeTypes;
|
|
16
|
+
/**
|
|
17
|
+
* How big should the card be
|
|
18
|
+
*/
|
|
19
|
+
size?: Omit<CardSize, "standard">;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the event Date, in both human and Unix format.
|
|
22
|
+
*/
|
|
23
|
+
date?: EventDate;
|
|
24
|
+
profile: ProfileProps;
|
|
25
|
+
link?: string;
|
|
26
|
+
};
|
|
@@ -36,6 +36,6 @@ export { TableOfContents } from "./TableOfContents";
|
|
|
36
36
|
export { Footer } from "./Footer";
|
|
37
37
|
export { LocalNav } from "./LocalNav";
|
|
38
38
|
export { Navigation } from "./Navigation";
|
|
39
|
-
export {
|
|
39
|
+
export { CardGroup } from "./Cards/CardGroup";
|
|
40
40
|
export { Breadcrumb } from "./Breadcrumb";
|
|
41
41
|
export { Tabs } from "./Tabs";
|
|
@@ -27,10 +27,14 @@ export type SizeTypes = "small" | "medium" | "large";
|
|
|
27
27
|
export type TagTypes = "anchor" | "display" | "button";
|
|
28
28
|
export type SocialTypes = "facebook" | "twitter" | "instagram" | "linkedin" | "youtube" | "tiktok" | "flickr";
|
|
29
29
|
export type CardColor = "turquoise" | "green" | "yellow" | "blue";
|
|
30
|
-
export type CardSize = "wide" | "standard" | "narrow";
|
|
31
|
-
export type CardCornerType =
|
|
30
|
+
export type CardSize = "wide" | "standard" | "narrow" | "fluid";
|
|
31
|
+
export type CardCornerType = boolean;
|
|
32
32
|
export type CardAlignment = "left" | "right";
|
|
33
|
-
export type CardTypes = "stat" | "multilink" | "
|
|
33
|
+
export type CardTypes = "stat" | "multilink" | "text" | "promo" | "feature" | "detail" | "factlist" | "data";
|
|
34
|
+
export type EventDate = {
|
|
35
|
+
unix?: string;
|
|
36
|
+
human?: string;
|
|
37
|
+
};
|
|
34
38
|
export interface FormFieldProps<T> {
|
|
35
39
|
/**
|
|
36
40
|
* The input's onChange callback.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "React components for the ILO's Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui_patterns",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@ilo-org/brand-assets": "0.4.0",
|
|
79
79
|
"@ilo-org/fonts": "0.1.2",
|
|
80
80
|
"@ilo-org/icons-react": "0.0.21",
|
|
81
|
-
"@ilo-org/styles": "0.
|
|
81
|
+
"@ilo-org/styles": "0.15.0",
|
|
82
82
|
"@ilo-org/themes": "0.7.2",
|
|
83
83
|
"@ilo-org/utils": "0.0.11"
|
|
84
84
|
},
|