@ilo-org/react 0.3.0 → 0.4.1
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 +24 -0
- package/README.md +1 -1
- package/lib/cjs/{DailyMotion-2aa7f048.js → DailyMotion-5654fa6e.js} +1 -1
- package/lib/cjs/{Facebook-87e24af8.js → Facebook-1924e510.js} +1 -1
- package/lib/cjs/{FilePlayer-e1216cc8.js → FilePlayer-9c697e42.js} +1 -1
- package/lib/cjs/{Kaltura-a673a8e9.js → Kaltura-177bb003.js} +1 -1
- package/lib/cjs/{Mixcloud-f9575c31.js → Mixcloud-91a772a6.js} +1 -1
- package/lib/cjs/{Preview-468c3a7f.js → Preview-8e2afb6a.js} +1 -1
- package/lib/cjs/{SoundCloud-7c59f293.js → SoundCloud-089e0f30.js} +1 -1
- package/lib/cjs/{Streamable-83e516e5.js → Streamable-4ca5b9c7.js} +1 -1
- package/lib/cjs/{Twitch-fdfa1c77.js → Twitch-dbc5c387.js} +1 -1
- package/lib/cjs/{VideoPlayer-9ce35136.js → VideoPlayer-874a52b0.js} +21 -16
- package/lib/cjs/{Vidyard-096bba3c.js → Vidyard-371acdcb.js} +1 -1
- package/lib/cjs/{Vimeo-2cb7476f.js → Vimeo-4d2029a8.js} +1 -1
- package/lib/cjs/{Wistia-5e830ac8.js → Wistia-cd0799ad.js} +1 -1
- package/lib/cjs/{YouTube-25a1d9a0.js → YouTube-23b7ec9e.js} +1 -1
- package/lib/cjs/components/Card/Card.js +43 -0
- package/lib/cjs/components/Card/CardGroup.js +25 -0
- package/lib/cjs/components/Card/index.js +21 -0
- package/lib/cjs/components/LocalNav/LocalNav.js +5 -3
- package/lib/cjs/components/LocalNav/index.js +1 -0
- package/lib/cjs/components/Logo/Logo.js +153 -0
- package/lib/cjs/components/Logo/index.js +13 -0
- package/lib/cjs/components/Video/Video.js +1 -1
- package/lib/cjs/components/Video/VideoPlayer.js +1 -1
- package/lib/cjs/components/Video/index.js +1 -1
- package/lib/cjs/components/index.js +7 -1
- package/lib/cjs/index.js +7 -1
- package/lib/esm/{DailyMotion-66b6eff2.js → DailyMotion-88f6c379.js} +1 -1
- package/lib/esm/{Facebook-dbd1003d.js → Facebook-3a284039.js} +1 -1
- package/lib/esm/{FilePlayer-617ed2ce.js → FilePlayer-dee1f94b.js} +1 -1
- package/lib/esm/{Kaltura-bbcec33d.js → Kaltura-c5d42c88.js} +1 -1
- package/lib/esm/{Mixcloud-a681ec69.js → Mixcloud-430ab42a.js} +1 -1
- package/lib/esm/{Preview-407cc648.js → Preview-7f57e055.js} +1 -1
- package/lib/esm/{SoundCloud-16e78ee5.js → SoundCloud-d1ab591e.js} +1 -1
- package/lib/esm/{Streamable-ecb225c1.js → Streamable-042d61d5.js} +1 -1
- package/lib/esm/{Twitch-8d1b6769.js → Twitch-2f45534f.js} +1 -1
- package/lib/esm/{VideoPlayer-62e0ce79.js → VideoPlayer-719076c4.js} +21 -16
- package/lib/esm/{Vidyard-57e2834a.js → Vidyard-4625527b.js} +1 -1
- package/lib/esm/{Vimeo-faa058a2.js → Vimeo-03b960e6.js} +1 -1
- package/lib/esm/{Wistia-24fb5120.js → Wistia-48f9c303.js} +1 -1
- package/lib/esm/{YouTube-01b3e51f.js → YouTube-5b29a3d9.js} +1 -1
- package/lib/esm/components/Card/Card.js +41 -0
- package/lib/esm/components/Card/CardGroup.js +23 -0
- package/lib/esm/components/Card/index.js +14 -0
- package/lib/esm/components/LocalNav/LocalNav.js +5 -3
- package/lib/esm/components/LocalNav/index.js +1 -0
- package/lib/esm/components/Logo/Logo.js +151 -0
- package/lib/esm/components/Logo/index.js +7 -0
- package/lib/esm/components/Video/Video.js +1 -1
- package/lib/esm/components/Video/VideoPlayer.js +1 -1
- package/lib/esm/components/Video/index.js +1 -1
- package/lib/esm/components/index.js +5 -1
- package/lib/esm/index.js +5 -1
- package/lib/types/react/src/components/Card/Card.d.ts +4 -0
- package/lib/types/react/src/components/Card/Card.props.d.ts +110 -0
- package/lib/types/react/src/components/Card/CardGroup.d.ts +4 -0
- package/lib/types/react/src/components/Card/CardGroup.props.d.ts +16 -0
- package/lib/types/react/src/components/Card/index.d.ts +2 -0
- package/lib/types/react/src/components/LocalNav/LocalNav.props.d.ts +4 -7
- package/lib/types/react/src/components/Logo/Logo.d.ts +4 -0
- package/lib/types/react/src/components/Logo/Logo.props.d.ts +55 -0
- package/lib/types/react/src/components/Logo/index.d.ts +1 -0
- package/lib/types/react/src/components/index.d.ts +1 -0
- package/lib/types/react/src/types/index.d.ts +6 -0
- package/package.json +17 -17
- package/src/components/Accordion/Accordion.args.ts +1 -4
- package/src/components/Card/Card.args.ts +215 -0
- package/src/components/Card/Card.props.ts +142 -0
- package/src/components/Card/Card.tsx +183 -0
- package/src/components/Card/CardGroup.args.ts +945 -0
- package/src/components/Card/CardGroup.props.ts +19 -0
- package/src/components/Card/CardGroup.tsx +55 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/LocalNav/LocalNav.args.ts +6 -6
- package/src/components/LocalNav/LocalNav.props.ts +4 -8
- package/src/components/LocalNav/LocalNav.tsx +21 -15
- package/src/components/Logo/Logo.args.ts +45 -0
- package/src/components/Logo/Logo.props.ts +67 -0
- package/src/components/Logo/Logo.tsx +247 -0
- package/src/components/Logo/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/types/index.ts +14 -0
|
@@ -5,7 +5,7 @@ import '../../hooks/useGlobalSettings.js';
|
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
-
import '../../VideoPlayer-
|
|
8
|
+
import '../../VideoPlayer-719076c4.js';
|
|
9
9
|
import '../../index-8ebb2cc1.js';
|
|
10
10
|
import 'react-dom';
|
|
11
11
|
import '../../utils/hoursMinutesSeconds.js';
|
|
@@ -51,6 +51,8 @@ export { default as TableOfContents } from './TableOfContents/TableOfContents.js
|
|
|
51
51
|
export { default as Footer } from './Footer/Footer.js';
|
|
52
52
|
export { default as LocalNav } from './LocalNav/LocalNav.js';
|
|
53
53
|
export { default as Navigation } from './Navigation/Navigation.js';
|
|
54
|
+
export { default as Card } from './Card/Card.js';
|
|
55
|
+
export { default as CardGroup } from './Card/CardGroup.js';
|
|
54
56
|
import '../hooks/useGlobalSettings.js';
|
|
55
57
|
import '../AccordionCtx-8c051900.js';
|
|
56
58
|
import '@ilo-org/utils';
|
|
@@ -63,7 +65,9 @@ import '../css-7414f50b.js';
|
|
|
63
65
|
import '../utils/transitionEndListener.js';
|
|
64
66
|
import '../utils/triggerBrowserReflow.js';
|
|
65
67
|
import './Hero/HeroCard.js';
|
|
66
|
-
import '../VideoPlayer-
|
|
68
|
+
import '../VideoPlayer-719076c4.js';
|
|
67
69
|
import '../utils/hoursMinutesSeconds.js';
|
|
68
70
|
import 'screenfull';
|
|
69
71
|
import '@ilo-org/icons-react';
|
|
72
|
+
import './Logo/Logo.js';
|
|
73
|
+
import './List/ListItem.js';
|
package/lib/esm/index.js
CHANGED
|
@@ -51,6 +51,8 @@ export { default as TableOfContents } from './components/TableOfContents/TableOf
|
|
|
51
51
|
export { default as Footer } from './components/Footer/Footer.js';
|
|
52
52
|
export { default as LocalNav } from './components/LocalNav/LocalNav.js';
|
|
53
53
|
export { default as Navigation } from './components/Navigation/Navigation.js';
|
|
54
|
+
export { default as Card } from './components/Card/Card.js';
|
|
55
|
+
export { default as CardGroup } from './components/Card/CardGroup.js';
|
|
54
56
|
import './hooks/useGlobalSettings.js';
|
|
55
57
|
import './AccordionCtx-8c051900.js';
|
|
56
58
|
import '@ilo-org/utils';
|
|
@@ -63,7 +65,9 @@ import './css-7414f50b.js';
|
|
|
63
65
|
import './utils/transitionEndListener.js';
|
|
64
66
|
import './utils/triggerBrowserReflow.js';
|
|
65
67
|
import './components/Hero/HeroCard.js';
|
|
66
|
-
import './VideoPlayer-
|
|
68
|
+
import './VideoPlayer-719076c4.js';
|
|
67
69
|
import './utils/hoursMinutesSeconds.js';
|
|
68
70
|
import 'screenfull';
|
|
69
71
|
import '@ilo-org/icons-react';
|
|
72
|
+
import './components/Logo/Logo.js';
|
|
73
|
+
import './components/List/ListItem.js';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { CardAlignment, HeroCardTheme, CardCornerType, CardColor, CardSize, CardTypes } from "../../types";
|
|
2
|
+
import { LinkProps, LinkListProps } from "../LinkList/LinkList.props";
|
|
3
|
+
import { ProfileProps } from "../Profile/Profile.props";
|
|
4
|
+
export interface CardProps {
|
|
5
|
+
/**
|
|
6
|
+
* Specify whether the card should display a video icon (for Feature card). Possible options: true | false
|
|
7
|
+
*/
|
|
8
|
+
isvideo?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Eyebrow field for the card.
|
|
11
|
+
*/
|
|
12
|
+
eyebrow: Required<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Title field for the card
|
|
15
|
+
*/
|
|
16
|
+
title: Required<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Color of the stat cards, options are turquoise | green| yellow| blue. Only used for stat cards.
|
|
19
|
+
*/
|
|
20
|
+
color?: CardColor;
|
|
21
|
+
/**
|
|
22
|
+
* The theme type for the card. Theme doesn't apply to these card types: Multilink, Data, Stat and Detail. Possible themes: light | dark.
|
|
23
|
+
*/
|
|
24
|
+
theme?: HeroCardTheme;
|
|
25
|
+
/**
|
|
26
|
+
* Different variations of card: Graphic | Stat | Graphic Promo | Multilink | Feature | Detail | Fact List | Data.
|
|
27
|
+
*/
|
|
28
|
+
variant: Required<CardTypes>;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the cards (usually reduces padding). `Wide` on Multilink and Feature cause a two column structure above a desktop breakpoint. Possible options: Wide | Standard | Narrow.
|
|
31
|
+
*/
|
|
32
|
+
size?: CardSize;
|
|
33
|
+
/**
|
|
34
|
+
* Specify whether the card has a cut corner. The only cards that use this setting are `Graphic Promo` and `Factlist`. Possible options: cornercut | corner.
|
|
35
|
+
*/
|
|
36
|
+
cornercut?: CardCornerType;
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether a card image is right-aligned or left-aligned for `Multilink` cards. Possible options: left | right.
|
|
39
|
+
*/
|
|
40
|
+
alignment?: CardAlignment;
|
|
41
|
+
/**
|
|
42
|
+
* Intro text field for the card
|
|
43
|
+
*/
|
|
44
|
+
intro?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Specify the event Date, in both human and Unix format.
|
|
47
|
+
*/
|
|
48
|
+
date?: EventDate;
|
|
49
|
+
/**
|
|
50
|
+
* Event details for `Detail` card
|
|
51
|
+
*/
|
|
52
|
+
eventdetails?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Profile to embed in the card for `Graphic Text`
|
|
55
|
+
*/
|
|
56
|
+
profile?: ProfileProps;
|
|
57
|
+
/**
|
|
58
|
+
* A list of text itmes to be embed in the card, specifically used in `Factlist` card.
|
|
59
|
+
*/
|
|
60
|
+
listitems?: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
* A Link behind a clickable card. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
|
|
63
|
+
*/
|
|
64
|
+
link?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Props of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
|
|
67
|
+
*/
|
|
68
|
+
linklist?: LinkListProps;
|
|
69
|
+
/**
|
|
70
|
+
* Items for clickable CTA button, specifically used for `Graphic Promo` card.
|
|
71
|
+
*/
|
|
72
|
+
cta?: LinkProps;
|
|
73
|
+
/**
|
|
74
|
+
* The image used in a card. Images should be avoided on `Graphic Promo`, `Graphic Text`, `Factlist`, and `Stat` card.
|
|
75
|
+
*/
|
|
76
|
+
image?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Source link for `Stat` cards.
|
|
79
|
+
*/
|
|
80
|
+
source?: LinkProps;
|
|
81
|
+
/**
|
|
82
|
+
* Dataset object for the `Data` card. An array of Content (label, copy), Files (optional headline, array of items with label and url), and Links (optional headline, array of items with label and url).
|
|
83
|
+
*/
|
|
84
|
+
dataset?: CardDataset;
|
|
85
|
+
}
|
|
86
|
+
interface EventDate {
|
|
87
|
+
unix?: string;
|
|
88
|
+
human?: string;
|
|
89
|
+
}
|
|
90
|
+
interface CardDataset {
|
|
91
|
+
content?: DataContent;
|
|
92
|
+
files?: DataFile;
|
|
93
|
+
links?: DataLink;
|
|
94
|
+
}
|
|
95
|
+
interface DataContent {
|
|
96
|
+
items?: Array<ContentItem>;
|
|
97
|
+
}
|
|
98
|
+
interface ContentItem {
|
|
99
|
+
label?: string;
|
|
100
|
+
copy?: string;
|
|
101
|
+
}
|
|
102
|
+
interface DataFile {
|
|
103
|
+
headline?: string;
|
|
104
|
+
items?: Array<LinkProps>;
|
|
105
|
+
}
|
|
106
|
+
interface DataLink {
|
|
107
|
+
headline?: string;
|
|
108
|
+
items?: Array<LinkProps>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardProps } from "../Card/Card.props";
|
|
2
|
+
import { LinkProps } from "../LinkList/LinkList.props";
|
|
3
|
+
export interface CardGroupProps {
|
|
4
|
+
/**
|
|
5
|
+
* An array of card objects
|
|
6
|
+
*/
|
|
7
|
+
cards?: Required<CardProps>[];
|
|
8
|
+
/**
|
|
9
|
+
* Number of cards in the group
|
|
10
|
+
*/
|
|
11
|
+
cardcount: Required<string>;
|
|
12
|
+
/**
|
|
13
|
+
* A Button to display after all the cards in the group
|
|
14
|
+
*/
|
|
15
|
+
cta?: LinkProps;
|
|
16
|
+
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { LinkProps, ContextMenuProps } from "../ContextMenu/ContextMenu.props";
|
|
2
|
+
import { LogoProps } from "../Logo/Logo.props";
|
|
2
3
|
export interface LocalNavProps {
|
|
3
4
|
/**
|
|
4
5
|
* Props for the background colour of the LocalNav
|
|
5
6
|
*/
|
|
6
7
|
background?: string;
|
|
7
8
|
/**
|
|
8
|
-
* Props for the
|
|
9
|
+
* Props for the Logo component of the LocalNav
|
|
9
10
|
*/
|
|
10
|
-
logo
|
|
11
|
-
/**
|
|
12
|
-
* Props for the home url of the LocalNav
|
|
13
|
-
*/
|
|
14
|
-
siteurl?: Required<string>;
|
|
11
|
+
logo: LogoProps;
|
|
15
12
|
/**
|
|
16
13
|
* Specify the primary items for the LocalNav
|
|
17
14
|
*/
|
|
18
|
-
primarynav?:
|
|
15
|
+
primarynav?: PrimaryNavProps;
|
|
19
16
|
/**
|
|
20
17
|
* Specify the main link for the LocalNav
|
|
21
18
|
*/
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
type LogoSrc = string | {
|
|
2
|
+
/**
|
|
3
|
+
* The url of the logo to use with light theme
|
|
4
|
+
*/
|
|
5
|
+
light: string;
|
|
6
|
+
/**
|
|
7
|
+
* The url of the logo to use with dark theme
|
|
8
|
+
*/
|
|
9
|
+
dark: string;
|
|
10
|
+
};
|
|
11
|
+
export interface LogoProps {
|
|
12
|
+
/**
|
|
13
|
+
* The location of the image file
|
|
14
|
+
*/
|
|
15
|
+
src: LogoSrc;
|
|
16
|
+
/**
|
|
17
|
+
* Alt text for the logo
|
|
18
|
+
*/
|
|
19
|
+
alt: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the sub-brand if there is one
|
|
22
|
+
*/
|
|
23
|
+
subbrand?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The width of the logo or 'fluid' width
|
|
26
|
+
*/
|
|
27
|
+
size?: number | "fluid";
|
|
28
|
+
/**
|
|
29
|
+
* Styles to be applied to the outermost element
|
|
30
|
+
*/
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
/**
|
|
33
|
+
* Optional className to be passed to the outermost element of the component
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional destination if the logo is a link
|
|
38
|
+
*/
|
|
39
|
+
url?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Optional target if the logo is a link
|
|
42
|
+
*/
|
|
43
|
+
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
44
|
+
/**
|
|
45
|
+
* Theme of the logo component
|
|
46
|
+
*/
|
|
47
|
+
theme?: "light" | "dark";
|
|
48
|
+
}
|
|
49
|
+
export interface InnerLogoProps extends LogoProps {
|
|
50
|
+
/**
|
|
51
|
+
* The base class of the logo component
|
|
52
|
+
*/
|
|
53
|
+
baseClass: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Logo } from "./Logo";
|
|
@@ -9,6 +9,7 @@ export type HeroCardAlignment = "left" | "center" | "right";
|
|
|
9
9
|
export type HeroCardTypes = "home" | "publication" | "graphic" | "project" | "article" | "portal";
|
|
10
10
|
export type HeroCardTheme = "dark" | "light";
|
|
11
11
|
export type InputTypes = "email" | "hidden" | "password" | "search" | "tel" | "text" | "url";
|
|
12
|
+
export type Language = "en" | "fr" | "es";
|
|
12
13
|
export type LabelTypes = "default" | "actionable" | "light";
|
|
13
14
|
export type LinkTypes = "light" | "dark" | "footer" | "button";
|
|
14
15
|
export type LinkListThemes = "light" | "dark";
|
|
@@ -25,3 +26,8 @@ export type PositionTypes = "top" | "bottom" | "left" | "right";
|
|
|
25
26
|
export type SizeTypes = "small" | "medium" | "large";
|
|
26
27
|
export type TagTypes = "anchor" | "display" | "button";
|
|
27
28
|
export type SocialTypes = "instagram" | "facebook" | "twitter" | "youtube";
|
|
29
|
+
export type CardColor = "turquoise" | "green" | "yellow" | "blue";
|
|
30
|
+
export type CardSize = "wide" | "standard" | "narrow";
|
|
31
|
+
export type CardCornerType = "cornercut" | "corner";
|
|
32
|
+
export type CardAlignment = "left" | "right";
|
|
33
|
+
export type CardTypes = "stat" | "multilink" | "graphic" | "graphicpromo" | "feature" | "detail" | "factlist" | "data";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "React components for the ILO's Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui_patterns",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@ilo-org/brand-assets": "0.1.0",
|
|
76
76
|
"@ilo-org/fonts": "0.1.0",
|
|
77
77
|
"@ilo-org/icons-react": "0.0.18",
|
|
78
|
-
"@ilo-org/styles": "0.1
|
|
78
|
+
"@ilo-org/styles": "0.2.1",
|
|
79
79
|
"@ilo-org/themes": "0.1.15",
|
|
80
80
|
"@ilo-org/utils": "0.0.11"
|
|
81
81
|
},
|
|
@@ -83,24 +83,24 @@
|
|
|
83
83
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
84
84
|
"@rollup/plugin-json": "^5.0.1",
|
|
85
85
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
86
|
-
"@storybook/addon-a11y": "
|
|
87
|
-
"@storybook/addon-actions": "
|
|
88
|
-
"@storybook/addon-docs": "
|
|
89
|
-
"@storybook/addon-essentials": "
|
|
90
|
-
"@storybook/addon-links": "
|
|
86
|
+
"@storybook/addon-a11y": "^7.0.6",
|
|
87
|
+
"@storybook/addon-actions": "^7.0.6",
|
|
88
|
+
"@storybook/addon-docs": "^7.0.6",
|
|
89
|
+
"@storybook/addon-essentials": "^7.0.6",
|
|
90
|
+
"@storybook/addon-links": "^7.0.6",
|
|
91
91
|
"@storybook/addon-postcss": "^2.0.0",
|
|
92
|
-
"@storybook/blocks": "
|
|
93
|
-
"@storybook/builder-webpack5": "
|
|
94
|
-
"@storybook/client-api": "
|
|
95
|
-
"@storybook/manager-api": "
|
|
92
|
+
"@storybook/blocks": "^7.0.6",
|
|
93
|
+
"@storybook/builder-webpack5": "^7.0.6",
|
|
94
|
+
"@storybook/client-api": "^7.0.6",
|
|
95
|
+
"@storybook/manager-api": "^7.0.6",
|
|
96
96
|
"@storybook/manager-webpack5": "6.5.15",
|
|
97
|
-
"@storybook/node-logger": "
|
|
98
|
-
"@storybook/preset-create-react-app": "
|
|
97
|
+
"@storybook/node-logger": "^7.0.6",
|
|
98
|
+
"@storybook/preset-create-react-app": "7.0.6",
|
|
99
99
|
"@storybook/preset-scss": "^1.0.3",
|
|
100
|
-
"@storybook/react": "
|
|
101
|
-
"@storybook/react-webpack5": "
|
|
102
|
-
"@storybook/testing-react": "
|
|
103
|
-
"@storybook/theming": "
|
|
100
|
+
"@storybook/react": "^7.0.6",
|
|
101
|
+
"@storybook/react-webpack5": "^7.0.6",
|
|
102
|
+
"@storybook/testing-react": "2.0.0",
|
|
103
|
+
"@storybook/theming": "^7.0.6",
|
|
104
104
|
"@testing-library/jest-dom": "^5.16.5",
|
|
105
105
|
"@testing-library/react": "^12.1.2",
|
|
106
106
|
"@testing-library/user-event": "^13.5.0",
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { CardProps } from "./Card.props";
|
|
2
|
+
|
|
3
|
+
const graphicTextCard: CardProps = {
|
|
4
|
+
variant: "graphic",
|
|
5
|
+
title: "Why we need greater social justice",
|
|
6
|
+
eyebrow: "Podcast",
|
|
7
|
+
date: {
|
|
8
|
+
human: "20 September 2022",
|
|
9
|
+
unix: "1670389200",
|
|
10
|
+
},
|
|
11
|
+
theme: "light",
|
|
12
|
+
link: "https:/www.ilo.org",
|
|
13
|
+
intro:
|
|
14
|
+
"A toxic combination of mutually-reinforcing crises – inflation, debt, food and fuel price rises, geopolitical tensions and conflict, climate change – are threatening to increase poverty, inequality and discrimination worldwide.",
|
|
15
|
+
profile: {
|
|
16
|
+
avatar: "/ilo-dg.jpg",
|
|
17
|
+
description:
|
|
18
|
+
"Gilbert Houngbo is the Director-General of the International Labour Organization",
|
|
19
|
+
name: "Gilbert Houngbo",
|
|
20
|
+
role: "ILO Director-General",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const statCard: CardProps = {
|
|
25
|
+
variant: "stat",
|
|
26
|
+
title: "Global employment growth down by half in 2023",
|
|
27
|
+
eyebrow: "Report",
|
|
28
|
+
intro:
|
|
29
|
+
"The current global economic slowdown is likely to force more workers to accept lower quality, poorly paid jobs which lack job security and social protection, so accentuating inequalities exacerbated by the COVID-19 crisis.",
|
|
30
|
+
color: "turquoise",
|
|
31
|
+
source: {
|
|
32
|
+
label: "World Employment and Social Outlook: Trends 2023",
|
|
33
|
+
url: "https://www.ilo.org",
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const multilinkCard: CardProps = {
|
|
38
|
+
variant: "multilink",
|
|
39
|
+
title:
|
|
40
|
+
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
41
|
+
eyebrow: "High-level meeting",
|
|
42
|
+
intro:
|
|
43
|
+
"At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health.",
|
|
44
|
+
image: "/hero.jpg",
|
|
45
|
+
alignment: "left",
|
|
46
|
+
date: {
|
|
47
|
+
human: "6 September 2023",
|
|
48
|
+
unix: "1670389200",
|
|
49
|
+
},
|
|
50
|
+
linklist: {
|
|
51
|
+
headline: "",
|
|
52
|
+
linkgroup: [
|
|
53
|
+
{
|
|
54
|
+
links: [
|
|
55
|
+
{
|
|
56
|
+
label: "Read the press release",
|
|
57
|
+
url: "https://www.ilo.org",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "See the statement",
|
|
61
|
+
url: "https://www.ilo.org",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: "Remarks to G7 Openening Session",
|
|
65
|
+
url: "https://www.ilo.org",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const graphicPromoCard: CardProps = {
|
|
74
|
+
variant: "graphicpromo",
|
|
75
|
+
title:
|
|
76
|
+
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
77
|
+
eyebrow: "High-level meeting",
|
|
78
|
+
theme: "light",
|
|
79
|
+
cornercut: "cornercut",
|
|
80
|
+
intro:
|
|
81
|
+
"At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health.",
|
|
82
|
+
link: "https:/www.ilo.org",
|
|
83
|
+
cta: {
|
|
84
|
+
label: "Read the press release",
|
|
85
|
+
url: "https://www.ilo.org",
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const featureCard: CardProps = {
|
|
90
|
+
variant: "feature",
|
|
91
|
+
isvideo: false,
|
|
92
|
+
title:
|
|
93
|
+
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
94
|
+
eyebrow: "High-level meeting",
|
|
95
|
+
theme: "light",
|
|
96
|
+
date: {
|
|
97
|
+
human: "18 March 2023",
|
|
98
|
+
unix: "1670389200",
|
|
99
|
+
},
|
|
100
|
+
image: "/hero.jpg",
|
|
101
|
+
link: "https:/www.ilo.org",
|
|
102
|
+
linklist: {
|
|
103
|
+
headline: "",
|
|
104
|
+
linkgroup: [
|
|
105
|
+
{
|
|
106
|
+
links: [
|
|
107
|
+
{
|
|
108
|
+
label: "Read the press release",
|
|
109
|
+
url: "http://www.google.com",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const detailCard: CardProps = {
|
|
118
|
+
variant: "detail",
|
|
119
|
+
title: "Technical meeting on digitalization in the construction sector",
|
|
120
|
+
eyebrow: "Meeting",
|
|
121
|
+
intro:
|
|
122
|
+
"The purpose of the meeting will be to discuss opportunities and challenges for the future of work in the construction industry as a vehicle to ensure a human-centred economic recovery.",
|
|
123
|
+
date: {
|
|
124
|
+
human: "18 March 2023",
|
|
125
|
+
unix: "1670389200",
|
|
126
|
+
},
|
|
127
|
+
image: "/medium.jpg",
|
|
128
|
+
link: "https:/www.ilo.org",
|
|
129
|
+
eventdetails: "8:30 - 12:00 CET | Geneva",
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const factListCard: CardProps = {
|
|
133
|
+
variant: "factlist",
|
|
134
|
+
title:
|
|
135
|
+
"Economic slowdown likely to force workers to accept lower quality jobs",
|
|
136
|
+
eyebrow: "Report",
|
|
137
|
+
theme: "light",
|
|
138
|
+
cornercut: "cornercut",
|
|
139
|
+
intro:
|
|
140
|
+
"A toxic combination of mutually-reinforcing crises – inflation, debt, food and fuel price rises, geopolitical tensions and conflict, climate change – are threatening to increase poverty, inequality and discrimination worldwide.",
|
|
141
|
+
listitems: [
|
|
142
|
+
"Global employment growth will be only 1.0 per cent in 2023, less than half the level in 2022.",
|
|
143
|
+
"The labour market deterioration is mainly due to emerging geopolitical tensions and the Ukraine conflict.",
|
|
144
|
+
"The current slowdown means that many workers will have to accept lower quality jobs, often at very low pay.",
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const dataCard: CardProps = {
|
|
149
|
+
variant: "data",
|
|
150
|
+
title: "Technical meeting on digitalization in the construction sector",
|
|
151
|
+
eyebrow: "Meeting",
|
|
152
|
+
eventdetails:
|
|
153
|
+
"The purpose of the meeting will be to discuss opportunities and challenges for the future of work in the construction industry as a vehicle to ensure a human-centred economic recovery.",
|
|
154
|
+
dataset: {
|
|
155
|
+
content: {
|
|
156
|
+
items: [
|
|
157
|
+
{
|
|
158
|
+
label: "Date",
|
|
159
|
+
copy: "18 March 2023",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: "Event type",
|
|
163
|
+
copy: "Technical meeting of experts",
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
files: {
|
|
168
|
+
headline: "Files",
|
|
169
|
+
items: [
|
|
170
|
+
{
|
|
171
|
+
label: "Meeting agenda",
|
|
172
|
+
url: "https://www.ilo.org",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "Briefing notes",
|
|
176
|
+
url: "https://www.ilo.org",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: "Practical info",
|
|
180
|
+
url: "https://www.ilo.org",
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
links: {
|
|
185
|
+
headline: "Languages",
|
|
186
|
+
items: [
|
|
187
|
+
{
|
|
188
|
+
label: "English",
|
|
189
|
+
url: "https://www.ilo.org",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: "Español",
|
|
193
|
+
url: "https://www.ilo.org",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: "Français",
|
|
197
|
+
url: "https://www.ilo.org",
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const CardArgs = {
|
|
205
|
+
graphicTextCard,
|
|
206
|
+
statCard,
|
|
207
|
+
multilinkCard,
|
|
208
|
+
graphicPromoCard,
|
|
209
|
+
featureCard,
|
|
210
|
+
detailCard,
|
|
211
|
+
factListCard,
|
|
212
|
+
dataCard,
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export default CardArgs;
|