@ilo-org/react 0.10.6 → 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 +25 -0
- package/lib/cjs/AccordionCtx-be704051.js +9 -0
- package/lib/cjs/{GlobalCtx-97e4b433.js → GlobalCtx-10114bdd.js} +2 -2
- package/lib/cjs/ListCtx-14aa546f.js +9 -0
- package/lib/cjs/TagCtx-690a1d54.js +7 -0
- package/lib/cjs/components/Accordion/Accordion.js +6 -6
- package/lib/cjs/components/Accordion/AccordionButton.js +5 -5
- package/lib/cjs/components/Accordion/AccordionItem.js +2 -2
- package/lib/cjs/components/Accordion/AccordionPanel.js +8 -8
- package/lib/cjs/components/Accordion/index.js +2 -2
- package/lib/cjs/components/Breadcrumb/Breadcrumb.js +5 -5
- package/lib/cjs/components/Breadcrumb/index.js +1 -1
- package/lib/cjs/components/Button/Button.js +1 -1
- package/lib/cjs/components/Button/index.js +1 -1
- package/lib/cjs/components/Callout/Callout.js +4 -4
- package/lib/cjs/components/Callout/index.js +1 -1
- 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/Checkbox/Checkbox.js +5 -5
- package/lib/cjs/components/Checkbox/index.js +1 -1
- package/lib/cjs/components/Collapse/Collapse.js +1194 -44
- package/lib/cjs/components/Collapse/index.js +0 -1
- package/lib/cjs/components/ContextMenu/ContextMenu.js +1 -1
- package/lib/cjs/components/ContextMenu/index.js +1 -1
- package/lib/cjs/components/Credit/Credit.js +3 -3
- package/lib/cjs/components/Credit/index.js +1 -1
- package/lib/cjs/components/DatePicker/DatePicker.js +4 -4
- package/lib/cjs/components/DatePicker/index.js +1 -1
- package/lib/cjs/components/Dropdown/Dropdown.js +5 -5
- package/lib/cjs/components/Dropdown/index.js +1 -1
- package/lib/cjs/components/Empty/Empty.js +1 -1
- package/lib/cjs/components/Empty/index.js +1 -1
- package/lib/cjs/components/Fieldset/Fieldset.js +5 -5
- package/lib/cjs/components/Fieldset/index.js +1 -1
- package/lib/cjs/components/FileUpload/FileUpload.js +5 -5
- package/lib/cjs/components/FileUpload/index.js +1 -1
- package/lib/cjs/components/Footer/Footer.js +1 -1
- package/lib/cjs/components/Footer/index.js +1 -1
- package/lib/cjs/components/Form/Form.js +3 -3
- package/lib/cjs/components/Form/index.js +1 -1
- package/lib/cjs/components/FormControl/FormControl.js +7 -7
- package/lib/cjs/components/FormControl/index.js +1 -1
- package/lib/cjs/components/GlobalProvider/GlobalProvider.js +1 -1
- package/lib/cjs/components/GlobalProvider/index.js +1 -1
- package/lib/cjs/components/Heading/Heading.js +1 -1
- package/lib/cjs/components/Heading/index.js +1 -1
- package/lib/cjs/components/Hero/Hero.js +1 -1
- package/lib/cjs/components/Hero/HeroCard.js +1 -1
- package/lib/cjs/components/Hero/index.js +1 -1
- package/lib/cjs/components/Icon/Icon.js +3 -3
- package/lib/cjs/components/Icon/index.js +1 -1
- package/lib/cjs/components/Image/Image.js +1 -1
- package/lib/cjs/components/Image/index.js +1 -1
- package/lib/cjs/components/Input/Input.js +1 -1
- package/lib/cjs/components/Input/index.js +1 -1
- package/lib/cjs/components/Link/Link.js +1 -1
- package/lib/cjs/components/Link/index.js +1 -1
- package/lib/cjs/components/LinkList/LinkList.js +2 -2
- package/lib/cjs/components/LinkList/index.js +1 -1
- package/lib/cjs/components/List/List.js +4 -4
- package/lib/cjs/components/List/ListItem.js +2 -2
- package/lib/cjs/components/List/index.js +2 -2
- package/lib/cjs/components/Loading/Loading.js +1 -1
- package/lib/cjs/components/Loading/index.js +1 -1
- package/lib/cjs/components/LocalNav/LocalNav.js +4 -4
- package/lib/cjs/components/LocalNav/index.js +1 -1
- package/lib/cjs/components/Logo/Logo.js +15 -15
- package/lib/cjs/components/Logo/index.js +1 -1
- package/lib/cjs/components/LogoGrid/LogoGrid.js +1 -1
- package/lib/cjs/components/LogoGrid/index.js +1 -1
- package/lib/cjs/components/Navigation/Navigation.js +6 -6
- package/lib/cjs/components/Navigation/index.js +1 -1
- package/lib/cjs/components/Notification/Notification.js +3 -3
- package/lib/cjs/components/Notification/index.js +1 -1
- package/lib/cjs/components/NumberPicker/NumberPicker.js +4 -4
- package/lib/cjs/components/NumberPicker/index.js +1 -1
- package/lib/cjs/components/Pagination/Pagination.js +1 -1
- package/lib/cjs/components/Pagination/index.js +1 -1
- package/lib/cjs/components/Profile/Profile.js +1 -1
- package/lib/cjs/components/Profile/index.js +1 -1
- package/lib/cjs/components/Radio/Radio.js +5 -5
- package/lib/cjs/components/Radio/index.js +1 -1
- package/lib/cjs/components/ReadMore/ReadMore.js +4 -4
- package/lib/cjs/components/ReadMore/index.js +1 -1
- package/lib/cjs/components/RichText/RichText.js +1 -1
- package/lib/cjs/components/RichText/index.js +1 -1
- package/lib/cjs/components/SearchField/SearchField.js +3 -3
- package/lib/cjs/components/SearchField/index.js +1 -1
- package/lib/cjs/components/SocialMedia/SocialMedia.js +1 -1
- package/lib/cjs/components/SocialMedia/index.js +1 -1
- package/lib/cjs/components/TableOfContents/TableOfContents.js +1 -1
- package/lib/cjs/components/TableOfContents/index.js +1 -1
- package/lib/cjs/components/Tabs/Tabs.args.js +156 -0
- package/lib/cjs/components/Tabs/Tabs.js +24 -0
- package/lib/cjs/components/Tabs/index.js +15 -0
- package/lib/cjs/components/Tag/Tag.js +4 -4
- package/lib/cjs/components/Tag/TagSet.js +6 -6
- package/lib/cjs/components/Tag/index.js +2 -2
- package/lib/cjs/components/TextInput/TextInput.js +4 -4
- package/lib/cjs/components/TextInput/index.js +1 -1
- package/lib/cjs/components/Textarea/Textarea.js +4 -4
- package/lib/cjs/components/Textarea/index.js +1 -1
- package/lib/cjs/components/Toggle/Toggle.js +4 -4
- package/lib/cjs/components/Toggle/index.js +1 -1
- package/lib/cjs/components/Tooltip/Tooltip.js +5 -5
- package/lib/cjs/components/Tooltip/index.js +1 -1
- package/lib/cjs/components/Video/Video.js +11 -12
- package/lib/cjs/components/Video/VideoPlayer.js +55 -13
- package/lib/cjs/components/Video/index.js +6 -8
- package/lib/cjs/components/index.js +21 -12
- package/lib/cjs/hooks/index.js +1 -1
- package/lib/cjs/hooks/useGlobalSettings.js +3 -3
- package/lib/cjs/hooks/usePrevious.js +3 -3
- package/lib/cjs/hooks/useVideoPlayer.js +7 -7
- package/lib/cjs/index.js +21 -12
- 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/Collapse/Collapse.js +1156 -6
- package/lib/esm/components/Collapse/index.js +0 -1
- package/lib/esm/components/FileUpload/FileUpload.js +3 -3
- package/lib/esm/components/LinkList/LinkList.js +1 -1
- package/lib/esm/components/NumberPicker/NumberPicker.js +3 -3
- package/lib/esm/components/Radio/Radio.js +3 -3
- package/lib/esm/components/Tabs/Tabs.args.js +154 -0
- package/lib/esm/components/Tabs/Tabs.js +22 -0
- package/lib/esm/components/Tabs/index.js +9 -0
- package/lib/esm/components/TextInput/TextInput.js +3 -3
- package/lib/esm/components/Textarea/Textarea.js +3 -3
- package/lib/esm/components/Video/Video.js +10 -11
- package/lib/esm/components/Video/VideoPlayer.js +57 -11
- package/lib/esm/components/Video/index.js +5 -7
- package/lib/esm/components/index.js +14 -6
- package/lib/esm/index.js +14 -6
- 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/Tabs/Tabs.args.d.ts +10 -0
- package/lib/types/react/src/components/Tabs/Tabs.d.ts +4 -0
- package/lib/types/react/src/components/Tabs/Tabs.props.d.ts +12 -0
- package/lib/types/react/src/components/Tabs/index.d.ts +1 -0
- package/lib/types/react/src/components/Video/Video.d.ts +2 -2
- package/lib/types/react/src/components/Video/Video.props.d.ts +5 -43
- package/lib/types/react/src/components/Video/VideoPlayer.d.ts +3 -3
- package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +6 -31
- package/lib/types/react/src/components/index.d.ts +2 -1
- package/lib/types/react/src/types/index.d.ts +3 -3
- package/package.json +9 -7
- 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/Tabs/Tabs.args.tsx +201 -0
- package/src/components/Tabs/Tabs.props.ts +13 -0
- package/src/components/Tabs/Tabs.tsx +60 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Video/Video.args.ts +18 -24
- package/src/components/Video/Video.props.ts +5 -47
- package/src/components/Video/Video.tsx +24 -19
- package/src/components/Video/VideoPlayer.props.ts +7 -38
- package/src/components/Video/VideoPlayer.tsx +67 -322
- package/src/components/index.ts +2 -1
- package/src/declarations.d.ts +22 -0
- package/src/types/index.ts +4 -4
- package/lib/cjs/AccordionCtx-fe08ff45.js +0 -9
- package/lib/cjs/DailyMotion-17b56ecb.js +0 -259
- package/lib/cjs/Facebook-0c8d86ee.js +0 -239
- package/lib/cjs/FilePlayer-01d6dc08.js +0 -596
- package/lib/cjs/Kaltura-40e8e581.js +0 -235
- package/lib/cjs/ListCtx-7db7fe04.js +0 -9
- package/lib/cjs/Mixcloud-e23f49d6.js +0 -222
- package/lib/cjs/Preview-8e490f54.js +0 -227
- package/lib/cjs/SoundCloud-2500b6cb.js +0 -249
- package/lib/cjs/Streamable-00723065.js +0 -234
- package/lib/cjs/TagCtx-929c7753.js +0 -7
- package/lib/cjs/Twitch-2c5c5733.js +0 -244
- package/lib/cjs/VideoPlayer-5f0a64c6.js +0 -2067
- package/lib/cjs/Vidyard-d36d6c45.js +0 -237
- package/lib/cjs/Vimeo-d311e3b8.js +0 -285
- package/lib/cjs/Wistia-318b4e43.js +0 -288
- package/lib/cjs/YouTube-a3796a55.js +0 -377
- 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/cjs/index-0af02e81.js +0 -1154
- package/lib/esm/DailyMotion-989c2db3.js +0 -257
- package/lib/esm/Facebook-04e9cc59.js +0 -237
- package/lib/esm/FilePlayer-0789336d.js +0 -594
- package/lib/esm/Kaltura-a9ed37a9.js +0 -233
- package/lib/esm/Mixcloud-5a3b4353.js +0 -220
- package/lib/esm/Preview-7ca1835e.js +0 -225
- package/lib/esm/SoundCloud-47bccd79.js +0 -247
- package/lib/esm/Streamable-ee762126.js +0 -232
- package/lib/esm/Twitch-3cd4b54b.js +0 -242
- package/lib/esm/VideoPlayer-96c2b20c.js +0 -2062
- package/lib/esm/Vidyard-258ab0ef.js +0 -235
- package/lib/esm/Vimeo-4b29b580.js +0 -283
- package/lib/esm/Wistia-3cbce669.js +0 -286
- package/lib/esm/YouTube-db52da1c.js +0 -375
- package/lib/esm/components/Card/Card.js +0 -41
- package/lib/esm/components/Card/index.js +0 -14
- package/lib/esm/index-623ce3f5.js +0 -1152
- 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
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { CardAlignment, ThemeTypes, CardCornerType, CardColor, CardSize, CardTypes } from "../../types";
|
|
2
|
+
import { LinkProps, LinkListProps } from "../LinkList/LinkList.props";
|
|
3
|
+
import { ProfileProps } from "../Profile/Profile.props";
|
|
4
|
+
export type DataCardProps = {
|
|
5
|
+
/**
|
|
6
|
+
* A line of text that appears as a small heading at the top of the card
|
|
7
|
+
*/
|
|
8
|
+
eyebrow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* How big should the card be
|
|
11
|
+
*/
|
|
12
|
+
size?: Omit<CardSize, "standard">;
|
|
13
|
+
/**
|
|
14
|
+
* The image to show in the card
|
|
15
|
+
*/
|
|
16
|
+
image?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 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)
|
|
19
|
+
*/
|
|
20
|
+
dataset?: CardDataset;
|
|
21
|
+
/**
|
|
22
|
+
* Make the content appear in one or two columns. Only applies when the size is set to `wide` or `fluid`
|
|
23
|
+
*/
|
|
24
|
+
columns?: string;
|
|
25
|
+
};
|
|
26
|
+
export type DetailCardProps = {
|
|
27
|
+
/**
|
|
28
|
+
* A line of text that appears as a small heading above the title of the card
|
|
29
|
+
*/
|
|
30
|
+
eyebrow?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The title of the card
|
|
33
|
+
*/
|
|
34
|
+
title: string;
|
|
35
|
+
/**
|
|
36
|
+
* Introductory text in the card
|
|
37
|
+
*/
|
|
38
|
+
intro?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Specify the event Date, in both human and Unix format.
|
|
41
|
+
*/
|
|
42
|
+
date?: EventDate;
|
|
43
|
+
/**
|
|
44
|
+
* Information about an event
|
|
45
|
+
*/
|
|
46
|
+
eventdetails?: string;
|
|
47
|
+
/**
|
|
48
|
+
* A URL to link to
|
|
49
|
+
*/
|
|
50
|
+
link?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The image to show in the card
|
|
53
|
+
*/
|
|
54
|
+
image?: string;
|
|
55
|
+
/**
|
|
56
|
+
* How big should the card be
|
|
57
|
+
*/
|
|
58
|
+
size?: Omit<CardSize, "standard">;
|
|
59
|
+
};
|
|
60
|
+
export type FactlistCardProps = {
|
|
61
|
+
/**
|
|
62
|
+
* The title of the card
|
|
63
|
+
*/
|
|
64
|
+
title: string;
|
|
65
|
+
/**
|
|
66
|
+
* Will render the card to appear on light or dark backgrounds
|
|
67
|
+
*/
|
|
68
|
+
theme?: ThemeTypes;
|
|
69
|
+
/**
|
|
70
|
+
* How big should the card be
|
|
71
|
+
*/
|
|
72
|
+
size?: Omit<CardSize, "standard">;
|
|
73
|
+
list?: string[];
|
|
74
|
+
};
|
|
75
|
+
export type FeatureCardProps = {
|
|
76
|
+
isvideo?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* A line of text that appears as a small heading above the title of the card
|
|
79
|
+
*/
|
|
80
|
+
eyebrow?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The title of the card
|
|
83
|
+
*/
|
|
84
|
+
title: string;
|
|
85
|
+
/**
|
|
86
|
+
* Will render the card to appear on light or dark backgrounds
|
|
87
|
+
*/
|
|
88
|
+
theme?: ThemeTypes;
|
|
89
|
+
/**
|
|
90
|
+
* How big should the card be
|
|
91
|
+
*/
|
|
92
|
+
size?: Omit<CardSize, "standard">;
|
|
93
|
+
/**
|
|
94
|
+
* Specify the event Date, in both human and Unix format.
|
|
95
|
+
*/
|
|
96
|
+
date?: EventDate;
|
|
97
|
+
link?: string;
|
|
98
|
+
linklist?: LinkListProps;
|
|
99
|
+
/**
|
|
100
|
+
* The image to show in the card
|
|
101
|
+
*/
|
|
102
|
+
image?: string;
|
|
103
|
+
};
|
|
104
|
+
export type MultilinkCardProps = {
|
|
105
|
+
isvideo?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* A line of text that appears as a small heading above the title of the card
|
|
108
|
+
*/
|
|
109
|
+
eyebrow?: string;
|
|
110
|
+
/**
|
|
111
|
+
* The title of the card
|
|
112
|
+
*/
|
|
113
|
+
title: string;
|
|
114
|
+
/**
|
|
115
|
+
* How big should the card be
|
|
116
|
+
*/
|
|
117
|
+
size?: CardSize;
|
|
118
|
+
alignment?: CardAlignment;
|
|
119
|
+
intro?: string;
|
|
120
|
+
link?: string;
|
|
121
|
+
linklist?: LinkListProps;
|
|
122
|
+
/**
|
|
123
|
+
* The image to show in the card
|
|
124
|
+
*/
|
|
125
|
+
image?: string;
|
|
126
|
+
};
|
|
127
|
+
export type PromoCardProps = {
|
|
128
|
+
/**
|
|
129
|
+
* A line of text that appears as a small heading above the title of the card
|
|
130
|
+
*/
|
|
131
|
+
eyebrow?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The title of the card
|
|
134
|
+
*/
|
|
135
|
+
title: string;
|
|
136
|
+
/**
|
|
137
|
+
* Will render the card to appear on light or dark backgrounds
|
|
138
|
+
*/
|
|
139
|
+
theme?: ThemeTypes;
|
|
140
|
+
/**
|
|
141
|
+
* How big should the card be
|
|
142
|
+
*/
|
|
143
|
+
size?: CardSize;
|
|
144
|
+
/**
|
|
145
|
+
* Apply an optional corner cut to the top of the card
|
|
146
|
+
*/
|
|
147
|
+
cornercut?: CardCornerType;
|
|
148
|
+
/**
|
|
149
|
+
* Introductory text in the card
|
|
150
|
+
*/
|
|
151
|
+
intro?: string;
|
|
152
|
+
link?: string;
|
|
153
|
+
cta?: LinkProps;
|
|
154
|
+
};
|
|
155
|
+
export type StatCardProps = {
|
|
156
|
+
/**
|
|
157
|
+
* The title of the card
|
|
158
|
+
*/
|
|
159
|
+
title: string;
|
|
160
|
+
color?: CardColor;
|
|
161
|
+
/**
|
|
162
|
+
* How big should the card be
|
|
163
|
+
*/
|
|
164
|
+
size?: Omit<CardSize, "narrow" | "wide">;
|
|
165
|
+
/**
|
|
166
|
+
* Introductory text in the card
|
|
167
|
+
*/
|
|
168
|
+
intro?: string;
|
|
169
|
+
source?: LinkProps;
|
|
170
|
+
};
|
|
171
|
+
export type TextCardProps = {
|
|
172
|
+
/**
|
|
173
|
+
* A line of text that appears as a small heading above the title of the card
|
|
174
|
+
*/
|
|
175
|
+
eyebrow?: string;
|
|
176
|
+
/**
|
|
177
|
+
* The title of the card
|
|
178
|
+
*/
|
|
179
|
+
title: string;
|
|
180
|
+
/**
|
|
181
|
+
* Will render the card to appear on light or dark backgrounds
|
|
182
|
+
*/
|
|
183
|
+
theme?: ThemeTypes;
|
|
184
|
+
/**
|
|
185
|
+
* How big should the card be
|
|
186
|
+
*/
|
|
187
|
+
size?: Omit<CardSize, "standard">;
|
|
188
|
+
/**
|
|
189
|
+
* Specify the event Date, in both human and Unix format.
|
|
190
|
+
*/
|
|
191
|
+
date?: EventDate;
|
|
192
|
+
profile: ProfileProps;
|
|
193
|
+
link?: string;
|
|
194
|
+
};
|
|
195
|
+
export interface CardProps {
|
|
196
|
+
/**
|
|
197
|
+
* Specify whether the card should display a video icon (for Feature card). Possible options: true | false
|
|
198
|
+
*/
|
|
199
|
+
isvideo?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Eyebrow field for the card.
|
|
202
|
+
*/
|
|
203
|
+
eyebrow: string;
|
|
204
|
+
/**
|
|
205
|
+
* Title field for the card
|
|
206
|
+
*/
|
|
207
|
+
title: string;
|
|
208
|
+
/**
|
|
209
|
+
* Color of the stat cards, options are turquoise | green| yellow| blue. Only used for stat cards.
|
|
210
|
+
*/
|
|
211
|
+
color?: CardColor;
|
|
212
|
+
/**
|
|
213
|
+
* The theme type for the card. Theme doesn't apply to these card types: Multilink, Data, Stat and Detail. Possible themes: light | dark.
|
|
214
|
+
*/
|
|
215
|
+
theme?: ThemeTypes;
|
|
216
|
+
/**
|
|
217
|
+
* Type - Sets the type of card to render.
|
|
218
|
+
Option keys: feature, text, detail, promo, multilink, data, stat, factlist
|
|
219
|
+
*/
|
|
220
|
+
type: CardTypes;
|
|
221
|
+
/**
|
|
222
|
+
* 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.
|
|
223
|
+
*/
|
|
224
|
+
size?: CardSize;
|
|
225
|
+
/**
|
|
226
|
+
* Specify whether the card has a cut corner. The only card that uses this setting are `Promo`.
|
|
227
|
+
*/
|
|
228
|
+
cornercut?: CardCornerType;
|
|
229
|
+
/**
|
|
230
|
+
* Specify whether a card image is right-aligned or left-aligned for `Multilink` cards. Possible options: left | right.
|
|
231
|
+
*/
|
|
232
|
+
alignment?: CardAlignment;
|
|
233
|
+
/**
|
|
234
|
+
* Intro text field for the card
|
|
235
|
+
*/
|
|
236
|
+
intro?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Specify the event Date, in both human and Unix format.
|
|
239
|
+
*/
|
|
240
|
+
date?: EventDate;
|
|
241
|
+
/**
|
|
242
|
+
* Event details for `Detail` card
|
|
243
|
+
*/
|
|
244
|
+
eventdetails?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Profile to embed in the card for `Text` card
|
|
247
|
+
*/
|
|
248
|
+
profile?: ProfileProps;
|
|
249
|
+
/**
|
|
250
|
+
* A list of text itmes to be embed in the card, specifically used in `Factlist` card.
|
|
251
|
+
*/
|
|
252
|
+
listitems?: Array<string>;
|
|
253
|
+
/**
|
|
254
|
+
* A Link behind a clickable card. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
|
|
255
|
+
*/
|
|
256
|
+
link?: string;
|
|
257
|
+
/**
|
|
258
|
+
* Props of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
|
|
259
|
+
*/
|
|
260
|
+
linklist?: LinkListProps;
|
|
261
|
+
/**
|
|
262
|
+
* Items for clickable CTA button, specifically used for `Promo` card.
|
|
263
|
+
*/
|
|
264
|
+
cta?: LinkProps;
|
|
265
|
+
/**
|
|
266
|
+
* The image used in a card. Images should be avoided on `Promo`, `Text`, `Factlist`, and `Stat` card.
|
|
267
|
+
*/
|
|
268
|
+
image?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Source link for `Stat` cards.
|
|
271
|
+
*/
|
|
272
|
+
source?: LinkProps;
|
|
273
|
+
/**
|
|
274
|
+
* 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).
|
|
275
|
+
*/
|
|
276
|
+
dataset?: CardDataset;
|
|
277
|
+
}
|
|
278
|
+
interface EventDate {
|
|
279
|
+
unix?: string;
|
|
280
|
+
human?: string;
|
|
281
|
+
}
|
|
282
|
+
interface CardDataset {
|
|
283
|
+
content?: DataContent;
|
|
284
|
+
files?: DataFile;
|
|
285
|
+
links?: DataLink;
|
|
286
|
+
cta?: Cta;
|
|
287
|
+
}
|
|
288
|
+
interface DataContent {
|
|
289
|
+
items?: Array<ContentItem>;
|
|
290
|
+
}
|
|
291
|
+
interface ContentItem {
|
|
292
|
+
label?: string;
|
|
293
|
+
copy?: string;
|
|
294
|
+
}
|
|
295
|
+
interface DataFile {
|
|
296
|
+
headline?: string;
|
|
297
|
+
items?: Array<LinkProps>;
|
|
298
|
+
}
|
|
299
|
+
interface DataLink {
|
|
300
|
+
headline?: string;
|
|
301
|
+
items?: Array<LinkProps>;
|
|
302
|
+
}
|
|
303
|
+
interface Cta {
|
|
304
|
+
headline?: string;
|
|
305
|
+
items?: Array<LinkProps>;
|
|
306
|
+
}
|
|
307
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import FeatureCard from "./FeatureCard";
|
|
2
|
+
import DataCard from "./DataCard";
|
|
3
|
+
import DetailCard from "./DetailCard";
|
|
4
|
+
import FactlistCard from "./FactlistCard";
|
|
5
|
+
import MultilinkCard from "./MultilinkCard";
|
|
6
|
+
import PromoCard from "./PromoCard";
|
|
7
|
+
import StatCard from "./StatCard";
|
|
8
|
+
import TextCard from "./TextCard";
|
|
9
|
+
export { FeatureCard, DataCard, DetailCard, FactlistCard, MultilinkCard, PromoCard, StatCard, TextCard, };
|
|
10
|
+
export { default as Card } from "./Card";
|
|
11
|
+
export { default as CardGroup } from "./CardGroup";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TabsProps } from "./Tabs.props";
|
|
2
|
+
/**
|
|
3
|
+
* Sample prop definitions for Button's enumerable properties (imported in stories and tests).
|
|
4
|
+
*/
|
|
5
|
+
declare const TabsArgs: {
|
|
6
|
+
tabs: TabsProps;
|
|
7
|
+
withIcon: TabsProps;
|
|
8
|
+
fiveItems: TabsProps;
|
|
9
|
+
};
|
|
10
|
+
export default TabsArgs;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IconProps } from "../Icon/Icon.props";
|
|
2
|
+
export interface TabsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the items inside a tab
|
|
5
|
+
*/
|
|
6
|
+
items: Required<Array<TabItem>>;
|
|
7
|
+
}
|
|
8
|
+
export interface TabItem {
|
|
9
|
+
icon?: IconProps;
|
|
10
|
+
label: Required<string>;
|
|
11
|
+
content: Required<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tabs } from "./Tabs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
1
|
import { VideoProps } from "./Video.props";
|
|
3
|
-
|
|
2
|
+
import { VideoPlayerRef } from "./VideoPlayer.props";
|
|
3
|
+
declare const Video: import("react").ForwardRefExoticComponent<VideoProps & import("react").RefAttributes<VideoPlayerRef>>;
|
|
4
4
|
export default Video;
|
|
@@ -1,51 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VideoPlayerControls } from "./VideoPlayer.props";
|
|
2
2
|
export interface Poster {
|
|
3
|
-
|
|
4
|
-
src: string;
|
|
5
|
-
}[];
|
|
3
|
+
src: string;
|
|
6
4
|
alt: string;
|
|
7
5
|
}
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
-
* Specify the label for the fullscreen button
|
|
11
|
-
*/
|
|
12
|
-
fullscreen?: Required<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Specify the label for the play button
|
|
15
|
-
*/
|
|
16
|
-
play?: Required<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Specify the label for the pause button
|
|
19
|
-
*/
|
|
20
|
-
pause?: Required<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Specify the label for the volume button
|
|
23
|
-
*/
|
|
24
|
-
volume?: Required<string>;
|
|
25
|
-
}
|
|
26
|
-
interface Video {
|
|
6
|
+
export interface VideoProps {
|
|
7
|
+
src: string;
|
|
27
8
|
/**
|
|
28
9
|
* Specify the strings to be used as labels for the video controls
|
|
29
10
|
*/
|
|
30
|
-
controls?:
|
|
31
|
-
/**
|
|
32
|
-
* if self-hosted, specify the url of this video
|
|
33
|
-
*/
|
|
34
|
-
src?: string | null;
|
|
35
|
-
/**
|
|
36
|
-
* if there are closed-caption tracks,
|
|
37
|
-
*/
|
|
38
|
-
tracks?: TracksConfig[];
|
|
11
|
+
controls?: VideoPlayerControls;
|
|
39
12
|
/**
|
|
40
13
|
* if YouTube, set to true
|
|
41
14
|
*/
|
|
42
15
|
youtube?: boolean;
|
|
43
|
-
}
|
|
44
|
-
export interface VideoProps {
|
|
45
|
-
/**
|
|
46
|
-
* Specify the alt for the image
|
|
47
|
-
*/
|
|
48
|
-
alt: string;
|
|
49
16
|
/**
|
|
50
17
|
* Specify the caption for the image/video
|
|
51
18
|
*/
|
|
@@ -58,9 +25,4 @@ export interface VideoProps {
|
|
|
58
25
|
* Specify the image src for the image
|
|
59
26
|
*/
|
|
60
27
|
poster?: Poster;
|
|
61
|
-
/**
|
|
62
|
-
* Specify whether there is a video being shown
|
|
63
|
-
*/
|
|
64
|
-
video: Video;
|
|
65
28
|
}
|
|
66
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { VideoPlayerProps } from "./VideoPlayer.props";
|
|
3
|
-
declare const VideoPlayer:
|
|
1
|
+
import "videojs-youtube";
|
|
2
|
+
import { VideoPlayerProps, VideoPlayerRef } from "./VideoPlayer.props";
|
|
3
|
+
declare const VideoPlayer: import("react").ForwardRefExoticComponent<VideoPlayerProps & import("react").RefAttributes<VideoPlayerRef>>;
|
|
4
4
|
export default VideoPlayer;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Poster } from "./Video.props";
|
|
2
|
+
import videojs from "video.js";
|
|
3
|
+
export interface VideoPlayerRef {
|
|
4
|
+
player: videojs.Player | undefined;
|
|
5
|
+
}
|
|
2
6
|
export interface VideoPlayerControls {
|
|
3
7
|
/**
|
|
4
8
|
* Specify the label for the fullscreen button
|
|
@@ -17,25 +21,8 @@ export interface VideoPlayerControls {
|
|
|
17
21
|
*/
|
|
18
22
|
volume: string;
|
|
19
23
|
}
|
|
20
|
-
export interface TracksConfig {
|
|
21
|
-
/**
|
|
22
|
-
* is this the default track?
|
|
23
|
-
*/
|
|
24
|
-
default?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* What kind of track is it?
|
|
27
|
-
*/
|
|
28
|
-
kind?: string;
|
|
29
|
-
/**
|
|
30
|
-
* url for the track
|
|
31
|
-
*/
|
|
32
|
-
src?: string;
|
|
33
|
-
/**
|
|
34
|
-
* language of the track
|
|
35
|
-
*/
|
|
36
|
-
srcLang?: string;
|
|
37
|
-
}
|
|
38
24
|
export interface VideoPlayerProps {
|
|
25
|
+
src: string;
|
|
39
26
|
/**
|
|
40
27
|
* Specify an optional className to be added to your Media.
|
|
41
28
|
*/
|
|
@@ -43,23 +30,11 @@ export interface VideoPlayerProps {
|
|
|
43
30
|
/**
|
|
44
31
|
* Specify the strings to be used as labels for the video controls
|
|
45
32
|
*/
|
|
46
|
-
controls?:
|
|
47
|
-
/**
|
|
48
|
-
* Specify whether a video is to be shown
|
|
49
|
-
*/
|
|
50
|
-
hasvideo?: Required<boolean>;
|
|
33
|
+
controls?: VideoPlayerControls;
|
|
51
34
|
/**
|
|
52
35
|
* poster image for video
|
|
53
36
|
*/
|
|
54
37
|
poster?: Poster;
|
|
55
|
-
/**
|
|
56
|
-
* if self-hosted, specify the url of this video
|
|
57
|
-
*/
|
|
58
|
-
src?: string | null;
|
|
59
|
-
/**
|
|
60
|
-
* if there are closed-caption tracks,
|
|
61
|
-
*/
|
|
62
|
-
tracks?: Required<Array<TracksConfig>> | null;
|
|
63
38
|
/**
|
|
64
39
|
* if YouTube, set to true
|
|
65
40
|
*/
|
|
@@ -36,5 +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 { Card, CardGroup } from "./
|
|
39
|
+
export { Card, CardGroup } from "./Cards";
|
|
40
40
|
export { Breadcrumb } from "./Breadcrumb";
|
|
41
|
+
export { Tabs } from "./Tabs";
|
|
@@ -27,10 +27,10 @@ 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
34
|
export interface FormFieldProps<T> {
|
|
35
35
|
/**
|
|
36
36
|
* 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.12.0",
|
|
4
4
|
"description": "React components for the ILO's Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui_patterns",
|
|
@@ -72,13 +72,14 @@
|
|
|
72
72
|
"classnames": "^2.3.1",
|
|
73
73
|
"dom-helpers": "^5.2.1",
|
|
74
74
|
"nanoid": "^3.3.6",
|
|
75
|
-
"react-player": "2.10.1",
|
|
76
75
|
"react-transition-group": "^4.4.1",
|
|
76
|
+
"video.js": "^7.21.2",
|
|
77
|
+
"videojs-youtube": "^3.0.1",
|
|
77
78
|
"@ilo-org/brand-assets": "0.4.0",
|
|
78
|
-
"@ilo-org/icons-react": "0.0.21",
|
|
79
79
|
"@ilo-org/fonts": "0.1.2",
|
|
80
|
-
"@ilo-org/styles": "0.14.
|
|
81
|
-
"@ilo-org/
|
|
80
|
+
"@ilo-org/styles": "0.14.2",
|
|
81
|
+
"@ilo-org/icons-react": "0.0.21",
|
|
82
|
+
"@ilo-org/themes": "0.7.2",
|
|
82
83
|
"@ilo-org/utils": "0.0.11"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
"@types/node": "^17.0.45",
|
|
108
109
|
"@types/react": "^17.0.11",
|
|
109
110
|
"@types/react-dom": "^17.0.20",
|
|
111
|
+
"@types/video.js": "7",
|
|
110
112
|
"http-server": "^14.1.0",
|
|
111
113
|
"identity-obj-proxy": "^3.0.0",
|
|
112
114
|
"jest-environment-jsdom": "27.5.1",
|
|
@@ -132,8 +134,8 @@
|
|
|
132
134
|
"tslib": "^2.3.1",
|
|
133
135
|
"vite": "^4.5.2",
|
|
134
136
|
"@ilo-org/eslint-config": "0.1.0",
|
|
135
|
-
"@ilo-org/
|
|
136
|
-
"@ilo-org/
|
|
137
|
+
"@ilo-org/prettier-config": "0.0.2",
|
|
138
|
+
"@ilo-org/typescript-config": "0.0.1"
|
|
137
139
|
},
|
|
138
140
|
"peerDependencies": {
|
|
139
141
|
"react": ">16",
|